diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-10-09 13:07:14 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-10-17 07:26:38 +0000 |
| commit | 03f955c333876a30a020002473aa2bda3c123681 (patch) | |
| tree | 7f16e45e710db7eea01ee6d109dd17f6d67717bf /syz-cluster/dashboard | |
| parent | e18aa5057febfc3f9f61c8755234e361528def0e (diff) | |
syz-cluster: display the reports count graph
Apart from just the total number of findings (some of which may end up
being non-reported), also display specifically the number of reports
that have found their way to the mailing lists.
Diffstat (limited to 'syz-cluster/dashboard')
| -rw-r--r-- | syz-cluster/dashboard/handler.go | 5 | ||||
| -rw-r--r-- | syz-cluster/dashboard/templates/graphs.html | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/syz-cluster/dashboard/handler.go b/syz-cluster/dashboard/handler.go index 2212bd959..58edd5c39 100644 --- a/syz-cluster/dashboard/handler.go +++ b/syz-cluster/dashboard/handler.go @@ -218,6 +218,7 @@ func (h *dashboardHandler) statsPage(w http.ResponseWriter, r *http.Request) err type StatsPageData struct { Processed []*db.CountPerWeek Findings []*db.CountPerWeek + Reports []*db.CountPerWeek Delay []*db.DelayPerWeek Distribution []*db.StatusPerWeek } @@ -231,6 +232,10 @@ func (h *dashboardHandler) statsPage(w http.ResponseWriter, r *http.Request) err if err != nil { return fmt.Errorf("failed to query findings data: %w", err) } + data.Reports, err = h.statsRepo.ReportsPerWeek(r.Context()) + if err != nil { + return fmt.Errorf("failed to query reports data: %w", err) + } data.Delay, err = h.statsRepo.DelayPerWeek(r.Context()) if err != nil { return fmt.Errorf("failed to query delay data: %w", err) diff --git a/syz-cluster/dashboard/templates/graphs.html b/syz-cluster/dashboard/templates/graphs.html index e972b81ca..c4da3289f 100644 --- a/syz-cluster/dashboard/templates/graphs.html +++ b/syz-cluster/dashboard/templates/graphs.html @@ -19,6 +19,15 @@ <hr class="my-4"> <div class="chart-wrapper mb-4"> + <h2 class="h4">Reports (weekly)</h2> + <p class="text-muted small">How many reports with findings have been published.</p> + <div id="reports_chart_div" style="width: 100%; height: 400px;"></div> + <p class="text-muted small">Click and drag to zoom into a time range. Right-click to reset.</p> + </div> + + <hr class="my-4"> + + <div class="chart-wrapper mb-4"> <h2 class="h4">Wait Time before Fuzzing (avg hours, weekly)</h2> <p class="text-muted small">How many hours have passed since the moment the series was published and the moment we started fuzzing it.</p> <div id="avg_wait_chart_div" style="width: 100%; height: 400px;"></div> @@ -67,9 +76,16 @@ {{end}} ]; + const reportsData = [ + {{range .Reports}} + [new Date({{.Date.Format "2006-01-02"}}), {{.Count}}], + {{end}} + ]; + function drawAllCharts() { drawChart('processed_chart_div', processedData, '#007bff'); drawChart('findings_chart_div', findingsData, '#dc3545'); + drawChart('reports_chart_div', reportsData, '#dc3545'); drawChart('avg_wait_chart_div', delayData, 'black'); drawDistributionChart(); } |
