From 708c10c4c13e9c045b11491f72d92ff75f853d00 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Mon, 22 Jul 2024 19:32:35 +0200 Subject: dashboard/app: check subsystems coverage enabled --- dashboard/app/main.go | 4 +++- dashboard/app/templates/templates.html | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dashboard/app/main.go b/dashboard/app/main.go index 21530c67c..c9d1e658d 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -67,7 +67,9 @@ func initHTTPHandlers() { if nsConfig.Coverage != nil { http.Handle("/"+ns+"/graph/coverage", handlerWrapper(handleCoverageGraph)) http.Handle("/"+ns+"/graph/coverage_heatmap", handlerWrapper(handleCoverageHeatmap)) - http.Handle("/"+ns+"/graph/coverage_subsystems_heatmap", handlerWrapper(handleSubsystemsCoverageHeatmap)) + if nsConfig.Subsystems.Service != nil { + http.Handle("/"+ns+"/graph/coverage_subsystems_heatmap", handlerWrapper(handleSubsystemsCoverageHeatmap)) + } } http.Handle("/"+ns+"/repos", handlerWrapper(handleRepos)) http.Handle("/"+ns+"/bug-summaries", handlerWrapper(handleBugSummaries)) diff --git a/dashboard/app/templates/templates.html b/dashboard/app/templates/templates.html index 0fb915c83..37ea44d7a 100644 --- a/dashboard/app/templates/templates.html +++ b/dashboard/app/templates/templates.html @@ -111,8 +111,10 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the href="/{{$.Namespace}}/graph/coverage">Total Repo Heatmap - Subsystems Heatmap + {{ if .ShowSubsystems }} + Subsystems Heatmap + {{ end }} {{end}} -- cgit mrf-deployment