ui.topics.inspect.ftl Maven / Gradle / Ivy
<#-- @ftlvariable name="lastCommit" type="java.lang.String" -->
<#-- @ftlvariable name="appUrl" type="com.infobip.kafkistry.webapp.url.AppUrl" -->
<#-- @ftlvariable name="topicName" type="java.lang.String" -->
<#-- @ftlvariable name="topicOwned" type="java.lang.Boolean" -->
<#-- @ftlvariable name="clusterIdentifier" type="java.lang.String" -->
<#-- @ftlvariable name="topicStatus" type="com.infobip.kafkistry.service.topic.TopicClusterStatus" -->
<#-- @ftlvariable name="expectedTopicInfo" type="com.infobip.kafkistry.service.topic.ExpectedTopicInfo" -->
<#-- @ftlvariable name="wrongPartitionValues" type="java.util.List" -->
<#-- @ftlvariable name="clusterInfo" type="com.infobip.kafkistry.kafka.ClusterInfo" -->
<#-- @ftlvariable name="assignmentStatus" type="com.infobip.kafkistry.service.topic.PartitionsAssignmentsStatus" -->
<#-- @ftlvariable name="topicConsumerGroups" type="java.util.List" -->
<#-- @ftlvariable name="topicOffsets" type="com.infobip.kafkistry.service.topic.offsets.TopicOffsets" -->
<#-- @ftlvariable name="topicReplicas" type="com.infobip.kafkistry.kafkastate.TopicReplicaInfos" -->
<#-- @ftlvariable name="partitionReAssignments" type="java.util.Map" -->
<#-- @ftlvariable name="topicResources" type="com.infobip.kafkistry.service.resources.TopicDiskUsage" -->
<#-- @ftlvariable name="kStreamsInvolvement" type="com.infobip.kafkistry.service.kafkastreams.TopicKStreamsInvolvement" -->
<#-- @ftlvariable name="inspectExtensionProperties" type="com.infobip.kafkistry.webapp.TopicInspectExtensionProperties" -->
<#-- @ftlvariable name="autopilotEnabled" type="java.lang.Boolean" -->
<#-- @ftlvariable name="autopilotActions" type="java.util.List" -->
<#include "../commonResources.ftl"/>
<#if inspectExtensionProperties.jsName??>
#if>
Kafkistry: Topic on cluster insect
<#include "../commonMenu.ftl">
<#import "../common/util.ftl" as util_>
<#import "../common/documentation.ftl" as doc_>
<#import "../common/infoIcon.ftl" as info_>
<#import "../consumers/util.ftl" as consumerUtil>
<#import "../sql/sqlQueries.ftl" as sql>
<#include "../common/backBtn.ftl"> Topic on cluster inspection
Topic
<#assign statusTypes = util_.namedTypeListToStringList(topicStatus.status.types)>
<#assign presentInRegistry = !statusTypes?seq_contains("UNKNOWN")>
<#if presentInRegistry>
${topicName}
<#if topicOwned>
<@util_.yourOwned what="topic"/>
#if>
<#else>
${topicName}
#if>
Cluster
${clusterIdentifier}
Last refresh
Topic status on cluster
<#assign topicOnClusterStatus = topicStatus.status>
<#include "../common/topicOnClusterStatus.ftl">
<#if autopilotEnabled>
Autopilot
<#assign actionsSearchTerm = topicName>
<#include "../autopilot/relatedActions.ftl">
#if>
Action
<#assign availableActions = topicStatus.status.availableActions>
<#include "../common/topicOnClusterAction.ftl">
Utilities
Compare...
Consume...
Records structure...
<#if topicOffsets??>
<#include "topicOffsetsStatus.ftl">
#if>
<#if topicStatus.existingTopicInfo?? && clusterInfo??>
<#if (expectedTopicInfo.resourceRequirements)??>
<#import "topicResourceUsages.ftl" as usages>
Resource requirements
<#assign requirements=expectedTopicInfo.resourceRequirements>
Avg message size
Messages rate
Retention
<#assign msgSize = requirements.avgMessageSize>
${msgSize.amount} ${msgSize.unit}
<#assign messagesRate = requirements.messagesRate>
<#if requirements.messagesRateOverrides?keys?seq_contains(clusterIdentifier)>
<#assign messagesRate = requirements.messagesRateOverrides[clusterIdentifier]>
#if>
${messagesRate.amount}
<#switch messagesRate.factor>
<#case "ONE"><#break>
<#case "K">thousand<#break>
<#case "M">million<#break>
<#case "G">billion<#break>
#switch>
messages /
<#switch messagesRate.unit>
<#case "MSG_PER_DAY">day<#break>
<#case "MSG_PER_HOUR">hour<#break>
<#case "MSG_PER_MINUTE">min<#break>
<#case "MSG_PER_SECOND">sec<#break>
#switch>
<#assign retention = requirements.retention>
${retention.amount} ${retention.unit}
<@usages.usageHeaderSectionCells/>
<@usages.usageHeaderCells/>
<@usages.usageValuesCells optionalResourceRequiredUsages=topicStatus.resourceRequiredUsages/>
#if>
<#if topicResources??>
<#include "resources.ftl">
#if>
Topic configuration
Topic ID (uuid)
<#if topicStatus.existingTopicInfo.uuid??>
${topicStatus.existingTopicInfo.uuid}
<#else>
(undefined for old kafka clusters)
#if>
Property
Actual value
Expected value
<#assign wrong = wrongPartitionValues?seq_contains("partition-count")>
Number partitions
class="value-mismatch"#if>>${topicStatus.existingTopicInfo.properties.partitionCount}
class="value-mismatch"#if>>
<#if expectedTopicInfo??>
${expectedTopicInfo.properties.partitionCount}
<#else>
---
#if>
<#assign wrong = wrongPartitionValues?seq_contains("replication-factor")>
Replication factor
class="value-mismatch"#if>>${topicStatus.existingTopicInfo.properties.replicationFactor}
class="value-mismatch"#if>>
<#if expectedTopicInfo??>
${expectedTopicInfo.properties.replicationFactor}
<#else>
---
#if>
<#assign config = topicStatus.existingTopicInfo.config>
<#assign configEntryStatuses = topicStatus.configEntryStatuses!{}>
<#assign expectedConfig = (expectedTopicInfo.config)!{}>
<#assign showExpected = true>
<#include "../common/existingConfig.ftl">
Consumer groups (${topicConsumerGroups?size})
<#if topicConsumerGroups?size == 0>
(no consumer groups reading from this topic)
<#else>
Group
Status
Lag
<@consumerUtil.lagDoc/>
<@consumerUtil.lagPercentDoc/>
<#list topicConsumerGroups as consumerGroup>
${consumerGroup.groupId}
<@util.namedTypeStatusAlert type=consumerGroup.status small=true/>
<#list consumerGroup.topicMembers as topicMember>
<#if topicMember.topicName == topicName>
<@util.namedTypeStatusAlert type=topicMember.lag.status small=true/>
${topicMember.lag.amount!'N/A'}
<#if topicMember.lag.percentage??>
<#if topicMember.lag.percentage?is_infinite>
((inf)
%)
<#else>
(${util.prettyNumber(topicMember.lag.percentage)}%)
#if>
#if>
#if>
#list>
#list>
#if>
<#assign numKStreamApps = kStreamsInvolvement.inputOf?size + ((kStreamsInvolvement.internalIn)??)?then(1, 0)>
KStream applications (${numKStreamApps})
<#if kStreamsInvolvement.inputOf?size == 0 && !(kStreamsInvolvement.internalIn)??>
(not involved in KStreams)
<#else>
KStream App
This topic involved as
<#list kStreamsInvolvement.inputOf as kStreamApp>
${kStreamApp.kafkaStreamAppId}
INPUT
#list>
<#if kStreamsInvolvement.internalIn??>
<#assign kStreamApp = kStreamsInvolvement.internalIn>
${kStreamApp.kafkaStreamAppId}
INTERNAL
#if>
#if>
<#assign affectingAcls = topicStatus.status.affectingAclRules>
<#include "../acls/affectingAcls.ftl">
<#if inspectExtensionProperties.templateName??>
<#assign nameTemplate = '<#include "${inspectExtensionProperties.templateName}.ftl">'?interpret>
<@nameTemplate/>
#if>
<#include "partitionStats.ftl">
<#assign partitionsAssignments = topicStatus.existingTopicInfo.partitionsAssignments>
<#assign assignmentsDisbalance = topicStatus.existingTopicInfo.assignmentsDisbalance>
<#if (topicOffsets.partitionsOffsets)??>
<#assign partitionOffsets = topicOffsets.partitionsOffsets>
#if>
<#include "partitionReplicaAssignments.ftl">
<#assign reAssignmentInProgress = partitionReAssignments?? && partitionReAssignments?size gt 0>
<#if reAssignmentInProgress>
<@sql.topicReassignmeentProgress cluster=clusterInfo.identifier topic=topicName/>
Change throttle rate...
#if>
<#assign noAutoBack = true>
<#include "../common/serverOpStatus.ftl">
<#if reAssignmentInProgress>
#if>
<#else>
(no data for selected cluster)
#if>
<#include "../common/backBtn.ftl">
<#include "../common/pageBottom.ftl">