Skip to content

Commit b03b122

Browse files
committed
Make inclusion of children optional
Added a switch in the alerts view which optionally includes every active child of the subscribed projects in the notification rule. Signed-off-by: RBickert <rbt@mm-software.com>
1 parent 298c5be commit b03b122

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

src/i18n/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,8 @@
497497
"destination": "Destination",
498498
"delete_alert": "Delete Alert",
499499
"limit_to": "Limit To",
500-
"limit_to_projects": "Limit to projects (including all of their active children)",
500+
"limit_to_projects": "Limit to projects",
501+
"include_children": "Include active children of projects",
501502
"limit_to_tags": "Limit to Tags",
502503
"alert_created": "Alert created",
503504
"alert_deleted": "Alert deleted",

src/views/administration/notifications/Alerts.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@
155155
<actionable-list-group-item :add-icon="true" v-on:actionClicked="$root.$emit('bv::show::modal', 'selectProjectModal')"/>
156156
</div>
157157
</b-form-group>
158+
<div v-if="limitToVisible === true">
159+
<c-switch id="isNotifyChildrenEnabled" color="primary" v-model="notifyChildren" label v-bind="labelIcon"/>
160+
{{ $t('admin.include_children') }}
161+
</div>
158162
</b-col>
159163
<b-col sm="6">
160164
<b-form-group id="fieldset-5" :label="this.$t('admin.scope')" label-for="input-5">
@@ -209,6 +213,7 @@
209213
uuid: row.uuid,
210214
name: row.name,
211215
enabled: row.enabled,
216+
notifyChildren: row.notifyChildren,
212217
publisherClass: row.publisher.publisherClass,
213218
notificationLevel: row.notificationLevel,
214219
destination: this.parseDestination(row),
@@ -230,6 +235,9 @@
230235
enabled() {
231236
this.updateNotificationRule();
232237
},
238+
notifyChildren() {
239+
this.updateNotificationRule();
240+
},
233241
notifyOn() {
234242
this.updateNotificationRule();
235243
},
@@ -260,6 +268,7 @@
260268
uuid: this.uuid,
261269
name: this.name,
262270
enabled: this.enabled,
271+
notifyChildren: this.notifyChildren,
263272
notificationLevel: this.notificationLevel,
264273
publisherConfig: JSON.stringify({ destination: this.destination }),
265274
notifyOn: this.notifyOn

0 commit comments

Comments
 (0)