Skip to content

Commit 0b506a4

Browse files
author
Michael Schwarz
committed
Add select all / none checkbox to metric selection in job view
1 parent 83a3a21 commit 0b506a4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

web/frontend/public/global.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,7 @@ footer {
7070
margin: 0rem 0.8rem;
7171
white-space: nowrap;
7272
}
73+
74+
.modal {
75+
--bs-modal-width: 600px;
76+
}

web/frontend/src/generic/select/MetricSelection.svelte

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,18 @@
129129
}
130130
});
131131
}
132+
133+
let selected = []
134+
function toggleAll(e) {
135+
unorderedMetrics = e.target.checked ? [...newMetricsOrder] : [];
136+
}
137+
132138
</script>
133139
134140
<Modal {isOpen} toggle={() => (isOpen = !isOpen)}>
135141
<ModalHeader>Configure columns (Metric availability shown)</ModalHeader>
136142
<ModalBody>
143+
<input type="checkbox" on:change={toggleAll} checked={selected.length == newMetricsOrder.length} /> (De-)select all
137144
<ListGroup>
138145
{#if footprintSelect}
139146
<li class="list-group-item">
@@ -154,13 +161,15 @@
154161
{#if unorderedMetrics.includes(metric)}
155162
<input
156163
type="checkbox"
164+
name={metric}
157165
bind:group={unorderedMetrics}
158166
value={metric}
159167
checked
160168
/>
161169
{:else}
162170
<input
163171
type="checkbox"
172+
name={metric}
164173
bind:group={unorderedMetrics}
165174
value={metric}
166175
/>

0 commit comments

Comments
 (0)