Skip to content

Commit

Permalink
Merge pull request #651 from nscuro/improve-notification-logging
Browse files Browse the repository at this point in the history
Add alert option to log successful publishing
  • Loading branch information
nscuro authored Nov 21, 2023
2 parents a6679a5 + 54e2a84 commit 5bdcc9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,8 @@
"limit_to_tags": "Limit to Tags",
"alert_created": "Alert created",
"alert_deleted": "Alert deleted",
"alert_log_successful_publish": "Log successful publish",
"alert_log_successful_publish_help": "Emit a log message upon successful publishing of the alert to the destination, instead of only emitting logs when issues are encountered. Aids in debugging missing alerts, or making alert publishing auditable.",
"change_password_next_login": "User must change password at next login",
"password_never_expires": "Password never expires",
"suspended": "Suspended",
Expand Down
8 changes: 8 additions & 0 deletions src/views/administration/notifications/Alerts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
<b-form-group>
<c-switch id="notificationEnabled" color="primary" v-model="enabled" label v-bind="labelIcon"/>
{{ $t('admin.enabled') }}
<br/>
<c-switch id="notificationLogSuccessfulPublish" color="primary" v-model="logSuccessfulPublish" label v-bind="labelIcon" :title="$t('admin.alert_log_successful_publish_help')" />
{{ $t('admin.alert_log_successful_publish') }}
</b-form-group>
<b-form-group id="fieldset-2" :label="this.$t('admin.publisher_class')" label-for="input-2">
<b-form-input id="input-2" v-model="publisherClass" disabled class="form-control disabled" readonly trim />
Expand Down Expand Up @@ -216,6 +219,7 @@
uuid: row.uuid,
name: row.name,
enabled: row.enabled,
logSuccessfulPublish: row.logSuccessfulPublish,
notifyChildren: row.notifyChildren,
publisherClass: row.publisher.publisherClass,
notificationLevel: row.notificationLevel,
Expand All @@ -240,6 +244,9 @@
enabled() {
this.updateNotificationRule();
},
logSuccessfulPublish() {
this.updateNotificationRule();
},
notifyChildren() {
this.updateNotificationRule();
},
Expand Down Expand Up @@ -282,6 +289,7 @@
uuid: this.uuid,
name: this.name,
enabled: this.enabled,
logSuccessfulPublish: this.logSuccessfulPublish,
notifyChildren: this.notifyChildren,
notificationLevel: this.notificationLevel,
publisherConfig: JSON.stringify({ destination: this.destination, jiraTicketType: this.jiraTicketType }),
Expand Down

0 comments on commit 5bdcc9b

Please sign in to comment.