diff --git a/cypress/integration/query_level_monitor_spec.js b/cypress/integration/query_level_monitor_spec.js index 3ca9a3b91..1e3cb3bb1 100644 --- a/cypress/integration/query_level_monitor_spec.js +++ b/cypress/integration/query_level_monitor_spec.js @@ -166,7 +166,7 @@ describe('Query-Level Monitors', () => { cy.contains(SAMPLE_MONITOR, { timeout: 20000 }); // Select the existing monitor - cy.get('a').contains(SAMPLE_MONITOR, { timeout: 20000 }).click(); + cy.get(`[data-test-subj="${SAMPLE_MONITOR}"]`).click(); // Click Edit button cy.contains('Edit', { timeout: 20000 }).click({ force: true }); @@ -195,7 +195,7 @@ describe('Query-Level Monitors', () => { cy.contains(SAMPLE_MONITOR, { timeout: 20000 }); // Select the existing monitor - cy.get('a').contains(SAMPLE_MONITOR, { timeout: 20000 }).click({ force: true }); + cy.get(`[data-test-subj="${SAMPLE_MONITOR}"]`).click({ force: true }); // Click Edit button cy.contains('Edit', { timeout: 20000 }).click({ force: true }); @@ -304,7 +304,7 @@ describe('Query-Level Monitors', () => { cy.contains(SAMPLE_MONITOR); // Select the existing monitor - cy.get('a').contains(SAMPLE_MONITOR).click(); + cy.get(`[data-test-subj="${SAMPLE_MONITOR}"]`).click(); // Click Edit button cy.contains('Edit').click({ force: true }); @@ -373,7 +373,7 @@ describe('Query-Level Monitors', () => { cy.contains(SAMPLE_DAYS_INTERVAL_MONITOR, { timeout: 20000 }); // Select the existing monitor - cy.get('a').contains(SAMPLE_DAYS_INTERVAL_MONITOR).click({ force: true }); + cy.get(`[data-test-subj="${SAMPLE_DAYS_INTERVAL_MONITOR}"]`).click({ force: true }); // Click Edit button cy.contains('Edit').click({ force: true }); @@ -398,7 +398,7 @@ describe('Query-Level Monitors', () => { cy.contains(SAMPLE_CRON_EXPRESSION_MONITOR, { timeout: 20000 }); // Select the existing monitor - cy.get('a').contains(SAMPLE_CRON_EXPRESSION_MONITOR).click({ force: true }); + cy.get(`[data-test-subj="${SAMPLE_CRON_EXPRESSION_MONITOR}"]`).click({ force: true }); // Click Edit button cy.contains('Edit').click({ force: true }); diff --git a/public/components/Flyout/flyouts/__snapshots__/flyouts.test.js.snap b/public/components/Flyout/flyouts/__snapshots__/flyouts.test.js.snap index 03a9157ec..e48f56595 100644 --- a/public/components/Flyout/flyouts/__snapshots__/flyouts.test.js.snap +++ b/public/components/Flyout/flyouts/__snapshots__/flyouts.test.js.snap @@ -8,33 +8,40 @@ Object { "data-test-subj": "alertsDashboardFlyout_undefined", "hideCloseButton": true, "size": "m", - "type": "push", }, - "footer": - Close - , "footerProps": Object { "style": Object { "backgroundColor": "#F5F7FA", }, }, - "header": -

- Alerts by undefined -

-
, + + +

+ Alerts by undefined +

+
+
+ + + + , "headerProps": Object { "hasBorder": true, }, diff --git a/public/components/Flyout/flyouts/alertsDashboard.js b/public/components/Flyout/flyouts/alertsDashboard.js index 18dc41a1f..db99eb150 100644 --- a/public/components/Flyout/flyouts/alertsDashboard.js +++ b/public/components/Flyout/flyouts/alertsDashboard.js @@ -4,7 +4,7 @@ */ import React from 'react'; -import { EuiButtonEmpty, EuiText } from '@elastic/eui'; +import { EuiFlexGroup, EuiButtonIcon, EuiTitle, EuiFlexItem } from '@elastic/eui'; import AlertsDashboardFlyoutComponent from './components/AlertsDashboardFlyoutComponent'; const alertsDashboard = (payload) => { @@ -15,25 +15,31 @@ const alertsDashboard = (payload) => { size: 'm', hideCloseButton: true, 'data-test-subj': `alertsDashboardFlyout_${trigger_name}`, - type: 'push', }, headerProps: { hasBorder: true }, header: ( - -

{`Alerts by ${trigger_name}`}

-
+ + + +

{`Alerts by ${trigger_name}`}

+
+
+ + + +
), footerProps: { style: { backgroundColor: '#F5F7FA' } }, - footer: ( - closeFlyout()} - style={{ paddingLeft: '0px', marginLeft: '0px' }} - data-test-subj={`alertsDashboardFlyout_closeButton_${trigger_name}`} - > - Close - - ), body: , }; }; diff --git a/public/components/Flyout/flyouts/components/AlertsDashboardFlyoutComponent.js b/public/components/Flyout/flyouts/components/AlertsDashboardFlyoutComponent.js index b2c861527..759cd231a 100644 --- a/public/components/Flyout/flyouts/components/AlertsDashboardFlyoutComponent.js +++ b/public/components/Flyout/flyouts/components/AlertsDashboardFlyoutComponent.js @@ -361,7 +361,7 @@ export default class AlertsDashboardFlyoutComponent extends Component { columns.splice( 0, 0, - getAlertsFindingColumn(httpClient, history, true, location, notifications) + getAlertsFindingColumn(httpClient, history, location, notifications) ); break; default: diff --git a/public/pages/CreateMonitor/components/VisualGraph/utils/helpers.js b/public/pages/CreateMonitor/components/VisualGraph/utils/helpers.js index c2420a5ed..210dfb432 100644 --- a/public/pages/CreateMonitor/components/VisualGraph/utils/helpers.js +++ b/public/pages/CreateMonitor/components/VisualGraph/utils/helpers.js @@ -91,7 +91,8 @@ export function getDataFromResponse(response, fieldName, monitorType) { const buckets = _.get(response, 'aggregations.composite_agg.buckets', []); return buckets .map((bucket) => getXYValuesByFieldName(bucket, fieldName)) - .filter(filterInvalidYValues); + .filter(filterInvalidYValues) + .sort((a, b) => a.x - b.x); } } diff --git a/public/pages/CreateMonitor/containers/CreateMonitor/CreateMonitor.js b/public/pages/CreateMonitor/containers/CreateMonitor/CreateMonitor.js index 36dbe7468..bee4ae8a2 100644 --- a/public/pages/CreateMonitor/containers/CreateMonitor/CreateMonitor.js +++ b/public/pages/CreateMonitor/containers/CreateMonitor/CreateMonitor.js @@ -286,6 +286,7 @@ export default class CreateMonitor extends Component { plugins={plugins} isAd={values.searchType === SEARCH_TYPE.AD} detectorId={this.props.detectorId} + setFlyout={this.props.setFlyout} /> diff --git a/public/pages/CreateTrigger/components/Action/Action.js b/public/pages/CreateTrigger/components/Action/Action.js index bb1ae8d9f..d085a16c6 100644 --- a/public/pages/CreateTrigger/components/Action/Action.js +++ b/public/pages/CreateTrigger/components/Action/Action.js @@ -78,7 +78,7 @@ const Action = ({ // Just a swap correct fields. arrayHelpers.replace(index, { ...action, - destination_id: options[0].value, + destination_id: options[0]?.value, }); }, onBlur: (e, field, form) => { @@ -96,7 +96,6 @@ const Action = ({ ), rowHeight: 45, - async: true, isLoading: loadingDestinations, }} /> diff --git a/public/pages/CreateTrigger/containers/ConfigureActions/ConfigureActions.js b/public/pages/CreateTrigger/containers/ConfigureActions/ConfigureActions.js index ea2e51f42..85b685d5e 100644 --- a/public/pages/CreateTrigger/containers/ConfigureActions/ConfigureActions.js +++ b/public/pages/CreateTrigger/containers/ConfigureActions/ConfigureActions.js @@ -17,6 +17,7 @@ import { import { getAllowList } from '../../../Destinations/utils/helpers'; import { MAX_QUERY_RESULT_SIZE, + MAX_CHANNELS_RESULT_SIZE, MONITOR_TYPE, OS_NOTIFICATION_PLUGIN, } from '../../../../utils/constants'; @@ -84,10 +85,54 @@ class ConfigureActions extends React.Component { } } + /** + * Returns all channels in consecutive requests until all channels are returned + * @returns {Promise<*[]>} + */ + getChannels = async () => { + const { plugins } = this.props; + const hasNotificationPlugin = plugins.indexOf(OS_NOTIFICATION_PLUGIN) !== -1; + + let channels = []; + let index = 0; + const getChannels = async () => { + const getChannelsQuery = { + from_index: index, + max_items: MAX_CHANNELS_RESULT_SIZE, + config_type: CHANNEL_TYPES, + sort_field: 'name', + sort_order: 'asc', + }; + + const channelsResponse = await this.props.notificationService.getChannels(getChannelsQuery); + + // TODO: Might still need to filter the allowed channel types here if the backend doesn't + // since Notifications uses its own setting + channels = channels.concat( + channelsResponse.items.map((channel) => ({ + label: `[Channel] ${channel.name}`, + value: channel.config_id, + type: channel.config_type, + description: channel.description, + })) + ); + + if (channelsResponse.total && channels.length < channelsResponse.total) { + index += MAX_CHANNELS_RESULT_SIZE; + await getChannels(); + } + }; + + if (hasNotificationPlugin) { + await getChannels(); + } + + return channels; + }; + loadDestinations = async (searchText = '') => { - const { httpClient, values, arrayHelpers, notifications, fieldPath, plugins } = this.props; + const { httpClient, values, arrayHelpers, notifications, fieldPath } = this.props; const { allowList, actionDeleted } = this.state; - const hasNotificationPlugin = plugins.indexOf(OS_NOTIFICATION_PLUGIN) !== -1; this.setState({ loadingDestinations: true }); try { @@ -109,27 +154,7 @@ class ConfigureActions extends React.Component { backendErrorNotification(notifications, 'load', 'destinations', response.err); } - let channels = []; - if (hasNotificationPlugin) { - // Fetch Notification Channels - const getChannelsQuery = { - from_index: 0, - max_items: MAX_QUERY_RESULT_SIZE, - query: searchText, - config_type: CHANNEL_TYPES, - sort_field: 'name', - sort_order: 'asc', - }; - const channelsResponse = await this.props.notificationService.getChannels(getChannelsQuery); - // TODO: Might still need to filter the allowed channel types here if the backend doesn't - // since Notifications uses its own setting - channels = channelsResponse.items.map((channel) => ({ - label: `[Channel] ${channel.name}`, - value: channel.config_id, - type: channel.config_type, - description: channel.description, - })); - } + let channels = await this.getChannels(); const destinationsAndChannels = destinations.concat(channels); const channelOptionsByType = getChannelOptions(destinationsAndChannels, CHANNEL_TYPES); diff --git a/public/pages/CreateTrigger/containers/ConfigureTriggers/ConfigureTriggers.js b/public/pages/CreateTrigger/containers/ConfigureTriggers/ConfigureTriggers.js index 90afc3cd4..06d98fc39 100644 --- a/public/pages/CreateTrigger/containers/ConfigureTriggers/ConfigureTriggers.js +++ b/public/pages/CreateTrigger/containers/ConfigureTriggers/ConfigureTriggers.js @@ -17,8 +17,6 @@ import { getPathsPerDataType } from '../../../CreateMonitor/containers/DefineMon import monitorToFormik from '../../../CreateMonitor/containers/CreateMonitor/utils/monitorToFormik'; import { buildRequest } from '../../../CreateMonitor/containers/DefineMonitor/utils/searchRequests'; import { backendErrorNotification, inputLimitText } from '../../../../utils/helpers'; -import moment from 'moment'; -import { formikToTrigger } from '../CreateTrigger/utils/formikToTrigger'; import DefineDocumentLevelTrigger from '../DefineDocumentLevelTrigger/DefineDocumentLevelTrigger'; import { buildClusterMetricsRequest, @@ -34,9 +32,6 @@ class ConfigureTriggers extends React.Component { this.state = { dataTypes: {}, executeResponse: null, - isBucketLevelMonitor: - _.get(props, 'monitor.monitor_type', MONITOR_TYPE.QUERY_LEVEL) === - MONITOR_TYPE.BUCKET_LEVEL, triggerDeleted: false, addTriggerButton: this.prepareAddTriggerButton(), triggerEmptyPrompt: this.prepareTriggerEmptyPrompt(), @@ -49,21 +44,10 @@ class ConfigureTriggers extends React.Component { } componentDidMount() { - const { - monitorValues: { searchType, uri }, - } = this.props; - const { isBucketLevelMonitor } = this.state; - if (searchType === SEARCH_TYPE.CLUSTER_METRICS && canExecuteClusterMetricsMonitor(uri)) - this.onRunExecute(); - if (isBucketLevelMonitor) this.onQueryMappings(); + this.monitorSetupByType(); } componentDidUpdate(prevProps) { - const prevMonitorType = _.get(prevProps, 'monitor.monitor_type', MONITOR_TYPE.QUERY_LEVEL); - const currMonitorType = _.get(this.props, 'monitor.monitor_type', MONITOR_TYPE.QUERY_LEVEL); - if (prevMonitorType !== currMonitorType) - _.set(this.state, 'isBucketLevelMonitor', currMonitorType === MONITOR_TYPE.BUCKET_LEVEL); - const prevSearchType = _.get( prevProps, 'monitorValues.searchType', @@ -91,12 +75,24 @@ class ConfigureTriggers extends React.Component { const prevInputs = prevProps.monitor.inputs[0]; const currInputs = this.props.monitor.inputs[0]; - if (!_.isEqual(prevInputs, currInputs)) { - const { isBucketLevelMonitor } = this.state; - if (isBucketLevelMonitor) this.onQueryMappings(); - } + if (!_.isEqual(prevInputs, currInputs)) this.monitorSetupByType(); } + monitorSetupByType = () => { + const { + monitor: { monitor_type }, + monitorValues: { uri }, + } = this.props; + switch (monitor_type) { + case MONITOR_TYPE.BUCKET_LEVEL: + this.onQueryMappings(); + break; + case MONITOR_TYPE.CLUSTER_METRICS: + if (canExecuteClusterMetricsMonitor(uri)) this.onRunExecute(); + break; + } + }; + prepareAddTriggerButton = () => { const { monitorValues, triggerArrayHelpers, triggerValues } = this.props; const disableAddTriggerButton = @@ -131,7 +127,7 @@ class ConfigureTriggers extends React.Component { case SEARCH_TYPE.QUERY: case SEARCH_TYPE.GRAPH: const searchRequest = buildRequest(formikValues); - _.set(monitorToExecute, 'inputs[0].search', searchRequest); + _.set(monitorToExecute, 'inputs[0]', searchRequest); break; case SEARCH_TYPE.CLUSTER_METRICS: const clusterMetricsRequest = buildClusterMetricsRequest(formikValues); @@ -186,18 +182,6 @@ class ConfigureTriggers extends React.Component { } } - getTriggerContext = (executeResponse, monitor, values) => { - return { - periodStart: moment.utc(_.get(executeResponse, 'period_start', Date.now())).format(), - periodEnd: moment.utc(_.get(executeResponse, 'period_end', Date.now())).format(), - results: [_.get(executeResponse, 'input_results.results[0]')].filter((result) => !!result), - trigger: formikToTrigger(values, _.get(this.props.monitor, 'ui_metadata', {})), - alert: null, - error: null, - monitor: monitor, - }; - }; - renderDefineTrigger = (triggerArrayHelpers, index) => { const { edit, @@ -212,13 +196,11 @@ class ConfigureTriggers extends React.Component { notificationService, plugins, } = this.props; - const { executeResponse } = this.state; return ( allowedTypes.map((type) => ({ @@ -46,3 +48,17 @@ export const getDefaultScript = (monitorValues) => { return FORMIK_INITIAL_TRIGGER_VALUES.script; } }; + +export const getTriggerContext = (executeResponse, monitor, values, triggerIndex) => { + let trigger = formikToTrigger(values, _.get(monitor, 'ui_metadata', {})); + if (_.isArray(trigger) && triggerIndex >= 0) trigger = trigger[triggerIndex]; + return { + periodStart: moment.utc(_.get(executeResponse, 'period_start', Date.now())).format(), + periodEnd: moment.utc(_.get(executeResponse, 'period_end', Date.now())).format(), + results: [_.get(executeResponse, 'input_results.results[0]')].filter((result) => !!result), + trigger: trigger, + alert: null, + error: null, + monitor: monitor, + }; +}; diff --git a/public/pages/Dashboard/components/AcknowledgeAlertsModal/AcknowledgeAlertsModal.js b/public/pages/Dashboard/components/AcknowledgeAlertsModal/AcknowledgeAlertsModal.js index 7bfd9e7e9..18324b7c8 100644 --- a/public/pages/Dashboard/components/AcknowledgeAlertsModal/AcknowledgeAlertsModal.js +++ b/public/pages/Dashboard/components/AcknowledgeAlertsModal/AcknowledgeAlertsModal.js @@ -352,7 +352,6 @@ export default class AcknowledgeAlertsModal extends Component { getAlertsFindingColumn( httpClient, history, - false, location, notifications, flyoutIsOpen, diff --git a/public/pages/Dashboard/components/FindingsDashboard/FindingFlyout.js b/public/pages/Dashboard/components/FindingsDashboard/FindingFlyout.js index ef15234d0..b773523f7 100644 --- a/public/pages/Dashboard/components/FindingsDashboard/FindingFlyout.js +++ b/public/pages/Dashboard/components/FindingsDashboard/FindingFlyout.js @@ -6,18 +6,18 @@ import React, { Component } from 'react'; import _ from 'lodash'; import { - EuiButtonEmpty, EuiCodeBlock, EuiFlexGrid, EuiFlexItem, EuiFlyout, EuiFlyoutBody, - EuiFlyoutFooter, EuiFlyoutHeader, EuiHorizontalRule, EuiLink, EuiText, EuiTitle, + EuiFlexGroup, + EuiButtonIcon, } from '@elastic/eui'; import { getFindings } from './findingsUtils'; import { DEFAULT_GET_FINDINGS_PARAMS } from '../../../../../server/services/FindingService'; @@ -70,10 +70,16 @@ export default class FindingFlyout extends Component { closeFlyout = () => { this.setState({ isFlyoutOpen: false }); + + const { dashboardFlyoutIsOpen = false, closeFlyout } = this.props; + + if (typeof closeFlyout === 'function' && dashboardFlyoutIsOpen) { + closeFlyout(); + } }; async renderFlyout() { - const { alert, isAlertsFlyout = false } = this.props; + const { alert } = this.props; if (!_.isEmpty(alert)) await this.getFinding(); const { docList, finding } = this.state; @@ -93,17 +99,28 @@ export default class FindingFlyout extends Component { const flyout = ( - -

Document finding

-
+ + + +

Document finding

+
+
+ + + +
@@ -157,16 +174,6 @@ export default class FindingFlyout extends Component { {JSON.stringify(documentDisplay, null, 3)} - - - - Close - -
); this.setState({ flyout: flyout }); diff --git a/public/pages/Dashboard/components/FindingsDashboard/findingsUtils.js b/public/pages/Dashboard/components/FindingsDashboard/findingsUtils.js index 8237210d4..98fa5345f 100644 --- a/public/pages/Dashboard/components/FindingsDashboard/findingsUtils.js +++ b/public/pages/Dashboard/components/FindingsDashboard/findingsUtils.js @@ -41,7 +41,6 @@ export const ALERTS_FINDING_COLUMN = { export const getAlertsFindingColumn = ( httpClient, history, - isAlertsFlyout = false, location, notifications, flyoutIsOpen, @@ -58,7 +57,6 @@ export const getAlertsFindingColumn = ( console.log('Alerts index contains an entry with 0 related document IDs:', alert); return ( { - 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';