feat(ui): add teams as a supported kapacitor service

pull/5740/head
Pavel Zavora 2021-04-28 05:20:34 +02:00
parent add987f025
commit b7a913ce77
1 changed files with 6 additions and 0 deletions

View File

@ -51,6 +51,7 @@ export enum AlertDisplayText {
victorops = 'VictorOps', victorops = 'VictorOps',
servicenow = 'ServiceNow', servicenow = 'ServiceNow',
bigpanda = 'BigPanda', bigpanda = 'BigPanda',
teams = 'Teams',
} }
export const SupportedServices: string[] = [ export const SupportedServices: string[] = [
@ -67,6 +68,7 @@ export const SupportedServices: string[] = [
'slack', 'slack',
'smtp', 'smtp',
'talk', 'talk',
'teams',
'telegram', 'telegram',
'victorops', 'victorops',
] ]
@ -215,6 +217,7 @@ export const MAP_KEYS_FROM_CONFIG: KeyMappings = {
victorops: 'victorOps', victorops: 'victorOps',
servicenow: 'serviceNow', servicenow: 'serviceNow',
bigpanda: 'bigPanda', bigpanda: 'bigPanda',
teams: 'teams',
} }
// ALERTS_FROM_CONFIG the array of fields to accept from Kapacitor Config // ALERTS_FROM_CONFIG the array of fields to accept from Kapacitor Config
@ -243,6 +246,7 @@ export const ALERTS_FROM_CONFIG: FieldsFromConfigAlerts = {
// mqtt:[] // mqtt:[]
serviceNow: ['url', 'source', 'username', 'password'], serviceNow: ['url', 'source', 'username', 'password'],
bigPanda: ['app-key'], bigPanda: ['app-key'],
teams: ['channel-url'],
} }
export const MAP_FIELD_KEYS_FROM_CONFIG: ConfigKeyMaps = { export const MAP_FIELD_KEYS_FROM_CONFIG: ConfigKeyMaps = {
@ -268,6 +272,7 @@ export const MAP_FIELD_KEYS_FROM_CONFIG: ConfigKeyMaps = {
// mqtt: {} // mqtt: {}
serviceNow: {}, serviceNow: {},
bigPanda: {}, bigPanda: {},
teams: {},
} }
// HANDLERS_TO_RULE returns array of fields that may be updated for each alert on rule. // HANDLERS_TO_RULE returns array of fields that may be updated for each alert on rule.
@ -312,4 +317,5 @@ export const HANDLERS_TO_RULE_THEM_ALL: FieldsFromAllAlerts = {
'_type', // serviceNow type, remapped from type on the wire '_type', // serviceNow type, remapped from type on the wire
], ],
bigPanda: ['app-key', 'primary-property', 'secondary-property'], bigPanda: ['app-key', 'primary-property', 'secondary-property'],
teams: ['channel-url'],
} }