ui.topics.topicResourceUsages.ftl Maven / Gradle / Ivy
<#import "../common/util.ftl" as _util_>
<#macro usageHeaderSectionCells>
Expected avg
msg rate
Required expected disk usage
Data IO
#macro>
<#macro usageHeaderCells>
Total
Per broker
Per partition replica
Total from producer
Per partition
Per broker IN
(produce + sync)
Per broker OUT
(sync only)
#macro>
<#macro usageValuesCells optionalResourceRequiredUsages>
<#-- @ftlvariable name="optionalUsages" type="com.infobip.kafkistry.service.OptionalValue" -->
<#if optionalResourceRequiredUsages.value??>
<#assign usages = optionalResourceRequiredUsages.value>
<#if usages.messagesPerSec=0.0>
0 msg/sec
<#elseif usages.messagesPerSec gte 1>
${_util_.prettyNumber(usages.messagesPerSec)+" msg/sec"}
<#else>
<#assign msgFreq = 1 / usages.messagesPerSec>
1 msg every ${_util_.prettyDuration(msgFreq)}
#if>
${_util_.prettyDataSize(usages.totalDiskUsageBytes)}
<#if usages.diskUsagePerBroker??>${_util_.prettyDataSize(usages.diskUsagePerBroker)}<#else>N/A#if>
${_util_.prettyDataSize(usages.diskUsagePerPartitionReplica)}
${_util_.prettyDataSize(usages.bytesPerSec)+"/sec"}
${_util_.prettyDataSize(usages.partitionInBytesPerSec)+"/sec"}
<#if usages.brokerInBytesPerSec??>${_util_.prettyDataSize(usages.brokerInBytesPerSec)+"/sec"}<#else>N/A#if>
<#if usages.brokerSyncBytesPerSec??>${_util_.prettyDataSize(usages.brokerSyncBytesPerSec)+"/sec"}<#else>N/A#if>
<#else>
N/A: ${optionalResourceRequiredUsages.absentReason}
#if>
#macro>