diff --git a/x-pack/plugins/monitoring/public/alerts/badge.tsx b/x-pack/plugins/monitoring/public/alerts/badge.tsx index cf75939b14efc..d4e823a194f8e 100644 --- a/x-pack/plugins/monitoring/public/alerts/badge.tsx +++ b/x-pack/plugins/monitoring/public/alerts/badge.tsx @@ -22,6 +22,7 @@ import { AlertMessage, AlertState } from '../../server/alerts/types'; import { AlertPanel } from './panel'; import { Legacy } from '../legacy_shims'; import { isInSetupMode } from '../lib/setup_mode'; +import { SetupModeContext } from '../components/setup_mode/setup_mode_context'; function getDateFromState(state: CommonAlertState) { const timestamp = state.state.ui.triggeredMS; @@ -44,7 +45,7 @@ interface Props { export const AlertsBadge: React.FC = (props: Props) => { const { stateFilter = () => true, nextStepsFilter = () => true } = props; const [showPopover, setShowPopover] = React.useState(null); - const inSetupMode = isInSetupMode(); + const inSetupMode = isInSetupMode(React.useContext(SetupModeContext)); const alerts = Object.values(props.alerts).filter(Boolean); if (alerts.length === 0) { diff --git a/x-pack/plugins/monitoring/public/alerts/lib/should_show_alert_badge.ts b/x-pack/plugins/monitoring/public/alerts/lib/should_show_alert_badge.ts index 6de371b53ef9b..0b95592d92c84 100644 --- a/x-pack/plugins/monitoring/public/alerts/lib/should_show_alert_badge.ts +++ b/x-pack/plugins/monitoring/public/alerts/lib/should_show_alert_badge.ts @@ -5,14 +5,16 @@ */ import { isInSetupMode } from '../../lib/setup_mode'; import { CommonAlertStatus } from '../../../common/types'; +import { ISetupModeContext } from '../../components/setup_mode/setup_mode_context'; export function shouldShowAlertBadge( alerts: { [alertTypeId: string]: CommonAlertStatus }, - alertTypeIds: string[] + alertTypeIds: string[], + context?: ISetupModeContext ) { if (!alerts) { return false; } - const inSetupMode = isInSetupMode(); + const inSetupMode = isInSetupMode(context); return inSetupMode || alertTypeIds.find((name) => alerts[name] && alerts[name].states.length); } diff --git a/x-pack/plugins/monitoring/public/alerts/panel.tsx b/x-pack/plugins/monitoring/public/alerts/panel.tsx index ee605592e9408..eb3b6ff9da1be 100644 --- a/x-pack/plugins/monitoring/public/alerts/panel.tsx +++ b/x-pack/plugins/monitoring/public/alerts/panel.tsx @@ -26,6 +26,7 @@ import { AlertsContextProvider } from '../../../triggers_actions_ui/public'; import { AlertEdit } from '../../../triggers_actions_ui/public'; import { isInSetupMode, hideBottomBar, showBottomBar } from '../lib/setup_mode'; import { BASE_ALERT_API_PATH } from '../../../alerts/common'; +import { SetupModeContext } from '../components/setup_mode/setup_mode_context'; interface Props { alert: CommonAlertStatus; @@ -42,7 +43,7 @@ export const AlertPanel: React.FC = (props: Props) => { const [isEnabled, setIsEnabled] = React.useState(alert.rawAlert.enabled); const [isMuted, setIsMuted] = React.useState(alert.rawAlert.muteAll); const [isSaving, setIsSaving] = React.useState(false); - const inSetupMode = isInSetupMode(); + const inSetupMode = isInSetupMode(React.useContext(SetupModeContext)); if (!alert.rawAlert) { return null; diff --git a/x-pack/plugins/monitoring/public/alerts/status.tsx b/x-pack/plugins/monitoring/public/alerts/status.tsx index dba66df0e4474..c1ad41fc8d763 100644 --- a/x-pack/plugins/monitoring/public/alerts/status.tsx +++ b/x-pack/plugins/monitoring/public/alerts/status.tsx @@ -12,6 +12,7 @@ import { AlertSeverity } from '../../common/enums'; import { AlertMessage, AlertState } from '../../server/alerts/types'; import { AlertsBadge } from './badge'; import { isInSetupMode } from '../lib/setup_mode'; +import { SetupModeContext } from '../components/setup_mode/setup_mode_context'; interface Props { alerts: { [alertTypeId: string]: CommonAlertStatus }; @@ -28,7 +29,7 @@ export const AlertsStatus: React.FC = (props: Props) => { stateFilter = () => true, nextStepsFilter = () => true, } = props; - const inSetupMode = isInSetupMode(); + const inSetupMode = isInSetupMode(React.useContext(SetupModeContext)); if (!alerts) { return null; diff --git a/x-pack/plugins/monitoring/public/components/cluster/overview/apm_panel.js b/x-pack/plugins/monitoring/public/components/cluster/overview/apm_panel.js index d0d5a36c3829b..97ef3ada2948c 100644 --- a/x-pack/plugins/monitoring/public/components/cluster/overview/apm_panel.js +++ b/x-pack/plugins/monitoring/public/components/cluster/overview/apm_panel.js @@ -35,11 +35,13 @@ import { isSetupModeFeatureEnabled } from '../../../lib/setup_mode'; import { SetupModeFeature } from '../../../../common/enums'; import { shouldShowAlertBadge } from '../../../alerts/lib/should_show_alert_badge'; import { AlertsBadge } from '../../../alerts/badge'; +import { SetupModeContext } from '../../setup_mode/setup_mode_context'; const SERVERS_PANEL_ALERTS = [ALERT_MISSING_MONITORING_DATA]; export function ApmPanel(props) { const { setupMode, alerts } = props; + const setupModeContext = React.useContext(SetupModeContext); const apmsTotal = get(props, 'apms.total') || 0; // Do not show if we are not in setup mode if (apmsTotal === 0 && !setupMode.enabled) { @@ -59,7 +61,7 @@ export function ApmPanel(props) { ) : null; let apmServersAlertStatus = null; - if (shouldShowAlertBadge(alerts, SERVERS_PANEL_ALERTS)) { + if (shouldShowAlertBadge(alerts, SERVERS_PANEL_ALERTS, setupModeContext)) { const alertsList = SERVERS_PANEL_ALERTS.map((alertType) => alerts[alertType]); apmServersAlertStatus = ( diff --git a/x-pack/plugins/monitoring/public/components/cluster/overview/beats_panel.js b/x-pack/plugins/monitoring/public/components/cluster/overview/beats_panel.js index 628f57a0ffde3..ab648097f151a 100644 --- a/x-pack/plugins/monitoring/public/components/cluster/overview/beats_panel.js +++ b/x-pack/plugins/monitoring/public/components/cluster/overview/beats_panel.js @@ -29,11 +29,13 @@ import { isSetupModeFeatureEnabled } from '../../../lib/setup_mode'; import { SetupModeFeature } from '../../../../common/enums'; import { shouldShowAlertBadge } from '../../../alerts/lib/should_show_alert_badge'; import { AlertsBadge } from '../../../alerts/badge'; +import { SetupModeContext } from '../../setup_mode/setup_mode_context'; const BEATS_PANEL_ALERTS = [ALERT_MISSING_MONITORING_DATA]; export function BeatsPanel(props) { const { setupMode, alerts } = props; + const setupModeContext = React.useContext(SetupModeContext); const beatsTotal = get(props, 'beats.total') || 0; // Do not show if we are not in setup mode if (beatsTotal === 0 && !setupMode.enabled) { @@ -52,7 +54,7 @@ export function BeatsPanel(props) { ) : null; let beatsAlertsStatus = null; - if (shouldShowAlertBadge(alerts, BEATS_PANEL_ALERTS)) { + if (shouldShowAlertBadge(alerts, BEATS_PANEL_ALERTS, setupModeContext)) { const alertsList = BEATS_PANEL_ALERTS.map((alertType) => alerts[alertType]); beatsAlertsStatus = ( diff --git a/x-pack/plugins/monitoring/public/components/cluster/overview/elasticsearch_panel.js b/x-pack/plugins/monitoring/public/components/cluster/overview/elasticsearch_panel.js index 13324ba3ecac9..0fe434afa2c88 100644 --- a/x-pack/plugins/monitoring/public/components/cluster/overview/elasticsearch_panel.js +++ b/x-pack/plugins/monitoring/public/components/cluster/overview/elasticsearch_panel.js @@ -50,6 +50,7 @@ import { AlertsBadge } from '../../../alerts/badge'; import { shouldShowAlertBadge } from '../../../alerts/lib/should_show_alert_badge'; import { SetupModeFeature } from '../../../../common/enums'; import { isSetupModeFeatureEnabled } from '../../../lib/setup_mode'; +import { SetupModeContext } from '../../setup_mode/setup_mode_context'; const calculateShards = (shards) => { const total = get(shards, 'total', 0); @@ -173,6 +174,7 @@ export function ElasticsearchPanel(props) { const indices = clusterStats.indices; const setupMode = props.setupMode; const alerts = props.alerts; + const setupModeContext = React.useContext(SetupModeContext); const goToElasticsearch = () => getSafeForExternalLink('#/elasticsearch'); const goToNodes = () => getSafeForExternalLink('#/elasticsearch/nodes'); @@ -231,7 +233,7 @@ export function ElasticsearchPanel(props) { }; let nodesAlertStatus = null; - if (shouldShowAlertBadge(alerts, NODES_PANEL_ALERTS)) { + if (shouldShowAlertBadge(alerts, NODES_PANEL_ALERTS, setupModeContext)) { const alertsList = NODES_PANEL_ALERTS.map((alertType) => alerts[alertType]); nodesAlertStatus = ( @@ -241,7 +243,7 @@ export function ElasticsearchPanel(props) { } let overviewAlertStatus = null; - if (shouldShowAlertBadge(alerts, OVERVIEW_PANEL_ALERTS)) { + if (shouldShowAlertBadge(alerts, OVERVIEW_PANEL_ALERTS, setupModeContext)) { const alertsList = OVERVIEW_PANEL_ALERTS.map((alertType) => alerts[alertType]); overviewAlertStatus = ( diff --git a/x-pack/plugins/monitoring/public/components/cluster/overview/kibana_panel.js b/x-pack/plugins/monitoring/public/components/cluster/overview/kibana_panel.js index 1f20684bd97d7..a5079f2eaa5f6 100644 --- a/x-pack/plugins/monitoring/public/components/cluster/overview/kibana_panel.js +++ b/x-pack/plugins/monitoring/public/components/cluster/overview/kibana_panel.js @@ -38,12 +38,14 @@ import { AlertsBadge } from '../../../alerts/badge'; import { shouldShowAlertBadge } from '../../../alerts/lib/should_show_alert_badge'; import { isSetupModeFeatureEnabled } from '../../../lib/setup_mode'; import { SetupModeFeature } from '../../../../common/enums'; +import { SetupModeContext } from '../../setup_mode/setup_mode_context'; const INSTANCES_PANEL_ALERTS = [ALERT_KIBANA_VERSION_MISMATCH, ALERT_MISSING_MONITORING_DATA]; export function KibanaPanel(props) { const setupMode = props.setupMode; const alerts = props.alerts; + const setupModeContext = React.useContext(SetupModeContext); const showDetectedKibanas = setupMode.enabled && get(setupMode.data, 'kibana.detected.doesExist', false); if (!props.count && !showDetectedKibanas) { @@ -67,7 +69,7 @@ export function KibanaPanel(props) { ) : null; let instancesAlertStatus = null; - if (shouldShowAlertBadge(alerts, INSTANCES_PANEL_ALERTS)) { + if (shouldShowAlertBadge(alerts, INSTANCES_PANEL_ALERTS, setupModeContext)) { const alertsList = INSTANCES_PANEL_ALERTS.map((alertType) => alerts[alertType]); instancesAlertStatus = ( diff --git a/x-pack/plugins/monitoring/public/components/cluster/overview/logstash_panel.js b/x-pack/plugins/monitoring/public/components/cluster/overview/logstash_panel.js index 7c0e04ab5d615..3bf3fa94c310e 100644 --- a/x-pack/plugins/monitoring/public/components/cluster/overview/logstash_panel.js +++ b/x-pack/plugins/monitoring/public/components/cluster/overview/logstash_panel.js @@ -40,6 +40,7 @@ import { AlertsBadge } from '../../../alerts/badge'; import { shouldShowAlertBadge } from '../../../alerts/lib/should_show_alert_badge'; import { isSetupModeFeatureEnabled } from '../../../lib/setup_mode'; import { SetupModeFeature } from '../../../../common/enums'; +import { SetupModeContext } from '../../setup_mode/setup_mode_context'; const NODES_PANEL_ALERTS = [ALERT_LOGSTASH_VERSION_MISMATCH, ALERT_MISSING_MONITORING_DATA]; @@ -48,6 +49,7 @@ export function LogstashPanel(props) { const nodesCount = props.node_count || 0; const queueTypes = props.queue_types || {}; const alerts = props.alerts; + const setupModeContext = React.useContext(SetupModeContext); // Do not show if we are not in setup mode if (!nodesCount && !setupMode.enabled) { @@ -70,7 +72,7 @@ export function LogstashPanel(props) { ) : null; let nodesAlertStatus = null; - if (shouldShowAlertBadge(alerts, NODES_PANEL_ALERTS)) { + if (shouldShowAlertBadge(alerts, NODES_PANEL_ALERTS, setupModeContext)) { const alertsList = NODES_PANEL_ALERTS.map((alertType) => alerts[alertType]); nodesAlertStatus = ( diff --git a/x-pack/plugins/monitoring/public/components/renderers/__snapshots__/setup_mode.test.js.snap b/x-pack/plugins/monitoring/public/components/renderers/__snapshots__/setup_mode.test.js.snap index 7e67e2f180d77..8134143ca5320 100644 --- a/x-pack/plugins/monitoring/public/components/renderers/__snapshots__/setup_mode.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/renderers/__snapshots__/setup_mode.test.js.snap @@ -100,7 +100,9 @@ exports[`SetupModeRenderer should render with setup mode disabled 1`] = ` setupMode={ Object { "closeFlyout": [Function], - "data": null, + "data": Object { + "byUuid": Object {}, + }, "enabled": false, "meta": null, "openFlyout": [Function], diff --git a/x-pack/plugins/monitoring/public/components/renderers/setup_mode.js b/x-pack/plugins/monitoring/public/components/renderers/setup_mode.js index 52e97f4c47381..816243c94ab1b 100644 --- a/x-pack/plugins/monitoring/public/components/renderers/setup_mode.js +++ b/x-pack/plugins/monitoring/public/components/renderers/setup_mode.js @@ -177,11 +177,11 @@ export class SetupModeRenderer extends React.Component { const { render, productName } = this.props; const setupModeState = getSetupModeState(); - let data = null; + let data = { byUuid: {} }; if (setupModeState.data) { - if (productName) { + if (productName && setupModeState.data[productName]) { data = setupModeState.data[productName]; - } else { + } else if (setupModeState.data) { data = setupModeState.data; } } diff --git a/x-pack/plugins/monitoring/public/components/setup_mode/setup_mode_context.ts b/x-pack/plugins/monitoring/public/components/setup_mode/setup_mode_context.ts new file mode 100644 index 0000000000000..c727aad0e88e6 --- /dev/null +++ b/x-pack/plugins/monitoring/public/components/setup_mode/setup_mode_context.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ +import React from 'react'; + +export interface ISetupModeContext { + setupModeSupported: boolean; +} + +export const SetupModeContext = React.createContext({ + setupModeSupported: false, +}); diff --git a/x-pack/plugins/monitoring/public/components/table/eui_table.js b/x-pack/plugins/monitoring/public/components/table/eui_table.js index 44ee883c135d2..dd99374cfe9b0 100644 --- a/x-pack/plugins/monitoring/public/components/table/eui_table.js +++ b/x-pack/plugins/monitoring/public/components/table/eui_table.js @@ -47,7 +47,7 @@ export function EuiMonitoringTable({ }); let footerContent = null; - if (isSetupModeFeatureEnabled(SetupModeFeature.MetricbeatMigration)) { + if (setupMode && isSetupModeFeatureEnabled(SetupModeFeature.MetricbeatMigration)) { footerContent = ( diff --git a/x-pack/plugins/monitoring/public/directives/main/index.js b/x-pack/plugins/monitoring/public/directives/main/index.js index bc43c8048c3e0..3abfb59931ee6 100644 --- a/x-pack/plugins/monitoring/public/directives/main/index.js +++ b/x-pack/plugins/monitoring/public/directives/main/index.js @@ -182,6 +182,10 @@ export class MonitoringMainController { return false; } + if (!setupMode.data) { + return false; + } + const data = setupMode.data[product] || {}; if (data.totalUniqueInstanceCount === 0) { return true; diff --git a/x-pack/plugins/monitoring/public/lib/internal_monitoring_toasts.tsx b/x-pack/plugins/monitoring/public/lib/internal_monitoring_toasts.tsx index b6ecb631d005a..a2304ada5cce4 100644 --- a/x-pack/plugins/monitoring/public/lib/internal_monitoring_toasts.tsx +++ b/x-pack/plugins/monitoring/public/lib/internal_monitoring_toasts.tsx @@ -40,8 +40,8 @@ const showIfLegacyOnlyIndices = () => {

{i18n.translate('xpack.monitoring.internalMonitoringToast.description', { - defaultMessage: `It appears you are using "Legacy Collection" for Stack Monitoring. - This method of monitoring will no longer be supported in the next major release (8.0.0). + defaultMessage: `It appears you are using "Legacy Collection" for Stack Monitoring. + This method of monitoring will no longer be supported in the next major release (8.0.0). Please follow the steps in setup mode to start monitoring with Metricbeat.`, })}

@@ -80,8 +80,8 @@ const showIfLegacyAndMetricbeatIndices = () => {

{i18n.translate('xpack.monitoring.internalAndMetricbeatMonitoringToast.description', { - defaultMessage: `It appears you are using both Metricbeat and "Legacy Collection" for Stack Monitoring. - In 8.0.0, you must use Metricbeat to collect monitoring data. + defaultMessage: `It appears you are using both Metricbeat and "Legacy Collection" for Stack Monitoring. + In 8.0.0, you must use Metricbeat to collect monitoring data. Please follow the steps in setup mode to migrate the rest of the monitoring to Metricbeat.`, })}

diff --git a/x-pack/plugins/monitoring/public/lib/setup_mode.tsx b/x-pack/plugins/monitoring/public/lib/setup_mode.tsx index 6b956ce71c009..a8511da1a4f37 100644 --- a/x-pack/plugins/monitoring/public/lib/setup_mode.tsx +++ b/x-pack/plugins/monitoring/public/lib/setup_mode.tsx @@ -13,6 +13,7 @@ import { Legacy } from '../legacy_shims'; import { ajaxErrorHandlersProvider } from './ajax_error_handler'; import { SetupModeEnterButton } from '../components/setup_mode/enter_button'; import { SetupModeFeature } from '../../common/enums'; +import { ISetupModeContext } from '../components/setup_mode/setup_mode_context'; function isOnPage(hash: string) { return includes(window.location.hash, hash); @@ -210,7 +211,10 @@ export const initSetupModeState = async ($scope: any, $injector: any, callback?: } }; -export const isInSetupMode = () => { +export const isInSetupMode = (context?: ISetupModeContext) => { + if (context?.setupModeSupported === false) { + return false; + } if (setupModeState.enabled) { return true; } diff --git a/x-pack/plugins/monitoring/public/views/apm/instances/index.js b/x-pack/plugins/monitoring/public/views/apm/instances/index.js index 75f3ded89a595..a66e939b18480 100644 --- a/x-pack/plugins/monitoring/public/views/apm/instances/index.js +++ b/x-pack/plugins/monitoring/public/views/apm/instances/index.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { Fragment } from 'react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; import { find } from 'lodash'; import { uiRoutes } from '../../../angular/helpers/routes'; @@ -13,6 +13,7 @@ import template from './index.html'; import { ApmServerInstances } from '../../../components/apm/instances'; import { MonitoringViewBaseEuiTableController } from '../..'; import { SetupModeRenderer } from '../../../components/renderers'; +import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; import { APM_SYSTEM_ID, CODE_PATH_APM, @@ -78,7 +79,7 @@ uiRoutes.when('/apm/instances', { injector={this.injector} productName={APM_SYSTEM_ID} render={({ setupMode, flyoutComponent, bottomBarComponent }) => ( - + {flyoutComponent} {bottomBarComponent} - + )} /> ); diff --git a/x-pack/plugins/monitoring/public/views/beats/listing/index.js b/x-pack/plugins/monitoring/public/views/beats/listing/index.js index f8f0749d6d30e..61656189aa47b 100644 --- a/x-pack/plugins/monitoring/public/views/beats/listing/index.js +++ b/x-pack/plugins/monitoring/public/views/beats/listing/index.js @@ -11,9 +11,10 @@ import { routeInitProvider } from '../../../lib/route_init'; import { MonitoringViewBaseEuiTableController } from '../../'; import { getPageData } from './get_page_data'; import template from './index.html'; -import React, { Fragment } from 'react'; +import React from 'react'; import { Listing } from '../../../components/beats/listing/listing'; import { SetupModeRenderer } from '../../../components/renderers'; +import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; import { CODE_PATH_BEATS, BEATS_SYSTEM_ID, @@ -81,7 +82,7 @@ uiRoutes.when('/beats/beats', { injector={this.injector} productName={BEATS_SYSTEM_ID} render={({ setupMode, flyoutComponent, bottomBarComponent }) => ( - + {flyoutComponent} {bottomBarComponent} - + )} /> ); diff --git a/x-pack/plugins/monitoring/public/views/cluster/overview/index.js b/x-pack/plugins/monitoring/public/views/cluster/overview/index.js index 6f27a12223b26..d8a01fcd30820 100644 --- a/x-pack/plugins/monitoring/public/views/cluster/overview/index.js +++ b/x-pack/plugins/monitoring/public/views/cluster/overview/index.js @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import React, { Fragment } from 'react'; +import React from 'react'; import { isEmpty } from 'lodash'; import { i18n } from '@kbn/i18n'; import { uiRoutes } from '../../../angular/helpers/routes'; @@ -12,6 +12,7 @@ import template from './index.html'; import { MonitoringViewBaseController } from '../../'; import { Overview } from '../../../components/cluster/overview'; import { SetupModeRenderer } from '../../../components/renderers'; +import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; import { CODE_PATH_ALL } from '../../../../common/constants'; const CODE_PATHS = [CODE_PATH_ALL]; @@ -71,7 +72,7 @@ uiRoutes.when('/overview', { scope={$scope} injector={$injector} render={({ setupMode, flyoutComponent, bottomBarComponent }) => ( - + {flyoutComponent} {bottomBarComponent} - + )} /> ); diff --git a/x-pack/plugins/monitoring/public/views/elasticsearch/nodes/index.js b/x-pack/plugins/monitoring/public/views/elasticsearch/nodes/index.js index 4f66508c2d30f..4341ada00da8b 100644 --- a/x-pack/plugins/monitoring/public/views/elasticsearch/nodes/index.js +++ b/x-pack/plugins/monitoring/public/views/elasticsearch/nodes/index.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { Fragment } from 'react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; import { find } from 'lodash'; import { uiRoutes } from '../../../angular/helpers/routes'; @@ -23,6 +23,7 @@ import { ALERT_DISK_USAGE, ALERT_MEMORY_USAGE, } from '../../../../common/constants'; +import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; uiRoutes.when('/elasticsearch/nodes', { template, @@ -125,7 +126,7 @@ uiRoutes.when('/elasticsearch/nodes', { injector={$injector} productName={ELASTICSEARCH_SYSTEM_ID} render={({ setupMode, flyoutComponent, bottomBarComponent }) => ( - + {flyoutComponent} {bottomBarComponent} - + )} /> ); diff --git a/x-pack/plugins/monitoring/public/views/kibana/instances/index.js b/x-pack/plugins/monitoring/public/views/kibana/instances/index.js index fcb2ee53471a1..97841ec490fa8 100644 --- a/x-pack/plugins/monitoring/public/views/kibana/instances/index.js +++ b/x-pack/plugins/monitoring/public/views/kibana/instances/index.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { Fragment } from 'react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; import { uiRoutes } from '../../../angular/helpers/routes'; import { routeInitProvider } from '../../../lib/route_init'; @@ -13,6 +13,7 @@ import { getPageData } from './get_page_data'; import template from './index.html'; import { KibanaInstances } from '../../../components/kibana/instances'; import { SetupModeRenderer } from '../../../components/renderers'; +import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; import { KIBANA_SYSTEM_ID, CODE_PATH_KIBANA, @@ -64,7 +65,7 @@ uiRoutes.when('/kibana/instances', { injector={$injector} productName={KIBANA_SYSTEM_ID} render={({ setupMode, flyoutComponent, bottomBarComponent }) => ( - + {flyoutComponent} {bottomBarComponent} - + )} /> ); diff --git a/x-pack/plugins/monitoring/public/views/logstash/nodes/index.js b/x-pack/plugins/monitoring/public/views/logstash/nodes/index.js index 20b2f68e2c67e..467462fffd48e 100644 --- a/x-pack/plugins/monitoring/public/views/logstash/nodes/index.js +++ b/x-pack/plugins/monitoring/public/views/logstash/nodes/index.js @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import React, { Fragment } from 'react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; import { uiRoutes } from '../../../angular/helpers/routes'; import { routeInitProvider } from '../../../lib/route_init'; @@ -12,6 +12,7 @@ import { getPageData } from './get_page_data'; import template from './index.html'; import { Listing } from '../../../components/logstash/listing'; import { SetupModeRenderer } from '../../../components/renderers'; +import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; import { CODE_PATH_LOGSTASH, LOGSTASH_SYSTEM_ID, @@ -65,7 +66,7 @@ uiRoutes.when('/logstash/nodes', { injector={$injector} productName={LOGSTASH_SYSTEM_ID} render={({ setupMode, flyoutComponent, bottomBarComponent }) => ( - + {flyoutComponent} {bottomBarComponent} - + )} /> );