mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 12:40:06 -03:30
Add support for grafana, rocketchat in awxkit
This commit is contained in:
@@ -16,7 +16,9 @@ notification_types = (
|
|||||||
'slack',
|
'slack',
|
||||||
'twilio',
|
'twilio',
|
||||||
'webhook',
|
'webhook',
|
||||||
'mattermost')
|
'mattermost',
|
||||||
|
'grafana',
|
||||||
|
'rocketchat')
|
||||||
|
|
||||||
|
|
||||||
class NotificationTemplate(HasCopy, HasCreate, base.Base):
|
class NotificationTemplate(HasCopy, HasCreate, base.Base):
|
||||||
@@ -110,6 +112,14 @@ class NotificationTemplate(HasCopy, HasCreate, base.Base):
|
|||||||
'mattermost_icon_url',
|
'mattermost_icon_url',
|
||||||
'mattermost_no_verify_ssl')
|
'mattermost_no_verify_ssl')
|
||||||
cred = services.mattermost
|
cred = services.mattermost
|
||||||
|
elif notification_type == 'grafana':
|
||||||
|
fields = ('grafana_url',
|
||||||
|
'grafana_key')
|
||||||
|
cred = services.grafana
|
||||||
|
elif notification_type == 'rocketchat':
|
||||||
|
fields = ('rocketchat_url',
|
||||||
|
'rocketchat_no_verify_ssl')
|
||||||
|
cred = services.rocketchat
|
||||||
else:
|
else:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
'Unknown notification_type {0}'.format(notification_type))
|
'Unknown notification_type {0}'.format(notification_type))
|
||||||
|
|||||||
Reference in New Issue
Block a user