ui.clusters.resources.index.ftl Maven / Gradle / Ivy
<#-- @ftlvariable name="appUrl" type="com.infobip.kafkistry.webapp.url.AppUrl" -->
<#-- @ftlvariable name="gitStorageEnabled" type="java.lang.Boolean" -->
<#-- @ftlvariable name="gitBranchBaseUrl" type="java.lang.String" -->
<#-- @ftlvariable name="gitCommitBaseUrl" type="java.lang.String" -->
<#-- @ftlvariable name="gitEmbeddedBrowse" type="java.lang.Boolean" -->
<#-- @ftlvariable name="branch" type="java.lang.String" -->
<#-- @ftlvariable name="clustersDiskUsage" type="java.util.Map>" -->
<#-- @ftlvariable name="clustersDiskUsageOnBranch" type="java.util.Map>" -->
<#-- @ftlvariable name="clustersDiskUsageDiffs" type="java.util.Map>" -->
<#-- @ftlvariable name="clustersBranches" type="java.util.List>" -->
<#-- @ftlvariable name="topicsBranches" type="java.util.List>" -->
<#include "../../commonResources.ftl"/>
Kafkistry: Clusters resources
<#include "../../commonMenu.ftl">
<#import "../../common/util.ftl" as util>
<#import "../../common/infoIcon.ftl" as info>
<#include "../../common/backBtn.ftl"> All Clusters resources
<#macro branchCommits branchRequests>
<#-- @ftlvariable name="branchRequests" type="com.infobip.kafkistry.service.history.BranchRequests extends com.infobip.kafkistry.service.history.PendingRequest>" -->
<#list branchRequests.commits as commitChanges>
<#assign commit = commitChanges.commit>
<#assign tooltipHtml>
${commit.username}
${(commit.timestampSec*1000)?number_to_datetime} UTC
${commit.message}
#assign>
<@info.icon tooltip=tooltipHtml/>
<#if gitCommitBaseUrl??>
<#assign commitUrl = gitCommitBaseUrl + commit.commitId>
target="_blank"#if>
href="${commitUrl}">${commit.commitId?substring(0, 6)}<#if !commitChanges?is_last>, #if>
<#else>
${commit.commitId?substring(0, 6)}<#if !commitChanges?is_last>, #if>
#if>
#list>
#macro>
<#if gitStorageEnabled>
Branch selection:
-
<#if !(branch??)>
SELECTED
#if>
main branch
<#list topicsBranches as topicsBranch>
<#assign url = appUrl.clusters().showClusterResourcesInspectOnBranch(topicsBranch.branch)>
-
<#if topicsBranch.branch == (branch!'')>
SELECTED
#if>
${topicsBranch.branch}
-
Topics:
<#list topicsBranch.requests as topicRequest>
${topicRequest.topicName}<#if topicRequest?has_next>,#if>
#list>
- Commits: <@branchCommits branchRequests=topicsBranch/>
#list>
<#list clustersBranches as clustersBranch>
<#assign url = appUrl.clusters().showClusterResourcesInspectOnBranch(clustersBranch.branch)>
-
<#if clustersBranch.branch == (branch!'')>
SELECTED
#if>
${clustersBranch.branch}
-
Clusters:
<#list clustersBranch.requests as clusterRequest>
${clusterRequest.identifier}<#if clusterRequest?has_next>,#if>
#list>
- Commits: <@branchCommits branchRequests=clustersBranch/>
#list>
#if>
<#if branch??>
<#assign branchDisplay>
<#if gitBranchBaseUrl??>
<#assign url = gitBranchBaseUrl + branch?url>
${branch}
<#elseif gitEmbeddedBrowse>
${branch}
<#else>
'${branch}'
#if>
#assign>
Showing resources for branch ${branchDisplay}
<#else>
Showing current resources
#if>
<#assign collapseEnabled = true>
<#list clustersDiskUsage as clusterIdentifier, optionalClusterRecources>
<#if (optionalClusterRecources.value)??>
<#assign clusterResources = optionalClusterRecources.value>
<#assign diffModeEnabled = false>
<#assign tableTitle = "Current">
<#assign collapseId = tableTitle + "-"+ clusterIdentifier?url>
<#include "../resourcesInspect.ftl">
<#else>
ERROR
${optionalClusterRecources.absentReason}
#if>
<#if (clustersDiskUsageDiffs)??>
<#if (clustersDiskUsageDiffs?api.get(clusterIdentifier))??>
<#assign optionalClusterRecourcesDiff = clustersDiskUsageDiffs[clusterIdentifier]>
<#if (optionalClusterRecourcesDiff.value)??>
<#assign clusterResources = optionalClusterRecourcesDiff.value>
<#assign diffModeEnabled = true>
<#assign tableTitle = "Diff">
<#assign collapseId = tableTitle + "-"+ clusterIdentifier?url>
<#include "../resourcesInspect.ftl">
<#else>
ERROR
${optionalClusterRecourcesDiff.absentReason}
#if>
<#else>
ERROR Cluster absent in branch
#if>
#if>
<#if (clustersDiskUsageOnBranch)??>
<#if (clustersDiskUsageOnBranch?api.get(clusterIdentifier))??>
<#assign optionalClusterRecourcesBranch = clustersDiskUsageOnBranch[clusterIdentifier]>
<#if (optionalClusterRecourcesBranch.value)??>
<#assign clusterResources = optionalClusterRecourcesBranch.value>
<#assign diffModeEnabled = false>
<#assign tableTitle = "OnBranch">
<#assign collapseId = tableTitle + "-"+ clusterIdentifier?url>
<#include "../resourcesInspect.ftl">
<#else>
ERROR
${optionalClusterRecourcesBranch.absentReason}
#if>
<#else>
ERROR Cluster absent in branch
#if>
#if>
#list>
<#if clustersDiskUsage?size == 0>
(no clusters to show)
#if>
<#include "../../common/pageBottom.ftl">