diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-07-22 19:32:35 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-07-22 18:25:37 +0000 |
| commit | 708c10c4c13e9c045b11491f72d92ff75f853d00 (patch) | |
| tree | 1cf84fe79d0ebe1259269f91bafbbf032b756d6c | |
| parent | 27981d31754e51f9084eec50f1f9bf31883d70e3 (diff) | |
dashboard/app: check subsystems coverage enabled
| -rw-r--r-- | dashboard/app/main.go | 4 | ||||
| -rw-r--r-- | 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</a> <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage_heatmap" $.Namespace)}}_selected{{end}}" href="/{{$.Namespace}}/graph/coverage_heatmap">Repo Heatmap</a> - <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage_subsystems_heatmap" $.Namespace)}}_selected{{end}}" - href="/{{$.Namespace}}/graph/coverage_subsystems_heatmap">Subsystems Heatmap</a> + {{ if .ShowSubsystems }} + <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage_subsystems_heatmap" $.Namespace)}}_selected{{end}}" + href="/{{$.Namespace}}/graph/coverage_subsystems_heatmap">Subsystems Heatmap</a> + {{ end }} </div> </div> {{end}} |
