ui.common.presenceForm.ftl Maven / Gradle / Ivy
<#-- @ftlvariable name="appUrl" type="com.infobip.kafkistry.webapp.url.AppUrl" -->
<#-- @ftlvariable name="kafkistryUser" type="com.infobip.kafkistry.webapp.security.User" -->
<#-- @ftlvariable name="forceTagForPresence" type="java.lang.Boolean" -->
<#-- @ftlvariable name="existingValues" type="com.infobip.kafkistry.service.ExistingValues" -->
<#-- @ftlvariable name="enums" type="java.util.Map>" -->
<#-- @ftlvariable name="presence" type="com.infobip.kafkistry.model.Presence" -->
<#import "infoIcon.ftl" as info>
<#import "documentation.ftl" as doc>
<#assign tagOnly = forceTagForPresence!false>
<#assign disabledPresenceTypeDoc>
<#if tagOnly>
DISABLED:
Only tag based selector should be used
#if>
#assign>
<#assign showAdminForceTagBypass = tagOnly && kafkistryUser?? && kafkistryUser.role.name == "ADMIN">
<#if showAdminForceTagBypass>
<#if showAdminForceTagBypass>
#if>
<#if (presence.type.name())??>
<#if presence.type == "INCLUDED_CLUSTERS" && presence.kafkaClusterIdentifiers?size == 0 && tagOnly>
<#assign presenceType = "TAGGED_CLUSTERS">
<#else>
<#assign presenceType = presence.type.name()>
#if>
<#else>
<#assign presenceType = tagOnly?then("TAGGED_CLUSTERS", "ALL_CLUSTERS")>
#if>
Need new tag?
style="display: none;"#if>>
<#assign selectedClusters = (presence.kafkaClusterIdentifiers)![]>
style="display: none;"#if>>
<#assign selectedTag = (presence.tag)!''>
<#assign noTags = existingValues.tagClusters?size == 0>
<#if noTags>
(no tags exist on cluster(s))
#if>
#if>