ui.topics.form.topicResourceRequirements.ftl Maven / Gradle / Ivy
<#-- @ftlvariable name="existingValues" type="com.infobip.kafkistry.service.ExistingValues" -->
<#-- @ftlvariable name="resourceRequirements" type="com.infobip.kafkistry.model.ResourceRequirements" -->
<#import "topicFormConfigComponents.ftl" as comp>
<#macro msgRate rate, rateFactor, rateUnit>
#macro>
<#macro msgRateOverride cluster tag rate rateFactor rateUnit>
#macro>
<#macro retention durationAmount retentionUnit>
#macro>
<#macro retentionOverride cluster tag durationAmount retentionUnit>
<@comp.commonLocComp.selectLocation selectedIdentifier=cluster selectedTag=tag />
<@retention durationAmount=durationAmount retentionUnit=retentionUnit />
#macro>
<#assign unit = (resourceRequirements.avgMessageSize.unit.name())!''>
<#assign retentionAmount = (resourceRequirements.retention.amount?c)!''>
<#assign retentionUnit = (resourceRequirements.retention.unit.name())!'DAYS'>
All clusters
<@retention durationAmount=retentionAmount retentionUnit=retentionUnit />
<#if resourceRequirements??>
<#list resourceRequirements.retentionTagOverrides as tag, dataRetention>
<@retentionOverride cluster="" tag=tag
durationAmount=dataRetention.amount?c retentionUnit=dataRetention.unit.name()/>
#list>
<#list resourceRequirements.retentionOverrides as clusterIdentifier, dataRetention>
<@retentionOverride cluster=clusterIdentifier tag=""
durationAmount=dataRetention.amount?c retentionUnit=dataRetention.unit.name()/>
#list>
#if>