Skip to content

Commit 31165de

Browse files
committed
dashboard/app: auto-disable unique coverage checkbox for "*" managers
1 parent 08fa855 commit 31165de

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dashboard/app/static/coverage.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ function initTogglers(){
1313
}
1414

1515
function initUpdateForm(){
16+
$('#target-manager').change(function() {
17+
if ($(this).val() === '') { // selected "*"
18+
$("#unique-only").prop("checked", false);
19+
$('#unique-only').prop('disabled', true);
20+
} else {
21+
$('#unique-only').prop('disabled', false);
22+
}
23+
});
24+
1625
var curUrlParams = new URLSearchParams(window.location.search);
1726
$('#target-period').val(curUrlParams.get('period'));
1827
if (curUrlParams.get('period_count') != null) {
@@ -21,6 +30,7 @@ function initUpdateForm(){
2130
$('#target-subsystem').val(curUrlParams.get('subsystem'));
2231
$('#target-manager').val(curUrlParams.get('manager'));
2332
$("#unique-only").prop("checked", curUrlParams.get('unique-only') == "1");
33+
$('#unique-only').prop('disabled', $('#target-manager').val() == '');
2434
}
2535

2636
// This handler is called when user clicks on the coverage percentage.

0 commit comments

Comments
 (0)