diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-01-29 10:06:00 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-01-31 14:06:26 +0000 |
| commit | aa47157c8ec3df5a6d16e3866b095c8f91026465 (patch) | |
| tree | ba6846ab62f0863d4e1b3294577563e4fffd35a3 /pkg | |
| parent | 4c6ac32f33aa00c680c8f4656d1fbf2887f390f1 (diff) | |
dashboard/app: change coverage links
It will simplify the json API links.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/cover/heatmap.go | 2 | ||||
| -rw-r--r-- | pkg/cover/heatmap_test.go | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/pkg/cover/heatmap.go b/pkg/cover/heatmap.go index ce98113cf..f02ee132f 100644 --- a/pkg/cover/heatmap.go +++ b/pkg/cover/heatmap.go @@ -101,7 +101,7 @@ func (thm *templateHeatmapRow) prepareDataFor(pageColumns []pageColumnTarget, sk thm.instrumented[tp], thm.covered[tp])) if !thm.IsDir { thm.FileCoverageLink = append(thm.FileCoverageLink, - fmt.Sprintf("/graph/coverage/file?dateto=%s&period=%s&commit=%s&filepath=%s", + fmt.Sprintf("/coverage/file?dateto=%s&period=%s&commit=%s&filepath=%s", tp.DateTo.String(), tp.Type, pageColumn.Commit, diff --git a/pkg/cover/heatmap_test.go b/pkg/cover/heatmap_test.go index 3a90dba10..60660b0a0 100644 --- a/pkg/cover/heatmap_test.go +++ b/pkg/cover/heatmap_test.go @@ -292,7 +292,7 @@ func TestFilesCoverageToTemplateData(t *testing.T) { "Instrumented:\t1 blocks\nCovered:\t1 blocks", }, FileCoverageLink: []string{ - "/graph/coverage/file?dateto=2024-07-01&period=day&commit=commit1&filepath=file1"}, + "/coverage/file?dateto=2024-07-01&period=day&commit=commit1&filepath=file1"}, }, }, Name: "", @@ -341,8 +341,8 @@ func TestFilesCoverageToTemplateData(t *testing.T) { "Instrumented:\t0 blocks\nCovered:\t0 blocks", }, FileCoverageLink: []string{ - "/graph/coverage/file?dateto=2024-07-01&period=day&commit=commit1&filepath=dir/file1", - "/graph/coverage/file?dateto=2024-07-02&period=day&commit=commit2&filepath=dir/file1"}, + "/coverage/file?dateto=2024-07-01&period=day&commit=commit1&filepath=dir/file1", + "/coverage/file?dateto=2024-07-02&period=day&commit=commit2&filepath=dir/file1"}, }, { Name: "file2", @@ -355,8 +355,8 @@ func TestFilesCoverageToTemplateData(t *testing.T) { "Instrumented:\t1 blocks\nCovered:\t0 blocks", }, FileCoverageLink: []string{ - "/graph/coverage/file?dateto=2024-07-01&period=day&commit=commit1&filepath=dir/file2", - "/graph/coverage/file?dateto=2024-07-02&period=day&commit=commit2&filepath=dir/file2"}, + "/coverage/file?dateto=2024-07-01&period=day&commit=commit1&filepath=dir/file2", + "/coverage/file?dateto=2024-07-02&period=day&commit=commit2&filepath=dir/file2"}, }, }, Name: "dir", |
