All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ui.autopilot.util.ftl Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
<#-- @ftlvariable name="appUrl" type="com.infobip.kafkistry.webapp.url.AppUrl" -->

<#macro outcomeBadge outcomeType>
<#-- @ftlvariable name="outcomeType" type="com.infobip.kafkistry.autopilot.reporting.ActionOutcome.OutcomeType" -->
    <#import "../common/infoIcon.ftl" as info>
    <#assign badgeClass = "">
    <#switch outcomeType>
        <#case "DISABLED">
            <#assign badgeClass = "badge-secondary">
            <#break>
        <#case "CLUSTER_UNSTABLE">
        <#case "BLOCKED">
            <#assign badgeClass = "badge-warning">
            <#break>
        <#case "PENDING">
            <#assign badgeClass = "badge-info">
            <#break>
        <#case "NOT_ACQUIRED">
            <#assign badgeClass = "badge-dark">
            <#break>
        <#case "FAILED">
            <#assign badgeClass = "badge-danger">
            <#break>
        <#case "RESOLVED">
            <#assign badgeClass = "badge-success">
            <#break>
        <#case "SUCCESSFUL">
            <#assign badgeClass = "badge-success">
            <#break>
    
    ${outcomeType} <@info.icon tooltip=outcomeType.doc/>


<#function resolveLink metadata>
<#-- @ftlvariable name="metadata" type="com.infobip.kafkistry.autopilot.binding.ActionMetadata" -->
    <#assign attributes = metadata.attributes>
    <#switch metadata.description.targetType>
        <#case "TOPIC">
            <#return appUrl.topics().showInspectTopicOnCluster(attributes["topicName"], attributes["clusterIdentifier"])>
        <#case "ACL">
            <#return appUrl.acls().showAllPrincipalAcls(attributes["principal"], attributes["aclRule"], attributes["clusterIdentifier"])>
    
    <#return "">




© 2015 - 2024 Weber Informatics LLC | Privacy Policy