Add unique key to endpoints added to alert
parent
42c3b924a1
commit
5b3864041a
|
@ -17,10 +17,7 @@ class RuleMessage extends Component {
|
||||||
this.state = {
|
this.state = {
|
||||||
selectedAlertNodeName: null,
|
selectedAlertNodeName: null,
|
||||||
endpointsOnThisAlert: [],
|
endpointsOnThisAlert: [],
|
||||||
<<<<<<< HEAD
|
|
||||||
endpointsOfKind: {},
|
endpointsOfKind: {},
|
||||||
=======
|
|
||||||
>>>>>>> Add functionality to Dropdown for new alert addition
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +34,6 @@ class RuleMessage extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleAddNewAlertEndpoint = selectedItem => {
|
handleAddNewAlertEndpoint = selectedItem => {
|
||||||
<<<<<<< HEAD
|
|
||||||
const {endpointsOnThisAlert, endpointsOfKind} = this.state
|
const {endpointsOnThisAlert, endpointsOfKind} = this.state
|
||||||
const newItemNumbering = _.get(endpointsOfKind, selectedItem.text, 0) + 1
|
const newItemNumbering = _.get(endpointsOfKind, selectedItem.text, 0) + 1
|
||||||
const newItemName = selectedItem.text + newItemNumbering
|
const newItemName = selectedItem.text + newItemNumbering
|
||||||
|
@ -56,14 +52,6 @@ class RuleMessage extends Component {
|
||||||
}
|
}
|
||||||
handleRemoveAlertEndpoint = removedItem => {
|
handleRemoveAlertEndpoint = removedItem => {
|
||||||
console.log(removedItem)
|
console.log(removedItem)
|
||||||
=======
|
|
||||||
this.setState({
|
|
||||||
endpointsOnThisAlert: _.concat(
|
|
||||||
this.state.endpointsOnThisAlert,
|
|
||||||
selectedItem
|
|
||||||
),
|
|
||||||
})
|
|
||||||
>>>>>>> Add functionality to Dropdown for new alert addition
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
Loading…
Reference in New Issue