From bffe5cfc47399b0fba62fc3b35d88df250387eda Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Fri, 24 Sep 2021 12:35:13 -0500 Subject: [PATCH 1/6] [ci] sync storybook builds between jenkins and buildkite (#113071) --- .buildkite/scripts/steps/storybooks/build_and_upload.js | 9 ++++++++- test/scripts/jenkins_storybook.sh | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.buildkite/scripts/steps/storybooks/build_and_upload.js b/.buildkite/scripts/steps/storybooks/build_and_upload.js index c1032575ae4a6..49e36d2126cd4 100644 --- a/.buildkite/scripts/steps/storybooks/build_and_upload.js +++ b/.buildkite/scripts/steps/storybooks/build_and_upload.js @@ -6,13 +6,20 @@ const path = require('path'); const STORYBOOKS = [ 'apm', 'canvas', + 'codeeditor', 'ci_composite', 'url_template_editor', - 'codeeditor', 'dashboard', 'dashboard_enhanced', 'data_enhanced', 'embeddable', + 'expression_error', + 'expression_image', + 'expression_metric', + 'expression_repeat_image', + 'expression_reveal_image', + 'expression_shape', + 'expression_tagcloud', 'fleet', 'infra', 'security_solution', diff --git a/test/scripts/jenkins_storybook.sh b/test/scripts/jenkins_storybook.sh index 00cc0d78599dd..17ca46b0097b1 100755 --- a/test/scripts/jenkins_storybook.sh +++ b/test/scripts/jenkins_storybook.sh @@ -20,6 +20,7 @@ yarn storybook --site expression_repeat_image yarn storybook --site expression_reveal_image yarn storybook --site expression_shape yarn storybook --site expression_tagcloud +yarn storybook --site fleet yarn storybook --site infra yarn storybook --site security_solution yarn storybook --site ui_actions_enhanced From affeb996fd5869dfad62b79698aef8e17abce762 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Sun, 26 Sep 2021 10:39:31 -0500 Subject: [PATCH 2/6] skip flaky suite. #113067 --- .../functional/apps/discover/feature_controls/discover_spaces.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts b/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts index c245b45917497..5e14cc6201ec2 100644 --- a/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts +++ b/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts @@ -28,6 +28,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await PageObjects.timePicker.setDefaultAbsoluteRange(); } + // FLAKY https://github.com/elastic/kibana/issues/113067 describe('spaces', () => { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); From 0a304340868e27896199ada4c4eb45853614af4d Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Sun, 26 Sep 2021 16:06:40 -0500 Subject: [PATCH 3/6] skip flaky suite. #100296 --- .../security_solution_endpoint/apps/endpoint/policy_details.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/policy_details.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/policy_details.ts index 8141bdde42b52..95299d8a81f5c 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/policy_details.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/policy_details.ts @@ -21,7 +21,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const policyTestResources = getService('policyTestResources'); - describe('When on the Endpoint Policy Details Page', function () { + // FLAKY https://github.com/elastic/kibana/issues/100296 + describe.skip('When on the Endpoint Policy Details Page', function () { describe('with an invalid policy id', () => { it('should display an error', async () => { await pageObjects.policy.navigateToPolicyDetails('invalid-id'); From d27c72302dba4e61296f76e37e93844634b95023 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Sun, 26 Sep 2021 16:29:06 -0500 Subject: [PATCH 4/6] skip flaky suite. #104578 --- x-pack/test/functional/apps/discover/saved_searches.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/discover/saved_searches.ts b/x-pack/test/functional/apps/discover/saved_searches.ts index 1d8de9fe9fb6d..ec649935adec2 100644 --- a/x-pack/test/functional/apps/discover/saved_searches.ts +++ b/x-pack/test/functional/apps/discover/saved_searches.ts @@ -18,7 +18,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const panelActionsTimeRange = getService('dashboardPanelTimeRange'); const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json'; - describe('Discover Saved Searches', () => { + // FLAKY https://github.com/elastic/kibana/issues/104578 + describe.skip('Discover Saved Searches', () => { before('initialize tests', async () => { await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce'); await kibanaServer.importExport.load(ecommerceSOPath); From 970394b8a9bf3f096fe2ba99c3f5dcecca2a6732 Mon Sep 17 00:00:00 2001 From: Mat Schaffer Date: Mon, 27 Sep 2021 12:40:59 +0900 Subject: [PATCH 5/6] [Stack Monitoring] Beats Overview view migration (#112377) * Wire up a stub beats overview page * Filling in some bits * Figured out this todo already * Fix importa and product name * Wire up BeatsOverview component * Set breadcrumbs * Add "beats" part to breadcrumbs * Remove unused vars copied from ES overview * Use passed data rather than outer scope * Fixing basic type checks * Fix breadcrumb type issues Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../monitoring/public/application/index.tsx | 11 ++- .../pages/beats/beats_template.tsx | 35 ++++++++ .../application/pages/beats/overview.tsx | 85 +++++++++++++++++++ 3 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 x-pack/plugins/monitoring/public/application/pages/beats/beats_template.tsx create mode 100644 x-pack/plugins/monitoring/public/application/pages/beats/overview.tsx diff --git a/x-pack/plugins/monitoring/public/application/index.tsx b/x-pack/plugins/monitoring/public/application/index.tsx index fa8dde397c1c0..85dc5286efa42 100644 --- a/x-pack/plugins/monitoring/public/application/index.tsx +++ b/x-pack/plugins/monitoring/public/application/index.tsx @@ -20,8 +20,9 @@ import { createPreserveQueryHistory } from './preserve_query_history'; import { RouteInit } from './route_init'; import { NoDataPage } from './pages/no_data'; import { ElasticsearchOverviewPage } from './pages/elasticsearch/overview'; +import { BeatsOverviewPage } from './pages/beats/overview'; +import { CODE_PATH_ELASTICSEARCH, CODE_PATH_BEATS } from '../../common/constants'; import { ElasticsearchNodesPage } from './pages/elasticsearch/nodes_page'; -import { CODE_PATH_ELASTICSEARCH } from '../../common/constants'; import { MonitoringTimeContainer } from './hooks/use_monitoring_time'; import { BreadcrumbContainer } from './hooks/use_breadcrumbs'; @@ -92,6 +93,14 @@ const MonitoringApp: React.FC<{ fetchAllClusters={false} /> + {/* Beats Views */} + + = ({ cluster, ...props }) => { + const tabs: TabMenuItem[] = [ + { + id: 'overview', + label: i18n.translate('xpack.monitoring.beatsNavigation.overviewLinkText', { + defaultMessage: 'Overview', + }), + route: '/beats', + }, + { + id: 'instances', + label: i18n.translate('xpack.monitoring.beatsNavigation.instancesLinkText', { + defaultMessage: 'Instances', + }), + route: '/beats/beats', + }, + ]; + + return ; +}; diff --git a/x-pack/plugins/monitoring/public/application/pages/beats/overview.tsx b/x-pack/plugins/monitoring/public/application/pages/beats/overview.tsx new file mode 100644 index 0000000000000..3efad7b82549c --- /dev/null +++ b/x-pack/plugins/monitoring/public/application/pages/beats/overview.tsx @@ -0,0 +1,85 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useContext, useState, useCallback, useEffect } from 'react'; +import { i18n } from '@kbn/i18n'; +import { find } from 'lodash'; +import { ComponentProps } from '../../route_init'; +import { BeatsTemplate } from './beats_template'; +import { GlobalStateContext } from '../../global_state_context'; +import { useCharts } from '../../hooks/use_charts'; +import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; +// @ts-ignore +import { BeatsOverview } from '../../../components/beats/overview'; +import { BreadcrumbContainer } from '../../hooks/use_breadcrumbs'; + +export const BeatsOverviewPage: React.FC = ({ clusters }) => { + const globalState = useContext(GlobalStateContext); + const { zoomInfo, onBrush } = useCharts(); + const { services } = useKibana<{ data: any }>(); + const clusterUuid = globalState.cluster_uuid; + const ccs = globalState.ccs; + const { generate: generateBreadcrumbs } = useContext(BreadcrumbContainer.Context); + const cluster = find(clusters, { + cluster_uuid: clusterUuid, + }) as any; + + const [data, setData] = useState(null); + + const title = i18n.translate('xpack.monitoring.beats.overview.routeTitle', { + defaultMessage: 'Beats - Overview', + }); + + const pageTitle = i18n.translate('xpack.monitoring.beats.overview.pageTitle', { + defaultMessage: 'Beats overview', + }); + + useEffect(() => { + if (cluster) { + generateBreadcrumbs(cluster.cluster_name, { + inBeats: true, + }); + } + }, [cluster, generateBreadcrumbs]); + + const getPageData = useCallback(async () => { + const bounds = services.data?.query.timefilter.timefilter.getBounds(); + const url = `../api/monitoring/v1/clusters/${clusterUuid}/beats`; + + const response = await services.http?.fetch(url, { + method: 'POST', + body: JSON.stringify({ + ccs, + timeRange: { + min: bounds.min.toISOString(), + max: bounds.max.toISOString(), + }, + }), + }); + + setData(response); + }, [ccs, clusterUuid, services.data?.query.timefilter.timefilter, services.http]); + + const renderOverview = (overviewData: any) => { + if (overviewData === null) { + return null; + } + return ; + }; + + return ( + +
{renderOverview(data)}
+
+ ); +}; From b303d0fecd8e0473e22dfd5624f786c36a1cdb61 Mon Sep 17 00:00:00 2001 From: Marco Liberati Date: Mon, 27 Sep 2021 10:13:12 +0200 Subject: [PATCH 6/6] [Lens] [Documentation] More Lens advanced questions answered (#111601) Co-authored-by: Kaarina Tungseth Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- docs/user/dashboard/lens.asciidoc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/user/dashboard/lens.asciidoc b/docs/user/dashboard/lens.asciidoc index 0f130f15c8a77..c3e0a5523a78d 100644 --- a/docs/user/dashboard/lens.asciidoc +++ b/docs/user/dashboard/lens.asciidoc @@ -441,4 +441,20 @@ Pagination in a data table is unsupported. To use pagination in data tables, cre [%collapsible] ==== Specifying the color for a single data point, such as a single bar or line, is unsupported. -==== \ No newline at end of file +==== + +[discrete] +[[is-it-possible-to-inspect-the-elasticsearch-queries-in-Lens]] +.*How do I inspect {es} queries in visualizations?* +[%collapsible] +==== +You can inspect the requests sent by the visualization to {es} using the Inspector. It can be accessed within the editor or in the dashboard. +==== + +[discrete] +[[how-to-isolate-a-single-series-in-a-chart]] +.*How do I isolate a single series in a chart?* +[%collapsible] +==== +For area, line, and bar charts, press Shift, then click the series in the legend. All other series are automatically unselected. +====