in public/pages/Monitors/containers/Monitors/Monitors.js [48:124]
constructor(props) {
super(props);
const { from, size, search, sortField, sortDirection, state } = getURLQueryParams(
this.props.location
);
this.state = {
alerts: [],
totalAlerts: 0,
totalMonitors: 0,
page: Math.floor(from / size),
size,
search,
sortField,
sortDirection,
selectedItems: [],
isPopoverOpen: false,
monitors: [],
monitorState: state,
loadingMonitors: true,
};
this.getMonitors = _.debounce(this.getMonitors.bind(this), 500, { leading: true });
this.onTableChange = this.onTableChange.bind(this);
this.onMonitorStateChange = this.onMonitorStateChange.bind(this);
this.onSelectionChange = this.onSelectionChange.bind(this);
this.onSearchChange = this.onSearchChange.bind(this);
this.updateMonitor = this.updateMonitor.bind(this);
this.deleteMonitor = this.deleteMonitor.bind(this);
this.updateMonitors = this.updateMonitors.bind(this);
this.deleteMonitors = this.deleteMonitors.bind(this);
this.onClickAcknowledge = this.onClickAcknowledge.bind(this);
this.onClickAcknowledgeModal = this.onClickAcknowledgeModal.bind(this);
this.onClickEdit = this.onClickEdit.bind(this);
this.onClickEnable = this.onClickEnable.bind(this);
this.onClickDelete = this.onClickDelete.bind(this);
this.onClickDisable = this.onClickDisable.bind(this);
this.onBulkAcknowledge = this.onBulkAcknowledge.bind(this);
this.onBulkEnable = this.onBulkEnable.bind(this);
this.onBulkDelete = this.onBulkDelete.bind(this);
this.onBulkDisable = this.onBulkDisable.bind(this);
this.onPageClick = this.onPageClick.bind(this);
this.getActiveAlerts = this.getActiveAlerts.bind(this);
this.onClickCancel = this.onClickCancel.bind(this);
this.resetFilters = this.resetFilters.bind(this);
this.columns = [
...staticColumns,
{
name: 'Actions',
width: '75px',
actions: [
{
name: 'Acknowledge',
description: 'Acknowledge this Monitor',
onClick: this.onClickAcknowledge,
},
{
name: 'Enable',
description: 'Enable this Monitor',
onClick: this.onClickEnable,
},
{
name: 'Disable',
description: 'Disable this Monitor',
onClick: this.onClickDisable,
},
{
name: 'Delete',
description: 'Delete this Monitor',
onClick: this.onClickDelete,
},
],
},
];
}