mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 18:07:33 -02:30
sort notification_type
This commit is contained in:
@@ -22,4 +22,14 @@ class Migration(migrations.Migration):
|
|||||||
null=True,
|
null=True,
|
||||||
blank=True),
|
blank=True),
|
||||||
),
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='notification',
|
||||||
|
name='notification_type',
|
||||||
|
field=models.CharField(choices=[('email', 'Email'), ('grafana', 'Grafana'), ('hipchat', 'HipChat'), ('irc', 'IRC'), ('mattermost', 'Mattermost'), ('pagerduty', 'Pagerduty'), ('rocketchat', 'Rocket.Chat'), ('slack', 'Slack'), ('twilio', 'Twilio'), ('webhook', 'Webhook')], max_length=32),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='notificationtemplate',
|
||||||
|
name='notification_type',
|
||||||
|
field=models.CharField(choices=[('email', 'Email'), ('grafana', 'Grafana'), ('hipchat', 'HipChat'), ('irc', 'IRC'), ('mattermost', 'Mattermost'), ('pagerduty', 'Pagerduty'), ('rocketchat', 'Rocket.Chat'), ('slack', 'Slack'), ('twilio', 'Twilio'), ('webhook', 'Webhook')], max_length=32),
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class NotificationTemplate(CommonModelNameNotUnique):
|
|||||||
('mattermost', _('Mattermost'), MattermostBackend),
|
('mattermost', _('Mattermost'), MattermostBackend),
|
||||||
('rocketchat', _('Rocket.Chat'), RocketChatBackend),
|
('rocketchat', _('Rocket.Chat'), RocketChatBackend),
|
||||||
('irc', _('IRC'), IrcBackend)]
|
('irc', _('IRC'), IrcBackend)]
|
||||||
NOTIFICATION_TYPE_CHOICES = [(x[0], x[1]) for x in NOTIFICATION_TYPES]
|
NOTIFICATION_TYPE_CHOICES = sorted([(x[0], x[1]) for x in NOTIFICATION_TYPES])
|
||||||
CLASS_FOR_NOTIFICATION_TYPE = dict([(x[0], x[2]) for x in NOTIFICATION_TYPES])
|
CLASS_FOR_NOTIFICATION_TYPE = dict([(x[0], x[2]) for x in NOTIFICATION_TYPES])
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|||||||
Reference in New Issue
Block a user