From 7cc17001e974d9ff7d7ce042c4e2ad2e8ec0e55e Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Tue, 7 Jan 2025 20:47:29 +0100 Subject: dashboard/app: add targeting controls to the coverage page It allows to control known parameters: 1. Period (months or days). 2. Target subsystem. 3. Target manager. And adds the disabled "Only unique" checkbox. --- dashboard/app/static/coverage.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'dashboard/app/static/coverage.js') diff --git a/dashboard/app/static/coverage.js b/dashboard/app/static/coverage.js index 16eb4fcd7..5a17ad0a9 100644 --- a/dashboard/app/static/coverage.js +++ b/dashboard/app/static/coverage.js @@ -1,7 +1,8 @@ // Copyright 2024 syzkaller project authors. All rights reserved. // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. -initTogglers(); +$(document).ready(initTogglers()); +$(document).ready(initUpdateForm); // Initializes the file tree onClick collapse logic. function initTogglers(){ @@ -11,6 +12,14 @@ function initTogglers(){ }); } +function initUpdateForm(){ + var curUrlParams = new URLSearchParams(window.location.search); + $('#target-period').val(curUrlParams.get('period')); + $('#target-subsystem').val(curUrlParams.get('subsystem')); + $('#target-manager').val(curUrlParams.get('manager')); + $("#only-unique").prop("checked", curUrlParams.get('subsystem') == "1"); +} + // This handler is called when user clicks on the coverage percentage. // It downloads the kernel file coverage html block and adjust page to show it. // "#file-content-prev" and "#file-content-curr" are the file content
s. -- cgit mrf-deployment