Skip to content

Commit

Permalink
Keep focus when editing Alerts (fixes #421)
Browse files Browse the repository at this point in the history
Signed-off-by: Abdel Hajou <[email protected]>
  • Loading branch information
AbdelHajou committed Oct 21, 2023
1 parent 6355635 commit c708bd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@
"notification_level": "Notification level",
"destination": "Destination",
"delete_alert": "Delete Alert",
"submit": "Submit",
"limit_to": "Limit To",
"limit_to_projects": "Limit to projects",
"include_children": "Include children of projects",
Expand Down
10 changes: 4 additions & 6 deletions src/views/administration/notifications/Alerts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@
<b-row class="expanded-row">
<b-col sm="6">
<b-input-group-form-input id="input-name" :label="$t('message.name')" input-group-size="mb-3"
required="true" type="text" v-model="name" lazy="true"
v-debounce:750ms="updateNotificationRule" :debounce-events="'keyup'" />
required="true" type="text" v-model="name" lazy="true" />
<b-form-group>
<c-switch id="notificationEnabled" color="primary" v-model="enabled" label v-bind="labelIcon"/>
{{ $t('admin.enabled') }}
Expand All @@ -136,11 +135,9 @@
</b-form-group>
<b-input-group-form-input id="input-destination" :label="$t('admin.destination')" input-group-size="mb-3"
:required="(!(this.alert.hasOwnProperty('teams') && this.alert.teams != null && this.alert.teams.length > 0)).toString()"
type="text" v-model="destination" lazy="true"
v-debounce:750ms="updateNotificationRule" :debounce-events="'keyup'" />
type="text" v-model="destination" lazy="true" />
<b-input-group-form-input v-if="this.publisherClass === 'org.dependencytrack.notification.publisher.JiraPublisher'" id="input-jira-ticket-type"
:label="$t('admin.jira_ticket_type')" :required="true" type="text" v-model="jiraTicketType" lazy="true"
v-debounce:750ms="updateNotificationRule" :debounce-events="'keyup'" />
:label="$t('admin.jira_ticket_type')" :required="true" type="text" v-model="jiraTicketType" lazy="true" />
<b-form-group v-if="this.publisherClass === 'org.dependencytrack.notification.publisher.SendMailPublisher'"
id="teamDestinationList" :label="this.$t('admin.select_team_as_recipient')">
<div class="list group">
Expand Down Expand Up @@ -197,6 +194,7 @@
v-permission="PERMISSIONS.VIEW_PORTFOLIO" v-on:toggle="limitToVisible = !limitToVisible"
v-if="this.scope === 'PORTFOLIO'" />
<b-button variant="outline-danger" @click="deleteNotificationRule">{{ $t('admin.delete_alert') }}</b-button>
<b-button variant="primary" @click="updateNotificationRule">{{ $t('admin.submit') }}</b-button>
</div>
</b-col>
<select-project-modal v-on:selection="updateProjectSelection"/>
Expand Down

0 comments on commit c708bd6

Please sign in to comment.