{
- console.log(`NotificationsInfoCallOut: ${hasNotificationPlugin}`);
return (
);
};
@@ -344,6 +346,7 @@ export default class MonitorDetails extends Component {
httpClient,
notifications,
isDarkMode,
+ setFlyout,
} = this.props;
const { action } = queryString.parse(location.search);
const updatingMonitor = action === MONITOR_ACTIONS.UPDATE_MONITOR;
@@ -365,6 +368,7 @@ export default class MonitorDetails extends Component {
monitorToEdit={monitor}
detectorId={detectorId}
notifications={notifications}
+ setFlyout={setFlyout}
{...this.props}
/>
);
diff --git a/public/pages/Monitors/containers/Monitors/Monitors.js b/public/pages/Monitors/containers/Monitors/Monitors.js
index 21f9de5a5..9367aafa0 100644
--- a/public/pages/Monitors/containers/Monitors/Monitors.js
+++ b/public/pages/Monitors/containers/Monitors/Monitors.js
@@ -75,7 +75,7 @@ export default class Monitors extends Component {
...staticColumns,
{
name: 'Actions',
- width: '75px',
+ width: '60px',
actions: [
{
name: 'Acknowledge',
@@ -86,11 +86,13 @@ export default class Monitors extends Component {
name: 'Enable',
description: 'Enable this Monitor',
onClick: this.onClickEnable,
+ available: (item) => !item.enabled,
},
{
name: 'Disable',
description: 'Disable this Monitor',
onClick: this.onClickDisable,
+ available: (item) => item.enabled,
},
{
name: 'Delete',
diff --git a/public/pages/Monitors/containers/Monitors/__snapshots__/Monitors.test.js.snap b/public/pages/Monitors/containers/Monitors/__snapshots__/Monitors.test.js.snap
index d664a137d..5dcbfd468 100644
--- a/public/pages/Monitors/containers/Monitors/__snapshots__/Monitors.test.js.snap
+++ b/public/pages/Monitors/containers/Monitors/__snapshots__/Monitors.test.js.snap
@@ -40,8 +40,6 @@ exports[`Monitors renders 1`] = `
"render": [Function],
"sortable": true,
"textOnly": true,
- "truncateText": true,
- "width": "150px",
},
Object {
"field": "user",
@@ -50,7 +48,6 @@ exports[`Monitors renders 1`] = `
"sortable": true,
"textOnly": true,
"truncateText": true,
- "width": "100px",
},
Object {
"field": "latestAlert",
@@ -58,7 +55,6 @@ exports[`Monitors renders 1`] = `
"sortable": false,
"textOnly": true,
"truncateText": true,
- "width": "150px",
},
Object {
"field": "enabled",
@@ -66,7 +62,6 @@ exports[`Monitors renders 1`] = `
"render": [Function],
"sortable": false,
"truncateText": false,
- "width": "100px",
},
Object {
"dataType": "date",
@@ -75,35 +70,30 @@ exports[`Monitors renders 1`] = `
"render": [Function],
"sortable": true,
"truncateText": false,
- "width": "150px",
},
Object {
"field": "active",
"name": "Active",
"sortable": true,
"truncateText": false,
- "width": "100px",
},
Object {
"field": "acknowledged",
"name": "Acknowledged",
"sortable": true,
"truncateText": false,
- "width": "100px",
},
Object {
"field": "errors",
"name": "Errors",
"sortable": true,
"truncateText": false,
- "width": "100px",
},
Object {
"field": "ignored",
"name": "Ignored",
"sortable": true,
"truncateText": false,
- "width": "100px",
},
Object {
"actions": Array [
@@ -113,11 +103,13 @@ exports[`Monitors renders 1`] = `
"onClick": [Function],
},
Object {
+ "available": [Function],
"description": "Enable this Monitor",
"name": "Enable",
"onClick": [Function],
},
Object {
+ "available": [Function],
"description": "Disable this Monitor",
"name": "Disable",
"onClick": [Function],
@@ -129,7 +121,7 @@ exports[`Monitors renders 1`] = `
},
],
"name": "Actions",
- "width": "75px",
+ "width": "60px",
},
]
}
diff --git a/public/pages/Monitors/containers/Monitors/utils/tableUtils.js b/public/pages/Monitors/containers/Monitors/utils/tableUtils.js
index c8b92249f..4aab897e9 100644
--- a/public/pages/Monitors/containers/Monitors/utils/tableUtils.js
+++ b/public/pages/Monitors/containers/Monitors/utils/tableUtils.js
@@ -20,10 +20,12 @@ export const columns = [
field: 'name',
name: 'Monitor name',
sortable: true,
- truncateText: true,
textOnly: true,
- width: '150px',
- render: (name, item) => {name},
+ render: (name, item) => (
+
+ {name}
+
+ ),
},
{
field: 'user',
@@ -31,7 +33,6 @@ export const columns = [
sortable: true,
truncateText: true,
textOnly: true,
- width: '100px',
/* There are 3 cases:
1. Monitors created by older versions and never updated.
These monitors won’t have User details in the monitor object. `monitor.user` will be null.
@@ -47,14 +48,12 @@ export const columns = [
sortable: false,
truncateText: true,
textOnly: true,
- width: '150px',
},
{
field: 'enabled',
name: 'State',
sortable: false,
truncateText: false,
- width: '100px',
render: (enabled) => (enabled ? 'Enabled' : 'Disabled'),
},
{
@@ -64,34 +63,29 @@ export const columns = [
truncateText: false,
render: renderTime,
dataType: 'date',
- width: '150px',
},
{
field: 'active',
name: 'Active',
sortable: true,
truncateText: false,
- width: '100px',
},
{
field: 'acknowledged',
name: 'Acknowledged',
sortable: true,
truncateText: false,
- width: '100px',
},
{
field: 'errors',
name: 'Errors',
sortable: true,
truncateText: false,
- width: '100px',
},
{
field: 'ignored',
name: 'Ignored',
sortable: true,
truncateText: false,
- width: '100px',
},
];
diff --git a/public/utils/constants.js b/public/utils/constants.js
index 58e8c585e..c6aae5e80 100644
--- a/public/utils/constants.js
+++ b/public/utils/constants.js
@@ -63,6 +63,7 @@ export const MONITOR_INPUT_DETECTOR_ID = `inputs.${INPUTS_DETECTOR_ID}`;
export const AD_PREVIEW_DAYS = 7;
export const MAX_QUERY_RESULT_SIZE = 200;
+export const MAX_CHANNELS_RESULT_SIZE = 5000;
export const MONITOR_GROUP_BY = 'ui_metadata.search.groupBy';