aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2024-09-10 09:31:37 +0200
committerTaras Madan <tarasmadan@google.com>2024-09-10 08:08:06 +0000
commit67f747a3bcbe7244a637bbb2bf2710c66a44e7b7 (patch)
treedc0248444ad5858979c797d177bad1b045878be1
parent2ee7713dc5bbcc1972f75a1083a7e4d777c45f63 (diff)
dashboard/app: fix url routing bug
No comments. It was an evening code I guess...
-rw-r--r--dashboard/app/main.go7
-rw-r--r--dashboard/app/templates/templates.html6
2 files changed, 6 insertions, 7 deletions
diff --git a/dashboard/app/main.go b/dashboard/app/main.go
index 596b52924..5d11f9951 100644
--- a/dashboard/app/main.go
+++ b/dashboard/app/main.go
@@ -65,11 +65,10 @@ func initHTTPHandlers() {
http.Handle("/"+ns+"/graph/crashes", handlerWrapper(handleGraphCrashes))
http.Handle("/"+ns+"/graph/found-bugs", handlerWrapper(handleFoundBugsGraph))
if nsConfig.Coverage != nil {
- http.Handle("/"+ns+"/graph/coverage?period=quarter", handlerWrapper(handleCoverageGraph))
- http.Handle("/"+ns+"/graph/coverage_heatmap?period=month", handlerWrapper(handleCoverageHeatmap))
+ http.Handle("/"+ns+"/graph/coverage", handlerWrapper(handleCoverageGraph))
+ http.Handle("/"+ns+"/graph/coverage_heatmap", handlerWrapper(handleCoverageHeatmap))
if nsConfig.Subsystems.Service != nil {
- http.Handle("/"+ns+"/graph/coverage_subsystems_heatmap?period=month",
- handlerWrapper(handleSubsystemsCoverageHeatmap))
+ http.Handle("/"+ns+"/graph/coverage_subsystems_heatmap", handlerWrapper(handleSubsystemsCoverageHeatmap))
}
}
http.Handle("/"+ns+"/repos", handlerWrapper(handleRepos))
diff --git a/dashboard/app/templates/templates.html b/dashboard/app/templates/templates.html
index 37ea44d7a..b776f4bcd 100644
--- a/dashboard/app/templates/templates.html
+++ b/dashboard/app/templates/templates.html
@@ -108,12 +108,12 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the
<button class="dropbtn"><span style="color:DarkOrange;">📈</span>Coverage</button>
<div class="dropdown-content">
<a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage" $.Namespace)}}_selected{{end}}"
- href="/{{$.Namespace}}/graph/coverage">Total</a>
+ href="/{{$.Namespace}}/graph/coverage?period=quarter">Total</a>
<a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage_heatmap" $.Namespace)}}_selected{{end}}"
- href="/{{$.Namespace}}/graph/coverage_heatmap">Repo&nbsp;Heatmap</a>
+ href="/{{$.Namespace}}/graph/coverage_heatmap?period=month">Repo&nbsp;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&nbsp;Heatmap</a>
+ href="/{{$.Namespace}}/graph/coverage_subsystems_heatmap?period=month">Subsystems&nbsp;Heatmap</a>
{{ end }}
</div>
</div>