Disable test alert button if endpoint is disabled at construction
parent
60d2ff014f
commit
24a182874a
|
@ -196,6 +196,7 @@ class AlertTabs extends Component {
|
|||
onSave={this.handleSaveConfig('slack')}
|
||||
config={this.getSection(configSections, 'slack')}
|
||||
onTest={this.handleTestConfig('slack')}
|
||||
enabled={this.getEnabled(configSections, 'slack')}
|
||||
/>,
|
||||
},
|
||||
smtp: {
|
||||
|
|
|
@ -6,8 +6,7 @@ class SlackConfig extends Component {
|
|||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
// if enabled true, else false.
|
||||
testEnabled: true,
|
||||
testEnabled: this.props.enabled,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,6 +100,7 @@ SlackConfig.propTypes = {
|
|||
}).isRequired,
|
||||
onSave: func.isRequired,
|
||||
onTest: func,
|
||||
enabled: bool.isRequired,
|
||||
}
|
||||
|
||||
export default SlackConfig
|
||||
|
|
Loading…
Reference in New Issue