fix AlertTab references and add a redacted input component to pagerdutyconfig
parent
90294546ef
commit
d2d0b79e7a
|
@ -138,7 +138,7 @@ class AlertTabs extends Component {
|
|||
},
|
||||
pagerduty: {
|
||||
type: 'PagerDuty',
|
||||
enabled: this.getEnabled(configSections, 'opsgenie'),
|
||||
enabled: this.getEnabled(configSections, 'pagerduty'),
|
||||
renderComponent: () =>
|
||||
<PagerDutyConfig
|
||||
onSave={this.handleSaveConfig('pagerduty')}
|
||||
|
@ -147,7 +147,7 @@ class AlertTabs extends Component {
|
|||
},
|
||||
pushover: {
|
||||
type: 'Pushover',
|
||||
enabled: this.getEnabled(configSections, 'alerta'),
|
||||
enabled: this.getEnabled(configSections, 'pushover'),
|
||||
renderComponent: () =>
|
||||
<PushoverConfig
|
||||
onSave={this.handleSaveConfig('pushover')}
|
||||
|
|
|
@ -67,10 +67,6 @@ class OpsGenieConfig extends Component {
|
|||
id="api-key"
|
||||
refFunc={this.handleApiKeyRef}
|
||||
/>
|
||||
<label className="form-helper">
|
||||
Note: a value of <code>true</code> indicates the OpsGenie API key
|
||||
has been set
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<TagInput
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, {PropTypes, Component} from 'react'
|
||||
import RedactedInput from './RedactedInput'
|
||||
|
||||
class PagerDutyConfig extends Component {
|
||||
constructor(props) {
|
||||
|
@ -25,17 +26,11 @@ class PagerDutyConfig extends Component {
|
|||
<form onSubmit={this.handleSaveAlert}>
|
||||
<div className="form-group col-xs-12">
|
||||
<label htmlFor="service-key">Service Key</label>
|
||||
<input
|
||||
className="form-control"
|
||||
id="service-key"
|
||||
type="text"
|
||||
ref={r => (this.serviceKey = r)}
|
||||
<RedactedInput
|
||||
defaultValue={serviceKey || ''}
|
||||
id="service-key"
|
||||
refFunc={r => (this.serviceKey = r)}
|
||||
/>
|
||||
<label className="form-helper">
|
||||
Note: a value of <code>true</code> indicates the PagerDuty service
|
||||
key has been set
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="form-group col-xs-12">
|
||||
|
|
Loading…
Reference in New Issue