Skip to content

Commit

Permalink
Merge pull request #30 from gapitio/notification-groups
Browse files Browse the repository at this point in the history
feat: add phone_numbers and emails to notification groups
  • Loading branch information
sbgap authored Oct 22, 2024
2 parents 4d62254 + 6560073 commit 5216c35
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 13 deletions.
14 changes: 7 additions & 7 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -590,21 +590,21 @@ export default {
},
{
icon: 'history',
text: i18n.t('NotificationHistory'),
text: i18n.t('Notification History'),
path: '/notificationhistory',
perms: 'read:notification_history',
show: true
},
{
icon: 'av_timer',
text: i18n.t('NotificationDelay'),
text: i18n.t('Notification Delays'),
path: '/notificationdelays',
perms: 'read:notification_rules',
show: true
},
{
icon: 'arrow_upward',
text: i18n.t('EscalationRules'),
text: i18n.t('Escalation Rules'),
path: '/escalationrules',
perms: 'read:escalation_rules',
show: true
Expand Down Expand Up @@ -639,14 +639,14 @@ export default {
},
{
icon: 'people',
text: i18n.t('NotificationGroups'),
text: i18n.t('Notification Groups'),
path: '/notificationgroups',
perms: 'read:notification_groups',
show: true
},
{
icon: 'phone',
text: i18n.t('OnCall'),
text: i18n.t('On Call'),
path: '/oncall',
perms: 'read:notification_rules',
show: true
Expand All @@ -667,14 +667,14 @@ export default {
},
{
icon: 'notifications',
text: i18n.t('NotificationChannels'),
text: i18n.t('Notification Channels'),
path: '/notificationchannels',
perms: 'read:notification_channels',
show: true
},
{
icon: 'notifications',
text: i18n.t('NotificationRules'),
text: i18n.t('Notification Rules'),
path: '/notificationrules',
perms: 'read:notification_rules',
show: true
Expand Down
2 changes: 1 addition & 1 deletion src/components/EscalationRuleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@

<v-card>
<v-card-title class="title">
{{ $t('escalationRules') }}
{{ $t('Escalation Rules') }}
<v-spacer />
<v-btn-toggle
v-model="status"
Expand Down
2 changes: 1 addition & 1 deletion src/components/NotificationChannelList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@

<v-card>
<v-card-title class="title">
{{ $t('notificationChannels') }}
{{ $t('Notification Channels') }}
<v-spacer />
<v-tooltip bottom>
<template slot="activator">
Expand Down
2 changes: 1 addition & 1 deletion src/components/NotificationDelayList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<v-card>
<v-card-title class="title">
{{ $t('notificationDelays') }}
{{ $t('Notification Delays') }}
</v-card-title>

<v-data-table
Expand Down
54 changes: 53 additions & 1 deletion src/components/NotificationGroupList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@
/>
</v-flex>

<v-flex xs12>
<v-combobox
v-model="editedItem.phoneNumbers"
:label="$t('PhoneNumbers')"
chips
multiple
/>
</v-flex>

<v-flex xs12>
<v-combobox
v-model="editedItem.mails"
:label="$t('Mails')"
chips
multiple
/>
</v-flex>

<v-flex xs12>
<v-text-field
v-model="editedItem.name"
Expand Down Expand Up @@ -62,7 +80,7 @@

<v-card>
<v-card-title class="title">
{{ $t('notificationGroup') }}
{{ $t('Notification Groups') }}
</v-card-title>

<v-data-table
Expand Down Expand Up @@ -91,6 +109,26 @@
{{ getName(users, user) }}
</v-chip>
</td>
<td>
<v-chip
v-for="number in props.item.phoneNumbers"
:key="number"
outline
small
>
{{ number }}
</v-chip>
</td>
<td>
<v-chip
v-for="mail in props.item.mails"
:key="mail"
outline
small
>
{{ mail }}
</v-chip>
</td>
<td class="text-no-wrap">
<v-btn
v-has-perms.disable="'write:notification_groups'"
Expand Down Expand Up @@ -181,6 +219,14 @@ export default {
text: i18n.t('Users'),
value: 'users'
},
{
text: i18n.t('Phone Numbers'),
value: 'phoneNumbers'
},
{
text: i18n.t('Mails'),
value: 'mails'
},
{
text: i18n.t('Actions'),
value: 'name',
Expand All @@ -191,12 +237,16 @@ export default {
editedItem: {
name: null,
users: [],
phoneNumbers: [],
mails: [],
},
menu1: false,
menu2: false,
defaultItem: {
name: null,
users: [],
phoneNumbers: [],
mails: [],
},
rules: {
required: v => !!v || i18n.t('Required')
Expand Down Expand Up @@ -309,6 +359,8 @@ export default {
{
name: this.editedItem.name,
users: this.editedItem.users,
phoneNumbers: this.editedItem.phoneNumbers,
mails: this.editedItem.mails
}
])
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/components/NotificationRuleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@

<v-card>
<v-card-title class="title">
{{ $t('notificationRules') }}
{{ $t('Notification Rules') }}
<v-spacer />
<span
v-if="selectableRows"
Expand Down
2 changes: 1 addition & 1 deletion src/components/OnCallList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@

<v-card>
<v-card-title class="title">
{{ $t('onCalls') }}
{{ $t('On Call') }}
<v-spacer />
<v-btn-toggle
v-model="status"
Expand Down

0 comments on commit 5216c35

Please sign in to comment.