ui.topics.cloneAdd.ftl Maven / Gradle / Ivy
<#-- @ftlvariable name="lastCommit" type="java.lang.String" -->
<#-- @ftlvariable name="topic" type="com.infobip.kafkistry.model.TopicDescription" -->
<#-- @ftlvariable name="existingValues" type="com.infobip.kafkistry.service.ExistingValues" -->
<#-- @ftlvariable name="forceTagForPresence" type="java.lang.Boolean" -->
<#-- @ftlvariable name="enums" type="java.util.Map>" -->
<#include "../commonResources.ftl"/>
<#include "form/topicFormResources.ftl">
Kafkistry: Create new topic by clone
<#include "../commonMenu.ftl">
<#include "../common/backBtn.ftl"> Create new topic by clone
Cloning from topic: ${topic.name}
<#assign tagOnly = forceTagForPresence!false>
<#if tagOnly && topic.presence.type != "TAGGED_CLUSTERS">
Not allowed clone a topic exactly
Source topic uses presence type ${topic.presence.type}
which is not allowed.
Please switch to using cluster tags for defining topic's presence.
Defaulting to presence type TAGGED_CLUSTERS
Source topic's presence was: ${topic.presence.toString()}
<#assign presenceTypes = enums["com.infobip.kafkistry.model.PresenceType"]>
<#list presenceTypes as presenceType, enum>
<#if presenceType.toString() == "TAGGED_CLUSTERS">
<#assign taggedClustersEnum = presenceType>
#if>
#list>
<#assign topic = topic + {'presence': {'type':taggedClustersEnum}}>
#if>
<#assign newName = "">
<#include "form/topicForm.ftl">
<#include "../common/cancelBtn.ftl">
<#include "../common/createPullRequestReminder.ftl">
<#include "../common/serverOpStatus.ftl">
<#include "../common/entityYaml.ftl">
<#include "../common/pageBottom.ftl">