Skip to content

Commit fae98c2

Browse files
committed
Add list of checkboxes to the notification alerts page to configure which severity levels triggers notifications
Signed-off-by: Erik Myhrberg <erimy268@student.liu.se>
1 parent e79f6f0 commit fae98c2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/views/administration/notifications/Alerts.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,20 @@ export default {
231231
<div class="list-group-item"><b-form-checkbox value="USER_DELETED">USER_DELETED</b-form-checkbox></div>
232232
</b-form-checkbox-group>
233233
</div>
234+
<div style="text-align:left">
235+
<b-form-group id="fieldset-7" :label="this.$t('Trigger notification on severities')" label-for="input-7">
236+
<div class="list-group" v-if="this.scope === 'PORTFOLIO'">
237+
<b-form-checkbox-group id="checkbox-group-severities" v-model="notifySeverities">
238+
<div class="list-group-item"><b-form-checkbox value="LOW">LOW_SEVERITY</b-form-checkbox></div>
239+
<div class="list-group-item"><b-form-checkbox value="MEDIUM">MEDIUM_SEVERITY</b-form-checkbox></div>
240+
<div class="list-group-item"><b-form-checkbox value="HIGH">HIGH_SEVERITY</b-form-checkbox></div>
241+
<div class="list-group-item"><b-form-checkbox value="CRITICAL">CRITICAL_SEVERITY</b-form-checkbox></div>
242+
<div class="list-group-item"><b-form-checkbox value="INFO">INFO_SEVERITY</b-form-checkbox></div>
243+
<div class="list-group-item"><b-form-checkbox value="UNASSIGNED">UNASSIGNED_SEVERITY</b-form-checkbox></div>
244+
</b-form-checkbox-group>
245+
</div>
246+
</b-form-group>
247+
</div>
234248
</b-form-group>
235249
<p v-show="isScheduled && (notifyOn.includes('NEW_POLICY_VIOLATIONS_SUMMARY') || notifyOn.includes('NEW_VULNERABILITIES_SUMMARY'))" class="font-sm text-warning">
236250
<span class="fa fa-warning"></span> {{ $t('admin.alert_schedule_summary_warning') }}
@@ -280,6 +294,7 @@ export default {
280294
jiraTicketType: this.parseJiraTicketType(row),
281295
scope: row.scope,
282296
notifyOn: row.notifyOn,
297+
notifySeverities: row.notifySeverities,
283298
projects: row.projects,
284299
teams: row.teams,
285300
scheduleLastTriggeredAt: common.formatTimestamp(
@@ -407,6 +422,7 @@ export default {
407422
tokenHeader: this.tokenHeader,
408423
}),
409424
notifyOn: this.notifyOn,
425+
notifySeverities: this.notifySeverities,
410426
tags: this.tags.map((tag) => {
411427
return { name: tag.text };
412428
}),

0 commit comments

Comments
 (0)