diff --git a/ui/src/kapacitor/components/AlertTabs.js b/ui/src/kapacitor/components/AlertTabs.js index 526a94b9c..6af239c1c 100644 --- a/ui/src/kapacitor/components/AlertTabs.js +++ b/ui/src/kapacitor/components/AlertTabs.js @@ -56,6 +56,14 @@ class AlertTabs extends Component { return _.get(sections, [section, 'elements', '0'], null) } + getEnabled = (sections, section) => { + return _.get( + sections, + [section, 'elements', '0', 'options', 'enabled'], + null + ) + } + handleGetSection = (sections, section) => () => { return this.getSection(sections, section) } @@ -100,10 +108,10 @@ class AlertTabs extends Component { if (!configSections) { return null } - const supportedConfigs = { alerta: { type: 'Alerta', + enabled: this.getEnabled(configSections, 'alerta'), renderComponent: () => supportedConfigs[k] ? acc.concat( - /* All endpoints appear "configured" by default (as a test) */ - + {supportedConfigs[k].type} )