Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let createTicketRows = _.filter(this.rows, row => {
return row.ticketerConfig && row.ticketerConfig.enabled
&& (!row.alarm.troubleTicketState || row.alarm.troubleTicketState === Model.TroubleTicketStates.CREATE_FAILED);
});
this.addOptionToContextMenu('Ticketing', 'Create Ticket', createTicketRows,
let closeTicketRows = _.filter(this.rows, row => {
return row.ticketerConfig && row.ticketerConfig.enabled
&& row.alarm.troubleTicketState && (row.alarm.troubleTicketState === Model.TroubleTicketStates.OPEN || row.alarm.troubleTicketState === Model.TroubleTicketStates.CLOSE_FAILED);
});
this.addOptionToContextMenu('Ticketing', 'Close Ticket', closeTicketRows,