Add functionality to Dropdown for new alert addition
parent
244dc21d7c
commit
42c3b924a1
|
@ -17,7 +17,10 @@ class RuleMessage extends Component {
|
|||
this.state = {
|
||||
selectedAlertNodeName: null,
|
||||
endpointsOnThisAlert: [],
|
||||
<<<<<<< HEAD
|
||||
endpointsOfKind: {},
|
||||
=======
|
||||
>>>>>>> Add functionality to Dropdown for new alert addition
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,6 +37,7 @@ class RuleMessage extends Component {
|
|||
}
|
||||
|
||||
handleAddNewAlertEndpoint = selectedItem => {
|
||||
<<<<<<< HEAD
|
||||
const {endpointsOnThisAlert, endpointsOfKind} = this.state
|
||||
const newItemNumbering = _.get(endpointsOfKind, selectedItem.text, 0) + 1
|
||||
const newItemName = selectedItem.text + newItemNumbering
|
||||
|
@ -52,6 +56,14 @@ class RuleMessage extends Component {
|
|||
}
|
||||
handleRemoveAlertEndpoint = removedItem => {
|
||||
console.log(removedItem)
|
||||
=======
|
||||
this.setState({
|
||||
endpointsOnThisAlert: _.concat(
|
||||
this.state.endpointsOnThisAlert,
|
||||
selectedItem
|
||||
),
|
||||
})
|
||||
>>>>>>> Add functionality to Dropdown for new alert addition
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -70,16 +82,6 @@ class RuleMessage extends Component {
|
|||
|
||||
const selectedAlertNodeName = rule.alerts[0] || alerts[0].text
|
||||
|
||||
const dropdownDummyClick = selectedItem => {
|
||||
console.log(selectedItem.text)
|
||||
}
|
||||
const dropdownDummyItems = [
|
||||
{text: 'swoggle'},
|
||||
{text: 'yoggle'},
|
||||
{text: 'zoggle'},
|
||||
{text: 'doggle'},
|
||||
]
|
||||
|
||||
return (
|
||||
<div className="rule-section">
|
||||
<h3 className="rule-section--heading">Alert Message</h3>
|
||||
|
|
Loading…
Reference in New Issue