ui.compare.result.ftl Maven / Gradle / Ivy
<#-- @ftlvariable name="compareRequest" type="com.infobip.kafkistry.service.topic.compare.ComparingRequest" -->
<#-- @ftlvariable name="result" type="com.infobip.kafkistry.service.topic.compare.ComparingResult" -->
<#-- @ftlvariable name="legend" type="java.util.Map" -->
<#-- @ftlvariable name="topicConfigDoc" type="java.util.Map" -->
<#import "../common/infoIcon.ftl" as cInfo>
<#import "../common/util.ftl" as util>
<#macro displayValue name comparedValue>
<#-- @ftlvariable name="comparedValue" type="com.infobip.kafkistry.service.topic.compare.ComparedValue" -->
<#assign boldClass = comparedValue.configDefined?then("font-weight-bold", "")>
<#assign value = (comparedValue.value)!'---'>
<#assign cellStyle = "">
<#assign statusClass = "">
<#switch comparedValue.status>
<#case "NOT_PRESENT">
<#assign statusClass = "text-secondary">
<#break>
<#case "MISMATCH">
<#assign statusClass = "text-danger">
<#assign cellStyle = "background-color: #f8d6da;">
<#break>
<#case "HAS_MISMATCH">
<#assign statusClass = "text-primary">
<#assign cellStyle = "background-color: #bfd7ff;">
<#break>
<#case "MATCHING">
<#assign statusClass = "text-dark">
<#break>
<#case "UNDEFINED">
<#assign statusClass = "text-muted font-italic">
<#break>
#switch>
${value}
#macro>
Base:
<#if compareRequest.source.topicName??>
${compareRequest.source.topicName}#if>
<#if compareRequest.source.onClusterIdentifier??>
${compareRequest.source.onClusterIdentifier}#if>
<#list compareRequest.targets as t>
Target ${t?index + 1}:
<#if t.topicName??>
${t.topicName}#if>
<#if t.onClusterIdentifier??>
${t.onClusterIdentifier}#if>
#list>
Status of topic on cluster →
Property ↓
<#list result.inspectionStatusTypes.sourceTypes as statusType>
<@util.namedTypeStatusAlert type = statusType alertInline=false/>
#list>
<#list result.inspectionStatusTypes.targetsTypes as targetTypes>
<#list targetTypes as statusType>
<@util.namedTypeStatusAlert type = statusType alertInline=false/>
#list>
#list>
partition.count
<@displayValue name="" comparedValue=result.partitionCount.source/>
<#list result.partitionCount.targets as t>
<@displayValue name="partition.count" comparedValue=t/>
#list>
replication.factor
<@displayValue name="" comparedValue=result.replicationFactor.source/>
<#list result.replicationFactor.targets as t>
<@displayValue name="replication.factor" comparedValue=t/>
#list>
<#list result.config as key, comparison>
${key} <@cInfo.icon tooltip=(topicConfigDoc[key]?replace('"', "'"))!''/>
<@displayValue name=key comparedValue=comparison.source/>
<#list comparison.targets as t>
<@displayValue name=key comparedValue=t/>
#list>
#list>
Legend
<#list legend as description,comparedValue>
${description}
<@displayValue name="" comparedValue=comparedValue/>
#list>