aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2025-01-28 19:43:26 +0100
committerTaras Madan <tarasmadan@google.com>2025-01-29 10:56:34 +0000
commit31165dea2b2f4d284667ecf29d84eb8e1394449e (patch)
tree7d2e3c27b552e59e283db4669dff3f0f0760b27e /dashboard/app
parent08fa85537e8a8061e232de5e22b52e8304ec0ce9 (diff)
dashboard/app: auto-disable unique coverage checkbox for "*" managers
Diffstat (limited to 'dashboard/app')
-rw-r--r--dashboard/app/static/coverage.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/dashboard/app/static/coverage.js b/dashboard/app/static/coverage.js
index 8a5190b90..dbc68b7c0 100644
--- a/dashboard/app/static/coverage.js
+++ b/dashboard/app/static/coverage.js
@@ -13,6 +13,15 @@ function initTogglers(){
}
function initUpdateForm(){
+ $('#target-manager').change(function() {
+ if ($(this).val() === '') { // selected "*"
+ $("#unique-only").prop("checked", false);
+ $('#unique-only').prop('disabled', true);
+ } else {
+ $('#unique-only').prop('disabled', false);
+ }
+ });
+
var curUrlParams = new URLSearchParams(window.location.search);
$('#target-period').val(curUrlParams.get('period'));
if (curUrlParams.get('period_count') != null) {
@@ -21,6 +30,7 @@ function initUpdateForm(){
$('#target-subsystem').val(curUrlParams.get('subsystem'));
$('#target-manager').val(curUrlParams.get('manager'));
$("#unique-only").prop("checked", curUrlParams.get('unique-only') == "1");
+ $('#unique-only').prop('disabled', $('#target-manager').val() == '');
}
// This handler is called when user clicks on the coverage percentage.