All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ui.clusters.dryRunInspect.ftl Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
<#-- @ftlvariable name="appUrl" type="com.infobip.kafkistry.webapp.url.AppUrl" -->
<#-- @ftlvariable name="clusterIdentifier" type="java.lang.String" -->
<#-- @ftlvariable name="clusterDryRunInspect" type="com.infobip.kafkistry.service.cluster.ClusterDryRunInspect" -->

<#import "../common/util.ftl" as util>
<#import "../quotas/util.ftl" as quotaUtil>

<#if clusterDryRunInspect.errors?size gt 0>
    

WARNING Having ${clusterDryRunInspect.errors?size} errors

<#list clusterDryRunInspect.errors as error>
${error}

Current disk resource usage

<#assign clusterResources = clusterDryRunInspect.clusterDiskUsageBefore> <#include "resourcesInspect.ftl">

Effective disk resource usage

<#assign clusterResources = clusterDryRunInspect.clusterDiskUsageAfter> <#include "resourcesInspect.ftl">

Diff disk resource usage (effective vs. current)

<#assign clusterResources = clusterDryRunInspect.clusterDiskUsageDiff> <#assign diffModeEnabled = true> <#include "resourcesInspect.ftl"> <#assign diffModeEnabled = false>
<#macro showDiff diff stateClass> <#switch stateClass> <#case "alert-danger"> <#case "alert-warnig"> <#assign sentiment = "NEGATIVE"> <#break> <#case "alert-success"> <#assign sentiment = "POSITIVE"> <#break> <#default> <#assign sentiment = "NEUTRAL"> <#assign textClass = ""> <#if sentiment == "NEGATIVE" && (diff gt 0)> <#assign textClass = "text-danger"> <#elseif sentiment == "NEGATIVE" && (diff lt 0)> <#assign textClass = "text-success"> <#elseif sentiment == "POSITIVE" && (diff gt 0)> <#assign textClass = "text-success"> <#elseif sentiment == "POSITIVE" && (diff lt 0)> <#assign textClass = "text-danger"> <#else> <#if diff gt 0> <#assign textClass = "text-primary"> <#else> <#assign textClass = "text-info"> <#if diff gt 0> +${diff} <#elseif diff lt 0> ${diff} <#else> ---
<#macro topicsList topics title topicDisks> <#-- @ftlvariable name="topicDisks" type="java.util.Map>" -->
<#list topics as topic> <#if (topicDisks[topic].value)??> <#assign topicDisk = topicDisks[topic].value> <#assign diffModeEnabled = true> <#assign diffModeEnabled = false> <#else>
Topic Replica count diff Actual usage diff Possible usage diff Unbounded usage diff
${topic} ${util.numberToString(topicDisk.combined.replicasCount, true)} <#if topicDisk.combined.actualUsedBytes??> ${util.prettyDataSize(topicDisk.combined.actualUsedBytes, true)} <#else> --- <#if topicDisk.combined.retentionBoundedBytes??> ${util.prettyDataSize(topicDisk.combined.retentionBoundedBytes, true)} <#else> --- <#if topicDisk.combined.unboundedUsageBytes??> ${util.prettyDataSize(topicDisk.combined.unboundedUsageBytes, true)} <#else> --- <#if (topicDisks[topic].absentReason)??>
${topicDisks[topic].absentReason}
<#else> ---
<#macro aclsList acls title>
<#macro quotasList quotas title>
<#assign topicsDiff = clusterDryRunInspect.topicsDiff>

Topics diff

<#if topicsDiff.problems?size gt 0>

WARNING Having ${topicsDiff.problems?size} problems

<#list topicsDiff.problems as problem>
${problem}

<#list topicsDiff.statusCounts as stateTypeCountDiff> <#assign stateType = stateTypeCountDiff.type> <#assign countDiff = stateTypeCountDiff.quantity>
Topic status type Current count Count after Diff
<#assign stateClass = util.levelToHtmlClass(stateType.level)>
${stateType.name}
${countDiff.before} ${countDiff.after} <@showDiff diff = countDiff.diff stateClass = stateClass/>
<#if topicsDiff.topicsToCreate?size gt 0> <@topicsList topics=topicsDiff.topicsToCreate title="topics to create" topicDisks=topicsDiff.topicDiskUsages/> <#if topicsDiff.topicsToDelete?size gt 0> <@topicsList topics=clusterDryRunInspect.topicsDiff.topicsToDelete title="topics to delete" topicDisks=topicsDiff.topicDiskUsages/> <#if topicsDiff.topicsToReconfigure?size gt 0> <@topicsList topics=topicsDiff.topicsToReconfigure title="topics to re-configure" topicDisks=topicsDiff.topicDiskUsages/> <#if clusterDryRunInspect.topicsDiff.topicsToReScale?size gt 0> <@topicsList topics=topicsDiff.topicsToReScale title="topics to re-scale" topicDisks=topicsDiff.topicDiskUsages/>

ACLs diff

<#list clusterDryRunInspect.aclsDiff.statusCounts as stateTypeCountDiff> <#assign stateType = stateTypeCountDiff.type> <#assign countDiff = stateTypeCountDiff.quantity>
ACL status type Current count Count after Diff
<#assign stateClass = util.levelToHtmlClass(stateType.level)>
${stateType.name}
${countDiff.before} ${countDiff.after} <@showDiff diff = countDiff.diff stateClass = stateClass/>
<#if clusterDryRunInspect.aclsDiff.aclsToCreate?size gt 0> <@aclsList acls=clusterDryRunInspect.aclsDiff.aclsToCreate title="ACLs to create"/> <#if clusterDryRunInspect.aclsDiff.aclsToDelete?size gt 0> <@aclsList acls=clusterDryRunInspect.aclsDiff.aclsToDelete title="ACLs to delete"/>

Quotas diff

<#list clusterDryRunInspect.quotasDiff.statusCounts as stateTypeCountDiff> <#assign stateType = stateTypeCountDiff.type> <#assign countDiff = stateTypeCountDiff.quantity>
Entity quotas status type Current count Count after Diff
<#assign stateClass = util.levelToHtmlClass(stateType.level)>
${stateType.name}
${countDiff.before} ${countDiff.after} <@showDiff diff = countDiff.diff stateClass = stateClass/>
<#if clusterDryRunInspect.quotasDiff.quotasToCreate?size gt 0> <@quotasList quotas=clusterDryRunInspect.quotasDiff.quotasToCreate title="quotas to create"/> <#if clusterDryRunInspect.quotasDiff.quotasToDelete?size gt 0> <@quotasList quotas=clusterDryRunInspect.quotasDiff.quotasToDelete title="quotas to delete"/> <#if clusterDryRunInspect.quotasDiff.quotasToReconfigure?size gt 0> <@quotasList quotas=clusterDryRunInspect.quotasDiff.quotasToReconfigure title="quotas to re-configure"/>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy