Merge pull request #1624 from theblazehen/devel

Add Rocket.Chat notification type
This commit is contained in:
Matthew Jones
2018-03-26 06:41:48 -07:00
committed by GitHub
6 changed files with 150 additions and 0 deletions

View File

@@ -372,6 +372,38 @@ export default ['i18n', function(i18n) {
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
rocketchat_url: {
label: i18n._('Target URL'),
type: 'text',
awRequiredWhen: {
reqExpression: "rocketchat_required",
init: "false"
},
ngShow: "notification_type.value == 'rocketchat' ",
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
rocketchat_username: {
label: i18n._('Username'),
type: 'text',
ngShow: "notification_type.value == 'rocketchat' ",
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
rocketchat_icon_url: {
label: i18n._('Icon URL'),
type: 'text',
ngShow: "notification_type.value == 'rocketchat' ",
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
rocketchat_no_verify_ssl: {
label: i18n._('Disable SSL Verification'),
type: 'checkbox',
ngShow: "notification_type.value == 'rocketchat' ",
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
server: {
label: i18n._('IRC Server Address'),
type: 'text',

View File

@@ -18,6 +18,7 @@ function (i18n) {
obj.twilio_required = false;
obj.webhook_required = false;
obj.mattermost_required = false;
obj.rocketchat_required = false;
obj.token_required = false;
obj.port_required = false;
obj.password_required = false;
@@ -52,6 +53,9 @@ function (i18n) {
case 'mattermost':
obj.mattermost_required = true;
break;
case 'rocketchat':
obj.rocketchat_required = true;
break;
case 'pagerduty':
obj.tokenLabel = ' ' + i18n._('API Token');
obj.pagerduty_required = true;