From 670dd60d9a3a580637890b37e2ecf368c2d05446 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 13 Oct 2022 09:06:12 +0200 Subject: [PATCH 01/35] [Security Solution] Removes duplicated code from `risk_scores/indices.ts` (#143030) --- .../tasks/api_calls/risk_scores/index.ts | 12 ++--- .../cypress/tasks/risk_scores/indices.ts | 53 +++++-------------- 2 files changed, 20 insertions(+), 45 deletions(-) diff --git a/x-pack/plugins/security_solution/cypress/tasks/api_calls/risk_scores/index.ts b/x-pack/plugins/security_solution/cypress/tasks/api_calls/risk_scores/index.ts index 8180c47698ea7..4429bfae8820a 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/api_calls/risk_scores/index.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/api_calls/risk_scores/index.ts @@ -10,8 +10,8 @@ import { RISK_SCORE_URL } from '../../../urls/risk_score'; import { visit } from '../../login'; import { RiskScoreEntity } from '../../risk_scores/common'; import { - getCreateLegacyRiskScoreIndicesOptions, - getCreateLegacyRiskScoreLatestIndicesOptions, + getLegacyRiskScoreIndicesOptions, + getLegacyRiskScoreLatestIndicesOptions, } from '../../risk_scores/indices'; import { getIngestPipelineName, @@ -133,7 +133,7 @@ const installLegacyHostRiskScoreModule = (spaceId: string) => { * Step 6 create ml_host_risk_score_{spaceId} index */ return createIndex( - getCreateLegacyRiskScoreIndicesOptions({ + getLegacyRiskScoreIndicesOptions({ spaceId, riskScoreEntity: RiskScoreEntity.host, }) @@ -153,7 +153,7 @@ const installLegacyHostRiskScoreModule = (spaceId: string) => { * Step 8 create ml_host_risk_score_latest_{spaceId} index */ return createIndex( - getCreateLegacyRiskScoreLatestIndicesOptions({ + getLegacyRiskScoreLatestIndicesOptions({ spaceId, riskScoreEntity: RiskScoreEntity.host, }) @@ -216,7 +216,7 @@ const installLegacyUserRiskScoreModule = async (spaceId = 'default') => { * Step 5 create ml_user_risk_score_{spaceId} index */ return createIndex( - getCreateLegacyRiskScoreIndicesOptions({ + getLegacyRiskScoreIndicesOptions({ spaceId, riskScoreEntity: RiskScoreEntity.user, }) @@ -236,7 +236,7 @@ const installLegacyUserRiskScoreModule = async (spaceId = 'default') => { * Step 7 create ml_user_risk_score_latest_{spaceId} index */ return createIndex( - getCreateLegacyRiskScoreLatestIndicesOptions({ + getLegacyRiskScoreLatestIndicesOptions({ spaceId, riskScoreEntity: RiskScoreEntity.user, }) diff --git a/x-pack/plugins/security_solution/cypress/tasks/risk_scores/indices.ts b/x-pack/plugins/security_solution/cypress/tasks/risk_scores/indices.ts index 6a7c7f317c8ca..1d064fcdbb59b 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/risk_scores/indices.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/risk_scores/indices.ts @@ -13,14 +13,8 @@ export const getPivotTransformIndex = (riskScoreEntity: RiskScoreEntity, spaceId export const getLatestTransformIndex = (riskScoreEntity: RiskScoreEntity, spaceId = 'default') => `ml_${riskScoreEntity}_risk_score_latest_${spaceId}`; -export const getCreateLegacyRiskScoreIndicesOptions = ({ - spaceId = 'default', - riskScoreEntity, -}: { - spaceId?: string; - riskScoreEntity: RiskScoreEntity; -}) => { - const mappings = { +export const getLegacyRiskScoreMapping = (riskScoreEntity: RiskScoreEntity) => { + return { properties: { [`${riskScoreEntity}.name`]: { type: 'keyword', @@ -48,49 +42,30 @@ export const getCreateLegacyRiskScoreIndicesOptions = ({ }, }, }; +}; + +export const getLegacyRiskScoreIndicesOptions = ({ + spaceId = 'default', + riskScoreEntity, +}: { + spaceId?: string; + riskScoreEntity: RiskScoreEntity; +}) => { return { index: getPivotTransformIndex(riskScoreEntity, spaceId), - mappings, + mappings: getLegacyRiskScoreMapping(riskScoreEntity), }; }; -export const getCreateLegacyRiskScoreLatestIndicesOptions = ({ +export const getLegacyRiskScoreLatestIndicesOptions = ({ spaceId = 'default', riskScoreEntity, }: { spaceId?: string; riskScoreEntity: RiskScoreEntity; }) => { - const mappings = { - properties: { - [`${riskScoreEntity}.name`]: { - type: 'keyword', - }, - '@timestamp': { - type: 'date', - }, - ingest_timestamp: { - type: 'date', - }, - risk: { - type: 'text', - fields: { - keyword: { - type: 'keyword', - }, - }, - }, - risk_stats: { - properties: { - risk_score: { - type: 'float', - }, - }, - }, - }, - }; return { index: getLatestTransformIndex(riskScoreEntity, spaceId), - mappings, + mappings: getLegacyRiskScoreMapping(riskScoreEntity), }; }; From 7c5235c2e7e3e74f7a8fd368734e227d3a6cc736 Mon Sep 17 00:00:00 2001 From: Sander Philipse <94373878+sphilipse@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:21:56 +0200 Subject: [PATCH 02/35] [Enterprise Search] Adds instrumentation for click telemetry (#143184) * [Enterprise Search] Add click telemetry instrumentation to Content app * Add some telemetry guidelines * Remove callout from search_index.tsx * Fix a few texts that were checking HTML attributes * Remove unused translations Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- x-pack/plugins/enterprise_search/TELEMETRY.md | 20 +++++ .../authentication_panel_actions.tsx | 4 + .../authentication_panel_edit_content.tsx | 2 + .../crawl_rules_table.tsx | 2 + .../crawler_domain_detail.tsx | 2 + .../deduplication_panel.tsx | 12 ++- .../entry_points_table.tsx | 1 + .../crawler_domain_detail/sitemaps_table.tsx | 1 + .../new_index/new_search_index_logic.ts | 1 - .../new_index/new_search_index_template.tsx | 8 +- .../client_libraries_popover/popover.tsx | 9 ++- .../document_list/document_list.tsx | 3 + .../generate_api_key_modal/modal.tsx | 11 ++- .../create_engine_menu_item.tsx | 3 + .../header_actions/header_actions.tsx | 19 +++-- .../header_actions/search_engines_popover.tsx | 22 +++++- .../components/header_actions/sync_button.tsx | 4 +- .../index_created_callout/callout.tsx | 78 ------------------- .../index_created_callout/callout_logic.ts | 36 --------- .../manage_api_keys_popover/popover.tsx | 9 ++- .../connector/connector_configuration.tsx | 2 + .../connector_configuration_config.tsx | 5 +- .../connector_configuration_form.tsx | 7 +- .../connector_name_and_description_form.tsx | 7 +- .../connector/connector_scheduling.tsx | 4 + ...ative_connector_advanced_configuration.tsx | 1 + .../select_connector/connector_checkable.tsx | 1 + .../select_connector/select_connector.tsx | 8 +- .../automatic_crawl_scheduler.tsx | 11 ++- .../crawl_custom_settings_flyout.tsx | 8 +- ...stom_settings_flyout_crawl_depth_panel.tsx | 1 + ...tom_settings_flyout_domains_panel.test.tsx | 12 +-- ...l_custom_settings_flyout_domains_panel.tsx | 1 + ...m_settings_flyout_seed_urls_panel.test.tsx | 24 +++--- ...custom_settings_flyout_seed_urls_panel.tsx | 5 ++ .../domain_management/delete_domain_modal.tsx | 15 +++- .../domain_management/domains_panel.tsx | 8 +- .../domain_management/empty_state_panel.tsx | 6 +- .../components/search_index/documents.tsx | 3 + .../search_index/generate_api_key_panel.tsx | 3 +- .../pipelines/custom_pipeline_panel.tsx | 4 +- .../pipelines/inference_pipeline_card.tsx | 6 ++ .../pipelines/ingest_pipeline_modal.tsx | 9 ++- .../pipelines/ingest_pipelines_card.tsx | 10 ++- .../ml_inference/add_ml_inference_button.tsx | 27 ++++--- .../add_ml_inference_pipeline_modal.tsx | 25 +++++- .../ml_inference/configure_pipeline.tsx | 7 ++ .../pipelines/pipeline_settings_form.tsx | 5 ++ .../pipelines_json_configurations.tsx | 6 ++ .../components/search_index/search_index.tsx | 4 - .../enterprise_search_content/types.ts | 6 +- .../translations/translations/fr-FR.json | 5 -- .../translations/translations/ja-JP.json | 5 -- .../translations/translations/zh-CN.json | 5 -- 54 files changed, 307 insertions(+), 196 deletions(-) create mode 100644 x-pack/plugins/enterprise_search/TELEMETRY.md delete mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout_logic.ts diff --git a/x-pack/plugins/enterprise_search/TELEMETRY.md b/x-pack/plugins/enterprise_search/TELEMETRY.md new file mode 100644 index 0000000000000..eff8c3006b017 --- /dev/null +++ b/x-pack/plugins/enterprise_search/TELEMETRY.md @@ -0,0 +1,20 @@ +# Telemetry + +We have three forms of Telemetry in Kibana Enterprise Search: + +1. Automatic URL navigation tracking +2. Automatic click tracking +3. Manual telemetry tracking + +Automatic URL navigation tracking happens automatically and doesn't require any work from our side. + +Click tracking also happens automatically, but works by sending the DOM tree location of the clicked element. That's only useful if that element has a good click tracking id. To facilitate this, we add a `data-telemetry-id` attribute to each button and other relevant elements. The telemetry is formatted like so: + +`{app}-{ingestion type if applicable}-{page title}-{page subtitle}-{element title}` +`entSearchContent-connector-overview-generateApiKey-optimizedRequest` + +You don't need to stick to this format exactly and you can deviate with the three titles if they don't make sense. + +We also have a [telemetry endpoint](server/routes/enterprise_search/telemetry.ts) that can be used to create custom tracking counters, which are saved to Kibana's saved objects and periodically sent to the telemetry cluster. We can use this endpoint to facilitate more specific, customized telemetry needs. + +Keep in mind that tracking and telemetry can be privacy and security sensitive, and we want to make sure we only send generic data to the telemetry cluster. For example, we should not be tracking the contents of form fields or index names. diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/authentication_panel/authentication_panel_actions.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/authentication_panel/authentication_panel_actions.tsx index 2a42a26ee8754..28285e004182e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/authentication_panel/authentication_panel_actions.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/authentication_panel/authentication_panel_actions.tsx @@ -37,6 +37,7 @@ export const AuthenticationPanelActions: React.FC = () => { { { ) : currentAuth === null ? ( { ) : ( { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/authentication_panel/authentication_panel_edit_content.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/authentication_panel/authentication_panel_edit_content.tsx index 8c7522dc868b4..55b930e7c9c21 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/authentication_panel/authentication_panel_edit_content.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/authentication_panel/authentication_panel_edit_content.tsx @@ -40,6 +40,7 @@ export const AuthenticationPanelEditContent: React.FC = () => { { = ({ { editingRender: (crawlRule, onChange, { isInvalid, isLoading }) => ( = ({ { editingRender: (crawlRule, onChange, { isInvalid, isLoading }) => ( { rightSideItems: [ , { @@ -78,6 +79,7 @@ export const CrawlerDomainDetail: React.FC = () => { > { } action={ { } > deduplicationEnabled @@ -125,6 +132,7 @@ export const DeduplicationPanel: React.FC = () => { { { @@ -170,6 +179,7 @@ export const DeduplicationPanel: React.FC = () => { )} , { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/entry_points_table.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/entry_points_table.tsx index d14670f2c9ede..5f637c506e185 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/entry_points_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/entry_points_table.tsx @@ -37,6 +37,7 @@ export const EntryPointsTable: React.FC = ({ domain, inde { editingRender: (entryPoint, onChange, { isInvalid, isLoading }) => ( onChange(e.target.value)} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/sitemaps_table.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/sitemaps_table.tsx index f4a4102fcac07..d4c2ab5f4955a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/sitemaps_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/sitemaps_table.tsx @@ -41,6 +41,7 @@ export const SitemapsTable: React.FC = ({ domain, indexName, { editingRender: (sitemap, onChange, { isInvalid, isLoading }) => ( onChange(e.target.value)} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_logic.ts index 19ff482edae89..56a525d7b91d6 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_logic.ts @@ -62,7 +62,6 @@ type NewSearchIndexActions = Pick< crawlerIndexCreated: Actions['apiSuccess']; setLanguageSelectValue(language: string): { language: string }; setRawName(rawName: string): { rawName: string }; - showIndexCreatedCallout: () => void; }; export const NewSearchIndexLogic = kea>({ diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx index 6401db2a7974d..8142a26ceff93 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx @@ -42,14 +42,15 @@ export interface Props { } export const NewSearchIndexTemplate: React.FC = ({ + buttonLoading, children, disabled, docsUrl, error, - title, onNameChange, onSubmit, - buttonLoading, + title, + type, }) => { const { fullIndexName, @@ -141,6 +142,7 @@ export const NewSearchIndexTemplate: React.FC = ({ fullWidth > = ({ )} > = ({ { const { isClientsPopoverOpen } = useValues(OverviewLogic); + const { ingestionMethod } = useValues(IndexViewLogic); const { toggleClientsPopover } = useActions(OverviewLogic); return ( @@ -119,7 +121,12 @@ export const ClientLibrariesPopover: React.FC = () => { isOpen={isClientsPopoverOpen} closePopover={toggleClientsPopover} button={ - + {i18n.translate( 'xpack.enterpriseSearch.content,overview.documentExample.clientLibraries.label', { defaultMessage: 'Client Libraries' } diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx index 1d34dc695b0e2..bb0eab01c491e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx @@ -31,6 +31,7 @@ import { Result } from '../../../../../shared/result/result'; import { resultMetaData } from '../../../../../shared/result/result_metadata'; import { DocumentsLogic } from '../../documents_logic'; +import { IndexViewLogic } from '../../index_view_logic'; export const DocumentList: React.FC = () => { const { @@ -40,6 +41,7 @@ export const DocumentList: React.FC = () => { results, simplifiedMapping: mappings, } = useValues(DocumentsLogic); + const { ingestionMethod } = useValues(IndexViewLogic); const { onPaginate, setDocsPerPage } = useActions(DocumentsLogic); const [isPopoverOpen, setIsPopoverOpen] = useState(false); @@ -111,6 +113,7 @@ export const DocumentList: React.FC = () => { )} button={ = ({ indexName, onClose }) => { const { keyName, apiKey, isLoading, isSuccess } = useValues(GenerateApiKeyModalLogic); + const { ingestionMethod } = useValues(IndexViewLogic); const { setKeyName, makeRequest } = useActions(GenerateApiKeyModalLogic); return ( @@ -81,6 +84,7 @@ export const GenerateApiKeyModal: React.FC = ({ indexN setKeyName(event.currentTarget.value)} @@ -91,6 +95,7 @@ export const GenerateApiKeyModal: React.FC = ({ indexN = ({ indexN = ({ indexN - + {i18n.translate('xpack.enterpriseSearch.content.overview.generateApiKeyModal.cancel', { defaultMessage: 'Cancel', })} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/create_engine_menu_item.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/create_engine_menu_item.tsx index be216d2548eb4..61f090f8e20ad 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/create_engine_menu_item.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/create_engine_menu_item.tsx @@ -19,11 +19,13 @@ import { KibanaLogic } from '../../../../../shared/kibana'; export interface CreateEngineMenuItemProps { indexName?: string; + ingestionMethod: string; isHiddenIndex?: boolean; } export const CreateEngineMenuItem: React.FC = ({ indexName, + ingestionMethod, isHiddenIndex, }) => { const engineCreationPath = !indexName @@ -37,6 +39,7 @@ export const CreateEngineMenuItem: React.FC = ({ { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx index 9f04dd7ba16ce..10d821b87b0ee 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx @@ -8,15 +8,22 @@ import React from 'react'; import { ElasticsearchIndexWithIngestion } from '../../../../../../../common/types/indices'; -import { isCrawlerIndex, isConnectorIndex } from '../../../../utils/indices'; +import { isCrawlerIndex, isConnectorIndex, getIngestionMethod } from '../../../../utils/indices'; import { CrawlerStatusIndicator } from '../../../shared/crawler_status_indicator/crawler_status_indicator'; import { SearchEnginesPopover } from './search_engines_popover'; import { SyncButton } from './sync_button'; // Used to populate rightSideItems of an EuiPageTemplate, which is rendered right-to-left -export const getHeaderActions = (indexData?: ElasticsearchIndexWithIngestion) => [ - ...(isCrawlerIndex(indexData) ? [] : []), - ...(isConnectorIndex(indexData) ? [] : []), - , -]; +export const getHeaderActions = (indexData?: ElasticsearchIndexWithIngestion) => { + const ingestionMethod = getIngestionMethod(indexData); + return [ + ...(isCrawlerIndex(indexData) ? [] : []), + ...(isConnectorIndex(indexData) ? [] : []), + , + ]; +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_engines_popover.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_engines_popover.tsx index 2ac1682f8676c..47584d3021ada 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_engines_popover.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_engines_popover.tsx @@ -28,11 +28,13 @@ import { SearchEnginesPopoverLogic } from './search_engines_popover_logic'; export interface SearchEnginesPopoverProps { indexName?: string; + ingestionMethod: string; isHiddenIndex?: boolean; } export const SearchEnginesPopover: React.FC = ({ indexName, + ingestionMethod, isHiddenIndex, }) => { const { isSearchEnginesPopoverOpen } = useValues(SearchEnginesPopoverLogic); @@ -43,7 +45,12 @@ export const SearchEnginesPopover: React.FC = ({ isOpen={isSearchEnginesPopoverOpen} closePopover={toggleSearchEnginesPopover} button={ - + {i18n.translate('xpack.enterpriseSearch.content.index.searchEngines.label', { defaultMessage: 'Search engines', })} @@ -54,6 +61,7 @@ export const SearchEnginesPopover: React.FC = ({ size="s" items={[ { KibanaLogic.values.navigateToUrl(APP_SEARCH_PLUGIN.URL, { @@ -78,10 +86,18 @@ export const SearchEnginesPopover: React.FC = ({ } )} > - + ) : ( - + ), ]} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/sync_button.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/sync_button.tsx index 6a6c483b30134..461bb2dd0e646 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/sync_button.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/sync_button.tsx @@ -16,7 +16,8 @@ import { IngestionStatus } from '../../../../types'; import { IndexViewLogic } from '../../index_view_logic'; export const SyncButton: React.FC = () => { - const { ingestionStatus, isSyncing, isWaitingForSync } = useValues(IndexViewLogic); + const { ingestionMethod, ingestionStatus, isSyncing, isWaitingForSync } = + useValues(IndexViewLogic); const { startSync } = useActions(IndexViewLogic); const getSyncButtonText = () => { @@ -39,6 +40,7 @@ export const SyncButton: React.FC = () => { }; return ( = ({ indexName }) => { - const { dismissIndexCreatedCallout } = useActions(IndexCreatedCalloutLogic); - return ( - - - {i18n.translate('xpack.enterpriseSearch.content.index.indexCreatedCallout.info', { - defaultMessage: - 'You can use App Search engines to build a search experience for your new Elasticsearch index.', - })} - - {i18n.translate('xpack.enterpriseSearch.content.index.readDocumentation.link', { - defaultMessage: 'Read the documentation', - })} - - - - - - { - // TODO bind it to AppSearch - // eslint-disable-next-line no-console - console.log(indexName); - }} - > - {i18n.translate('xpack.enterpriseSearch.content.index.createAppSearchEngine.button', { - defaultMessage: 'Create an App Search engine', - })} - - - - - {i18n.translate('xpack.enterpriseSearch.content.index.dismiss.button', { - defaultMessage: 'Dismiss', - })} - - - - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout_logic.ts deleted file mode 100644 index d8421137a859d..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout_logic.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { kea, MakeLogicType } from 'kea'; - -interface IndexCreatedCalloutLogicValues { - isCalloutVisible: boolean; -} - -interface IndexCreatedCalloutLogicActions { - dismissIndexCreatedCallout: void; - showIndexCreatedCallout: void; -} - -export const IndexCreatedCalloutLogic = kea< - MakeLogicType ->({ - actions: { - dismissIndexCreatedCallout: true, - showIndexCreatedCallout: true, - }, - path: ['enterprise_search', 'search_index', 'index_created_callout'], - reducers: () => ({ - isCalloutVisible: [ - false, - { - dismissIndexCreatedCallout: () => false, - showIndexCreatedCallout: () => true, - }, - ], - }), -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/manage_api_keys_popover/popover.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/manage_api_keys_popover/popover.tsx index b4b7e9bb038de..5d6734d5d9190 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/manage_api_keys_popover/popover.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/manage_api_keys_popover/popover.tsx @@ -21,10 +21,12 @@ import { i18n } from '@kbn/i18n'; import { KibanaLogic } from '../../../../../shared/kibana'; +import { IndexViewLogic } from '../../index_view_logic'; import { OverviewLogic } from '../../overview.logic'; export const ManageKeysPopover: React.FC = () => { const { isManageKeysPopoverOpen } = useValues(OverviewLogic); + const { ingestionMethod } = useValues(IndexViewLogic); const { toggleManageApiKeyPopover, openGenerateModal } = useActions(OverviewLogic); return ( @@ -44,6 +46,7 @@ export const ManageKeysPopover: React.FC = () => { size="s" items={[ KibanaLogic.values.navigateToUrl('/app/management/security/api_keys', { @@ -60,7 +63,11 @@ export const ManageKeysPopover: React.FC = () => {

, - +

{i18n.translate( diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration.tsx index d554e26caf5dc..399006c6f3995 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration.tsx @@ -216,6 +216,7 @@ export const ConnectorConfiguration: React.FC = () => { )} recheckIndex()} isLoading={recheckIndexLoading} @@ -274,6 +275,7 @@ export const ConnectorConfiguration: React.FC = () => { { - setIsEditing(!isEditing)}> + setIsEditing(!isEditing)} + > {i18n.translate( 'xpack.enterpriseSearch.content.indices.configurationConnector.config.editButton.title', { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_form.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_form.tsx index 3ef6c017a8a1e..29df3ccc5212b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_form.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_form.tsx @@ -55,7 +55,11 @@ export const ConnectorConfigurationForm = () => { - + {i18n.translate( 'xpack.enterpriseSearch.content.indices.configurationConnector.config.submitButton.title', { @@ -66,6 +70,7 @@ export const ConnectorConfigurationForm = () => { { setIsEditing(false); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_form.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_form.tsx index 33ea50ff8c6d6..84f9e32501f2f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_form.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_form.tsx @@ -76,12 +76,17 @@ export const ConnectorNameAndDescriptionForm: React.FC = () => { - + {SAVE_BUTTON_LABEL} { setIsEditing(false); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling.tsx index 5438cd1a25f11..0067fc47b8290 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling.tsx @@ -92,6 +92,7 @@ export const ConnectorSchedulingComponent: React.FC = () => { { { { setScheduling(schedulingInput); @@ -204,6 +207,7 @@ export const ConnectorSchedulingComponent: React.FC = () => { makeRequest({ connectorId: index.connector.id, scheduling })} > diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_advanced_configuration.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_advanced_configuration.tsx index 3e3582bb619fa..83f0a10db1538 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_advanced_configuration.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_advanced_configuration.tsx @@ -39,6 +39,7 @@ export const NativeConnectorAdvancedConfiguration: React.FC = () => { = ({ {...props} id={`checkableCard-${serviceType}`} className="connectorCheckable" + data-telemetry-id={`entSearchContent-connector-selectConnector-${serviceType}-select`} label={ {icon && ( diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/select_connector/select_connector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/select_connector/select_connector.tsx index 737be758e8605..d60bfc9c59620 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/select_connector/select_connector.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/select_connector/select_connector.tsx @@ -136,7 +136,13 @@ export const SelectConnector: React.FC = () => { ))} - + {i18n.translate( 'xpack.enterpriseSearch.content.indices.selectConnector.selectAndConfigureButtonLabel', { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler.tsx index da625aae2b5c9..28c8b8ff10000 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler.tsx @@ -96,6 +96,7 @@ export const AutomaticCrawlScheduler: React.FC = () => { > { { { - + {SAVE_BUTTON_LABEL} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout.tsx index d3c486fa20ca5..e64d296f1655a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout.tsx @@ -84,10 +84,16 @@ export const CrawlCustomSettingsFlyout: React.FC = () => { - {CANCEL_BUTTON_LABEL} + + {CANCEL_BUTTON_LABEL} + { )} > ) => diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_domains_panel.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_domains_panel.test.tsx index 2e74c598cbe6d..e69534e0e4ad9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_domains_panel.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_domains_panel.test.tsx @@ -50,11 +50,13 @@ describe('CrawlCustomSettingsFlyoutDomainsPanel', () => { it('allows the user to select domains', () => { const domainAccordionWrapper = wrapper.find(EuiAccordion); - expect(domainAccordionWrapper.find(SimplifiedSelectable).props()).toEqual({ - options: ['https://www.elastic.co', 'https://www.swiftype.com'], - selectedOptions: ['https://www.elastic.co'], - onChange: MOCK_ACTIONS.onSelectDomainUrls, - }); + expect(domainAccordionWrapper.find(SimplifiedSelectable).props()).toEqual( + expect.objectContaining({ + options: ['https://www.elastic.co', 'https://www.swiftype.com'], + selectedOptions: ['https://www.elastic.co'], + onChange: MOCK_ACTIONS.onSelectDomainUrls, + }) + ); }); it('indicates how many domains are selected', () => { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_domains_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_domains_panel.tsx index 3cdeefa758fd4..446f6c043091b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_domains_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_domains_panel.tsx @@ -74,6 +74,7 @@ export const CrawlCustomSettingsFlyoutDomainsPanel: React.FC = () => { } > { }); it('allows the user to select sitemap urls', () => { - expect(sitemapTab.find(SimplifiedSelectable).props()).toEqual({ - options: MOCK_VALUES.sitemapUrls, - selectedOptions: MOCK_VALUES.selectedSitemapUrls, - onChange: MOCK_ACTIONS.onSelectSitemapUrls, - }); + expect(sitemapTab.find(SimplifiedSelectable).props()).toEqual( + expect.objectContaining({ + options: MOCK_VALUES.sitemapUrls, + selectedOptions: MOCK_VALUES.selectedSitemapUrls, + onChange: MOCK_ACTIONS.onSelectSitemapUrls, + }) + ); }); it('allows the user to toggle whether to include robots.txt sitemaps', () => { @@ -111,11 +113,13 @@ describe('CrawlCustomSettingsFlyoutSeedUrlsPanel', () => { }); it('allows the user to select entry point urls', () => { - expect(entryPointsTab.find(SimplifiedSelectable).props()).toEqual({ - options: MOCK_VALUES.entryPointUrls, - selectedOptions: MOCK_VALUES.selectedEntryPointUrls, - onChange: MOCK_ACTIONS.onSelectEntryPointUrls, - }); + expect(entryPointsTab.find(SimplifiedSelectable).props()).toEqual( + expect.objectContaining({ + options: MOCK_VALUES.entryPointUrls, + selectedOptions: MOCK_VALUES.selectedEntryPointUrls, + onChange: MOCK_ACTIONS.onSelectEntryPointUrls, + }) + ); }); it('allows the user to add custom entry point urls', () => { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_seed_urls_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_seed_urls_panel.tsx index 27f3543835d11..1b0adb243af24 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_seed_urls_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout_seed_urls_panel.tsx @@ -113,6 +113,7 @@ export const CrawlCustomSettingsFlyoutSeedUrlsPanel: React.FC = () => { { /> { /> { <> { /> { - {CANCEL_BUTTON_LABEL} - + + {CANCEL_BUTTON_LABEL} + + {i18n.translate( 'xpack.enterpriseSearch.crawler.deleteDomainModal.deleteDomainButtonLabel', { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_panel.tsx index fdd56e055e1cd..41af7db78b6be 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_panel.tsx @@ -43,7 +43,13 @@ export const DomainsPanel: React.FC = () => { - + {i18n.translate('xpack.enterpriseSearch.crawler.addDomainFlyout.openButtonLabel', { defaultMessage: 'Add domain', })} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/empty_state_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/empty_state_panel.tsx index 40cd93f5b8345..31e8e9d84e466 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/empty_state_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/empty_state_panel.tsx @@ -55,7 +55,11 @@ export const EmptyStatePanel: React.FC = () => { - + {i18n.translate( 'xpack.enterpriseSearch.crawler.domainManagement.emptyState.addDomainButtonLabel', { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx index b67e866151ff0..aa0768181e1ea 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx @@ -26,9 +26,11 @@ import { DocumentsLogic, DEFAULT_PAGINATION } from './documents_logic'; import { IndexNameLogic } from './index_name_logic'; import './documents.scss'; +import { IndexViewLogic } from './index_view_logic'; export const SearchIndexDocuments: React.FC = () => { const { indexName } = useValues(IndexNameLogic); + const { ingestionMethod } = useValues(IndexViewLogic); const { simplifiedMapping } = useValues(DocumentsLogic); const { makeRequest, makeMappingRequest, setSearchQuery } = useActions(DocumentsLogic); @@ -58,6 +60,7 @@ export const SearchIndexDocuments: React.FC = () => { { const { apiKey, isGenerateModalOpen } = useValues(OverviewLogic); - const { indexName } = useValues(IndexViewLogic); + const { indexName, ingestionMethod } = useValues(IndexViewLogic); const { closeGenerateModal } = useActions(OverviewLogic); const { defaultPipeline } = useValues(SettingsLogic); @@ -58,6 +58,7 @@ export const GenerateApiKeyPanel: React.FC = () => { setOptimizedRequest(event.target.checked)} label={i18n.translate( 'xpack.enterpriseSearch.content.overview.optimizedRequest.label', diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/custom_pipeline_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/custom_pipeline_panel.tsx index 702ecf89c9580..0a15e03eb2326 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/custom_pipeline_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/custom_pipeline_panel.tsx @@ -15,9 +15,10 @@ import { EuiButtonEmptyTo } from '../../../../shared/react_router_helpers'; export const CustomPipelinePanel: React.FC<{ indexName: string; + ingestionMethod: string; pipelineSuffix: string; processorsCount: number; -}> = ({ indexName, pipelineSuffix, processorsCount }) => { +}> = ({ indexName, ingestionMethod, pipelineSuffix, processorsCount }) => { return ( @@ -29,6 +30,7 @@ export const CustomPipelinePanel: React.FC<{ diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.tsx index e8017ff15a198..87b3b3c4be3de 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.tsx @@ -32,12 +32,15 @@ import { HttpLogic } from '../../../../shared/http'; import { ML_MANAGE_TRAINED_MODELS_PATH } from '../../../routes'; import { IndexNameLogic } from '../index_name_logic'; +import { IndexViewLogic } from '../index_view_logic'; + import { TrainedModelHealth } from './ml_model_health'; import { PipelinesLogic } from './pipelines_logic'; export const InferencePipelineCard: React.FC = (pipeline) => { const { http } = useValues(HttpLogic); const { indexName } = useValues(IndexNameLogic); + const { ingestionMethod } = useValues(IndexViewLogic); const [isPopOverOpen, setIsPopOverOpen] = useState(false); const [showConfirmDelete, setShowConfirmDelete] = useState(false); const { deleteMlPipeline } = useActions(PipelinesLogic); @@ -85,6 +88,7 @@ export const InferencePipelineCard: React.FC = (pipeline) =>

= (pipeline) =>
= (pipeline) => )} > void; displayOnly: boolean; indexName: string; + ingestionMethod: string; isGated: boolean; isLoading: boolean; pipeline: IngestPipelineParams; @@ -53,6 +54,7 @@ export const IngestPipelineModal: React.FC = ({ createCustomPipelines, displayOnly, indexName, + ingestionMethod, isGated, isLoading, pipeline, @@ -160,7 +162,11 @@ export const IngestPipelineModal: React.FC = ({ - + @@ -206,6 +212,7 @@ export const IngestPipelineModal: React.FC = ({ { - const { indexName } = useValues(IndexViewLogic); + const { indexName, ingestionMethod } = useValues(IndexViewLogic); const { canSetPipeline, index, pipelineName, pipelineState, showModal } = useValues(PipelinesLogic); @@ -60,6 +60,7 @@ export const IngestPipelinesCard: React.FC = () => { createCustomPipelines={() => createCustomPipeline({ indexName })} displayOnly={!canSetPipeline} indexName={indexName} + ingestionMethod={ingestionMethod} isGated={isGated} isLoading={false} pipeline={{ ...pipelineState, name: pipelineName }} @@ -72,6 +73,7 @@ export const IngestPipelinesCard: React.FC = () => { @@ -89,7 +91,10 @@ export const IngestPipelinesCard: React.FC = () => { - + {i18n.translate( 'xpack.enterpriseSearch.content.indices.pipelines.ingestPipelinesCard.settings.label', { defaultMessage: 'Settings' } @@ -103,6 +108,7 @@ export const IngestPipelinesCard: React.FC = () => { {isApiIndex(index) && ( { const { capabilities } = useValues(KibanaLogic); + const { ingestionMethod } = useValues(IndexViewLogic); const { canUseMlInferencePipeline, hasIndexIngestionPipeline } = useValues(PipelinesLogic); const hasMLPermissions = capabilities?.ml?.canAccessML ?? false; if (!hasMLPermissions) { @@ -32,7 +34,7 @@ export const AddMLInferencePipelineButton: React.FC - + ); } @@ -47,7 +49,7 @@ export const AddMLInferencePipelineButton: React.FC - + ); } @@ -62,18 +64,25 @@ export const AddMLInferencePipelineButton: React.FC - + ); } - return ; + return ; }; -const AddButton: React.FC<{ disabled?: boolean; onClick?: () => void }> = ({ - disabled, - onClick, -}) => ( - +const AddButton: React.FC<{ + disabled?: boolean; + ingestionMethod: string; + onClick?: () => void; +}> = ({ disabled, ingestionMethod, onClick }) => ( + {i18n.translate('xpack.enterpriseSearch.content.indices.pipelines.mlInference.addButtonLabel', { defaultMessage: 'Add inference pipeline', })} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.tsx index 916a295df0050..99faa4920108c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.tsx @@ -35,6 +35,8 @@ import { } from '../../../../../shared/constants'; import { IndexNameLogic } from '../../index_name_logic'; +import { IndexViewLogic } from '../../index_view_logic'; + import { ConfigurePipeline } from './configure_pipeline'; import { AddInferencePipelineSteps, MLInferenceLogic } from './ml_inference_logic'; import { NoModelsPanel } from './no_models'; @@ -74,6 +76,7 @@ export const AddMLInferencePipelineModal: React.FC = ({ onClose }) => { + const { ingestionMethod } = useValues(IndexViewLogic); const { createErrors, supportedMLModels, @@ -115,7 +118,7 @@ const AddProcessorContent: React.FC = ({ onClo {step === AddInferencePipelineSteps.Test && } {step === AddInferencePipelineSteps.Review && } - + ); }; @@ -172,7 +175,10 @@ const ModalSteps: React.FC = () => { return ; }; -const ModalFooter: React.FC = ({ onClose }) => { +const ModalFooter: React.FC = ({ + ingestionMethod, + onClose, +}) => { const { addInferencePipelineModal: modal, isPipelineDataValid } = useValues(MLInferenceLogic); const { createPipeline, setAddInferencePipelineStep } = useActions(MLInferenceLogic); @@ -206,11 +212,17 @@ const ModalFooter: React.FC = ({ onClose }) => - {CANCEL_BUTTON_LABEL} + + {CANCEL_BUTTON_LABEL} + {nextStep !== undefined ? ( setAddInferencePipelineStep(nextStep as AddInferencePipelineSteps)} @@ -219,7 +231,12 @@ const ModalFooter: React.FC = ({ onClose }) => {CONTINUE_BUTTON_LABEL} ) : ( - + {i18n.translate( 'xpack.enterpriseSearch.content.indices.transforms.addInferencePipelineModal.footer.create', { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/configure_pipeline.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/configure_pipeline.tsx index 99be659cbac36..fed9f8e6c5376 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/configure_pipeline.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/configure_pipeline.tsx @@ -26,6 +26,8 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { docLinks } from '../../../../../shared/doc_links'; +import { IndexViewLogic } from '../../index_view_logic'; + import { MLInferenceLogic } from './ml_inference_logic'; const NoSourceFieldsError: React.FC = () => ( @@ -53,6 +55,7 @@ export const ConfigurePipeline: React.FC = () => { sourceFields, } = useValues(MLInferenceLogic); const { setInferencePipelineConfiguration } = useActions(MLInferenceLogic); + const { ingestionMethod } = useValues(IndexViewLogic); const { destinationField, modelID, pipelineName, sourceField } = configuration; const models = supportedMLModels ?? []; @@ -104,6 +107,7 @@ export const ConfigurePipeline: React.FC = () => { isInvalid={nameError} > { fullWidth > { isInvalid={emptySourceFields} > { isInvalid={formErrors.destinationField !== undefined} > diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipeline_settings_form.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipeline_settings_form.tsx index c01ca3d11a45a..bd3dc0856e36a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipeline_settings_form.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipeline_settings_form.tsx @@ -14,11 +14,13 @@ import { IngestPipelineParams } from '../../../../../../common/types/connectors' import { SettingsCheckableCard } from '../../shared/settings_checkable_card/settings_checkable_card'; interface PipelineSettingsFormProps { + ingestionMethod: string; pipeline: IngestPipelineParams; setPipeline: (pipeline: IngestPipelineParams) => void; } export const PipelineSettingsForm: React.FC = ({ + ingestionMethod, setPipeline, pipeline, }) => { @@ -31,6 +33,7 @@ export const PipelineSettingsForm: React.FC = ({ = ({ = ({ { const { http } = useValues(HttpLogic); + const { ingestionMethod } = useValues(IndexViewLogic); const { pipelineNames, selectedPipeline, selectedPipelineId, selectedPipelineJSON } = useValues( IndexPipelinesConfigurationsLogic ); @@ -79,6 +82,7 @@ export const PipelinesJSONConfigurations: React.FC = () => { )} > ({ text: name, value: name }))} value={selectedPipelineId} @@ -95,6 +99,7 @@ export const PipelinesJSONConfigurations: React.FC = () => { {isManagedPipeline(selectedPipeline) ? ( { ) : ( { const { data: indexData, status: indexApiStatus } = useValues(FetchIndexApiLogic); - const { isCalloutVisible } = useValues(IndexCreatedCalloutLogic); const { tabId = SearchIndexTabId.OVERVIEW } = useParams<{ tabId?: string; }>(); @@ -177,7 +174,6 @@ export const SearchIndex: React.FC = () => { }} > <> - {isCalloutVisible && } {indexName === indexData?.name && ( )} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/types.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/types.ts index 9120a3b055b61..12cb87c98b434 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/types.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/types.ts @@ -12,9 +12,9 @@ export interface Crawler { } export const enum IngestionMethod { - CONNECTOR, - CRAWLER, - API, + CONNECTOR = 'connector', + CRAWLER = 'crawler', + API = 'api', } export const enum IngestionStatus { diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index ad0fe281590ef..dd64f4ded51b6 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -11360,11 +11360,6 @@ "xpack.enterpriseSearch.content.callout.dismissButton": "Rejeter", "xpack.enterpriseSearch.content.callout.title": "Présentation des index Elasticsearch dans Enterprise Search", "xpack.enterpriseSearch.content.description": "Enterprise Search offre un certain nombre de moyens de rendre vos données facilement interrogeables. Vous pouvez choisir entre le robot d'indexation, les indices Elasticsearch, l'API, les téléchargements directs ou les connecteurs tiers.", - "xpack.enterpriseSearch.content.index.createAppSearchEngine.button": "Créer un moteur App Search", - "xpack.enterpriseSearch.content.index.dismiss.button": "Rejeter", - "xpack.enterpriseSearch.content.index.indexCreatedCallout.info": "Vous pouvez utiliser des moteurs App Search pour créer une expérience de recherche pour votre nouvel index Elasticsearch.", - "xpack.enterpriseSearch.content.index.indexCreatedCallout.title": "Index Elasticsearch créé avec succès", - "xpack.enterpriseSearch.content.index.readDocumentation.link": "Lire la documentation", "xpack.enterpriseSearch.content.index.searchEngines.createEngine": "Créer un moteur App Search", "xpack.enterpriseSearch.content.index.searchEngines.label": "Moteurs de recherche", "xpack.enterpriseSearch.content.index.searchEngines.viewEngines": "Afficher les moteurs App Search", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 8f42a223702e9..55e4b7a85b6a9 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -11346,11 +11346,6 @@ "xpack.enterpriseSearch.content.callout.dismissButton": "閉じる", "xpack.enterpriseSearch.content.callout.title": "エンタープライズ サーチでのElasticsearchインデックスの概要", "xpack.enterpriseSearch.content.description": "エンタープライズ サーチでは、さまざまな方法で簡単にデータを検索可能にできます。Webクローラー、Elasticsearchインデックス、API、直接アップロード、サードパーティコネクターから選択します。", - "xpack.enterpriseSearch.content.index.createAppSearchEngine.button": "App Searchエンジンの作成", - "xpack.enterpriseSearch.content.index.dismiss.button": "閉じる", - "xpack.enterpriseSearch.content.index.indexCreatedCallout.info": "App Searchエンジンを使用して、新しいElasticsearchインデックスの検索エクスペリエンスを構築できます。", - "xpack.enterpriseSearch.content.index.indexCreatedCallout.title": "Elasticsearchインデックスは正常に作成されました", - "xpack.enterpriseSearch.content.index.readDocumentation.link": "ドキュメントを読む", "xpack.enterpriseSearch.content.index.searchEngines.createEngine": "新しいApp Searchエンジンの作成", "xpack.enterpriseSearch.content.index.searchEngines.label": "検索エンジン", "xpack.enterpriseSearch.content.index.searchEngines.viewEngines": "App Searchエンジンを表示", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 03989e8565803..93f70fddc202f 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -11365,11 +11365,6 @@ "xpack.enterpriseSearch.content.callout.dismissButton": "关闭", "xpack.enterpriseSearch.content.callout.title": "在 Enterprise Search 中引入 Elasticsearch 索引", "xpack.enterpriseSearch.content.description": "Enterprise Search 提供了各种方法以便您轻松搜索数据。从网络爬虫、Elasticsearch 索引、API、直接上传或第三方连接器中选择。", - "xpack.enterpriseSearch.content.index.createAppSearchEngine.button": "创建 App Search 引擎", - "xpack.enterpriseSearch.content.index.dismiss.button": "关闭", - "xpack.enterpriseSearch.content.index.indexCreatedCallout.info": "您可以使用 App Search 引擎为您的新 Elasticsearch 索引构建搜索体验。", - "xpack.enterpriseSearch.content.index.indexCreatedCallout.title": "已成功创建 Elasticsearch 索引", - "xpack.enterpriseSearch.content.index.readDocumentation.link": "阅读文档", "xpack.enterpriseSearch.content.index.searchEngines.createEngine": "创建新的 App Search 引擎", "xpack.enterpriseSearch.content.index.searchEngines.label": "搜索引擎", "xpack.enterpriseSearch.content.index.searchEngines.viewEngines": "查看 App Search 引擎", From b452e7fa80bcbab928963712eca9f1cb3263321c Mon Sep 17 00:00:00 2001 From: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:35:33 +0200 Subject: [PATCH 03/35] added fleet usage sender that sends hourly usage through EBT (#143180) * added fleet usage sender that sends hourly usage through EBT * changed channel name to fleet-usages for consistency * added try catch --- .../fleet/server/collectors/register.ts | 23 +- x-pack/plugins/fleet/server/plugin.ts | 13 +- .../server/services/fleet_usage_sender.ts | 198 ++++++++++++++++++ x-pack/plugins/fleet/server/services/index.ts | 2 + 4 files changed, 225 insertions(+), 11 deletions(-) create mode 100644 x-pack/plugins/fleet/server/services/fleet_usage_sender.ts diff --git a/x-pack/plugins/fleet/server/collectors/register.ts b/x-pack/plugins/fleet/server/collectors/register.ts index a0a373d0f435f..f19682a5a243a 100644 --- a/x-pack/plugins/fleet/server/collectors/register.ts +++ b/x-pack/plugins/fleet/server/collectors/register.ts @@ -19,13 +19,24 @@ import type { PackageUsage } from './package_collectors'; import { getFleetServerUsage } from './fleet_server_collector'; import type { FleetServerUsage } from './fleet_server_collector'; -interface Usage { +export interface Usage { agents_enabled: boolean; agents: AgentUsage; packages: PackageUsage[]; fleet_server: FleetServerUsage; } +export const fetchUsage = async (core: CoreSetup, config: FleetConfigType) => { + const [soClient, esClient] = await getInternalClients(core); + const usage = { + agents_enabled: getIsAgentsEnabled(config), + agents: await getAgentUsage(config, soClient, esClient), + fleet_server: await getFleetServerUsage(soClient, esClient), + packages: await getPackageUsage(soClient), + }; + return usage; +}; + export function registerFleetUsageCollector( core: CoreSetup, config: FleetConfigType, @@ -41,15 +52,7 @@ export function registerFleetUsageCollector( const fleetCollector = usageCollection.makeUsageCollector({ type: 'fleet', isReady: () => true, - fetch: async () => { - const [soClient, esClient] = await getInternalClients(core); - return { - agents_enabled: getIsAgentsEnabled(config), - agents: await getAgentUsage(config, soClient, esClient), - fleet_server: await getFleetServerUsage(soClient, esClient), - packages: await getPackageUsage(soClient), - }; - }, + fetch: async () => fetchUsage(core, config), schema: { agents_enabled: { type: 'boolean' }, agents: { diff --git a/x-pack/plugins/fleet/server/plugin.ts b/x-pack/plugins/fleet/server/plugin.ts index 9e02ad3f96407..7d00f944fbf81 100644 --- a/x-pack/plugins/fleet/server/plugin.ts +++ b/x-pack/plugins/fleet/server/plugin.ts @@ -91,6 +91,7 @@ import type { AgentPolicyServiceInterface, PackageService, } from './services'; +import { FleetUsageSender } from './services'; import { appContextService, licenseService, @@ -100,7 +101,7 @@ import { AgentServiceImpl, PackageServiceImpl, } from './services'; -import { registerFleetUsageCollector } from './collectors/register'; +import { registerFleetUsageCollector, fetchUsage } from './collectors/register'; import { getAuthzFromRequest, makeRouterWithFleetAuthz } from './routes/security'; import { FleetArtifactsClient } from './services/artifacts'; import type { FleetRouter } from './types/request_context'; @@ -217,6 +218,7 @@ export class FleetPlugin private readonly telemetryEventsSender: TelemetryEventsSender; private readonly fleetStatus$: BehaviorSubject; private bulkActionsResolver?: BulkActionsResolver; + private fleetUsageSender?: FleetUsageSender; private agentService?: AgentService; private packageService?: PackageService; @@ -378,6 +380,14 @@ export class FleetPlugin // Register usage collection registerFleetUsageCollector(core, config, deps.usageCollection); + const fetch = async () => fetchUsage(core, config); + this.fleetUsageSender = new FleetUsageSender( + deps.taskManager, + core, + fetch, + this.kibanaVersion, + this.isProductionMode + ); const router: FleetRouter = core.http.createRouter(); // Allow read-only users access to endpoints necessary for Integrations UI @@ -444,6 +454,7 @@ export class FleetPlugin this.telemetryEventsSender.start(plugins.telemetry, core); this.bulkActionsResolver?.start(plugins.taskManager); + this.fleetUsageSender?.start(plugins.taskManager); const logger = appContextService.getLogger(); diff --git a/x-pack/plugins/fleet/server/services/fleet_usage_sender.ts b/x-pack/plugins/fleet/server/services/fleet_usage_sender.ts new file mode 100644 index 0000000000000..b7ab806e5f8c1 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/fleet_usage_sender.ts @@ -0,0 +1,198 @@ +/* + * 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. + */ +/* eslint-disable max-classes-per-file */ +import type { + ConcreteTaskInstance, + TaskManagerStartContract, + TaskManagerSetupContract, +} from '@kbn/task-manager-plugin/server'; +import type { CoreSetup } from '@kbn/core/server'; + +import { ElasticV3ServerShipper } from '@kbn/analytics-shippers-elastic-v3-server'; + +import type { Usage } from '../collectors/register'; + +import { appContextService } from './app_context'; + +export class FleetShipper extends ElasticV3ServerShipper { + public static shipperName = 'fleet_shipper'; +} + +export class FleetUsageSender { + private taskManager?: TaskManagerStartContract; + private taskId = 'Fleet-Usage-Sender-Task'; + private taskType = 'Fleet-Usage-Sender'; + + constructor( + taskManager: TaskManagerSetupContract, + core: CoreSetup, + fetchUsage: () => Promise, + kibanaVersion: string, + isProductionMode: boolean + ) { + taskManager.registerTaskDefinitions({ + [this.taskType]: { + title: 'Fleet Usage Sender', + timeout: '1m', + maxAttempts: 1, + createTaskRunner: ({ taskInstance }: { taskInstance: ConcreteTaskInstance }) => { + return { + async run() { + appContextService.getLogger().info('Running Fleet Usage telemetry send task'); + + try { + const usageData = await fetchUsage(); + appContextService.getLogger().debug(JSON.stringify(usageData)); + core.analytics.reportEvent('Fleet Usage', usageData); + } catch (error) { + appContextService + .getLogger() + .error('Error occurred while sending Fleet Usage telemetry: ' + error); + } + }, + + async cancel() {}, + }; + }, + }, + }); + this.registerTelemetryEventType(core); + + core.analytics.registerShipper(FleetShipper, { + channelName: 'fleet-usages', + version: kibanaVersion, + sendTo: isProductionMode ? 'production' : 'staging', + }); + } + + public async start(taskManager: TaskManagerStartContract) { + this.taskManager = taskManager; + + appContextService.getLogger().info(`Task ${this.taskId} scheduled with interval 1h`); + await this.taskManager?.ensureScheduled({ + id: this.taskId, + taskType: this.taskType, + schedule: { + interval: '1h', + }, + scope: ['fleet'], + state: {}, + params: {}, + }); + } + + /** + * took schema from [here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/server/collectors/register.ts#L53) and adapted to EBT format + */ + private registerTelemetryEventType(core: CoreSetup): void { + core.analytics.registerEventType({ + eventType: 'Fleet Usage', + schema: { + agents_enabled: { type: 'boolean', _meta: { description: 'agents enabled' } }, + agents: { + properties: { + total_enrolled: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents, in any state', + }, + }, + healthy: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents in a healthy state', + }, + }, + unhealthy: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents in an unhealthy state', + }, + }, + updating: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents in an updating state', + }, + }, + offline: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents currently offline', + }, + }, + total_all_statuses: { + type: 'long', + _meta: { + description: 'The total number of agents in any state, both enrolled and inactive', + }, + }, + }, + }, + fleet_server: { + properties: { + total_enrolled: { + type: 'long', + _meta: { + description: 'The total number of enrolled Fleet Server agents, in any state', + }, + }, + total_all_statuses: { + type: 'long', + _meta: { + description: + 'The total number of Fleet Server agents in any state, both enrolled and inactive.', + }, + }, + healthy: { + type: 'long', + _meta: { + description: 'The total number of enrolled Fleet Server agents in a healthy state.', + }, + }, + unhealthy: { + type: 'long', + _meta: { + description: + 'The total number of enrolled Fleet Server agents in an unhealthy state', + }, + }, + updating: { + type: 'long', + _meta: { + description: + 'The total number of enrolled Fleet Server agents in an updating state', + }, + }, + offline: { + type: 'long', + _meta: { + description: 'The total number of enrolled Fleet Server agents currently offline', + }, + }, + num_host_urls: { + type: 'long', + _meta: { + description: 'The number of Fleet Server hosts configured in Fleet settings.', + }, + }, + }, + }, + packages: { + type: 'array', + items: { + properties: { + name: { type: 'keyword' }, + version: { type: 'keyword' }, + enabled: { type: 'boolean' }, + }, + }, + }, + }, + }); + } +} diff --git a/x-pack/plugins/fleet/server/services/index.ts b/x-pack/plugins/fleet/server/services/index.ts index aafbb383cbb0d..6078e2696f3b9 100644 --- a/x-pack/plugins/fleet/server/services/index.ts +++ b/x-pack/plugins/fleet/server/services/index.ts @@ -62,3 +62,5 @@ export type { PackageService, PackageClient } from './epm'; // Fleet server policy config export { migrateSettingsToFleetServerHost } from './fleet_server_host'; + +export { FleetUsageSender } from './fleet_usage_sender'; From 5e57ffcdacda080af134fb5ad7842fa64ce51ef5 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Thu, 13 Oct 2022 11:07:59 +0200 Subject: [PATCH 04/35] Change `histogram:maxBars` default setting from 100 to 1000 (#143081) * change max bars default setting * fix functional tests * fix tests Co-authored-by: Stratoula Kalafateli --- src/plugins/data/server/ui_settings.ts | 2 +- test/functional/apps/visualize/group2/index.ts | 11 +++++++++++ .../visualize/replaced_vislib_chart_types/index.ts | 2 ++ test/functional/page_objects/visualize_page.ts | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index fce2680f5fc03..a1ac225ba4b38 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -295,7 +295,7 @@ export function getUiSettings( name: i18n.translate('data.advancedSettings.histogram.maxBarsTitle', { defaultMessage: 'Maximum buckets', }), - value: 100, + value: 1000, description: i18n.translate('data.advancedSettings.histogram.maxBarsText', { defaultMessage: ` Limits the density of date and number histograms across Kibana diff --git a/test/functional/apps/visualize/group2/index.ts b/test/functional/apps/visualize/group2/index.ts index 4925c3ef73598..5a83044deee17 100644 --- a/test/functional/apps/visualize/group2/index.ts +++ b/test/functional/apps/visualize/group2/index.ts @@ -19,11 +19,22 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { log.debug('Starting visualize before method'); await browser.setWindowSize(1280, 800); await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.uiSettings.update({ + 'histogram:maxBars': 100, + }); + await browser.refresh(); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/long_window_logstash'); }); + after(async () => { + await kibanaServer.uiSettings.update({ + 'histogram:maxBars': 1000, + }); + await browser.refresh(); + }); + loadTestFile(require.resolve('./_inspector')); loadTestFile(require.resolve('./_experimental_vis')); loadTestFile(require.resolve('./_gauge_chart')); diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/index.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/index.ts index 8ee970693b7a9..d8e35e8f12bfc 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/index.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/index.ts @@ -28,6 +28,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { before(async () => { await kibanaServer.uiSettings.update({ 'visualization:visualize:legacyHeatmapChartsLibrary': false, + 'histogram:maxBars': 100, }); await browser.refresh(); }); @@ -35,6 +36,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { after(async () => { await kibanaServer.uiSettings.update({ 'visualization:visualize:legacyHeatmapChartsLibrary': true, + 'histogram:maxBars': 1000, }); await browser.refresh(); }); diff --git a/test/functional/page_objects/visualize_page.ts b/test/functional/page_objects/visualize_page.ts index a75e54c6bcdd7..634c9f4bc5005 100644 --- a/test/functional/page_objects/visualize_page.ts +++ b/test/functional/page_objects/visualize_page.ts @@ -61,6 +61,7 @@ export class VisualizePageObject extends FtrService { [FORMATS_UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN]: '0,0.[000]b', 'visualization:visualize:legacyPieChartsLibrary': !isNewLibrary, 'visualization:visualize:legacyHeatmapChartsLibrary': !isNewLibrary, + 'histogram:maxBars': 100, }); } From 8fbc5cbb71f52e380409ec09ccd06c9632eb466f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yulia=20=C4=8Cech?= <6585477+yuliacech@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:15:51 +0200 Subject: [PATCH 05/35] [Guided onboarding] Manual step completion (#142884) * [Guided onboarding] Updated the readme file * [Guided onboarding] Updated the security guide config with wording and merged alerts and cases together * [Guided onboarding] Implemented the manual completion for guide steps * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Revert "[Guided onboarding] Updated the readme file" This reverts commit 5588569947b90c555c41e9ce7c724f57fdd3f2c1. * [Guided onboarding] Reverted the security config changes and added manual step completion * [Guided onboarding] Added jest tests for manual completion * [Guided onboarding] Fixed tests and types errors * Update src/plugins/guided_onboarding/public/services/api.test.ts Co-authored-by: Alison Goryachev * [Guided onboarding] Fixed merge conflict changes and addressed some CR comments * Update src/plugins/guided_onboarding/public/services/helpers.ts Co-authored-by: Alison Goryachev * [Guided onboarding] Addressed more comments * [Guided onboarding] Added completion on navigation * Update src/plugins/guided_onboarding/public/components/guide_button_popover.tsx Co-authored-by: Cindy Chang * Update src/plugins/guided_onboarding/public/components/guide_button_popover.tsx Co-authored-by: Cindy Chang * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * [Guided onboarding] Added a spacer between title and text in the manual step popover Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alison Goryachev Co-authored-by: Cindy Chang --- src/plugins/guided_onboarding/common/types.ts | 3 +- .../public/components/guide_button.tsx | 82 +++++++++++ .../components/guide_button_popover.tsx | 55 +++++++ .../public/components/guide_panel.test.tsx | 139 ++++++++++-------- .../public/components/guide_panel.tsx | 82 +++++------ .../public/components/guide_panel_step.tsx | 41 ++++-- .../public/constants/guides_config/search.ts | 6 + .../constants/guides_config/security.ts | 5 + .../public/services/api.mocks.ts | 34 ++--- .../public/services/api.test.ts | 51 ++++++- .../guided_onboarding/public/services/api.ts | 61 +++----- .../public/services/helpers.test.ts | 4 +- .../public/services/helpers.ts | 91 ++++++++++-- src/plugins/guided_onboarding/public/types.ts | 5 + 14 files changed, 461 insertions(+), 198 deletions(-) create mode 100644 src/plugins/guided_onboarding/public/components/guide_button.tsx create mode 100644 src/plugins/guided_onboarding/public/components/guide_button_popover.tsx diff --git a/src/plugins/guided_onboarding/common/types.ts b/src/plugins/guided_onboarding/common/types.ts index 92cc3af1ff1dd..435dd948d9f80 100644 --- a/src/plugins/guided_onboarding/common/types.ts +++ b/src/plugins/guided_onboarding/common/types.ts @@ -27,9 +27,10 @@ export type GuideStatus = 'in_progress' | 'ready_to_complete' | 'complete'; * inactive: Step has not started * active: Step is ready to start (i.e., the guide has been started) * in_progress: Step has been started and is in progress + * ready_to_complete: Step can be manually completed * complete: Step has been completed */ -export type StepStatus = 'inactive' | 'active' | 'in_progress' | 'complete'; +export type StepStatus = 'inactive' | 'active' | 'in_progress' | 'ready_to_complete' | 'complete'; export interface GuideStep { id: GuideStepIds; diff --git a/src/plugins/guided_onboarding/public/components/guide_button.tsx b/src/plugins/guided_onboarding/public/components/guide_button.tsx new file mode 100644 index 0000000000000..b4b50d78942ea --- /dev/null +++ b/src/plugins/guided_onboarding/public/components/guide_button.tsx @@ -0,0 +1,82 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { EuiButton } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { GuideState } from '../../common/types'; +import { getStepConfig } from '../services/helpers'; +import { GuideButtonPopover } from './guide_button_popover'; + +interface GuideButtonProps { + guideState: GuideState; + toggleGuidePanel: () => void; + isGuidePanelOpen: boolean; +} + +const getStepNumber = (state: GuideState): number | undefined => { + let stepNumber: number | undefined; + + state.steps.forEach((step, stepIndex) => { + // If the step is in_progress or ready_to_complete, show that step number + if (step.status === 'in_progress' || step.status === 'ready_to_complete') { + stepNumber = stepIndex + 1; + } + + // If the step is active, show the previous step number + if (step.status === 'active') { + stepNumber = stepIndex; + } + }); + + return stepNumber; +}; + +export const GuideButton = ({ + guideState, + toggleGuidePanel, + isGuidePanelOpen, +}: GuideButtonProps) => { + const stepNumber = getStepNumber(guideState); + const stepReadyToComplete = guideState.steps.find((step) => step.status === 'ready_to_complete'); + const button = ( + + {Boolean(stepNumber) + ? i18n.translate('guidedOnboarding.guidedSetupStepButtonLabel', { + defaultMessage: 'Setup guide: step {stepNumber}', + values: { + stepNumber, + }, + }) + : i18n.translate('guidedOnboarding.guidedSetupButtonLabel', { + defaultMessage: 'Setup guide', + })} + + ); + if (stepReadyToComplete) { + const stepConfig = getStepConfig(guideState.guideId, stepReadyToComplete.id); + // check if the stepConfig has manualCompletion info + if (stepConfig && stepConfig.manualCompletion) { + return ( + + ); + } + } + return button; +}; diff --git a/src/plugins/guided_onboarding/public/components/guide_button_popover.tsx b/src/plugins/guided_onboarding/public/components/guide_button_popover.tsx new file mode 100644 index 0000000000000..fe341108f089e --- /dev/null +++ b/src/plugins/guided_onboarding/public/components/guide_button_popover.tsx @@ -0,0 +1,55 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { useEffect, useRef, useState } from 'react'; +import { EuiPopover, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; +import React from 'react'; + +interface GuideButtonPopoverProps { + button: EuiPopover['button']; + isGuidePanelOpen: boolean; + title?: string; + description?: string; +} +export const GuideButtonPopover = ({ + button, + isGuidePanelOpen, + title, + description, +}: GuideButtonPopoverProps) => { + const isFirstRender = useRef(true); + useEffect(() => { + isFirstRender.current = false; + }, []); + + const [isPopoverShown, setIsPopoverShown] = useState(true); + useEffect(() => { + // close the popover after it was rendered once and the panel is opened + if (isGuidePanelOpen && !isFirstRender.current) { + setIsPopoverShown(false); + } + }, [isGuidePanelOpen]); + return ( + { + /* do nothing, the popover is closed once the panel is opened */ + }} + > + {title && ( + +

{title}

+
+ )} + + {description &&

{description}

}
+
+ ); +}; diff --git a/src/plugins/guided_onboarding/public/components/guide_panel.test.tsx b/src/plugins/guided_onboarding/public/components/guide_panel.test.tsx index 5bd846aebbdef..268117f8af570 100644 --- a/src/plugins/guided_onboarding/public/components/guide_panel.test.tsx +++ b/src/plugins/guided_onboarding/public/components/guide_panel.test.tsx @@ -41,6 +41,45 @@ const mockActiveSearchGuideState: GuideState = { ], }; +const mockInProgressSearchGuideState: GuideState = { + ...mockActiveSearchGuideState, + steps: [ + { + id: mockActiveSearchGuideState.steps[0].id, + status: 'in_progress', + }, + mockActiveSearchGuideState.steps[1], + mockActiveSearchGuideState.steps[2], + ], +}; + +const mockReadyToCompleteSearchGuideState: GuideState = { + ...mockActiveSearchGuideState, + steps: [ + { + id: mockActiveSearchGuideState.steps[0].id, + status: 'complete', + }, + { + id: mockActiveSearchGuideState.steps[1].id, + status: 'ready_to_complete', + }, + mockActiveSearchGuideState.steps[2], + ], +}; + +const updateComponentWithState = async ( + component: TestBed['component'], + guideState: GuideState, + isPanelOpen: boolean +) => { + await act(async () => { + await apiService.updateGuideState(guideState, isPanelOpen); + }); + + component.update(); +}; + const getGuidePanel = () => () => { return ; }; @@ -80,12 +119,8 @@ describe('Guided setup', () => { test('should be enabled if there is an active guide', async () => { const { exists, component, find } = testBed; - await act(async () => { - // Enable the "search" guide - await apiService.updateGuideState(mockActiveSearchGuideState, true); - }); - - component.update(); + // Enable the "search" guide + await updateComponentWithState(component, mockActiveSearchGuideState, true); expect(exists('disabledGuideButton')).toBe(false); expect(exists('guideButton')).toBe(true); @@ -95,25 +130,33 @@ describe('Guided setup', () => { test('should show the step number in the button label if a step is active', async () => { const { component, find } = testBed; - const mockInProgressSearchGuideState: GuideState = { - ...mockActiveSearchGuideState, - steps: [ - { - id: mockActiveSearchGuideState.steps[0].id, - status: 'in_progress', - }, - mockActiveSearchGuideState.steps[1], - mockActiveSearchGuideState.steps[2], - ], - }; + await updateComponentWithState(component, mockInProgressSearchGuideState, true); - await act(async () => { - await apiService.updateGuideState(mockInProgressSearchGuideState, true); - }); + expect(find('guideButton').text()).toEqual('Setup guide: step 1'); + }); - component.update(); + test('shows the step number in the button label if a step is ready to complete', async () => { + const { component, find } = testBed; - expect(find('guideButton').text()).toEqual('Setup guide: step 1'); + await updateComponentWithState(component, mockReadyToCompleteSearchGuideState, true); + + expect(find('guideButton').text()).toEqual('Setup guide: step 2'); + }); + + test('shows the manual completion popover if a step is ready to complete', async () => { + const { component, exists } = testBed; + + await updateComponentWithState(component, mockReadyToCompleteSearchGuideState, false); + + expect(exists('manualCompletionPopover')).toBe(true); + }); + + test('shows no manual completion popover if a step is in progress', async () => { + const { component, exists } = testBed; + + await updateComponentWithState(component, mockInProgressSearchGuideState, false); + + expect(exists('manualCompletionPopoverPanel')).toBe(false); }); }); @@ -121,12 +164,7 @@ describe('Guided setup', () => { test('should be enabled if a guide is activated', async () => { const { exists, component, find } = testBed; - await act(async () => { - // Enable the "search" guide - await apiService.updateGuideState(mockActiveSearchGuideState, true); - }); - - component.update(); + await updateComponentWithState(component, mockActiveSearchGuideState, true); expect(exists('guidePanel')).toBe(true); expect(exists('guideProgress')).toBe(false); @@ -136,7 +174,7 @@ describe('Guided setup', () => { test('should show the progress bar if the first step has been completed', async () => { const { component, exists } = testBed; - const mockInProgressSearchGuideState: GuideState = { + const mockCompleteSearchGuideState: GuideState = { ...mockActiveSearchGuideState, steps: [ { @@ -148,11 +186,7 @@ describe('Guided setup', () => { ], }; - await act(async () => { - await apiService.updateGuideState(mockInProgressSearchGuideState, true); - }); - - component.update(); + await updateComponentWithState(component, mockCompleteSearchGuideState, true); expect(exists('guidePanel')).toBe(true); expect(exists('guideProgress')).toBe(true); @@ -181,11 +215,7 @@ describe('Guided setup', () => { ], }; - await act(async () => { - await apiService.updateGuideState(readyToCompleteGuideState, true); - }); - - component.update(); + await updateComponentWithState(component, readyToCompleteGuideState, true); expect(exists('useElasticButton')).toBe(true); }); @@ -194,12 +224,7 @@ describe('Guided setup', () => { test('should show "Start" button label if step has not been started', async () => { const { component, find } = testBed; - await act(async () => { - // Enable the "search" guide - await apiService.updateGuideState(mockActiveSearchGuideState, true); - }); - - component.update(); + await updateComponentWithState(component, mockActiveSearchGuideState, true); expect(find('activeStepButtonLabel').text()).toEqual('Start'); }); @@ -207,25 +232,17 @@ describe('Guided setup', () => { test('should show "Continue" button label if step is in progress', async () => { const { component, find } = testBed; - const mockInProgressSearchGuideState: GuideState = { - ...mockActiveSearchGuideState, - steps: [ - { - id: mockActiveSearchGuideState.steps[0].id, - status: 'in_progress', - }, - mockActiveSearchGuideState.steps[1], - mockActiveSearchGuideState.steps[2], - ], - }; + await updateComponentWithState(component, mockInProgressSearchGuideState, true); - await act(async () => { - await apiService.updateGuideState(mockInProgressSearchGuideState, true); - }); + expect(find('activeStepButtonLabel').text()).toEqual('Continue'); + }); - component.update(); + test('shows "Mark done" button label if step is ready to complete', async () => { + const { component, find } = testBed; - expect(find('activeStepButtonLabel').text()).toEqual('Continue'); + await updateComponentWithState(component, mockReadyToCompleteSearchGuideState, true); + + expect(find('activeStepButtonLabel').text()).toEqual('Mark done'); }); }); diff --git a/src/plugins/guided_onboarding/public/components/guide_panel.tsx b/src/plugins/guided_onboarding/public/components/guide_panel.tsx index 7c122492d84a1..84726825240a3 100644 --- a/src/plugins/guided_onboarding/public/components/guide_panel.tsx +++ b/src/plugins/guided_onboarding/public/components/guide_panel.tsx @@ -26,51 +26,27 @@ import { useEuiTheme, } from '@elastic/eui'; -import { ApplicationStart } from '@kbn/core-application-browser'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { guidesConfig } from '../constants/guides_config'; -import type { GuideState, GuideStepIds } from '../../common/types'; -import type { GuideConfig, StepConfig } from '../types'; +import { ApplicationStart } from '@kbn/core/public'; + +import type { GuideState, GuideStep as GuideStepStatus } from '../../common/types'; +import type { StepConfig } from '../types'; import type { ApiService } from '../services/api'; +import { getGuideConfig } from '../services/helpers'; import { GuideStep } from './guide_panel_step'; import { QuitGuideModal } from './quit_guide_modal'; import { getGuidePanelStyles } from './guide_panel.styles'; +import { GuideButton } from './guide_button'; interface GuidePanelProps { api: ApiService; application: ApplicationStart; } -const getConfig = (state?: GuideState): GuideConfig | undefined => { - if (state) { - return guidesConfig[state.guideId]; - } - - return undefined; -}; - -const getStepNumber = (state?: GuideState): number | undefined => { - let stepNumber: number | undefined; - - state?.steps.forEach((step, stepIndex) => { - // If the step is in_progress, show that step number - if (step.status === 'in_progress') { - stepNumber = stepIndex + 1; - } - - // If the step is active, show the previous step number - if (step.status === 'active') { - stepNumber = stepIndex; - } - }); - - return stepNumber; -}; - const getProgress = (state?: GuideState): number => { if (state) { return state.steps.reduce((acc, currentVal) => { @@ -95,10 +71,26 @@ export const GuidePanel = ({ api, application }: GuidePanelProps) => { setIsGuideOpen((prevIsGuideOpen) => !prevIsGuideOpen); }; - const navigateToStep = async (stepId: GuideStepIds, stepLocation: StepConfig['location']) => { - await api.startGuideStep(guideState!.guideId, stepId); - if (stepLocation) { - application.navigateToApp(stepLocation.appID, { path: stepLocation.path }); + const handleStepButtonClick = async (step: GuideStepStatus, stepConfig: StepConfig) => { + if (guideState) { + const { id, status } = step; + if (status === 'ready_to_complete') { + return await api.completeGuideStep(guideState?.guideId, id); + } + + if (status === 'active') { + await api.startGuideStep(guideState!.guideId, id); + } + if (status === 'active' || status === 'in_progress') { + if (stepConfig.location) { + await application.navigateToApp(stepConfig.location.appID, { + path: stepConfig.location.path, + }); + if (stepConfig.manualCompletion?.readyToCompleteOnNavigation) { + await api.completeGuideStep(guideState.guideId, id); + } + } + } } }; @@ -136,7 +128,7 @@ export const GuidePanel = ({ api, application }: GuidePanelProps) => { return () => subscription.unsubscribe(); }, [api]); - const guideConfig = getConfig(guideState); + const guideConfig = getGuideConfig(guideState?.guideId); // TODO handle loading, error state // https://github.com/elastic/kibana/issues/139799, https://github.com/elastic/kibana/issues/139798 @@ -157,23 +149,15 @@ export const GuidePanel = ({ api, application }: GuidePanelProps) => { ); } - const stepNumber = getStepNumber(guideState); const stepsCompleted = getProgress(guideState); return ( <> - - {Boolean(stepNumber) - ? i18n.translate('guidedOnboarding.guidedSetupStepButtonLabel', { - defaultMessage: 'Setup guide: step {stepNumber}', - values: { - stepNumber, - }, - }) - : i18n.translate('guidedOnboarding.guidedSetupButtonLabel', { - defaultMessage: 'Setup guide', - })} - + {isGuideOpen && ( { stepStatus={stepState.status} stepConfig={step} stepNumber={index + 1} - navigateToStep={navigateToStep} + handleButtonClick={() => handleStepButtonClick(stepState, step)} key={accordionId} /> ); diff --git a/src/plugins/guided_onboarding/public/components/guide_panel_step.tsx b/src/plugins/guided_onboarding/public/components/guide_panel_step.tsx index c05ad6ec310c7..107babb6ac0d8 100644 --- a/src/plugins/guided_onboarding/public/components/guide_panel_step.tsx +++ b/src/plugins/guided_onboarding/public/components/guide_panel_step.tsx @@ -20,7 +20,8 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import type { StepStatus, GuideStepIds } from '../../common/types'; + +import type { StepStatus } from '../../common/types'; import type { StepConfig } from '../types'; import { getGuidePanelStepStyles } from './guide_panel_step.styles'; @@ -29,7 +30,7 @@ interface GuideStepProps { stepStatus: StepStatus; stepConfig: StepConfig; stepNumber: number; - navigateToStep: (stepId: GuideStepIds, stepLocation: StepConfig['location']) => void; + handleButtonClick: () => void; } export const GuideStep = ({ @@ -37,7 +38,7 @@ export const GuideStep = ({ stepStatus, stepNumber, stepConfig, - navigateToStep, + handleButtonClick, }: GuideStepProps) => { const { euiTheme } = useEuiTheme(); const styles = getGuidePanelStepStyles(euiTheme, stepStatus); @@ -58,6 +59,26 @@ export const GuideStep = ({
); + const isAccordionOpen = + stepStatus === 'in_progress' || stepStatus === 'active' || stepStatus === 'ready_to_complete'; + + const getStepButtonLabel = (): string => { + switch (stepStatus) { + case 'active': + return i18n.translate('guidedOnboarding.dropdownPanel.startStepButtonLabel', { + defaultMessage: 'Start', + }); + case 'in_progress': + return i18n.translate('guidedOnboarding.dropdownPanel.continueStepButtonLabel', { + defaultMessage: 'Continue', + }); + case 'ready_to_complete': + return i18n.translate('guidedOnboarding.dropdownPanel.markDoneStepButtonLabel', { + defaultMessage: 'Mark done', + }); + } + return ''; + }; return (
@@ -68,7 +89,7 @@ export const GuideStep = ({ id={accordionId} buttonContent={stepTitleContent} arrowDisplay="right" - initialIsOpen={stepStatus === 'in_progress' || stepStatus === 'active'} + initialIsOpen={isAccordionOpen} > <> @@ -82,21 +103,15 @@ export const GuideStep = ({ - {(stepStatus === 'in_progress' || stepStatus === 'active') && ( + {isAccordionOpen && ( navigateToStep(stepConfig.id, stepConfig.location)} + onClick={() => handleButtonClick()} fill data-test-subj="activeStepButtonLabel" > - {stepStatus === 'active' - ? i18n.translate('guidedOnboarding.dropdownPanel.startStepButtonLabel', { - defaultMessage: 'Start', - }) - : i18n.translate('guidedOnboarding.dropdownPanel.continueStepButtonLabel', { - defaultMessage: 'Continue', - })} + {getStepButtonLabel()} diff --git a/src/plugins/guided_onboarding/public/constants/guides_config/search.ts b/src/plugins/guided_onboarding/public/constants/guides_config/search.ts index 57d81fdfe1301..f91c0af1ba446 100644 --- a/src/plugins/guided_onboarding/public/constants/guides_config/search.ts +++ b/src/plugins/guided_onboarding/public/constants/guides_config/search.ts @@ -41,6 +41,12 @@ export const searchConfig: GuideConfig = { appID: 'guidedOnboardingExample', path: 'stepTwo', }, + manualCompletion: { + title: 'Manual completion step title', + description: + 'Mark the step complete by opening the panel and clicking the button "Mark done"', + readyToCompleteOnNavigation: true, + }, }, { id: 'search_experience', diff --git a/src/plugins/guided_onboarding/public/constants/guides_config/security.ts b/src/plugins/guided_onboarding/public/constants/guides_config/security.ts index 8eafa3b51c408..e67e318a61f01 100644 --- a/src/plugins/guided_onboarding/public/constants/guides_config/security.ts +++ b/src/plugins/guided_onboarding/public/constants/guides_config/security.ts @@ -35,6 +35,11 @@ export const securityConfig: GuideConfig = { 'Nullam ligula enim, malesuada a finibus vel, cursus sed risus.', 'Vivamus pretium, elit dictum lacinia aliquet, libero nibh dictum enim, a rhoncus leo magna in sapien.', ], + manualCompletion: { + title: 'Manual completion step title', + description: + 'Mark the step complete by opening the panel and clicking the button "Mark done"', + }, }, { id: 'alertsCases', diff --git a/src/plugins/guided_onboarding/public/services/api.mocks.ts b/src/plugins/guided_onboarding/public/services/api.mocks.ts index 19dd67c7d7b1b..ed2985a1dd74a 100644 --- a/src/plugins/guided_onboarding/public/services/api.mocks.ts +++ b/src/plugins/guided_onboarding/public/services/api.mocks.ts @@ -28,26 +28,6 @@ export const searchAddDataActiveState: GuideState = { ], }; -export const searchAddDataInProgressState: GuideState = { - isActive: true, - status: 'in_progress', - steps: [ - { - id: 'add_data', - status: 'in_progress', - }, - { - id: 'browse_docs', - status: 'inactive', - }, - { - id: 'search_experience', - status: 'inactive', - }, - ], - guideId: 'search', -}; - export const securityAddDataInProgressState: GuideState = { guideId: 'security', status: 'in_progress', @@ -61,10 +41,14 @@ export const securityAddDataInProgressState: GuideState = { id: 'rules', status: 'inactive', }, + { + id: 'alertsCases', + status: 'inactive', + }, ], }; -export const securityRulesActivesState: GuideState = { +export const securityRulesActiveState: GuideState = { guideId: 'security', isActive: true, status: 'in_progress', @@ -77,6 +61,10 @@ export const securityRulesActivesState: GuideState = { id: 'rules', status: 'active', }, + { + id: 'alertsCases', + status: 'inactive', + }, ], }; @@ -93,5 +81,9 @@ export const noGuideActiveState: GuideState = { id: 'rules', status: 'inactive', }, + { + id: 'alertsCases', + status: 'inactive', + }, ], }; diff --git a/src/plugins/guided_onboarding/public/services/api.test.ts b/src/plugins/guided_onboarding/public/services/api.test.ts index 5deb3d50987f2..8765af0fb07f6 100644 --- a/src/plugins/guided_onboarding/public/services/api.test.ts +++ b/src/plugins/guided_onboarding/public/services/api.test.ts @@ -18,7 +18,7 @@ import { noGuideActiveState, searchAddDataActiveState, securityAddDataInProgressState, - securityRulesActivesState, + securityRulesActiveState, } from './api.mocks'; const searchGuide = 'search'; @@ -315,17 +315,58 @@ describe('GuidedOnboarding ApiService', () => { }); }); + it(`marks the step as 'ready_to_complete' if it's configured for manual completion`, async () => { + const securityRulesInProgressState = { + ...securityRulesActiveState, + steps: [ + securityRulesActiveState.steps[0], + { + id: securityRulesActiveState.steps[1].id, + status: 'in_progress', + }, + securityRulesActiveState.steps[2], + ], + }; + httpClient.get.mockResolvedValue({ + state: [securityRulesInProgressState], + }); + apiService.setup(httpClient); + + await apiService.completeGuideStep('security', 'rules'); + + expect(httpClient.put).toHaveBeenCalledTimes(1); + // Verify the completed step now has a "ready_to_complete" status, and the subsequent step is "inactive" + expect(httpClient.put).toHaveBeenLastCalledWith(`${API_BASE_PATH}/state`, { + body: JSON.stringify({ + ...securityRulesInProgressState, + steps: [ + securityRulesInProgressState.steps[0], + { + id: securityRulesInProgressState.steps[1].id, + status: 'ready_to_complete', + }, + { + id: securityRulesInProgressState.steps[2].id, + status: 'inactive', + }, + ], + }), + }); + }); + it('returns undefined if the selected guide is not active', async () => { const startState = await apiService.completeGuideStep('observability', 'add_data'); // not active expect(startState).not.toBeDefined(); }); it('does nothing if the step is not in progress', async () => { - await apiService.updateGuideState(searchAddDataActiveState, false); + httpClient.get.mockResolvedValue({ + state: [searchAddDataActiveState], + }); + apiService.setup(httpClient); await apiService.completeGuideStep(searchGuide, firstStep); - // Expect only 1 call from updateGuideState() - expect(httpClient.put).toHaveBeenCalledTimes(1); + expect(httpClient.put).toHaveBeenCalledTimes(0); }); }); @@ -384,7 +425,7 @@ describe('GuidedOnboarding ApiService', () => { expect(httpClient.put).toHaveBeenCalledTimes(1); // this assertion depends on the guides config expect(httpClient.put).toHaveBeenCalledWith(`${API_BASE_PATH}/state`, { - body: JSON.stringify(securityRulesActivesState), + body: JSON.stringify(securityRulesActiveState), }); }); diff --git a/src/plugins/guided_onboarding/public/services/api.ts b/src/plugins/guided_onboarding/public/services/api.ts index 7c970717be5f1..7895f9f2a7f24 100644 --- a/src/plugins/guided_onboarding/public/services/api.ts +++ b/src/plugins/guided_onboarding/public/services/api.ts @@ -13,8 +13,12 @@ import { GuidedOnboardingApi } from '../types'; import { getGuideConfig, getInProgressStepId, + getStepConfig, + getUpdatedSteps, isIntegrationInGuideStep, isLastStep, + isStepInProgress, + isStepReadyToComplete, } from './helpers'; import { API_BASE_PATH } from '../../common/constants'; import type { GuideState, GuideId, GuideStep, GuideStepIds } from '../../common/types'; @@ -210,16 +214,7 @@ export class ApiService implements GuidedOnboardingApi { */ public isGuideStepActive$(guideId: GuideId, stepId: GuideStepIds): Observable { return this.fetchActiveGuideState$().pipe( - map((activeGuideState) => { - // Return false right away if the guide itself is not active - if (activeGuideState?.guideId !== guideId) { - return false; - } - - // If the guide is active, next check the step - const selectedStep = activeGuideState.steps.find((step) => step.id === stepId); - return selectedStep ? selectedStep.status === 'in_progress' : false; - }) + map((activeGuideState) => isStepInProgress(activeGuideState, guideId, stepId)) ); } @@ -282,34 +277,20 @@ export class ApiService implements GuidedOnboardingApi { return undefined; } - const currentStepIndex = guideState.steps.findIndex((step) => step.id === stepId); - const currentStep = guideState.steps[currentStepIndex]; - const isCurrentStepInProgress = currentStep ? currentStep.status === 'in_progress' : false; - - if (isCurrentStepInProgress) { - const updatedSteps: GuideStep[] = guideState.steps.map((step, stepIndex) => { - const isCurrentStep = step.id === currentStep!.id; - const isNextStep = stepIndex === currentStepIndex + 1; - - // Mark the current step as complete - if (isCurrentStep) { - return { - id: step.id, - status: 'complete', - }; - } + const isCurrentStepInProgress = isStepInProgress(guideState, guideId, stepId); + const isCurrentStepReadyToComplete = isStepReadyToComplete(guideState, guideId, stepId); - // Update the next step to active status - if (isNextStep) { - return { - id: step.id, - status: 'active', - }; - } + const stepConfig = getStepConfig(guideState.guideId, stepId); + const isManualCompletion = stepConfig ? !!stepConfig.manualCompletion : false; - // All other steps return as-is - return step; - }); + if (isCurrentStepInProgress || isCurrentStepReadyToComplete) { + const updatedSteps = getUpdatedSteps( + guideState, + stepId, + // if current step is in progress and configured for manual completion, + // set the status to ready_to_complete + isManualCompletion && isCurrentStepInProgress + ); const currentGuide: GuideState = { guideId, @@ -318,7 +299,13 @@ export class ApiService implements GuidedOnboardingApi { steps: updatedSteps, }; - return await this.updateGuideState(currentGuide, true); + return await this.updateGuideState( + currentGuide, + // the panel is opened when the step is being set to complete. + // that happens when the step is not configured for manual completion + // or it's already ready_to_complete + !isManualCompletion || isCurrentStepReadyToComplete + ); } return undefined; diff --git a/src/plugins/guided_onboarding/public/services/helpers.test.ts b/src/plugins/guided_onboarding/public/services/helpers.test.ts index 586566fe9488b..9dc7519a02019 100644 --- a/src/plugins/guided_onboarding/public/services/helpers.test.ts +++ b/src/plugins/guided_onboarding/public/services/helpers.test.ts @@ -11,7 +11,7 @@ import { isIntegrationInGuideStep, isLastStep } from './helpers'; import { noGuideActiveState, securityAddDataInProgressState, - securityRulesActivesState, + securityRulesActiveState, } from './api.mocks'; const searchGuide = 'search'; @@ -42,7 +42,7 @@ describe('GuidedOnboarding ApiService helpers', () => { expect(result).toBe(false); }); it('returns false if no integration is defined in the guide step', () => { - const result = isIntegrationInGuideStep(securityRulesActivesState, 'endpoint'); + const result = isIntegrationInGuideStep(securityRulesActiveState, 'endpoint'); expect(result).toBe(false); }); it('returns false if no guide is active', () => { diff --git a/src/plugins/guided_onboarding/public/services/helpers.ts b/src/plugins/guided_onboarding/public/services/helpers.ts index 0e738646c558d..30fbd5051215b 100644 --- a/src/plugins/guided_onboarding/public/services/helpers.ts +++ b/src/plugins/guided_onboarding/public/services/helpers.ts @@ -9,24 +9,30 @@ import type { GuideId, GuideState, GuideStepIds } from '../../common/types'; import { guidesConfig } from '../constants/guides_config'; import { GuideConfig, StepConfig } from '../types'; +import { GuideStep } from '../../common/types'; -export const getGuideConfig = (guideID?: string): GuideConfig | undefined => { - if (guideID && Object.keys(guidesConfig).includes(guideID)) { - return guidesConfig[guideID as GuideId]; +export const getGuideConfig = (guideId?: GuideId): GuideConfig | undefined => { + if (guideId && Object.keys(guidesConfig).includes(guideId)) { + return guidesConfig[guideId]; } }; -const getStepIndex = (guideID: string, stepID: string): number => { - const guide = getGuideConfig(guideID); +export const getStepConfig = (guideId: GuideId, stepId: GuideStepIds): StepConfig | undefined => { + const guideConfig = getGuideConfig(guideId); + return guideConfig?.steps.find((step) => step.id === stepId); +}; + +const getStepIndex = (guideId: GuideId, stepId: GuideStepIds): number => { + const guide = getGuideConfig(guideId); if (guide) { - return guide.steps.findIndex((step: StepConfig) => step.id === stepID); + return guide.steps.findIndex((step: StepConfig) => step.id === stepId); } return -1; }; -export const isLastStep = (guideID: string, stepID: string): boolean => { - const guide = getGuideConfig(guideID); - const activeStepIndex = getStepIndex(guideID, stepID); +export const isLastStep = (guideId: GuideId, stepId: GuideStepIds): boolean => { + const guide = getGuideConfig(guideId); + const activeStepIndex = getStepIndex(guideId, stepId); const stepsNumber = guide?.steps.length || 0; if (stepsNumber > 0) { return activeStepIndex === stepsNumber - 1; @@ -56,3 +62,70 @@ export const isIntegrationInGuideStep = (state: GuideState, integration?: string } return false; }; + +const isGuideActive = (guideState: GuideState | undefined, guideId: GuideId): boolean => { + // false if guideState is undefined or the guide is not active + return !!(guideState && guideState.isActive && guideState.guideId === guideId); +}; + +export const isStepInProgress = ( + guideState: GuideState | undefined, + guideId: GuideId, + stepId: GuideStepIds +): boolean => { + if (!isGuideActive(guideState, guideId)) { + return false; + } + + // false if the step is not 'in_progress' + const selectedStep = guideState!.steps.find((step) => step.id === stepId); + return selectedStep ? selectedStep.status === 'in_progress' : false; +}; + +export const isStepReadyToComplete = ( + guideState: GuideState | undefined, + guideId: GuideId, + stepId: GuideStepIds +): boolean => { + if (!isGuideActive(guideState, guideId)) { + return false; + } + + // false if the step is not 'ready_to_complete' + const selectedStep = guideState!.steps.find((step) => step.id === stepId); + return selectedStep ? selectedStep.status === 'ready_to_complete' : false; +}; + +export const getUpdatedSteps = ( + guideState: GuideState, + stepId: GuideStepIds, + setToReadyToComplete?: boolean +): GuideStep[] => { + const currentStepIndex = guideState.steps.findIndex((step) => step.id === stepId); + const currentStep = guideState.steps[currentStepIndex]; + return guideState.steps.map((step, stepIndex) => { + const isCurrentStep = step.id === currentStep!.id; + const isNextStep = stepIndex === currentStepIndex + 1; + + if (isCurrentStep) { + return { + id: step.id, + status: setToReadyToComplete ? 'ready_to_complete' : 'complete', + }; + } + + // if the current step is being updated to 'ready_to_complete, the next step stays inactive + // otherwise update the next step to active status + if (isNextStep) { + return setToReadyToComplete + ? step + : { + id: step.id, + status: 'active', + }; + } + + // All other steps return as-is + return step; + }); +}; diff --git a/src/plugins/guided_onboarding/public/types.ts b/src/plugins/guided_onboarding/public/types.ts index ba7271756cbb7..0ca4a5801fb15 100755 --- a/src/plugins/guided_onboarding/public/types.ts +++ b/src/plugins/guided_onboarding/public/types.ts @@ -65,6 +65,11 @@ export interface StepConfig { }; status?: StepStatus; integration?: string; + manualCompletion?: { + title: string; + description: string; + readyToCompleteOnNavigation?: boolean; + }; } export interface GuideConfig { title: string; From 45e4164a9b1186f623c9d5dff91b32b4d6258f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20G=C3=B3mez?= Date: Thu, 13 Oct 2022 11:35:56 +0200 Subject: [PATCH 06/35] [Synthetics UI] Monitor details page: move tabs to the header (#143176) Co-authored-by: shahzad31 --- .../plugins/synthetics/common/constants/ui.ts | 4 + .../monitor_details/monitor_details_page.tsx | 27 +-- .../monitor_details/monitor_detials_tabs.tsx | 70 -------- .../monitor_errors/monitor_errors.tsx | 2 +- .../monitor_history/monitor_history.tsx | 2 +- .../public/apps/synthetics/routes.tsx | 158 +++++++++++++----- .../translations/translations/fr-FR.json | 3 - .../translations/translations/ja-JP.json | 3 - .../translations/translations/zh-CN.json | 3 - 9 files changed, 129 insertions(+), 143 deletions(-) delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_detials_tabs.tsx diff --git a/x-pack/plugins/synthetics/common/constants/ui.ts b/x-pack/plugins/synthetics/common/constants/ui.ts index 226eda1986886..4fb8a374f944b 100644 --- a/x-pack/plugins/synthetics/common/constants/ui.ts +++ b/x-pack/plugins/synthetics/common/constants/ui.ts @@ -7,6 +7,10 @@ export const MONITOR_ROUTE = '/monitor/:monitorId?'; +export const MONITOR_HISTORY_ROUTE = '/monitor/:monitorId/history'; + +export const MONITOR_ERRORS_ROUTE = '/monitor/:monitorId/errors'; + export const MONITOR_ADD_ROUTE = '/add-monitor'; export const MONITOR_EDIT_ROUTE = '/edit-monitor/:monitorId'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx index 58b5f724d53b9..cdf4ba1cfb2ce 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx @@ -5,31 +5,12 @@ * 2.0. */ -import React, { useEffect } from 'react'; -import { useDispatch } from 'react-redux'; -import { useParams } from 'react-router-dom'; +import React from 'react'; import { useSelectedMonitor } from './hooks/use_selected_monitor'; -import { useSelectedLocation } from './hooks/use_selected_location'; -import { getMonitorAction, getMonitorRecentPingsAction } from '../../state/monitor_details'; import { useMonitorListBreadcrumbs } from '../monitors_page/hooks/use_breadcrumbs'; -import { MonitorDetailsTabs } from './monitor_detials_tabs'; -export const MonitorDetailsPage = () => { - const { monitor } = useSelectedMonitor(); +export const MonitorDetailsPage: React.FC<{ children: React.ReactElement }> = ({ children }) => { + const { monitor } = useSelectedMonitor(); useMonitorListBreadcrumbs([{ text: monitor?.name ?? '' }]); - - const dispatch = useDispatch(); - - const selectedLocation = useSelectedLocation(); - const { monitorId } = useParams<{ monitorId: string }>(); - - useEffect(() => { - dispatch(getMonitorAction.get({ monitorId })); - - if (selectedLocation) { - dispatch(getMonitorRecentPingsAction.get({ monitorId, locationId: selectedLocation.label })); - } - }, [dispatch, monitorId, selectedLocation]); - - return ; + return children; }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_detials_tabs.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_detials_tabs.tsx deleted file mode 100644 index 6667034da5fdf..0000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_detials_tabs.tsx +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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 { EuiIcon, EuiSpacer, EuiTabbedContent } from '@elastic/eui'; -import React from 'react'; -import { i18n } from '@kbn/i18n'; -import { ErrorsTabContent } from './monitor_errors/monitor_errors'; -import { HistoryTabContent } from './monitor_history/monitor_history'; -import { MonitorSummary } from './monitor_summary/monitor_summary'; - -export const MonitorDetailsTabs = () => { - const tabs = [ - { - id: 'summary', - name: SUMMARY_LABEL, - content: ( - <> - - - - ), - }, - { - id: 'history', - name: HISTORY_LABEL, - content: ( - <> - - - - ), - }, - { - id: 'errors', - name: ERRORS_LABEL, - prepend: , - content: ( - <> - - - - ), - }, - ]; - - return ( - {}} - /> - ); -}; - -const SUMMARY_LABEL = i18n.translate('xpack.synthetics.monitorSummary.summary', { - defaultMessage: 'Summary', -}); - -const HISTORY_LABEL = i18n.translate('xpack.synthetics.monitorSummary.history', { - defaultMessage: 'History', -}); - -const ERRORS_LABEL = i18n.translate('xpack.synthetics.monitorSummary.errors', { - defaultMessage: 'Errors', -}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_errors/monitor_errors.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_errors/monitor_errors.tsx index 75fb0d7ccf3ae..479aa6ac72bfb 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_errors/monitor_errors.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_errors/monitor_errors.tsx @@ -7,6 +7,6 @@ import { EuiText } from '@elastic/eui'; import React from 'react'; -export const ErrorsTabContent = () => { +export const MonitorErrors = () => { return Monitor errors tabs content; }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_history/monitor_history.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_history/monitor_history.tsx index 5b90c2c2d73e1..a1522f58047da 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_history/monitor_history.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_history/monitor_history.tsx @@ -7,6 +7,6 @@ import { EuiText } from '@elastic/eui'; import React from 'react'; -export const HistoryTabContent = () => { +export const MonitorHistory = () => { return Monitor history tab content; }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx index 6d6cdd18e8953..92ec0afce43ff 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx @@ -7,8 +7,15 @@ import { EuiThemeComputed } from '@elastic/eui/src/services/theme/types'; import React, { FC, useEffect } from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLink, useEuiTheme } from '@elastic/eui'; -import { Route, Switch, useHistory } from 'react-router-dom'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiLink, + EuiPageHeaderProps, + useEuiTheme, +} from '@elastic/eui'; +import { Route, Switch, useHistory, useRouteMatch } from 'react-router-dom'; import { OutPortal } from 'react-reverse-portal'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; @@ -31,12 +38,14 @@ import { MonitorDetailsLinkPortalNode, } from './components/monitor_add_edit/portals'; import { + GETTING_STARTED_ROUTE, + MONITORS_ROUTE, MONITOR_ADD_ROUTE, MONITOR_EDIT_ROUTE, - MONITORS_ROUTE, - OVERVIEW_ROUTE, - GETTING_STARTED_ROUTE, + MONITOR_ERRORS_ROUTE, + MONITOR_HISTORY_ROUTE, MONITOR_ROUTE, + OVERVIEW_ROUTE, } from '../../../common/constants'; import { PLUGIN } from '../../../common/constants/plugin'; import { MonitorPage } from './components/monitors_page/monitor_page'; @@ -45,6 +54,9 @@ import { RunTestManually } from './components/monitor_details/run_test_manually' import { MonitorDetailsStatus } from './components/monitor_details/monitor_details_status'; import { MonitorDetailsLocation } from './components/monitor_details/monitor_details_location'; import { MonitorDetailsLastRun } from './components/monitor_details/monitor_details_last_run'; +import { MonitorSummary } from './components/monitor_details/monitor_summary/monitor_summary'; +import { MonitorHistory } from './components/monitor_details/monitor_history/monitor_history'; +import { MonitorErrors } from './components/monitor_details/monitor_errors/monitor_errors'; type RouteProps = LazyObservabilityPageTemplateProps & { path: string; @@ -89,33 +101,41 @@ const getRoutes = ( values: { baseTitle }, }), path: MONITOR_ROUTE, - component: () => , + component: () => ( + + + + ), dataTestSubj: 'syntheticsMonitorDetailsPage', - pageHeader: { - pageTitle: , - breadcrumbs: [ - { - text: ( - <> - {' '} - - - ), - color: 'primary', - 'aria-current': false, - href: `${syntheticsPath}${MONITORS_ROUTE}`, - }, - ], - rightSideItems: [ - , - , - , - , - ], - }, + pageHeader: getMonitorSummaryHeader(history, syntheticsPath, 'summary'), + }, + { + title: i18n.translate('xpack.synthetics.monitorHistory.title', { + defaultMessage: 'Synthetics Monitor History | {baseTitle}', + values: { baseTitle }, + }), + path: MONITOR_HISTORY_ROUTE, + component: () => ( + + + + ), + dataTestSubj: 'syntheticsMonitorHistoryPage', + pageHeader: getMonitorSummaryHeader(history, syntheticsPath, 'history'), + }, + { + title: i18n.translate('xpack.synthetics.monitorErrors.title', { + defaultMessage: 'Synthetics Monitor Errors | {baseTitle}', + values: { baseTitle }, + }), + path: MONITOR_ERRORS_ROUTE, + component: () => ( + + + + ), + dataTestSubj: 'syntheticsMonitorHistoryPage', + pageHeader: getMonitorSummaryHeader(history, syntheticsPath, 'errors'), }, { title: i18n.translate('xpack.synthetics.overviewRoute.title', { @@ -156,10 +176,7 @@ const getRoutes = ( defaultMessage="Management" /> ), - onClick: () => - history.push({ - pathname: MONITORS_ROUTE, - }), + href: `${syntheticsPath}${MONITORS_ROUTE}`, }, ], }, @@ -188,10 +205,7 @@ const getRoutes = ( defaultMessage="Overview" /> ), - onClick: () => - history.push({ - pathname: OVERVIEW_ROUTE, - }), + href: `${syntheticsPath}${OVERVIEW_ROUTE}`, }, { label: ( @@ -272,6 +286,72 @@ const getRoutes = ( ]; }; +const getMonitorSummaryHeader = ( + history: ReturnType, + syntheticsPath: string, + selectedTab: 'summary' | 'history' | 'errors' +): EuiPageHeaderProps => { + // Not a component, but it doesn't matter. Hooks are just functions + const match = useRouteMatch<{ monitorId: string }>(MONITOR_ROUTE); // eslint-disable-line react-hooks/rules-of-hooks + + if (!match) { + return {}; + } + + const search = history.location.search; + const monitorId = match.params.monitorId; + + return { + pageTitle: , + breadcrumbs: [ + { + text: ( + <> + {' '} + + + ), + color: 'primary', + 'aria-current': false, + href: `${syntheticsPath}${MONITORS_ROUTE}`, + }, + ], + rightSideItems: [ + , + , + , + , + ], + tabs: [ + { + label: i18n.translate('xpack.synthetics.monitorSummaryTab.title', { + defaultMessage: 'Summary', + }), + isSelected: selectedTab === 'summary', + href: `${syntheticsPath}${MONITOR_ROUTE.replace(':monitorId?', monitorId)}${search}`, + }, + { + label: i18n.translate('xpack.synthetics.monitorHistoryTab.title', { + defaultMessage: 'History', + }), + isSelected: selectedTab === 'history', + href: `${syntheticsPath}${MONITOR_HISTORY_ROUTE.replace(':monitorId', monitorId)}${search}`, + }, + { + label: i18n.translate('xpack.synthetics.monitorErrorsTab.title', { + defaultMessage: 'Errors', + }), + prepend: , + isSelected: selectedTab === 'errors', + href: `${syntheticsPath}${MONITOR_ERRORS_ROUTE.replace(':monitorId', monitorId)}${search}`, + }, + ], + }; +}; + const RouteInit: React.FC> = ({ path, title }) => { useEffect(() => { document.title = title; diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index dd64f4ded51b6..3750a4af42538 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -31343,10 +31343,7 @@ "xpack.synthetics.monitorStatusBar.timestampFromNowTextAriaLabel": "Temps depuis la dernière vérification", "xpack.synthetics.monitorStatusBar.type.ariaLabel": "Type de moniteur", "xpack.synthetics.monitorStatusBar.type.label": "Type", - "xpack.synthetics.monitorSummary.errors": "Erreurs", - "xpack.synthetics.monitorSummary.history": "Historique", "xpack.synthetics.monitorSummary.runTestManually": "Exécuter le test manuellement", - "xpack.synthetics.monitorSummary.summary": "Résumé", "xpack.synthetics.navigateToAlertingButton.content": "Gérer les règles", "xpack.synthetics.navigateToAlertingUi": "Quitter Uptime et accéder à la page de gestion Alerting", "xpack.synthetics.noDataConfig.beatsCard.description": "Monitorez de façon proactive la disponibilité de vos sites et services. Recevez des alertes et corrigez les problèmes plus rapidement pour optimiser l'expérience de vos utilisateurs.", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 55e4b7a85b6a9..f0d7d45fec244 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -31319,10 +31319,7 @@ "xpack.synthetics.monitorStatusBar.timestampFromNowTextAriaLabel": "最終確認からの経過時間", "xpack.synthetics.monitorStatusBar.type.ariaLabel": "モニタータイプ", "xpack.synthetics.monitorStatusBar.type.label": "型", - "xpack.synthetics.monitorSummary.errors": "エラー", - "xpack.synthetics.monitorSummary.history": "履歴", "xpack.synthetics.monitorSummary.runTestManually": "手動でテストを実行", - "xpack.synthetics.monitorSummary.summary": "まとめ", "xpack.synthetics.navigateToAlertingButton.content": "ルールの管理", "xpack.synthetics.navigateToAlertingUi": "Uptime を離れてアラート管理ページに移動します", "xpack.synthetics.noDataConfig.beatsCard.description": "サイトとサービスの可用性をアクティブに監視するアラートを受信し、問題をより迅速に解決して、ユーザーエクスペリエンスを最適化します。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 93f70fddc202f..482a967318153 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -31354,10 +31354,7 @@ "xpack.synthetics.monitorStatusBar.timestampFromNowTextAriaLabel": "自上次检查以来经过的时间", "xpack.synthetics.monitorStatusBar.type.ariaLabel": "监测类型", "xpack.synthetics.monitorStatusBar.type.label": "类型", - "xpack.synthetics.monitorSummary.errors": "错误", - "xpack.synthetics.monitorSummary.history": "历史记录", "xpack.synthetics.monitorSummary.runTestManually": "手动运行测试", - "xpack.synthetics.monitorSummary.summary": "摘要", "xpack.synthetics.navigateToAlertingButton.content": "管理规则", "xpack.synthetics.navigateToAlertingUi": "离开 Uptime 并前往“Alerting 管理”页面", "xpack.synthetics.noDataConfig.beatsCard.description": "主动监测站点和服务的可用性。接收告警并更快地解决问题,从而优化用户体验。", From e7942ccdbdd38e8ea3a67c315dc0ed9b53b5292d Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Thu, 13 Oct 2022 11:43:23 +0200 Subject: [PATCH 07/35] [Lens] Fix race condition in embeddable initialization (#143069) * fix race condition * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../lens/public/embeddable/embeddable.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.tsx index 8da6ca0e6d5c0..77164cfa1e1fa 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable.tsx @@ -304,13 +304,21 @@ export class Embeddable this.lensInspector = getLensInspectorService(deps.inspector); this.expressionRenderer = deps.expressionRenderer; + let containerStateChangedCalledAlready = false; this.initializeSavedVis(initialInput) - .then(() => this.onContainerStateChanged(initialInput)) + .then(() => { + if (!containerStateChangedCalledAlready) { + this.onContainerStateChanged(initialInput); + } else { + this.reload(); + } + }) .catch((e) => this.onFatalError(e)); - this.subscription = this.getUpdated$().subscribe(() => - this.onContainerStateChanged(this.input) - ); + this.subscription = this.getUpdated$().subscribe(() => { + containerStateChangedCalledAlready = true; + this.onContainerStateChanged(this.input); + }); const input$ = this.getInput$(); this.embeddableTitle = this.getTitle(); From fbacdc6315ccc599fe82795a42b0c77559494aa6 Mon Sep 17 00:00:00 2001 From: Mark Hopkin Date: Thu, 13 Oct 2022 11:26:23 +0100 Subject: [PATCH 08/35] [Fleet] Simplify `skipArchive` behaviour for input packages (#141671) * add test for missing pkg policy field * test create package policy API * always try and get info from registry * remove skipArchive * fix mock * remove comment * change log message * add download key to archive packages * add clarifying comment --- .../server/services/epm/packages/get.test.ts | 4 ++ .../fleet/server/services/epm/packages/get.ts | 11 ++-- .../server/services/epm/registry/index.ts | 4 +- .../fleet_api_integration/apis/epm/get.ts | 12 ++++ .../apis/package_policy/create.ts | 66 +++++++++++++++++++ 5 files changed, 90 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts index 1dacf4ed7df8a..20ed655d97176 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts @@ -188,6 +188,10 @@ describe('When using EPM `get` services', () => { name: 'my-package', version: '1.0.0', } as RegistryPackage); + MockRegistry.fetchInfo.mockResolvedValue({ + name: 'my-package', + version: '1.0.0', + } as RegistryPackage); MockRegistry.getPackage.mockResolvedValue({ paths: [], packageInfo: { diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get.ts b/x-pack/plugins/fleet/server/services/epm/packages/get.ts index 0ce4e3c1cbea3..b8b447a8de526 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get.ts @@ -152,13 +152,12 @@ export async function getPackageInfo({ // If same version is available in registry and skipArchive is true, use the info from the registry (faster), // otherwise build it from the archive let paths: string[]; - let packageInfo: RegistryPackage | ArchivePackage | undefined = skipArchive - ? await Registry.fetchInfo(pkgName, resolvedPkgVersion).catch(() => undefined) - : undefined; - + const registryInfo = await Registry.fetchInfo(pkgName, resolvedPkgVersion).catch(() => undefined); + let packageInfo; // We need to get input only packages from source to get all fields // see https://github.com/elastic/package-registry/issues/864 - if (packageInfo && packageInfo.type !== 'input') { + if (registryInfo && skipArchive && registryInfo.type !== 'input') { + packageInfo = registryInfo; // Fix the paths paths = packageInfo.assets?.map((path) => @@ -293,7 +292,7 @@ export async function getPackageFromSource(options: { } } else { res = await Registry.getPackage(pkgName, pkgVersion, { ignoreUnverified }); - logger.debug(`retrieved uninstalled package ${pkgName}-${pkgVersion}`); + logger.debug(`retrieved package ${pkgName}-${pkgVersion} from registry`); } if (!res) { throw new FleetError(`package info for ${pkgName}-${pkgVersion} does not exist`); diff --git a/x-pack/plugins/fleet/server/services/epm/registry/index.ts b/x-pack/plugins/fleet/server/services/epm/registry/index.ts index 3f648a7fd73dc..e4ebf9013f55e 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/index.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/index.ts @@ -265,7 +265,9 @@ async function getPackageInfoFromArchiveOrCache( archiveBuffer, ensureContentType(archivePath) ); - setPackageInfo({ packageInfo, name, version }); + // set the download URL as it isn't contained in the manifest + // this allows us to re-download the archive during package install + setPackageInfo({ packageInfo: { ...packageInfo, download: archivePath }, name, version }); return packageInfo; } else { return cachedInfo; diff --git a/x-pack/test/fleet_api_integration/apis/epm/get.ts b/x-pack/test/fleet_api_integration/apis/epm/get.ts index 2a63e1c8b3905..280922b2e4a33 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/get.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/get.ts @@ -144,6 +144,18 @@ export default function (providerContext: FtrProviderContext) { expect(packageInfo.name).to.equal('apache'); await uninstallPackage(testPkgName, testPkgVersion); }); + it('should return all fields for input only packages', async function () { + // input packages have to get their package info from the manifest directly + // not from the package registry. This is because they contain a field the registry + // does not support + const res = await supertest + .get(`/api/fleet/epm/packages/integration_to_input/0.9.1`) + .expect(200); + + const packageInfo = res.body.item; + expect(packageInfo.policy_templates.length).to.equal(1); + expect(packageInfo.policy_templates[0].vars).not.to.be(undefined); + }); describe('Pkg verification', () => { it('should return validation error for unverified input only pkg', async function () { const res = await supertest.get(`/api/fleet/epm/packages/input_only/0.1.0`).expect(400); diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/create.ts b/x-pack/test/fleet_api_integration/apis/package_policy/create.ts index 10b1b709d188f..21a5fa0f6dc2a 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/create.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/create.ts @@ -446,6 +446,72 @@ export default function (providerContext: FtrProviderContext) { expect(policy.name).to.equal(nameWithWhitespace.trim()); }); + describe('input only packages', () => { + it('should return 400 if dataset not provided for input only pkg', async function () { + await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + policy_id: agentPolicyId, + package: { + name: 'integration_to_input', + version: '0.9.1', + }, + name: 'integration_to_input-1', + description: '', + namespace: 'default', + inputs: { + 'logs-logfile': { + enabled: true, + streams: { + 'integration_to_input.logs': { + enabled: true, + vars: { + paths: ['/tmp/test.log'], + tags: ['tag1'], + ignore_older: '72h', + }, + }, + }, + }, + }, + }) + .expect(400); + }); + it('should successfully create an input only package policy with all required vars', async function () { + await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + policy_id: agentPolicyId, + package: { + name: 'integration_to_input', + version: '0.9.1', + }, + name: 'integration_to_input-2', + description: '', + namespace: 'default', + inputs: { + 'logs-logfile': { + enabled: true, + streams: { + 'integration_to_input.logs': { + enabled: true, + vars: { + paths: ['/tmp/test.log'], + tags: ['tag1'], + ignore_older: '72h', + 'data_stream.dataset': 'generic', + }, + }, + }, + }, + }, + }) + .expect(200); + }); + }); + describe('Simplified package policy', () => { it('should work with valid values', async () => { await supertest From e74b4e3e3546701a1a52d0f1607a9ad0098390f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Thu, 13 Oct 2022 12:47:09 +0200 Subject: [PATCH 09/35] [Security Solution][Endpoint] Adds trusted application privileges for API actions (#142472) * Adds trusted application privileges for API actions * Unify error messages * Removes validateCanManageEndpointArtifacts check Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../endpoint/validators/base_validator.ts | 7 ++++++ .../validators/trusted_app_validator.ts | 24 ++++++++++++------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.ts index 872d8da7cdb3d..ecc2ac7893336 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.ts @@ -10,6 +10,7 @@ import { schema } from '@kbn/config-schema'; import { isEqual } from 'lodash/fp'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { OperatingSystem } from '@kbn/securitysolution-utils'; +import type { EndpointAuthz } from '../../../../common/endpoint/types/authz'; import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; import type { ExceptionItemLikeOptions } from '../types'; import { getEndpointAuthzInitialState } from '../../../../common/endpoint/service/authz'; @@ -73,6 +74,12 @@ export class BaseValidator { } } + protected async validateHasPrivilege(privilege: keyof EndpointAuthz): Promise { + if (!(await this.endpointAuthzPromise)[privilege]) { + throw new EndpointArtifactExceptionValidationError('Endpoint authorization failure', 403); + } + } + protected isItemByPolicy(item: ExceptionItemLikeOptions): boolean { return isArtifactByPolicy(item); } diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/trusted_app_validator.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/trusted_app_validator.ts index ebc3c05460923..86b11249af9bd 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/trusted_app_validator.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/trusted_app_validator.ts @@ -175,10 +175,18 @@ export class TrustedAppValidator extends BaseValidator { return item.listId === ENDPOINT_TRUSTED_APPS_LIST_ID; } + protected async validateHasWritePrivilege(): Promise { + return super.validateHasPrivilege('canWriteTrustedApplications'); + } + + protected async validateHasReadPrivilege(): Promise { + return super.validateHasPrivilege('canReadTrustedApplications'); + } + async validatePreCreateItem( item: CreateExceptionListItemOptions ): Promise { - await this.validateCanManageEndpointArtifacts(); + await this.validateHasWritePrivilege(); await this.validateTrustedAppData(item); await this.validateCanCreateByPolicyArtifacts(item); await this.validateByPolicyItem(item); @@ -187,27 +195,27 @@ export class TrustedAppValidator extends BaseValidator { } async validatePreDeleteItem(): Promise { - await this.validateCanManageEndpointArtifacts(); + await this.validateHasWritePrivilege(); } async validatePreGetOneItem(): Promise { - await this.validateCanManageEndpointArtifacts(); + await this.validateHasReadPrivilege(); } async validatePreMultiListFind(): Promise { - await this.validateCanManageEndpointArtifacts(); + await this.validateHasReadPrivilege(); } async validatePreExport(): Promise { - await this.validateCanManageEndpointArtifacts(); + await this.validateHasWritePrivilege(); } async validatePreSingleListFind(): Promise { - await this.validateCanManageEndpointArtifacts(); + await this.validateHasReadPrivilege(); } async validatePreGetListSummary(): Promise { - await this.validateCanManageEndpointArtifacts(); + await this.validateHasReadPrivilege(); } async validatePreUpdateItem( @@ -216,7 +224,7 @@ export class TrustedAppValidator extends BaseValidator { ): Promise { const updatedItem = _updatedItem as ExceptionItemLikeOptions; - await this.validateCanManageEndpointArtifacts(); + await this.validateHasWritePrivilege(); await this.validateTrustedAppData(updatedItem); try { From 84e5c6d1a84ac6f68725b18142d08734149ce584 Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Thu, 13 Oct 2022 12:58:32 +0200 Subject: [PATCH 10/35] [ML] Disable notifications polling for the basic license (#143212) --- .../ml/public/application/components/ml_page/side_nav.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/ml/public/application/components/ml_page/side_nav.tsx b/x-pack/plugins/ml/public/application/components/ml_page/side_nav.tsx index 4dbc2400aa7cf..6959f5cf17a53 100644 --- a/x-pack/plugins/ml/public/application/components/ml_page/side_nav.tsx +++ b/x-pack/plugins/ml/public/application/components/ml_page/side_nav.tsx @@ -84,7 +84,13 @@ export function useSideNavItems(activeRoute: MlRoute | undefined) { { id: 'notifications', pathId: ML_PAGES.NOTIFICATIONS, - name: , + name: disableLinks ? ( + i18n.translate('xpack.ml.navMenu.notificationsTabLinkText', { + defaultMessage: 'Notifications', + }) + ) : ( + + ), disabled: disableLinks, testSubj: 'mlMainTab notifications', }, From 8801f984a6a1d4b29987b7131e843c947b3fdac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Thu, 13 Oct 2022 13:59:10 +0200 Subject: [PATCH 11/35] [EBT] `userId` is optional (#143261) --- .../security/public/analytics/register_user_context.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security/public/analytics/register_user_context.ts b/x-pack/plugins/security/public/analytics/register_user_context.ts index bc48846913d02..19ecf0a6896fa 100644 --- a/x-pack/plugins/security/public/analytics/register_user_context.ts +++ b/x-pack/plugins/security/public/analytics/register_user_context.ts @@ -12,6 +12,11 @@ import { Sha256 } from '@kbn/crypto-browser'; import type { AuthenticationServiceSetup } from '..'; +interface UserIdContext { + userId?: string; + isElasticCloudUser: boolean; +} + /** * Set up the Analytics context provider for the User information. * @param analytics Core's Analytics service. The Setup contract. @@ -24,7 +29,7 @@ export function registerUserContext( authc: AuthenticationServiceSetup, cloudId?: string ) { - analytics.registerContextProvider({ + analytics.registerContextProvider({ name: 'user_id', context$: from(authc.getCurrentUser()).pipe( map((user) => { @@ -50,7 +55,7 @@ export function registerUserContext( schema: { userId: { type: 'keyword', - _meta: { description: 'The user id scoped as seen by Cloud (hashed)' }, + _meta: { description: 'The user id scoped as seen by Cloud (hashed)', optional: true }, }, isElasticCloudUser: { type: 'boolean', From 17668d773c2b4791284766d81b7b99227cc7dc14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Louv-Jansen?= Date: Thu, 13 Oct 2022 14:00:09 +0200 Subject: [PATCH 12/35] [APM] Fix tooltip text (#143243) --- .../service_overview_dependencies_table/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx index 8e7c7a0336d30..c4c1690b6bb89 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx @@ -140,7 +140,7 @@ export function ServiceOverviewDependenciesTable({ 'xpack.apm.serviceOverview.dependenciesTableTitleTip', { defaultMessage: - 'Uninstrumented downstream services or external connections derived from the exit spans of instrumented services.', + 'Downstream services and external connections to uninstrumented services', } )} > From 0980919e244439cccd421e2f697f3540e97c229f Mon Sep 17 00:00:00 2001 From: Yaroslav Kuznietsov Date: Thu, 13 Oct 2022 15:59:17 +0300 Subject: [PATCH 13/35] [Lens][TSVB] Functional tests for converting of Metric. (#143164) * Added test for metric with params. * Added test for invalid model. * Added test for unsupported aggregation. * Added test for sibling pipeline agg. * Added parent pipeline agg tests. * Added functional tests for static value. * Added tests for converting metric with params, unsupported metrics and not valid panels. * Added tests for color ranges. --- .../page_objects/visual_builder_page.ts | 12 +++ .../lens/group3/open_in_lens/tsvb/metric.ts | 99 ++++++++++++++++++- .../test/functional/page_objects/lens_page.ts | 16 +++ 3 files changed, 126 insertions(+), 1 deletion(-) diff --git a/test/functional/page_objects/visual_builder_page.ts b/test/functional/page_objects/visual_builder_page.ts index 3e62d830cddbf..be13c856c3f02 100644 --- a/test/functional/page_objects/visual_builder_page.ts +++ b/test/functional/page_objects/visual_builder_page.ts @@ -417,6 +417,18 @@ export class VisualBuilderPageObject extends FtrService { }); } + public async createColorRule(nth = 0) { + await this.clickPanelOptions('metric'); + + const elements = await this.testSubjects.findAll('AddAddBtn'); + await elements[nth].click(); + await this.visChart.waitForVisualizationRenderingStabilized(); + await this.retry.waitFor('new color rule is added', async () => { + const currentAddButtons = await this.testSubjects.findAll('AddAddBtn'); + return currentAddButtons.length > elements.length; + }); + } + public async selectAggType(value: string, nth = 0) { const elements = await this.testSubjects.findAll('aggSelector'); await this.comboBox.setElement(elements[nth], value); diff --git a/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/metric.ts b/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/metric.ts index 273473b67a31e..6ec2ef5cc984a 100644 --- a/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/metric.ts +++ b/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/metric.ts @@ -9,9 +9,16 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const { visualize, visualBuilder, lens } = getPageObjects(['visualBuilder', 'visualize', 'lens']); + const { visualize, visualBuilder, lens, header } = getPageObjects([ + 'visualBuilder', + 'visualize', + 'lens', + 'header', + ]); const testSubjects = getService('testSubjects'); + const retry = getService('retry'); + const find = getService('find'); describe('Metric', function describeIndexTests() { before(async () => { @@ -40,5 +47,95 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const metricData = await lens.getMetricVisualizationData(); expect(metricData[0].title).to.eql('Count of records'); }); + + it('should draw static value', async () => { + await visualBuilder.selectAggType('Static Value'); + await visualBuilder.setStaticValue(10); + + await header.waitUntilLoadingHasFinished(); + + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + await lens.waitForVisualization('mtrVis'); + await retry.try(async () => { + const layers = await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`); + expect(layers).to.have.length(1); + + const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); + expect(dimensions).to.have.length(1); + expect(await dimensions[0].getVisibleText()).to.be('10'); + }); + }); + + it('should convert metric with params', async () => { + await visualBuilder.selectAggType('Value Count'); + await visualBuilder.setFieldForAggregation('bytes'); + + await header.waitUntilLoadingHasFinished(); + + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + await lens.waitForVisualization('mtrVis'); + await retry.try(async () => { + const layers = await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`); + expect(layers).to.have.length(1); + + const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); + expect(dimensions).to.have.length(1); + expect(await dimensions[0].getVisibleText()).to.be('Count of bytes'); + }); + }); + + it('should not allow converting of unsupported metric', async () => { + await visualBuilder.selectAggType('Counter Rate'); + await visualBuilder.setFieldForAggregation('machine.ram'); + + await header.waitUntilLoadingHasFinished(); + + const canEdit = await testSubjects.exists('visualizeEditInLensButton'); + expect(canEdit).to.be(false); + }); + + it('should not allow converting of not valid panel', async () => { + await visualBuilder.selectAggType('Value Count'); + await header.waitUntilLoadingHasFinished(); + const canEdit = await testSubjects.exists('visualizeEditInLensButton'); + expect(canEdit).to.be(false); + }); + + it('should convert color ranges', async () => { + await visualBuilder.clickPanelOptions('metric'); + await visualBuilder.setColorRuleOperator('>= greater than or equal'); + await visualBuilder.setColorRuleValue(10); + await visualBuilder.setColorPickerValue('#54B399'); + + await header.waitUntilLoadingHasFinished(); + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + + await lens.waitForVisualization('mtrVis'); + await retry.try(async () => { + const closePalettePanels = await testSubjects.findAll( + 'lns-indexPattern-PalettePanelContainerBack' + ); + if (closePalettePanels.length) { + await lens.closePalettePanel(); + await lens.closeDimensionEditor(); + } + + const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); + expect(dimensions).to.have.length(1); + + dimensions[0].click(); + + await lens.openPalettePanel('lnsMetric'); + const colorStops = await lens.getPaletteColorStops(); + + expect(colorStops).to.eql([ + { stop: '10', color: 'rgba(84, 179, 153, 1)' }, + { stop: '', color: undefined }, + ]); + }); + }); }); } diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index c37a9af94eb7e..05e3c6bb53f57 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -1586,5 +1586,21 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont throw new Error(`Warning with text "${warningText}" not found`); } }, + + async getPaletteColorStops() { + const stops = await find.allByCssSelector( + `[data-test-subj^="lnsPalettePanel_dynamicColoring_range_value_"]` + ); + const colorsElements = await testSubjects.findAll('euiColorPickerAnchor'); + const colors = await Promise.all( + colorsElements.map((c) => c.getComputedStyle('background-color')) + ); + + return await Promise.all( + stops.map(async (stop, index) => { + return { stop: await stop.getAttribute('value'), color: colors[index] }; + }) + ); + }, }); } From 6cb56f106223dbc65057ebc834e4c09de8bb7cbe Mon Sep 17 00:00:00 2001 From: Philippe Oberti Date: Thu, 13 Oct 2022 08:52:25 -0500 Subject: [PATCH 14/35] [TIP] Cleanup structure and imports for the entire indicators module (#142788) - rename indicator_field_label to field_label - rename indicator_field_value to field_value - rename index.tsx to index.ts - move indicators_page.tsx under pages folder and rename to indicators.tsx - rename use_indicators_filters_context to use_filters_context - rename use_indicators_total_count to use_total_count - add index.ts at root of indicators module and update imports in other modules accordingly --- .../mocks/mock_indicators_filters_context.tsx | 2 +- .../public/common/mocks/story_providers.tsx | 2 +- .../public/common/mocks/test_providers.tsx | 2 +- .../containers/field_types_provider.tsx | 5 ++-- .../integrations_guard.test.tsx | 4 +-- .../integrations_guard/integrations_guard.tsx | 5 ++-- .../field_label.tsx} | 0 .../index.tsx => field_label/index.ts} | 2 +- .../__snapshots__/field.test.tsx.snap} | 0 .../field.stories.tsx} | 2 +- .../field.test.tsx} | 2 +- .../field_value.tsx} | 2 +- .../index.tsx => field_value/index.ts} | 2 +- .../fields_table/fields_table.stories.tsx | 2 +- .../flyout/fields_table/fields_table.tsx | 2 +- .../components/flyout/flyout.stories.tsx | 2 +- .../indicators/components/flyout/flyout.tsx | 2 +- .../indicator_value_actions.tsx | 2 +- .../overview_tab/block/block.stories.tsx | 2 +- .../flyout/overview_tab/block/block.tsx | 4 +-- .../highlighted_values_table.tsx | 2 +- .../overview_tab/overview_tab.stories.tsx | 2 +- .../flyout/overview_tab/overview_tab.tsx | 2 +- .../flyout/table_tab/table_tab.stories.tsx | 2 +- .../flyout/table_tab/table_tab.test.tsx | 2 +- .../table/components/cell_actions.tsx | 4 +-- .../table/components/cell_renderer.tsx | 2 +- .../table/hooks/use_column_settings.ts | 2 +- .../components/table/table.stories.tsx | 2 +- .../indicators/components/table/table.tsx | 4 +-- .../context.ts | 0 .../filters.tsx} | 2 +- .../{indicators_filters => filters}/index.ts | 3 +- .../public/modules/indicators/hooks/index.ts | 5 ++-- ...ters_context.ts => use_filters_context.ts} | 2 +- .../indicators/hooks/use_indicators.test.tsx | 2 +- ...ount.test.tsx => use_total_count.test.tsx} | 4 +-- ...rs_total_count.tsx => use_total_count.tsx} | 0 .../public/modules/indicators/index.ts | 13 +++++++++ .../public/modules/indicators/pages/index.ts | 8 ++++++ .../indicators.test.tsx} | 19 ++++++------- .../indicators.tsx} | 28 +++++++++---------- .../services/fetch_aggregated_indicators.ts | 3 +- .../indicators/services/fetch_indicators.ts | 3 +- .../public/modules/indicators/utils/index.ts | 14 ++++++++++ .../filter_in/filter_in.stories.tsx | 4 +-- .../components/filter_in/filter_in.test.tsx | 4 +-- .../filter_out/filter_out.stories.tsx | 4 +-- .../components/filter_out/filter_out.test.tsx | 4 +-- .../query_bar/hooks/use_filter_in_out.ts | 7 +++-- .../hooks/use_filters/use_filters.ts | 5 +--- .../add_to_timeline/add_to_timeline.tsx | 5 +--- .../timeline/hooks/use_add_to_timeline.ts | 2 +- .../hooks/use_investigate_in_timeline.ts | 3 +- .../threat_intelligence/public/plugin.tsx | 4 +-- 55 files changed, 122 insertions(+), 96 deletions(-) rename x-pack/plugins/threat_intelligence/public/modules/indicators/components/{indicator_field_label/indicator_field_label.tsx => field_label/field_label.tsx} (100%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/components/{indicator_field_label/index.tsx => field_label/index.ts} (86%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/components/{indicator_field_value/__snapshots__/indicator_field.test.tsx.snap => field_value/__snapshots__/field.test.tsx.snap} (100%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/components/{indicator_field_value/indicator_field.stories.tsx => field_value/field.stories.tsx} (94%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/components/{indicator_field_value/indicator_field.test.tsx => field_value/field.test.tsx} (95%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/components/{indicator_field_value/indicator_field_value.tsx => field_value/field_value.tsx} (96%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/components/{indicator_field_value/index.tsx => field_value/index.ts} (86%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/containers/{indicators_filters => filters}/context.ts (100%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/containers/{indicators_filters/indicators_filters.tsx => filters/filters.tsx} (98%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/containers/{indicators_filters => filters}/index.ts (87%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/{use_indicators_filters_context.ts => use_filters_context.ts} (93%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/{use_indicators_total_count.test.tsx => use_total_count.test.tsx} (92%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/{use_indicators_total_count.tsx => use_total_count.tsx} (100%) create mode 100644 x-pack/plugins/threat_intelligence/public/modules/indicators/index.ts create mode 100644 x-pack/plugins/threat_intelligence/public/modules/indicators/pages/index.ts rename x-pack/plugins/threat_intelligence/public/modules/indicators/{indicators_page.test.tsx => pages/indicators.test.tsx} (76%) rename x-pack/plugins/threat_intelligence/public/modules/indicators/{indicators_page.tsx => pages/indicators.tsx} (76%) create mode 100644 x-pack/plugins/threat_intelligence/public/modules/indicators/utils/index.ts diff --git a/x-pack/plugins/threat_intelligence/public/common/mocks/mock_indicators_filters_context.tsx b/x-pack/plugins/threat_intelligence/public/common/mocks/mock_indicators_filters_context.tsx index 0be85bea8ccf1..b93a67bd0a5c2 100644 --- a/x-pack/plugins/threat_intelligence/public/common/mocks/mock_indicators_filters_context.tsx +++ b/x-pack/plugins/threat_intelligence/public/common/mocks/mock_indicators_filters_context.tsx @@ -6,7 +6,7 @@ */ import { FilterManager } from '@kbn/data-plugin/public'; -import { IndicatorsFiltersContextValue } from '../../modules/indicators/containers/indicators_filters/context'; +import { IndicatorsFiltersContextValue } from '../../modules/indicators'; export const mockTimeRange = { from: '2022-10-03T07:48:31.498Z', to: '2022-10-03T07:48:31.498Z' }; diff --git a/x-pack/plugins/threat_intelligence/public/common/mocks/story_providers.tsx b/x-pack/plugins/threat_intelligence/public/common/mocks/story_providers.tsx index 7cea653c45e5f..f1f5e3c215eb2 100644 --- a/x-pack/plugins/threat_intelligence/public/common/mocks/story_providers.tsx +++ b/x-pack/plugins/threat_intelligence/public/common/mocks/story_providers.tsx @@ -16,7 +16,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { mockIndicatorsFiltersContext } from './mock_indicators_filters_context'; import { SecuritySolutionContext } from '../../containers/security_solution_context'; import { getSecuritySolutionContextMock } from './mock_security_context'; -import { IndicatorsFiltersContext } from '../../modules/indicators/containers/indicators_filters/context'; +import { IndicatorsFiltersContext } from '../../modules/indicators'; import { FieldTypesContext } from '../../containers/field_types_provider'; import { generateFieldTypeMap } from './mock_field_type_map'; import { mockUiSettingsService } from './mock_kibana_ui_settings_service'; diff --git a/x-pack/plugins/threat_intelligence/public/common/mocks/test_providers.tsx b/x-pack/plugins/threat_intelligence/public/common/mocks/test_providers.tsx index c41f8972fd605..38eca1caad028 100644 --- a/x-pack/plugins/threat_intelligence/public/common/mocks/test_providers.tsx +++ b/x-pack/plugins/threat_intelligence/public/common/mocks/test_providers.tsx @@ -24,7 +24,7 @@ import { SecuritySolutionPluginContext } from '../../types'; import { getSecuritySolutionContextMock } from './mock_security_context'; import { mockUiSetting } from './mock_kibana_ui_settings_service'; import { SecuritySolutionContext } from '../../containers/security_solution_context'; -import { IndicatorsFiltersContext } from '../../modules/indicators/containers/indicators_filters/context'; +import { IndicatorsFiltersContext } from '../../modules/indicators'; import { mockIndicatorsFiltersContext } from './mock_indicators_filters_context'; import { FieldTypesContext } from '../../containers/field_types_provider'; import { generateFieldTypeMap } from './mock_field_type_map'; diff --git a/x-pack/plugins/threat_intelligence/public/containers/field_types_provider.tsx b/x-pack/plugins/threat_intelligence/public/containers/field_types_provider.tsx index 050ecb4a3fe10..109ad335d30a8 100644 --- a/x-pack/plugins/threat_intelligence/public/containers/field_types_provider.tsx +++ b/x-pack/plugins/threat_intelligence/public/containers/field_types_provider.tsx @@ -5,9 +5,8 @@ * 2.0. */ -import React, { createContext, useMemo } from 'react'; -import { FC } from 'react'; -import { useSourcererDataView } from '../modules/indicators/hooks/use_sourcerer_data_view'; +import React, { createContext, FC, useMemo } from 'react'; +import { useSourcererDataView } from '../modules/indicators'; export type FieldTypesContextValue = Record; diff --git a/x-pack/plugins/threat_intelligence/public/containers/integrations_guard/integrations_guard.test.tsx b/x-pack/plugins/threat_intelligence/public/containers/integrations_guard/integrations_guard.test.tsx index fe3c88d6479e1..099559f8651b9 100644 --- a/x-pack/plugins/threat_intelligence/public/containers/integrations_guard/integrations_guard.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/containers/integrations_guard/integrations_guard.test.tsx @@ -11,9 +11,9 @@ import { IntegrationsGuard } from '.'; import { TestProvidersComponent } from '../../common/mocks/test_providers'; import { useTIDocumentationLink } from '../../hooks/use_documentation_link'; import { useIntegrationsPageLink } from '../../hooks/use_integrations_page_link'; -import { useIndicatorsTotalCount } from '../../modules/indicators/hooks/use_indicators_total_count'; +import { useIndicatorsTotalCount } from '../../modules/indicators'; -jest.mock('../../modules/indicators/hooks/use_indicators_total_count'); +jest.mock('../../modules/indicators/hooks/use_total_count'); jest.mock('../../hooks/use_integrations_page_link'); jest.mock('../../hooks/use_documentation_link'); diff --git a/x-pack/plugins/threat_intelligence/public/containers/integrations_guard/integrations_guard.tsx b/x-pack/plugins/threat_intelligence/public/containers/integrations_guard/integrations_guard.tsx index 82a8d05470da2..eb639d6c50f75 100644 --- a/x-pack/plugins/threat_intelligence/public/containers/integrations_guard/integrations_guard.tsx +++ b/x-pack/plugins/threat_intelligence/public/containers/integrations_guard/integrations_guard.tsx @@ -6,10 +6,9 @@ */ import { EuiLoadingLogo } from '@elastic/eui'; -import React from 'react'; -import { FC } from 'react'; +import React, { FC } from 'react'; import { EmptyPage } from '../../modules/empty_page'; -import { useIndicatorsTotalCount } from '../../modules/indicators/hooks/use_indicators_total_count'; +import { useIndicatorsTotalCount } from '../../modules/indicators'; import { SecuritySolutionPluginTemplateWrapper } from '../security_solution_plugin_template_wrapper'; /** diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_label/indicator_field_label.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_label/field_label.tsx similarity index 100% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_label/indicator_field_label.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_label/field_label.tsx diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_label/index.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_label/index.ts similarity index 86% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_label/index.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_label/index.ts index a2f2520c9541b..20bfa1be1286b 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_label/index.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_label/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './indicator_field_label'; +export * from './field_label'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/__snapshots__/indicator_field.test.tsx.snap b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/__snapshots__/field.test.tsx.snap similarity index 100% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/__snapshots__/indicator_field.test.tsx.snap rename to x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/__snapshots__/field.test.tsx.snap diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/indicator_field.stories.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/field.stories.tsx similarity index 94% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/indicator_field.stories.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/field.stories.tsx index 9548691e49ec5..da56583404a15 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/indicator_field.stories.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/field.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { StoryProvidersComponent } from '../../../../common/mocks/story_providers'; import { generateMockIndicator } from '../../../../../common/types/indicator'; -import { IndicatorFieldValue } from './indicator_field_value'; +import { IndicatorFieldValue } from '.'; export default { component: IndicatorFieldValue, diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/indicator_field.test.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/field.test.tsx similarity index 95% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/indicator_field.test.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/field.test.tsx index c695a2c4ebe84..3142b6cd68dac 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/indicator_field.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/field.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { IndicatorFieldValue } from './indicator_field_value'; +import { IndicatorFieldValue } from '.'; import { generateMockIndicator } from '../../../../../common/types/indicator'; import { EMPTY_VALUE } from '../../../../../common/constants'; import { TestProvidersComponent } from '../../../../common/mocks/test_providers'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/indicator_field_value.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/field_value.tsx similarity index 96% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/indicator_field_value.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/field_value.tsx index 55dfa883c30ad..699ccee505562 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/indicator_field_value.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/field_value.tsx @@ -10,7 +10,7 @@ import { useFieldTypes } from '../../../../hooks/use_field_types'; import { EMPTY_VALUE } from '../../../../../common/constants'; import { Indicator, RawIndicatorFieldId } from '../../../../../common/types/indicator'; import { DateFormatter } from '../../../../components/date_formatter'; -import { unwrapValue } from '../../utils/unwrap_value'; +import { unwrapValue } from '../../utils'; export interface IndicatorFieldValueProps { /** diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/index.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/index.ts similarity index 86% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/index.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/index.ts index 724caf3c75243..377ac4a266b0b 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicator_field_value/index.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/field_value/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './indicator_field_value'; +export * from './field_value'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/fields_table/fields_table.stories.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/fields_table/fields_table.stories.tsx index eb0ed8fb045ed..80bd24d59adc9 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/fields_table/fields_table.stories.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/fields_table/fields_table.stories.tsx @@ -10,7 +10,7 @@ import { mockIndicatorsFiltersContext } from '../../../../../common/mocks/mock_i import { IndicatorFieldsTable } from '.'; import { generateMockIndicator } from '../../../../../../common/types/indicator'; import { StoryProvidersComponent } from '../../../../../common/mocks/story_providers'; -import { IndicatorsFiltersContext } from '../../../containers/indicators_filters'; +import { IndicatorsFiltersContext } from '../../../containers/filters'; export default { component: IndicatorFieldsTable, diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/fields_table/fields_table.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/fields_table/fields_table.tsx index eb5b2d0ca2589..3fe1f62599059 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/fields_table/fields_table.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/fields_table/fields_table.tsx @@ -9,7 +9,7 @@ import { EuiBasicTableColumn, EuiInMemoryTable, EuiInMemoryTableProps } from '@e import { FormattedMessage } from '@kbn/i18n-react'; import React, { useMemo, VFC } from 'react'; import { Indicator } from '../../../../../../common/types/indicator'; -import { IndicatorFieldValue } from '../../indicator_field_value'; +import { IndicatorFieldValue } from '../../field_value'; import { IndicatorValueActions } from '../indicator_value_actions'; export interface IndicatorFieldsTableProps { diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/flyout.stories.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/flyout.stories.tsx index 69236e778178b..88f6762aab0d4 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/flyout.stories.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/flyout.stories.tsx @@ -14,7 +14,7 @@ import { mockUiSettingsService } from '../../../../common/mocks/mock_kibana_ui_s import { mockKibanaTimelinesService } from '../../../../common/mocks/mock_kibana_timelines_service'; import { generateMockIndicator, Indicator } from '../../../../../common/types/indicator'; import { IndicatorsFlyout } from '.'; -import { IndicatorsFiltersContext } from '../../containers/indicators_filters'; +import { IndicatorsFiltersContext } from '../../containers/filters'; export default { component: IndicatorsFlyout, diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/flyout.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/flyout.tsx index 11102df797017..e43495c9b0a6c 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/flyout.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/flyout.tsx @@ -26,7 +26,7 @@ import { DateFormatter } from '../../../../components/date_formatter/date_format import { Indicator, RawIndicatorFieldId } from '../../../../../common/types/indicator'; import { IndicatorsFlyoutJson } from './json_tab'; import { IndicatorsFlyoutTable } from './table_tab'; -import { unwrapValue } from '../../utils/unwrap_value'; +import { unwrapValue } from '../../utils'; import { IndicatorsFlyoutOverview } from './overview_tab'; export const TITLE_TEST_ID = 'tiIndicatorFlyoutTitle'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/indicator_value_actions/indicator_value_actions.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/indicator_value_actions/indicator_value_actions.tsx index 473bc5d0088f7..c6eb8b82e2124 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/indicator_value_actions/indicator_value_actions.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/indicator_value_actions/indicator_value_actions.tsx @@ -18,7 +18,7 @@ import { Indicator } from '../../../../../../common/types/indicator'; import { FilterInButtonIcon } from '../../../../query_bar/components/filter_in'; import { FilterOutButtonIcon } from '../../../../query_bar/components/filter_out'; import { AddToTimelineContextMenu } from '../../../../timeline/components/add_to_timeline'; -import { fieldAndValueValid, getIndicatorFieldAndValue } from '../../../utils/field_value'; +import { fieldAndValueValid, getIndicatorFieldAndValue } from '../../../utils'; import { CopyToClipboardContextMenu } from '../../copy_to_clipboard'; export const TIMELINE_BUTTON_TEST_ID = 'TimelineButton'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/block/block.stories.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/block/block.stories.tsx index e30d352c2644f..0ae9c8b962d9a 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/block/block.stories.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/block/block.stories.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { IndicatorsFiltersContext } from '../../../../containers/indicators_filters'; +import { IndicatorsFiltersContext } from '../../../../containers/filters'; import { StoryProvidersComponent } from '../../../../../../common/mocks/story_providers'; import { generateMockIndicator } from '../../../../../../../common/types/indicator'; import { IndicatorBlock } from '.'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/block/block.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/block/block.tsx index 0866edde505bf..3baa182530b86 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/block/block.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/block/block.tsx @@ -9,8 +9,8 @@ import { EuiPanel, EuiSpacer, EuiText } from '@elastic/eui'; import React, { VFC } from 'react'; import { css, euiStyled } from '@kbn/kibana-react-plugin/common'; import { Indicator } from '../../../../../../../common/types/indicator'; -import { IndicatorFieldValue } from '../../../indicator_field_value'; -import { IndicatorFieldLabel } from '../../../indicator_field_label'; +import { IndicatorFieldValue } from '../../../field_value'; +import { IndicatorFieldLabel } from '../../../field_label'; import { IndicatorValueActions } from '../../indicator_value_actions'; /** diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/highlighted_values_table/highlighted_values_table.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/highlighted_values_table/highlighted_values_table.tsx index 7ccbbdf2f1c99..5c60ed4684d9b 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/highlighted_values_table/highlighted_values_table.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/highlighted_values_table/highlighted_values_table.tsx @@ -7,7 +7,7 @@ import React, { useMemo, VFC } from 'react'; import { Indicator, RawIndicatorFieldId } from '../../../../../../../common/types/indicator'; -import { unwrapValue } from '../../../../utils/unwrap_value'; +import { unwrapValue } from '../../../../utils'; import { IndicatorFieldsTable } from '../../fields_table'; /** diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/overview_tab.stories.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/overview_tab.stories.tsx index 005edd9c4201d..4c74ea25330d7 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/overview_tab.stories.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/overview_tab.stories.tsx @@ -10,7 +10,7 @@ import { Story } from '@storybook/react'; import { StoryProvidersComponent } from '../../../../../common/mocks/story_providers'; import { generateMockIndicator, Indicator } from '../../../../../../common/types/indicator'; import { IndicatorsFlyoutOverview } from '.'; -import { IndicatorsFiltersContext } from '../../../containers/indicators_filters'; +import { IndicatorsFiltersContext } from '../../../containers/filters'; export default { component: IndicatorsFlyoutOverview, diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/overview_tab.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/overview_tab.tsx index 7abbc1508fb58..8dc7f6a466574 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/overview_tab.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/overview_tab/overview_tab.tsx @@ -18,7 +18,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React, { useMemo, VFC } from 'react'; import { EMPTY_VALUE } from '../../../../../../common/constants'; import { Indicator, RawIndicatorFieldId } from '../../../../../../common/types/indicator'; -import { unwrapValue } from '../../../utils/unwrap_value'; +import { unwrapValue } from '../../../utils'; import { IndicatorEmptyPrompt } from '../empty_prompt'; import { IndicatorBlock } from './block'; import { HighlightedValuesTable } from './highlighted_values_table'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/table_tab/table_tab.stories.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/table_tab/table_tab.stories.tsx index 60808a46356a8..1842d52171db3 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/table_tab/table_tab.stories.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/table_tab/table_tab.stories.tsx @@ -14,7 +14,7 @@ import { mockUiSettingsService } from '../../../../../common/mocks/mock_kibana_u import { mockKibanaTimelinesService } from '../../../../../common/mocks/mock_kibana_timelines_service'; import { generateMockIndicator, Indicator } from '../../../../../../common/types/indicator'; import { IndicatorsFlyoutTable } from '.'; -import { IndicatorsFiltersContext } from '../../../containers/indicators_filters'; +import { IndicatorsFiltersContext } from '../../../containers/filters'; export default { component: IndicatorsFlyoutTable, diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/table_tab/table_tab.test.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/table_tab/table_tab.test.tsx index 8503bcdace2cc..aae9aa41cbf2f 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/table_tab/table_tab.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/flyout/table_tab/table_tab.test.tsx @@ -14,7 +14,7 @@ import { RawIndicatorFieldId, } from '../../../../../../common/types/indicator'; import { IndicatorsFlyoutTable, TABLE_TEST_ID } from '.'; -import { unwrapValue } from '../../../utils/unwrap_value'; +import { unwrapValue } from '../../../utils'; import { EMPTY_PROMPT_TEST_ID } from '../empty_prompt'; const mockIndicator: Indicator = generateMockIndicator(); diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/components/cell_actions.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/components/cell_actions.tsx index baed5eda31478..969308200797a 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/components/cell_actions.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/components/cell_actions.tsx @@ -11,8 +11,8 @@ import { Indicator } from '../../../../../../common/types/indicator'; import { AddToTimelineCellAction } from '../../../../timeline/components/add_to_timeline'; import { FilterInCellAction } from '../../../../query_bar/components/filter_in'; import { FilterOutCellAction } from '../../../../query_bar/components/filter_out'; -import { fieldAndValueValid, getIndicatorFieldAndValue } from '../../../utils/field_value'; -import type { Pagination } from '../../../services/fetch_indicators'; +import { fieldAndValueValid, getIndicatorFieldAndValue } from '../../../utils'; +import type { Pagination } from '../../../services'; export const CELL_TIMELINE_BUTTON_TEST_ID = 'tiIndicatorsTableCellTimelineButton'; export const CELL_FILTER_IN_BUTTON_TEST_ID = 'tiIndicatorsTableCellFilterInButton'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/components/cell_renderer.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/components/cell_renderer.tsx index 97c37c1598ccd..d4b52a0c82af6 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/components/cell_renderer.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/components/cell_renderer.tsx @@ -10,7 +10,7 @@ import React, { useContext, useEffect } from 'react'; import { euiDarkVars as themeDark, euiLightVars as themeLight } from '@kbn/ui-theme'; import { useKibana } from '../../../../../hooks/use_kibana'; import { Indicator } from '../../../../../../common/types/indicator'; -import { IndicatorFieldValue } from '../../indicator_field_value'; +import { IndicatorFieldValue } from '../../field_value'; import { IndicatorsTableContext } from '../contexts'; import { ActionsRowCell } from '.'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/hooks/use_column_settings.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/hooks/use_column_settings.ts index ff61c9d525616..05c58ac4b2fcf 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/hooks/use_column_settings.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/hooks/use_column_settings.ts @@ -10,7 +10,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import negate from 'lodash/negate'; import { RawIndicatorFieldId } from '../../../../../../common/types/indicator'; import { useKibana } from '../../../../../hooks/use_kibana'; -import { translateFieldLabel } from '../../indicator_field_label'; +import { translateFieldLabel } from '../../field_label'; export const DEFAULT_COLUMNS: EuiDataGridColumn[] = [ RawIndicatorFieldId.TimeStamp, diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/table.stories.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/table.stories.tsx index f11977145d7a4..4822d403e3f4b 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/table.stories.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/table.stories.tsx @@ -11,7 +11,7 @@ import { mockIndicatorsFiltersContext } from '../../../../common/mocks/mock_indi import { StoryProvidersComponent } from '../../../../common/mocks/story_providers'; import { generateMockIndicator, Indicator } from '../../../../../common/types/indicator'; import { IndicatorsTable } from '.'; -import { IndicatorsFiltersContext } from '../../containers/indicators_filters/context'; +import { IndicatorsFiltersContext } from '../../containers/filters/context'; import { DEFAULT_COLUMNS } from './hooks'; export default { diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/table.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/table.tsx index 78fe1aaab2ea0..e5c4b7c205d58 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/table.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/table/table.tsx @@ -27,8 +27,8 @@ import { IndicatorsTableContext, IndicatorsTableContextValue } from './contexts' import { IndicatorsFlyout } from '../flyout'; import { ColumnSettingsValue, useToolbarOptions } from './hooks'; import { useFieldTypes } from '../../../../hooks/use_field_types'; -import { getFieldSchema } from '../../utils/get_field_schema'; -import { Pagination } from '../../services/fetch_indicators'; +import { getFieldSchema } from '../../utils'; +import { Pagination } from '../../services'; export interface IndicatorsTableProps { indicators: Indicator[]; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/containers/indicators_filters/context.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/containers/filters/context.ts similarity index 100% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/containers/indicators_filters/context.ts rename to x-pack/plugins/threat_intelligence/public/modules/indicators/containers/filters/context.ts diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/containers/indicators_filters/indicators_filters.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/containers/filters/filters.tsx similarity index 98% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/containers/indicators_filters/indicators_filters.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/containers/filters/filters.tsx index 2253b1c548968..8d4b986ffd509 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/containers/indicators_filters/indicators_filters.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/containers/filters/filters.tsx @@ -8,7 +8,7 @@ import React, { FC, useMemo } from 'react'; import { useKibana } from '../../../../hooks/use_kibana'; import { useSecurityContext } from '../../../../hooks/use_security_context'; -import { IndicatorsFiltersContext, IndicatorsFiltersContextValue } from './context'; +import { IndicatorsFiltersContext, IndicatorsFiltersContextValue } from '.'; /** * Container used to wrap components and share the {@link FilterManager} through React context. diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/containers/indicators_filters/index.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/containers/filters/index.ts similarity index 87% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/containers/indicators_filters/index.ts rename to x-pack/plugins/threat_intelligence/public/modules/indicators/containers/filters/index.ts index 4ef23e3e95001..2eafda804a6c1 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/containers/indicators_filters/index.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/containers/filters/index.ts @@ -5,6 +5,5 @@ * 2.0. */ -export * from './indicators_filters'; - +export * from './filters'; export * from './context'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/index.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/index.ts index 23461fc809957..124171ce2d0a6 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/index.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/index.ts @@ -6,6 +6,7 @@ */ export * from './use_aggregated_indicators'; -export * from './use_indicators_filters_context'; -export * from './use_indicators_total_count'; +export * from './use_filters_context'; +export * from './use_indicators'; export * from './use_sourcerer_data_view'; +export * from './use_total_count'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators_filters_context.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_filters_context.ts similarity index 93% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators_filters_context.ts rename to x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_filters_context.ts index e4c7c48d03d1b..8fec9d03852b2 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators_filters_context.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_filters_context.ts @@ -9,7 +9,7 @@ import { useContext } from 'react'; import { IndicatorsFiltersContext, IndicatorsFiltersContextValue, -} from '../containers/indicators_filters/context'; +} from '../containers/filters/context'; /** * Hook to retrieve {@link IndicatorsFiltersContext} (contains FilterManager) diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators.test.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators.test.tsx index 40d64636fa346..9292321658e86 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook, act } from '@testing-library/react-hooks'; +import { act, renderHook } from '@testing-library/react-hooks'; import { useIndicators, UseIndicatorsParams, UseIndicatorsValue } from './use_indicators'; import { TestProvidersComponent } from '../../../common/mocks/test_providers'; import { createFetchIndicators } from '../services/fetch_indicators'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators_total_count.test.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_total_count.test.tsx similarity index 92% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators_total_count.test.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_total_count.test.tsx index 7b5afb43e9311..af7ece94a6f51 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators_total_count.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_total_count.test.tsx @@ -5,10 +5,10 @@ * 2.0. */ -import { TestProvidersComponent, mockedSearchService } from '../../../common/mocks/test_providers'; +import { mockedSearchService, TestProvidersComponent } from '../../../common/mocks/test_providers'; import { act, renderHook } from '@testing-library/react-hooks'; import { BehaviorSubject } from 'rxjs'; -import { useIndicatorsTotalCount } from './use_indicators_total_count'; +import { useIndicatorsTotalCount } from '.'; const indicatorsResponse = { rawResponse: { hits: { hits: [], total: 0 } } }; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators_total_count.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_total_count.tsx similarity index 100% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators_total_count.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_total_count.tsx diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/index.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/index.ts new file mode 100644 index 0000000000000..73affbb6e8a63 --- /dev/null +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/index.ts @@ -0,0 +1,13 @@ +/* + * 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. + */ + +export * from './containers/filters/context'; +export * from './hooks/use_filters_context'; +export * from './hooks/use_sourcerer_data_view'; +export * from './hooks/use_total_count'; +export * from './utils/field_value'; +export * from './utils/unwrap_value'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/pages/index.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/pages/index.ts new file mode 100644 index 0000000000000..b4e67e7869557 --- /dev/null +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/pages/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export * from './indicators'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/indicators_page.test.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/pages/indicators.test.tsx similarity index 76% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/indicators_page.test.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/pages/indicators.test.tsx index 527507584f0e1..d51410857c26e 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/indicators_page.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/pages/indicators.test.tsx @@ -7,18 +7,17 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { IndicatorsPage } from './indicators_page'; -import { useIndicators } from './hooks/use_indicators'; -import { useAggregatedIndicators } from './hooks/use_aggregated_indicators'; -import { useFilters } from '../query_bar/hooks/use_filters'; +import { IndicatorsPage } from '.'; +import { useAggregatedIndicators, useIndicators } from '../hooks'; +import { useFilters } from '../../query_bar/hooks/use_filters'; import moment from 'moment'; -import { TestProvidersComponent } from '../../common/mocks/test_providers'; -import { TABLE_TEST_ID } from './components/table'; -import { mockTimeRange } from '../../common/mocks/mock_indicators_filters_context'; +import { TestProvidersComponent } from '../../../common/mocks/test_providers'; +import { TABLE_TEST_ID } from '../components/table'; +import { mockTimeRange } from '../../../common/mocks/mock_indicators_filters_context'; -jest.mock('../query_bar/hooks/use_filters'); -jest.mock('./hooks/use_indicators'); -jest.mock('./hooks/use_aggregated_indicators'); +jest.mock('../../query_bar/hooks/use_filters'); +jest.mock('../hooks/use_indicators'); +jest.mock('../hooks/use_aggregated_indicators'); const stub = () => {}; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/indicators_page.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/pages/indicators.tsx similarity index 76% rename from x-pack/plugins/threat_intelligence/public/modules/indicators/indicators_page.tsx rename to x-pack/plugins/threat_intelligence/public/modules/indicators/pages/indicators.tsx index 195bd74238241..6b79442164676 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/indicators_page.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/pages/indicators.tsx @@ -7,20 +7,20 @@ import React, { FC, VFC } from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { IndicatorsBarChartWrapper } from './components/barchart'; -import { IndicatorsTable } from './components/table'; -import { useIndicators } from './hooks/use_indicators'; -import { DefaultPageLayout } from '../../components/layout'; -import { useFilters } from '../query_bar/hooks/use_filters'; -import { FiltersGlobal } from '../../containers/filters_global'; -import { useSourcererDataView } from './hooks/use_sourcerer_data_view'; -import { FieldTypesProvider } from '../../containers/field_types_provider'; -import { InspectorProvider } from '../../containers/inspector'; -import { useColumnSettings } from './components/table/hooks'; -import { useAggregatedIndicators } from './hooks/use_aggregated_indicators'; -import { IndicatorsFilters } from './containers/indicators_filters'; -import { useSecurityContext } from '../../hooks/use_security_context'; -import { UpdateStatus } from '../../components/update_status'; +import { IndicatorsBarChartWrapper } from '../components/barchart'; +import { IndicatorsTable } from '../components/table'; +import { useIndicators } from '../hooks/use_indicators'; +import { DefaultPageLayout } from '../../../components/layout'; +import { useFilters } from '../../query_bar/hooks/use_filters'; +import { FiltersGlobal } from '../../../containers/filters_global'; +import { useSourcererDataView } from '../hooks/use_sourcerer_data_view'; +import { FieldTypesProvider } from '../../../containers/field_types_provider'; +import { InspectorProvider } from '../../../containers/inspector'; +import { useColumnSettings } from '../components/table/hooks'; +import { useAggregatedIndicators } from '../hooks/use_aggregated_indicators'; +import { IndicatorsFilters } from '../containers/filters'; +import { useSecurityContext } from '../../../hooks/use_security_context'; +import { UpdateStatus } from '../../../components/update_status'; const queryClient = new QueryClient(); diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/services/fetch_aggregated_indicators.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/services/fetch_aggregated_indicators.ts index 0edc0cca34e5c..f69d28e663bc2 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/services/fetch_aggregated_indicators.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/services/fetch_aggregated_indicators.ts @@ -11,8 +11,7 @@ import type { Filter, Query, TimeRange } from '@kbn/es-query'; import { RequestAdapter } from '@kbn/inspector-plugin/common'; import { calculateBarchartColumnTimeInterval } from '../../../common/utils/dates'; import { RawIndicatorFieldId } from '../../../../common/types/indicator'; -import { getIndicatorQueryParams } from '../utils/get_indicator_query_params'; -import { search } from '../utils/search'; +import { getIndicatorQueryParams, search } from '../utils'; const TIMESTAMP_FIELD = RawIndicatorFieldId.TimeStamp; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/services/fetch_indicators.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/services/fetch_indicators.ts index f06038c320116..babf442a5f3fb 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/services/fetch_indicators.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/services/fetch_indicators.ts @@ -9,8 +9,7 @@ import { ISearchStart } from '@kbn/data-plugin/public'; import type { Filter, Query, TimeRange } from '@kbn/es-query'; import { RequestAdapter } from '@kbn/inspector-plugin/common'; import { Indicator } from '../../../../common/types/indicator'; -import { getIndicatorQueryParams } from '../utils/get_indicator_query_params'; -import { search } from '../utils/search'; +import { getIndicatorQueryParams, search } from '../utils'; export interface RawIndicatorsResponse { hits: { diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/utils/index.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/utils/index.ts new file mode 100644 index 0000000000000..9a542d2960bd1 --- /dev/null +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/utils/index.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 + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export * from './display_name'; +export * from './field_value'; +export * from './get_field_schema'; +export * from './get_indicator_query_params'; +export * from './get_runtime_mappings'; +export * from './search'; +export * from './unwrap_value'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_in/filter_in.stories.tsx b/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_in/filter_in.stories.tsx index d32adf70ee103..b808f37f02486 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_in/filter_in.stories.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_in/filter_in.stories.tsx @@ -11,8 +11,8 @@ import { EuiContextMenuPanel, EuiDataGrid, EuiDataGridColumn } from '@elastic/eu import { EuiDataGridColumnVisibility } from '@elastic/eui/src/components/datagrid/data_grid_types'; import { mockIndicatorsFiltersContext } from '../../../../common/mocks/mock_indicators_filters_context'; import { generateMockIndicator, Indicator } from '../../../../../common/types/indicator'; -import { FilterInButtonIcon, FilterInContextMenu, FilterInCellAction } from '.'; -import { IndicatorsFiltersContext } from '../../../indicators/containers/indicators_filters/context'; +import { FilterInButtonIcon, FilterInCellAction, FilterInContextMenu } from '.'; +import { IndicatorsFiltersContext } from '../../../indicators'; export default { title: 'FilterIn', diff --git a/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_in/filter_in.test.tsx b/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_in/filter_in.test.tsx index 29349b5442790..18d555da85013 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_in/filter_in.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_in/filter_in.test.tsx @@ -9,7 +9,7 @@ import React, { FunctionComponent } from 'react'; import { render } from '@testing-library/react'; import { EuiButtonIcon } from '@elastic/eui'; import { generateMockIndicator, Indicator } from '../../../../../common/types/indicator'; -import { useIndicatorsFiltersContext } from '../../../indicators/hooks/use_indicators_filters_context'; +import { useIndicatorsFiltersContext } from '../../../indicators'; import { mockIndicatorsFiltersContext } from '../../../../common/mocks/mock_indicators_filters_context'; import { FilterInButtonEmpty, @@ -18,7 +18,7 @@ import { FilterInContextMenu, } from '.'; -jest.mock('../../../indicators/hooks/use_indicators_filters_context'); +jest.mock('../../../indicators/hooks/use_filters_context'); const mockIndicator: Indicator = generateMockIndicator(); diff --git a/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_out/filter_out.stories.tsx b/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_out/filter_out.stories.tsx index 463b249998eb2..5553a62e8118d 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_out/filter_out.stories.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_out/filter_out.stories.tsx @@ -11,8 +11,8 @@ import { EuiContextMenuPanel, EuiDataGrid, EuiDataGridColumn } from '@elastic/eu import { EuiDataGridColumnVisibility } from '@elastic/eui/src/components/datagrid/data_grid_types'; import { mockIndicatorsFiltersContext } from '../../../../common/mocks/mock_indicators_filters_context'; import { generateMockIndicator, Indicator } from '../../../../../common/types/indicator'; -import { FilterOutButtonIcon, FilterOutContextMenu, FilterOutCellAction } from '.'; -import { IndicatorsFiltersContext } from '../../../indicators/containers/indicators_filters/context'; +import { FilterOutButtonIcon, FilterOutCellAction, FilterOutContextMenu } from '.'; +import { IndicatorsFiltersContext } from '../../../indicators'; export default { title: 'FilterOut', diff --git a/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_out/filter_out.test.tsx b/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_out/filter_out.test.tsx index 68c08cbebd0fc..c35416d5a3128 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_out/filter_out.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/query_bar/components/filter_out/filter_out.test.tsx @@ -9,7 +9,7 @@ import React, { FunctionComponent } from 'react'; import { render } from '@testing-library/react'; import { EuiButtonIcon } from '@elastic/eui'; import { generateMockIndicator, Indicator } from '../../../../../common/types/indicator'; -import { useIndicatorsFiltersContext } from '../../../indicators/hooks/use_indicators_filters_context'; +import { useIndicatorsFiltersContext } from '../../../indicators'; import { mockIndicatorsFiltersContext } from '../../../../common/mocks/mock_indicators_filters_context'; import { FilterOutButtonEmpty, @@ -18,7 +18,7 @@ import { FilterOutContextMenu, } from '.'; -jest.mock('../../../indicators/hooks/use_indicators_filters_context'); +jest.mock('../../../indicators/hooks/use_filters_context'); const mockIndicator: Indicator = generateMockIndicator(); diff --git a/x-pack/plugins/threat_intelligence/public/modules/query_bar/hooks/use_filter_in_out.ts b/x-pack/plugins/threat_intelligence/public/modules/query_bar/hooks/use_filter_in_out.ts index d44bb8528afab..a7bc8d2581617 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/query_bar/hooks/use_filter_in_out.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/query_bar/hooks/use_filter_in_out.ts @@ -7,8 +7,11 @@ import { useCallback } from 'react'; import { Filter } from '@kbn/es-query'; -import { useIndicatorsFiltersContext } from '../../indicators/hooks/use_indicators_filters_context'; -import { fieldAndValueValid, getIndicatorFieldAndValue } from '../../indicators/utils/field_value'; +import { + fieldAndValueValid, + getIndicatorFieldAndValue, + useIndicatorsFiltersContext, +} from '../../indicators'; import { FilterIn, FilterOut, updateFiltersArray } from '../utils/filter'; import { Indicator } from '../../../../common/types/indicator'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/query_bar/hooks/use_filters/use_filters.ts b/x-pack/plugins/threat_intelligence/public/modules/query_bar/hooks/use_filters/use_filters.ts index c50a10c17b709..1018320073500 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/query_bar/hooks/use_filters/use_filters.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/query_bar/hooks/use_filters/use_filters.ts @@ -6,10 +6,7 @@ */ import { useContext } from 'react'; -import { - IndicatorsFiltersContext, - IndicatorsFiltersContextValue, -} from '../../../indicators/containers/indicators_filters'; +import { IndicatorsFiltersContext, IndicatorsFiltersContextValue } from '../../../indicators'; export type UseFiltersValue = IndicatorsFiltersContextValue; diff --git a/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline/add_to_timeline.tsx b/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline/add_to_timeline.tsx index 211d37dc6b4e4..1a1f4d61475e5 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline/add_to_timeline.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline/add_to_timeline.tsx @@ -17,10 +17,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { generateDataProvider } from '../../utils/data_provider'; -import { - fieldAndValueValid, - getIndicatorFieldAndValue, -} from '../../../indicators/utils/field_value'; +import { fieldAndValueValid, getIndicatorFieldAndValue } from '../../../indicators'; import { useKibana } from '../../../../hooks/use_kibana'; import { Indicator } from '../../../../../common/types/indicator'; import { useStyles } from './styles'; diff --git a/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_add_to_timeline.ts b/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_add_to_timeline.ts index ab69481d3b528..7e1e4af8a7d39 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_add_to_timeline.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_add_to_timeline.ts @@ -8,7 +8,7 @@ import { DataProvider } from '@kbn/timelines-plugin/common'; import { AddToTimelineButtonProps } from '@kbn/timelines-plugin/public'; import { generateDataProvider } from '../utils/data_provider'; -import { fieldAndValueValid, getIndicatorFieldAndValue } from '../../indicators/utils/field_value'; +import { fieldAndValueValid, getIndicatorFieldAndValue } from '../../indicators'; import { Indicator } from '../../../../common/types/indicator'; export interface UseAddToTimelineParam { diff --git a/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_investigate_in_timeline.ts b/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_investigate_in_timeline.ts index efae8b441a673..41b33a9e4c963 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_investigate_in_timeline.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_investigate_in_timeline.ts @@ -10,8 +10,7 @@ import moment from 'moment'; import { DataProvider } from '@kbn/timelines-plugin/common'; import { generateDataProvider } from '../utils/data_provider'; import { SecuritySolutionContext } from '../../../containers/security_solution_context'; -import { fieldAndValueValid, getIndicatorFieldAndValue } from '../../indicators/utils/field_value'; -import { unwrapValue } from '../../indicators/utils/unwrap_value'; +import { fieldAndValueValid, getIndicatorFieldAndValue, unwrapValue } from '../../indicators'; import { Indicator, IndicatorFieldEventEnrichmentMap, diff --git a/x-pack/plugins/threat_intelligence/public/plugin.tsx b/x-pack/plugins/threat_intelligence/public/plugin.tsx index 0ec3064c5052b..4af2f41af9c4f 100755 --- a/x-pack/plugins/threat_intelligence/public/plugin.tsx +++ b/x-pack/plugins/threat_intelligence/public/plugin.tsx @@ -12,11 +12,11 @@ import React, { Suspense, VFC } from 'react'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; import { KibanaContextProvider } from './hooks/use_kibana'; import { + SecuritySolutionPluginContext, Services, ThreatIntelligencePluginSetup, ThreatIntelligencePluginStart, ThreatIntelligencePluginStartDeps, - SecuritySolutionPluginContext, } from './types'; import { SecuritySolutionContext } from './containers/security_solution_context'; import { EnterpriseGuard } from './containers/enterprise_guard'; @@ -27,7 +27,7 @@ interface AppProps { securitySolutionContext: SecuritySolutionPluginContext; } -const LazyIndicatorsPage = React.lazy(() => import('./modules/indicators/indicators_page')); +const LazyIndicatorsPage = React.lazy(() => import('./modules/indicators/pages/indicators')); const IndicatorsPage: VFC = () => ( From d21c5a7e0e16289a4020161595c92c64f4628233 Mon Sep 17 00:00:00 2001 From: DeDe Morton Date: Thu, 13 Oct 2022 06:56:10 -0700 Subject: [PATCH 15/35] Fix typo in API preview (#143245) --- .../single_page_layout/hooks/devtools_request.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/devtools_request.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/devtools_request.tsx index 55e91154060b7..ca8c24b9a748d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/devtools_request.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/devtools_request.tsx @@ -54,7 +54,7 @@ export function useDevToolsRequest({ 'xpack.fleet.createPackagePolicy.devtoolsRequestWithAgentPolicyDescription', { defaultMessage: - 'These Kibana requests creates a new agent policy and a new package policy.', + 'These Kibana requests create a new agent policy and a new package policy.', } ), ]; From 63a4b2283f8272ca9ce96b4d19d5c05448377d8b Mon Sep 17 00:00:00 2001 From: "Joey F. Poon" Date: Thu, 13 Oct 2022 09:35:33 -0500 Subject: [PATCH 16/35] [Security Solution] relax metadata + policy response API permissions (#143244) --- .../server/endpoint/routes/metadata/index.ts | 4 +- .../endpoint/routes/metadata/metadata.test.ts | 41 ++++++++++++++++--- .../endpoint/routes/policy/handlers.test.ts | 4 +- .../server/endpoint/routes/policy/index.ts | 2 +- .../server/endpoint/routes/policy/service.ts | 2 +- .../apis/endpoint_authz.ts | 6 --- 6 files changed, 41 insertions(+), 18 deletions(-) diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts index abe65089143aa..d959add145663 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts @@ -67,10 +67,10 @@ export function registerEndpointRoutes( { path: HOST_METADATA_GET_ROUTE, validate: GetMetadataRequestSchema, - options: { authRequired: true, tags: ['access:securitySolution'] }, + options: { authRequired: true }, }, withEndpointAuthz( - { all: ['canReadSecuritySolution'] }, + { any: ['canReadSecuritySolution', 'canAccessFleet'] }, logger, getMetadataRequestHandler(endpointAppContext, logger) ) diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts index 58cda4c9737c9..86b57fcb85022 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts @@ -674,7 +674,6 @@ describe('test endpoint routes', () => { expect(esSearchMock).toHaveBeenCalledTimes(1); expect(routeConfig.options).toEqual({ authRequired: true, - tags: ['access:securitySolution'], }); expect(mockResponse.notFound).toBeCalled(); const message = mockResponse.notFound.mock.calls[0][0]?.body; @@ -706,7 +705,6 @@ describe('test endpoint routes', () => { expect(esSearchMock).toHaveBeenCalledTimes(1); expect(routeConfig.options).toEqual({ authRequired: true, - tags: ['access:securitySolution'], }); expect(mockResponse.ok).toBeCalled(); const result = mockResponse.ok.mock.calls[0][0]?.body as HostInfo; @@ -741,7 +739,6 @@ describe('test endpoint routes', () => { expect(esSearchMock).toHaveBeenCalledTimes(1); expect(routeConfig.options).toEqual({ authRequired: true, - tags: ['access:securitySolution'], }); expect(mockResponse.ok).toBeCalled(); const result = mockResponse.ok.mock.calls[0][0]?.body as HostInfo; @@ -778,7 +775,6 @@ describe('test endpoint routes', () => { expect(esSearchMock).toHaveBeenCalledTimes(1); expect(routeConfig.options).toEqual({ authRequired: true, - tags: ['access:securitySolution'], }); expect(mockResponse.ok).toBeCalled(); const result = mockResponse.ok.mock.calls[0][0]?.body as HostInfo; @@ -814,7 +810,37 @@ describe('test endpoint routes', () => { expect(mockResponse.badRequest).toBeCalled(); }); - it('should get forbidden if no security solution access', async () => { + it('should work if no security solution access but has fleet access', async () => { + const response = legacyMetadataSearchResponseMock( + new EndpointDocGenerator().generateHostMetadata() + ); + const mockRequest = httpServerMock.createKibanaRequest({ + params: { id: response.hits.hits[0]._id }, + }); + const esSearchMock = mockScopedClient.asInternalUser.search; + + mockAgentClient.getAgent.mockResolvedValue(agentGenerator.generate({ status: 'online' })); + esSearchMock.mockResponseOnce(response); + + [routeConfig, routeHandler] = routerMock.get.mock.calls.find(([{ path }]) => + path.startsWith(HOST_METADATA_GET_ROUTE) + )!; + + const contextOverrides = { + endpointAuthz: getEndpointAuthzInitialStateMock({ + canReadSecuritySolution: false, + }), + }; + await routeHandler( + createRouteHandlerContext(mockScopedClient, mockSavedObjectClient, contextOverrides), + mockRequest, + mockResponse + ); + + expect(mockResponse.ok).toBeCalled(); + }); + + it('should get forbidden if no security solution or fleet access', async () => { const mockRequest = httpServerMock.createKibanaRequest(); [routeConfig, routeHandler] = routerMock.get.mock.calls.find(([{ path }]) => @@ -822,7 +848,10 @@ describe('test endpoint routes', () => { )!; const contextOverrides = { - endpointAuthz: getEndpointAuthzInitialStateMock({ canReadSecuritySolution: false }), + endpointAuthz: getEndpointAuthzInitialStateMock({ + canAccessFleet: false, + canReadSecuritySolution: false, + }), }; await routeHandler( createRouteHandlerContext(mockScopedClient, mockSavedObjectClient, contextOverrides), diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts index a9a7c7c4837e3..e92f316f7c125 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts @@ -55,7 +55,7 @@ describe('test policy response handler', () => { const response = createSearchResponse(new EndpointDocGenerator().generatePolicyResponse()); const hostPolicyResponseHandler = getHostPolicyResponseHandler(); - mockScopedClient.asCurrentUser.search.mockResponseOnce(response); + mockScopedClient.asInternalUser.search.mockResponseOnce(response); const mockRequest = httpServerMock.createKibanaRequest({ params: { agentId: 'id' }, }); @@ -78,7 +78,7 @@ describe('test policy response handler', () => { it('should return not found when there is no response policy for host', async () => { const hostPolicyResponseHandler = getHostPolicyResponseHandler(); - mockScopedClient.asCurrentUser.search.mockResponseOnce(createSearchResponse()); + mockScopedClient.asInternalUser.search.mockResponseOnce(createSearchResponse()); const mockRequest = httpServerMock.createKibanaRequest({ params: { agentId: 'id' }, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/policy/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/index.ts index 18eb1c961ee76..568a61d2691d8 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/policy/index.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/policy/index.ts @@ -30,7 +30,7 @@ export function registerPolicyRoutes(router: IRouter, endpointAppContext: Endpoi options: { authRequired: true }, }, withEndpointAuthz( - { all: ['canAccessEndpointManagement'] }, + { any: ['canReadSecuritySolution', 'canAccessFleet'] }, logger, getHostPolicyResponseHandler() ) diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts index c0639bcbcb848..1afafa2b61245 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts @@ -51,7 +51,7 @@ export async function getPolicyResponseByAgentId( dataClient: IScopedClusterClient ): Promise { const query = getESQueryPolicyResponseByAgentID(agentID, index); - const response = await dataClient.asCurrentUser.search(query); + const response = await dataClient.asInternalUser.search(query); if (response.hits.hits.length > 0 && response.hits.hits[0]._source != null) { return { diff --git a/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts b/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts index ca6a72f50d00e..9b7212b20b833 100644 --- a/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts +++ b/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts @@ -8,7 +8,6 @@ import { wrapErrorAndRejectPromise } from '@kbn/security-solution-plugin/common/endpoint/data_loaders/utils'; import { AGENT_POLICY_SUMMARY_ROUTE, - BASE_POLICY_RESPONSE_ROUTE, GET_PROCESSES_ROUTE, ISOLATE_HOST_ROUTE, ISOLATE_HOST_ROUTE_V2, @@ -49,11 +48,6 @@ export default function ({ getService }: FtrProviderContext) { path: '/api/endpoint/action_log/one?start_date=2021-12-01&end_date=2021-12-04', body: undefined, }, - { - method: 'get', - path: `${BASE_POLICY_RESPONSE_ROUTE}?agentId=1`, - body: undefined, - }, { method: 'post', path: ISOLATE_HOST_ROUTE, From d4d2a77fd5d15a558dabae7828ee2de5df78a9bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Thu, 13 Oct 2022 17:59:09 +0200 Subject: [PATCH 17/35] [Security/EBT] Skip `user_id` registration on anonymous pages (#143280) Co-authored-by: Larry Gregory --- .../analytics/analytics_service.test.ts | 63 +++++++++++++++++-- .../public/analytics/analytics_service.ts | 8 ++- x-pack/plugins/security/public/plugin.tsx | 1 + 3 files changed, 65 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/security/public/analytics/analytics_service.test.ts b/x-pack/plugins/security/public/analytics/analytics_service.test.ts index 28a272c12f9ec..be13fa25c1c8d 100644 --- a/x-pack/plugins/security/public/analytics/analytics_service.test.ts +++ b/x-pack/plugins/security/public/analytics/analytics_service.test.ts @@ -34,9 +34,12 @@ describe('AnalyticsService', () => { const authc = authenticationMock.createSetup(); authc.getCurrentUser.mockResolvedValue(securityMock.createMockAuthenticatedUser()); + const { analytics, http } = coreMock.createSetup(); + analyticsService.setup({ authc, - analytics: coreMock.createSetup().analytics, + analytics, + http, securityLicense: licenseMock.create({ allowLogin: true }), }); analyticsService.start({ http: mockCore.http }); @@ -63,9 +66,12 @@ describe('AnalyticsService', () => { const authc = authenticationMock.createSetup(); authc.getCurrentUser.mockResolvedValue(securityMock.createMockAuthenticatedUser()); + const { analytics, http } = coreMock.createSetup(); + analyticsService.setup({ authc, - analytics: coreMock.createSetup().analytics, + analytics, + http, securityLicense: licenseMock.create(licenseFeatures$.asObservable()), }); analyticsService.start({ http: mockCore.http }); @@ -116,9 +122,12 @@ describe('AnalyticsService', () => { const authc = authenticationMock.createSetup(); authc.getCurrentUser.mockResolvedValue(securityMock.createMockAuthenticatedUser()); + const { analytics, http } = coreMock.createSetup(); + analyticsService.setup({ authc, - analytics: coreMock.createSetup().analytics, + analytics, + http, securityLicense: licenseMock.create({ allowLogin: true }), }); analyticsService.start({ http: mockCore.http }); @@ -141,9 +150,12 @@ describe('AnalyticsService', () => { const authc = authenticationMock.createSetup(); authc.getCurrentUser.mockResolvedValue(securityMock.createMockAuthenticatedUser()); + const { analytics, http } = coreMock.createSetup(); + analyticsService.setup({ authc, - analytics: coreMock.createSetup().analytics, + analytics, + http, securityLicense: licenseMock.create({ allowLogin: false }), }); analyticsService.start({ http: mockCore.http }); @@ -167,9 +179,12 @@ describe('AnalyticsService', () => { const authc = authenticationMock.createSetup(); authc.getCurrentUser.mockResolvedValue(securityMock.createMockAuthenticatedUser()); + const { analytics, http } = coreMock.createSetup(); + analyticsService.setup({ authc, - analytics: coreMock.createSetup().analytics, + analytics, + http, securityLicense: licenseMock.create({ allowLogin: true }), }); analyticsService.start({ http: mockCore.http }); @@ -185,4 +200,42 @@ describe('AnalyticsService', () => { mockCurrentAuthTypeInfo ); }); + + it('does not register the analytics context provider if the page is anonymous', () => { + const authc = authenticationMock.createSetup(); + const { analytics, http } = coreMock.createSetup(); + + http.anonymousPaths.isAnonymous.mockReturnValue(true); + + analyticsService.setup({ + authc, + analytics, + http, + securityLicense: licenseMock.create({ allowLogin: false }), + }); + + expect(analytics.registerContextProvider).not.toHaveBeenCalled(); + }); + + it('registers the user_id analytics context provider if the page is not anonymous', () => { + const authc = authenticationMock.createSetup(); + authc.getCurrentUser.mockResolvedValue(securityMock.createMockAuthenticatedUser()); + + const { analytics, http } = coreMock.createSetup(); + + http.anonymousPaths.isAnonymous.mockReturnValue(false); + + analyticsService.setup({ + authc, + analytics, + http, + securityLicense: licenseMock.create({ allowLogin: false }), + }); + + expect(analytics.registerContextProvider).toHaveBeenCalledWith( + expect.objectContaining({ + name: 'user_id', + }) + ); + }); }); diff --git a/x-pack/plugins/security/public/analytics/analytics_service.ts b/x-pack/plugins/security/public/analytics/analytics_service.ts index 87c402e9983a0..1c87db674eb40 100644 --- a/x-pack/plugins/security/public/analytics/analytics_service.ts +++ b/x-pack/plugins/security/public/analytics/analytics_service.ts @@ -11,6 +11,7 @@ import { throttleTime } from 'rxjs/operators'; import type { AnalyticsServiceSetup as CoreAnalyticsServiceSetup, + HttpSetup, HttpStart, } from '@kbn/core/public'; @@ -22,6 +23,7 @@ interface AnalyticsServiceSetupParams { securityLicense: SecurityLicense; analytics: CoreAnalyticsServiceSetup; authc: AuthenticationServiceSetup; + http: HttpSetup; cloudId?: string; } @@ -43,9 +45,11 @@ export class AnalyticsService { private securityLicense!: SecurityLicense; private securityFeaturesSubscription?: Subscription; - public setup({ analytics, authc, cloudId, securityLicense }: AnalyticsServiceSetupParams) { + public setup({ analytics, authc, cloudId, http, securityLicense }: AnalyticsServiceSetupParams) { this.securityLicense = securityLicense; - registerUserContext(analytics, authc, cloudId); + if (http.anonymousPaths.isAnonymous(window.location.pathname) === false) { + registerUserContext(analytics, authc, cloudId); + } } public start({ http }: AnalyticsServiceStartParams) { diff --git a/x-pack/plugins/security/public/plugin.tsx b/x-pack/plugins/security/public/plugin.tsx index 2a91479824062..c56c40f63b4d0 100644 --- a/x-pack/plugins/security/public/plugin.tsx +++ b/x-pack/plugins/security/public/plugin.tsx @@ -113,6 +113,7 @@ export class SecurityPlugin analytics: core.analytics, authc: this.authc, cloudId: cloud?.cloudId, + http: core.http, securityLicense: license, }); From ee313b34c2a6b879b54468287a7f76bd3189e3c0 Mon Sep 17 00:00:00 2001 From: Yaroslav Kuznietsov Date: Thu, 13 Oct 2022 19:00:16 +0300 Subject: [PATCH 18/35] [Lens][TSVB] Navigate to Lens Guage functional tests. (#143214) * Added tests for converting metric with params, unsupported metrics and not valid panels. * Added tests for color ranges. * Added tests for gauge. * Fixed tests. --- .../page_objects/visual_builder_page.ts | 14 ++- test/functional/services/combo_box.ts | 15 +++ .../lens/group3/open_in_lens/tsvb/gauge.ts | 92 ++++++++++++++++++- .../lens/group3/open_in_lens/tsvb/metric.ts | 7 +- 4 files changed, 114 insertions(+), 14 deletions(-) diff --git a/test/functional/page_objects/visual_builder_page.ts b/test/functional/page_objects/visual_builder_page.ts index be13c856c3f02..edbd53e80d8c5 100644 --- a/test/functional/page_objects/visual_builder_page.ts +++ b/test/functional/page_objects/visual_builder_page.ts @@ -418,8 +418,6 @@ export class VisualBuilderPageObject extends FtrService { } public async createColorRule(nth = 0) { - await this.clickPanelOptions('metric'); - const elements = await this.testSubjects.findAll('AddAddBtn'); await elements[nth].click(); await this.visChart.waitForVisualizationRenderingStabilized(); @@ -710,16 +708,16 @@ export class VisualBuilderPageObject extends FtrService { public async setColorRuleOperator(condition: string): Promise { await this.retry.try(async () => { - await this.comboBox.clearInputField('colorRuleOperator'); - await this.comboBox.set('colorRuleOperator', condition); + await this.comboBox.clearLastInputField('colorRuleOperator'); + await this.comboBox.setForLastInput('colorRuleOperator', condition); }); } - public async setColorRuleValue(value: number): Promise { + public async setColorRuleValue(value: number, nth: number = 0): Promise { await this.retry.try(async () => { - const colorRuleValueInput = await this.find.byCssSelector( - '[data-test-subj="colorRuleValue"]' - ); + const colorRuleValueInput = ( + await this.find.allByCssSelector('[data-test-subj="colorRuleValue"]') + )[nth]; await colorRuleValueInput.type(value.toString()); }); } diff --git a/test/functional/services/combo_box.ts b/test/functional/services/combo_box.ts index 98b04f83aa47f..96d51cd24611a 100644 --- a/test/functional/services/combo_box.ts +++ b/test/functional/services/combo_box.ts @@ -36,6 +36,13 @@ export class ComboBoxService extends FtrService { await this.setElement(comboBox, value); } + public async setForLastInput(comboBoxSelector: string, value: string): Promise { + this.log.debug(`comboBox.set, comboBoxSelector: ${comboBoxSelector}`); + const comboBoxes = await this.testSubjects.findAll(comboBoxSelector); + const comboBox = comboBoxes[comboBoxes.length - 1]; + await this.setElement(comboBox, value); + } + /** * Clicks option in combobox dropdown * @@ -308,4 +315,12 @@ export class ComboBoxService extends FtrService { const input = await comboBoxElement.findByTagName('input'); await input.clearValueWithKeyboard(); } + + public async clearLastInputField(comboBoxSelector: string): Promise { + this.log.debug(`comboBox.clearInputField, comboBoxSelector:${comboBoxSelector}`); + const comboBoxElements = await this.testSubjects.findAll(comboBoxSelector); + const comboBoxElement = comboBoxElements[comboBoxElements.length - 1]; + const input = await comboBoxElement.findByTagName('input'); + await input.clearValueWithKeyboard(); + } } diff --git a/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/gauge.ts b/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/gauge.ts index bb2bc9a15ce9b..307847d82f61c 100644 --- a/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/gauge.ts +++ b/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/gauge.ts @@ -9,9 +9,16 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const { visualize, visualBuilder, lens } = getPageObjects(['visualBuilder', 'visualize', 'lens']); + const { visualize, visualBuilder, lens, header } = getPageObjects([ + 'visualBuilder', + 'visualize', + 'lens', + 'header', + ]); const testSubjects = getService('testSubjects'); + const retry = getService('retry'); + const find = getService('find'); describe('Gauge', function describeIndexTests() { before(async () => { @@ -40,5 +47,88 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const metricData = await lens.getMetricVisualizationData(); expect(metricData[0].title).to.eql('Count of records'); }); + + it('should convert metric with params', async () => { + await visualBuilder.selectAggType('Value Count'); + await visualBuilder.setFieldForAggregation('bytes'); + + await header.waitUntilLoadingHasFinished(); + + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + await lens.waitForVisualization('mtrVis'); + await retry.try(async () => { + const layers = await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`); + expect(layers).to.have.length(1); + + const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); + expect(dimensions).to.have.length(2); + expect(await dimensions[0].getVisibleText()).to.be('Count of bytes'); + expect(await dimensions[1].getVisibleText()).to.be('overall_max(count(bytes))'); + }); + }); + + it('should not allow converting of unsupported metric', async () => { + await visualBuilder.selectAggType('Counter Rate'); + await visualBuilder.setFieldForAggregation('machine.ram'); + + await header.waitUntilLoadingHasFinished(); + + const canEdit = await testSubjects.exists('visualizeEditInLensButton'); + expect(canEdit).to.be(false); + }); + + it('should not allow converting of not valid panel', async () => { + await visualBuilder.selectAggType('Value Count'); + await header.waitUntilLoadingHasFinished(); + const canEdit = await testSubjects.exists('visualizeEditInLensButton'); + expect(canEdit).to.be(false); + }); + + it('should convert color ranges', async () => { + await visualBuilder.setMetricsGroupByTerms('extension.raw'); + + await visualBuilder.clickPanelOptions('gauge'); + + await visualBuilder.setColorRuleOperator('>= greater than or equal'); + await visualBuilder.setColorRuleValue(10); + await visualBuilder.setColorPickerValue('#54B399', 2); + + await visualBuilder.createColorRule(); + + await visualBuilder.setColorRuleOperator('>= greater than or equal'); + await visualBuilder.setColorRuleValue(100, 1); + await visualBuilder.setColorPickerValue('#54A000', 4); + + await header.waitUntilLoadingHasFinished(); + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + + await lens.waitForVisualization('mtrVis'); + await retry.try(async () => { + const closePalettePanels = await testSubjects.findAll( + 'lns-indexPattern-PalettePanelContainerBack' + ); + if (closePalettePanels.length) { + await lens.closePalettePanel(); + await lens.closeDimensionEditor(); + } + + const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); + expect(dimensions).to.have.length(3); + + dimensions[0].click(); + + await lens.openPalettePanel('lnsMetric'); + const colorStops = await lens.getPaletteColorStops(); + + expect(colorStops).to.eql([ + { stop: '', color: 'rgba(104, 188, 0, 1)' }, + { stop: '10', color: 'rgba(84, 179, 153, 1)' }, + { stop: '100', color: 'rgba(84, 160, 0, 1)' }, + { stop: '', color: undefined }, + ]); + }); + }); }); } diff --git a/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/metric.ts b/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/metric.ts index 6ec2ef5cc984a..7a157d569bf0f 100644 --- a/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/metric.ts +++ b/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/metric.ts @@ -18,7 +18,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const retry = getService('retry'); - const find = getService('find'); describe('Metric', function describeIndexTests() { before(async () => { @@ -58,8 +57,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await button.click(); await lens.waitForVisualization('mtrVis'); await retry.try(async () => { - const layers = await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`); - expect(layers).to.have.length(1); + expect(await lens.getLayerCount()).to.be(1); const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); expect(dimensions).to.have.length(1); @@ -77,8 +75,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await button.click(); await lens.waitForVisualization('mtrVis'); await retry.try(async () => { - const layers = await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`); - expect(layers).to.have.length(1); + expect(await lens.getLayerCount()).to.be(1); const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); expect(dimensions).to.have.length(1); From 42a7a0926704263493ff0571f13d1692b4adc105 Mon Sep 17 00:00:00 2001 From: Mark Hopkin Date: Thu, 13 Oct 2022 17:04:01 +0100 Subject: [PATCH 19/35] [Fleet] Add link to skip multi step add integration workflow (#143279) * add link to skip multi page add int flow * fix types Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../add_first_integration_splash.tsx | 8 +++++- .../components/bottom_bar.tsx | 16 +++++++----- .../multi_page_layout/index.tsx | 25 +++++++++---------- .../multi_page_layout/types.ts | 2 +- 4 files changed, 30 insertions(+), 21 deletions(-) diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/add_first_integration_splash.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/add_first_integration_splash.tsx index 1e0aeb3236492..e1e53efa16985 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/add_first_integration_splash.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/add_first_integration_splash.tsx @@ -230,7 +230,7 @@ export const AddFirstIntegrationSplashScreen: React.FC<{ error?: RequestError | null; packageInfo?: PackageInfo; isLoading: boolean; - cancelClickHandler: React.ReactEventHandler; + cancelClickHandler?: React.ReactEventHandler; cancelUrl: string; onNext: () => void; }> = ({ @@ -276,6 +276,12 @@ export const AddFirstIntegrationSplashScreen: React.FC<{ + } cancelClickHandler={cancelClickHandler} isLoading={isLoading} onNext={onNext} diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/bottom_bar.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/bottom_bar.tsx index 228a89fa4e495..61875a063207d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/bottom_bar.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/bottom_bar.tsx @@ -29,8 +29,9 @@ export const NotObscuredByBottomBar = styled('div')` export const CreatePackagePolicyBottomBar: React.FC<{ isLoading?: boolean; isDisabled?: boolean; - cancelClickHandler: React.ReactEventHandler; + cancelClickHandler?: React.ReactEventHandler; cancelUrl?: string; + cancelMessage?: React.ReactElement; actionMessage: React.ReactElement; onNext: () => void; noAnimation?: boolean; @@ -42,6 +43,7 @@ export const CreatePackagePolicyBottomBar: React.FC<{ cancelClickHandler, cancelUrl, actionMessage, + cancelMessage, isDisabled = false, noAnimation = false, }) => { @@ -53,10 +55,12 @@ export const CreatePackagePolicyBottomBar: React.FC<{ {/* eslint-disable-next-line @elastic/eui/href-or-on-click */} - + {cancelMessage || ( + + )} @@ -85,7 +89,7 @@ export const CreatePackagePolicyBottomBar: React.FC<{ }; export const AgentStandaloneBottomBar: React.FC<{ - cancelClickHandler: React.ReactEventHandler; + cancelClickHandler?: React.ReactEventHandler; cancelUrl?: string; onNext: () => void; noAnimation?: boolean; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/index.tsx index c14d4bcd67752..6ce311b36aa6a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/index.tsx @@ -10,10 +10,9 @@ import { i18n } from '@kbn/i18n'; import { splitPkgKey } from '../../../../../../../common/services'; -import { useGetPackageInfoByKey, useGetSettings } from '../../../../hooks'; +import { useGetPackageInfoByKey, useGetSettings, useLink } from '../../../../hooks'; import type { AddToPolicyParams, CreatePackagePolicyParams } from '../types'; -import { useCancelAddPackagePolicy } from '../hooks'; import { useGetAgentPolicyOrDefault } from './hooks'; @@ -55,11 +54,12 @@ export const CreatePackagePolicyMultiPage: CreatePackagePolicyParams = ({ queryParamsPolicyId, }) => { const { params } = useRouteMatch(); - - const { pkgName, pkgVersion } = splitPkgKey(params.pkgkey); + const { pkgkey, policyId, integration } = params; + const { pkgName, pkgVersion } = splitPkgKey(pkgkey); const [onSplash, setOnSplash] = useState(true); const [currentStep, setCurrentStep] = useState(0); const [isManaged, setIsManaged] = useState(true); + const { getHref } = useLink(); const [enrolledAgentIds, setEnrolledAgentIds] = useState([]); const toggleIsManaged = (newIsManaged: boolean) => { setIsManaged(newIsManaged); @@ -85,19 +85,21 @@ export const CreatePackagePolicyMultiPage: CreatePackagePolicyParams = ({ const settings = useMemo(() => settingsData?.item, [settingsData]); const integrationInfo = useMemo(() => { - if (!params.integration) return; + if (!integration) return; return packageInfo?.policy_templates?.find( - (policyTemplate) => policyTemplate.name === params.integration + (policyTemplate) => policyTemplate.name === integration ); - }, [packageInfo?.policy_templates, params]); + }, [packageInfo?.policy_templates, integration]); const splashScreenNext = () => { setOnSplash(false); }; - const { cancelClickHandler, cancelUrl } = useCancelAddPackagePolicy({ - from, - pkgkey: params.pkgkey, + const cancelUrl = getHref('add_integration_to_policy', { + pkgkey, + useMultiPageLayout: false, + ...(integration ? { integration } : {}), + ...(policyId ? { agentPolicyId: policyId } : {}), }); if (onSplash || !packageInfo) { @@ -108,7 +110,6 @@ export const CreatePackagePolicyMultiPage: CreatePackagePolicyParams = ({ integrationInfo={integrationInfo} packageInfo={packageInfo} cancelUrl={cancelUrl} - cancelClickHandler={cancelClickHandler} onNext={splashScreenNext} /> ); @@ -125,7 +126,6 @@ export const CreatePackagePolicyMultiPage: CreatePackagePolicyParams = ({ const stepsBack = () => { if (currentStep === 0) { - cancelClickHandler(null); return; } @@ -142,7 +142,6 @@ export const CreatePackagePolicyMultiPage: CreatePackagePolicyParams = ({ packageInfo={packageInfo} integrationInfo={integrationInfo} cancelUrl={cancelUrl} - cancelClickHandler={cancelClickHandler} onNext={stepsNext} onBack={stepsBack} isManaged={isManaged} diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/types.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/types.ts index 327be01e0b3e9..d3a195e0513d4 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/types.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/types.ts @@ -27,7 +27,7 @@ export interface MultiPageStepLayoutProps { enrollmentAPIKey?: EnrollmentAPIKey; packageInfo: PackageInfo; integrationInfo?: RegistryPolicyTemplate; - cancelClickHandler: React.ReactEventHandler; + cancelClickHandler?: React.ReactEventHandler; onBack: React.ReactEventHandler; cancelUrl: string; steps: MultiPageStep[]; From ec98f01c9f60a42ea4544bcca3f49052cc636089 Mon Sep 17 00:00:00 2001 From: Zacqary Adam Xeper Date: Thu, 13 Oct 2022 11:07:28 -0500 Subject: [PATCH 20/35] [RAM] Move Connectors to own page (#142485) * Move Connectors to own page * Move create connector button to header * Update permissions IDs * Fix some tests * Test fixes * Fix more tests * Fix more tests * Fix FTR 7 * Fix jest * Fix FTR 4 * Fix FTR 6 * Fix translations * Fix breadcrumbs * Fix empty prompt design * Update empty prompt text * Update import warning url * Add documentation buttons Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- x-pack/plugins/actions/server/feature.ts | 6 +- .../saved_objects/get_import_warnings.ts | 2 +- x-pack/plugins/cases/public/plugin.ts | 2 +- .../ml/public/application/management/index.ts | 2 +- x-pack/plugins/reporting/public/plugin.ts | 2 +- .../translations/translations/fr-FR.json | 1 - .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - .../public/application/app.tsx | 20 +- .../prompts/empty_connectors_prompt.tsx | 63 +++-- .../public/application/connectors_app.tsx | 104 ++++++++ .../public/application/constants/plugin.ts | 2 +- .../public/application/home.test.tsx | 6 +- .../public/application/home.tsx | 47 +--- .../public/application/lib/breadcrumb.test.ts | 4 +- .../public/application/lib/breadcrumb.ts | 15 +- .../public/application/lib/doc_title.test.ts | 2 +- .../public/application/lib/doc_title.ts | 7 +- .../components/actions_connectors_list.tsx | 236 +++++++++++------- .../public/common/constants/index.ts | 1 + .../triggers_actions_ui/public/plugin.ts | 74 +++++- x-pack/plugins/watcher/public/plugin.ts | 2 +- .../feature_controls/management_security.ts | 2 +- .../alert_create_flyout.ts | 2 +- .../apps/triggers_actions_ui/connectors.ts | 13 +- .../apps/triggers_actions_ui/details.ts | 16 +- .../apps/triggers_actions_ui/home_page.ts | 26 +- x-pack/test/functional_with_es_ssl/config.ts | 3 + .../page_objects/triggers_actions_ui_page.ts | 5 + 29 files changed, 454 insertions(+), 213 deletions(-) create mode 100644 x-pack/plugins/triggers_actions_ui/public/application/connectors_app.tsx diff --git a/x-pack/plugins/actions/server/feature.ts b/x-pack/plugins/actions/server/feature.ts index c176e9f261551..aa0b88dbee633 100644 --- a/x-pack/plugins/actions/server/feature.ts +++ b/x-pack/plugins/actions/server/feature.ts @@ -28,7 +28,7 @@ export const ACTIONS_FEATURE = { app: [], order: FEATURE_ORDER, management: { - insightsAndAlerting: ['triggersActions'], + insightsAndAlerting: ['triggersActions', 'triggersActionsConnectors'], }, privileges: { all: { @@ -36,7 +36,7 @@ export const ACTIONS_FEATURE = { api: [], catalogue: [], management: { - insightsAndAlerting: ['triggersActions'], + insightsAndAlerting: ['triggersActions', 'triggersActionsConnectors'], }, savedObject: { all: [ @@ -53,7 +53,7 @@ export const ACTIONS_FEATURE = { api: [], catalogue: [], management: { - insightsAndAlerting: ['triggersActions'], + insightsAndAlerting: ['triggersActions', 'triggersActionsConnectors'], }, savedObject: { // action execution requires 'read' over `actions`, but 'all' over `action_task_params` diff --git a/x-pack/plugins/actions/server/saved_objects/get_import_warnings.ts b/x-pack/plugins/actions/server/saved_objects/get_import_warnings.ts index 2c8eef94f9a4d..ce2b290ed2ab4 100644 --- a/x-pack/plugins/actions/server/saved_objects/get_import_warnings.ts +++ b/x-pack/plugins/actions/server/saved_objects/get_import_warnings.ts @@ -29,7 +29,7 @@ export function getImportWarnings( { type: 'action_required', message, - actionPath: '/app/management/insightsAndAlerting/triggersActions/connectors', + actionPath: '/app/management/insightsAndAlerting/triggersActionsConnectors', buttonLabel: GO_TO_CONNECTORS_BUTTON_LABLE, } as SavedObjectsImportWarning, ]; diff --git a/x-pack/plugins/cases/public/plugin.ts b/x-pack/plugins/cases/public/plugin.ts index 53b3b57d4e2ef..73c8866ca71a3 100644 --- a/x-pack/plugins/cases/public/plugin.ts +++ b/x-pack/plugins/cases/public/plugin.ts @@ -67,7 +67,7 @@ export class CasesUiPlugin plugins.management.sections.section.insightsAndAlerting.registerApp({ id: APP_ID, title: APP_TITLE, - order: 0, + order: 1, async mount(params: ManagementAppMountParams) { const [coreStart, pluginsStart] = (await core.getStartServices()) as [ CoreStart, diff --git a/x-pack/plugins/ml/public/application/management/index.ts b/x-pack/plugins/ml/public/application/management/index.ts index 86f7fa0ff92ab..f64d7cbb5bb64 100644 --- a/x-pack/plugins/ml/public/application/management/index.ts +++ b/x-pack/plugins/ml/public/application/management/index.ts @@ -23,7 +23,7 @@ export function registerManagementSection( title: i18n.translate('xpack.ml.management.jobsListTitle', { defaultMessage: 'Machine Learning', }), - order: 2, + order: 4, async mount(params: ManagementAppMountParams) { const { mountApp } = await import('./jobs_list'); return mountApp(core, params, deps); diff --git a/x-pack/plugins/reporting/public/plugin.ts b/x-pack/plugins/reporting/public/plugin.ts index df47c6f28a6e3..d8f4132a59541 100644 --- a/x-pack/plugins/reporting/public/plugin.ts +++ b/x-pack/plugins/reporting/public/plugin.ts @@ -172,7 +172,7 @@ export class ReportingPublicPlugin management.sections.section.insightsAndAlerting.registerApp({ id: 'reporting', title: this.title, - order: 1, + order: 3, mount: async (params) => { params.setBreadcrumbs([{ text: this.breadcrumbText }]); const [[start, startDeps], { mountManagementSection }] = await Promise.all([ diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 3750a4af42538..f82a3b264a722 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -32297,7 +32297,6 @@ "xpack.triggersActionsUI.fieldBrowser.viewSelected": "sélectionné", "xpack.triggersActionsUI.home.appTitle": "Règles et connecteurs", "xpack.triggersActionsUI.home.breadcrumbTitle": "Règles et connecteurs", - "xpack.triggersActionsUI.home.connectorsTabTitle": "Connecteurs", "xpack.triggersActionsUI.home.docsLinkText": "Documentation", "xpack.triggersActionsUI.home.rulesTabTitle": "Règles", "xpack.triggersActionsUI.home.sectionDescription": "Détecter les conditions à l'aide des règles, et entreprendre des actions à l'aide des connecteurs.", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index f0d7d45fec244..fa482be26a856 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -32271,7 +32271,6 @@ "xpack.triggersActionsUI.fieldBrowser.viewSelected": "選択済み", "xpack.triggersActionsUI.home.appTitle": "ルールとコネクター", "xpack.triggersActionsUI.home.breadcrumbTitle": "ルールとコネクター", - "xpack.triggersActionsUI.home.connectorsTabTitle": "コネクター", "xpack.triggersActionsUI.home.docsLinkText": "ドキュメント", "xpack.triggersActionsUI.home.rulesTabTitle": "ルール", "xpack.triggersActionsUI.home.sectionDescription": "ルールを使用して条件を検出し、コネクターを使用してアクションを実行します。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 482a967318153..424fa52fcee66 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -32308,7 +32308,6 @@ "xpack.triggersActionsUI.fieldBrowser.viewSelected": "已选定", "xpack.triggersActionsUI.home.appTitle": "规则和连接器", "xpack.triggersActionsUI.home.breadcrumbTitle": "规则和连接器", - "xpack.triggersActionsUI.home.connectorsTabTitle": "连接器", "xpack.triggersActionsUI.home.docsLinkText": "文档", "xpack.triggersActionsUI.home.rulesTabTitle": "规则", "xpack.triggersActionsUI.home.sectionDescription": "使规则检测条件,并使用连接器采取操作。", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/app.tsx b/x-pack/plugins/triggers_actions_ui/public/application/app.tsx index 5f2dcfcb5ff62..d0c61c884e528 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/app.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/app.tsx @@ -31,11 +31,17 @@ import { AlertsTableConfigurationRegistryContract, RuleTypeRegistryContract, } from '../types'; -import { Section, routeToRuleDetails, legacyRouteToRuleDetails } from './constants'; +import { + Section, + routeToRuleDetails, + legacyRouteToRuleDetails, + routeToConnectors, +} from './constants'; import { setDataViewsService } from '../common/lib/data_apis'; import { KibanaContextProvider, useKibana } from '../common/lib/kibana'; import { ConnectorProvider } from './context/connector_context'; +import { CONNECTORS_PLUGIN_ID } from '../common/constants'; const TriggersActionsUIHome = lazy(() => import('./home')); const RuleDetailsRoute = lazy( @@ -73,7 +79,7 @@ export const renderApp = (deps: TriggersAndActionsUiServices) => { export const App = ({ deps }: { deps: TriggersAndActionsUiServices }) => { const { dataViews, uiSettings, theme$ } = deps; - const sections: Section[] = ['rules', 'connectors', 'logs', 'alerts']; + const sections: Section[] = ['rules', 'logs', 'alerts']; const isDarkMode = useObservable(uiSettings.get$('theme:darkMode')); const sectionsRegex = sections.join('|'); @@ -96,6 +102,7 @@ export const App = ({ deps }: { deps: TriggersAndActionsUiServices }) => { export const AppWithoutRouter = ({ sectionsRegex }: { sectionsRegex: string }) => { const { actions: { validateEmailAddresses }, + application: { navigateToApp }, } = useKibana().services; return ( @@ -114,6 +121,15 @@ export const AppWithoutRouter = ({ sectionsRegex }: { sectionsRegex: string }) = path={legacyRouteToRuleDetails} render={({ match }) => } /> + { + navigateToApp(`management/insightsAndAlerting/${CONNECTORS_PLUGIN_ID}`); + return null; + }} + /> + diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/prompts/empty_connectors_prompt.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/prompts/empty_connectors_prompt.tsx index 4637b6aa1d801..f6b149328db97 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/prompts/empty_connectors_prompt.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/prompts/empty_connectors_prompt.tsx @@ -7,11 +7,25 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; -import { EuiButton, EuiEmptyPrompt, EuiIcon, EuiSpacer, EuiTitle } from '@elastic/eui'; +import { + EuiButton, + EuiButtonEmpty, + EuiPageTemplate, + EuiIcon, + EuiSpacer, + EuiTitle, +} from '@elastic/eui'; +import { DocLinksStart } from '@kbn/core-doc-links-browser'; import './empty_connectors_prompt.scss'; -export const EmptyConnectorsPrompt = ({ onCTAClicked }: { onCTAClicked: () => void }) => ( - void; + docLinks: DocLinksStart; +}) => ( + @@ -33,24 +47,39 @@ export const EmptyConnectorsPrompt = ({ onCTAClicked }: { onCTAClicked: () => vo

} actions={ - - - + <> + + + +
+ + + + } /> ); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/connectors_app.tsx b/x-pack/plugins/triggers_actions_ui/public/application/connectors_app.tsx new file mode 100644 index 0000000000000..78b2559cc3dec --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/connectors_app.tsx @@ -0,0 +1,104 @@ +/* + * 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, { lazy } from 'react'; +import { Switch, Route, Router } from 'react-router-dom'; +import { ChromeBreadcrumb, CoreStart, CoreTheme, ScopedHistory } from '@kbn/core/public'; +import { render, unmountComponentAtNode } from 'react-dom'; +import { I18nProvider } from '@kbn/i18n-react'; +import useObservable from 'react-use/lib/useObservable'; +import { Observable } from 'rxjs'; +import { KibanaFeature } from '@kbn/features-plugin/common'; +import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { ChartsPluginStart } from '@kbn/charts-plugin/public'; +import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import type { DataViewEditorStart } from '@kbn/data-view-editor-plugin/public'; +import { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import { PluginStartContract as AlertingStart } from '@kbn/alerting-plugin/public'; +import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; + +import { Storage } from '@kbn/kibana-utils-plugin/public'; +import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; +import { ActionsPublicPluginSetup } from '@kbn/actions-plugin/public'; +import { suspendedComponentWithProps } from './lib/suspended_component_with_props'; +import { + ActionTypeRegistryContract, + AlertsTableConfigurationRegistryContract, + RuleTypeRegistryContract, +} from '../types'; + +import { setDataViewsService } from '../common/lib/data_apis'; +import { KibanaContextProvider, useKibana } from '../common/lib/kibana'; +import { ConnectorProvider } from './context/connector_context'; + +const ActionsConnectorsList = lazy( + () => import('./sections/actions_connectors_list/components/actions_connectors_list') +); + +export interface TriggersAndActionsUiServices extends CoreStart { + actions: ActionsPublicPluginSetup; + data: DataPublicPluginStart; + dataViews: DataViewsPublicPluginStart; + dataViewEditor: DataViewEditorStart; + charts: ChartsPluginStart; + alerting?: AlertingStart; + spaces?: SpacesPluginStart; + storage?: Storage; + isCloud: boolean; + setBreadcrumbs: (crumbs: ChromeBreadcrumb[]) => void; + actionTypeRegistry: ActionTypeRegistryContract; + ruleTypeRegistry: RuleTypeRegistryContract; + alertsTableConfigurationRegistry: AlertsTableConfigurationRegistryContract; + history: ScopedHistory; + kibanaFeatures: KibanaFeature[]; + element: HTMLElement; + theme$: Observable; + unifiedSearch: UnifiedSearchPublicPluginStart; +} + +export const renderApp = (deps: TriggersAndActionsUiServices) => { + const { element } = deps; + render(, element); + return () => { + unmountComponentAtNode(element); + }; +}; + +export const App = ({ deps }: { deps: TriggersAndActionsUiServices }) => { + const { dataViews, uiSettings, theme$ } = deps; + const isDarkMode = useObservable(uiSettings.get$('theme:darkMode')); + + setDataViewsService(dataViews); + return ( + + + + + + + + + + + + ); +}; + +export const AppWithoutRouter = () => { + const { + actions: { validateEmailAddresses }, + } = useKibana().services; + + return ( + + + + + + ); +}; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/constants/plugin.ts b/x-pack/plugins/triggers_actions_ui/public/application/constants/plugin.ts index bf5cf6d58c69c..93ba3dd88b709 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/constants/plugin.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/constants/plugin.ts @@ -9,7 +9,7 @@ export const PLUGIN = { ID: 'triggersActionsUi', getI18nName: (i18n: any): string => { return i18n.translate('xpack.triggersActionsUI.appName', { - defaultMessage: 'Rules and Connectors', + defaultMessage: 'Rules', }); }, }; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/home.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/home.test.tsx index 0024fef8ac125..83c856663f8f8 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/home.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/home.test.tsx @@ -69,8 +69,8 @@ describe('home', () => { let home = mountWithIntl(); - // Just rules/connectors - expect(home.find('.euiTab__content').length).toBe(3); + // Just rules/logs + expect(home.find('.euiTab__content').length).toBe(2); (getIsExperimentalFeatureEnabled as jest.Mock).mockImplementation((feature: string) => { if (feature === 'internalAlertsTable') { @@ -81,6 +81,6 @@ describe('home', () => { home = mountWithIntl(); // alerts now too! - expect(home.find('.euiTab__content').length).toBe(4); + expect(home.find('.euiTab__content').length).toBe(3); }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/home.tsx b/x-pack/plugins/triggers_actions_ui/public/application/home.tsx index 8963e63eb44fc..894db7ce5a59e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/home.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/home.tsx @@ -11,25 +11,15 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { EuiSpacer, EuiButtonEmpty, EuiPageHeader } from '@elastic/eui'; import { getIsExperimentalFeatureEnabled } from '../common/get_experimental_features'; -import { - Section, - routeToConnectors, - routeToRules, - routeToInternalAlerts, - routeToLogs, -} from './constants'; +import { Section, routeToRules, routeToInternalAlerts, routeToLogs } from './constants'; import { getAlertingSectionBreadcrumb } from './lib/breadcrumb'; import { getCurrentDocTitle } from './lib/doc_title'; -import { hasShowActionsCapability } from './lib/capabilities'; import { HealthCheck } from './components/health_check'; import { HealthContextProvider } from './context/health_context'; import { useKibana } from '../common/lib/kibana'; import { suspendedComponentWithProps } from './lib/suspended_component_with_props'; -const ActionsConnectorsList = lazy( - () => import('./sections/actions_connectors_list/components/actions_connectors_list') -); const RulesList = lazy(() => import('./sections/rules_list/components/rules_list')); const LogsList = lazy(() => import('./sections/logs_list/components/logs_list')); const AlertsPage = lazy(() => import('./sections/alerts_table/alerts_page')); @@ -44,16 +34,9 @@ export const TriggersActionsUIHome: React.FunctionComponent { - const { - chrome, - application: { capabilities }, - - setBreadcrumbs, - docLinks, - } = useKibana().services; + const { chrome, setBreadcrumbs, docLinks } = useKibana().services; const isInternalAlertsTableEnabled = getIsExperimentalFeatureEnabled('internalAlertsTable'); - const canShowActions = hasShowActionsCapability(capabilities); const tabs: Array<{ id: Section; name: React.ReactNode; @@ -66,18 +49,6 @@ export const TriggersActionsUIHome: React.FunctionComponent - ), - }); - } - tabs.push({ id: 'logs', name: , @@ -111,10 +82,7 @@ export const TriggersActionsUIHome: React.FunctionComponent - + } rightSideItems={[ @@ -133,7 +101,7 @@ export const TriggersActionsUIHome: React.FunctionComponent } tabs={tabs.map((tab) => ({ @@ -155,13 +123,6 @@ export const TriggersActionsUIHome: React.FunctionComponent - {canShowActions && ( - - )} { }); expect(getAlertingSectionBreadcrumb('home', true)).toMatchObject({ text: i18n.translate('xpack.triggersActionsUI.home.breadcrumbTitle', { - defaultMessage: 'Rules and Connectors', + defaultMessage: 'Rules', }), href: `${routeToHome}`, }); @@ -44,7 +44,7 @@ describe('getAlertingSectionBreadcrumb', () => { }); expect(getAlertingSectionBreadcrumb('home', false)).toMatchObject({ text: i18n.translate('xpack.triggersActionsUI.home.breadcrumbTitle', { - defaultMessage: 'Rules and Connectors', + defaultMessage: 'Rules', }), }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/breadcrumb.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/breadcrumb.ts index 46a15b12bb733..c0b9551968870 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/breadcrumb.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/breadcrumb.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { routeToHome, routeToConnectors, routeToRules } from '../constants'; +import { routeToHome, routeToConnectors, routeToRules, routeToLogs } from '../constants'; export const getAlertingSectionBreadcrumb = ( type: string, @@ -14,6 +14,17 @@ export const getAlertingSectionBreadcrumb = ( ): { text: string; href?: string } => { // Home and sections switch (type) { + case 'logs': + return { + text: i18n.translate('xpack.triggersActionsUI.logs.breadcrumbTitle', { + defaultMessage: 'Logs', + }), + ...(returnHref + ? { + href: `${routeToLogs}`, + } + : {}), + }; case 'connectors': return { text: i18n.translate('xpack.triggersActionsUI.connectors.breadcrumbTitle', { @@ -39,7 +50,7 @@ export const getAlertingSectionBreadcrumb = ( default: return { text: i18n.translate('xpack.triggersActionsUI.home.breadcrumbTitle', { - defaultMessage: 'Rules and Connectors', + defaultMessage: 'Rules', }), ...(returnHref ? { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/doc_title.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/doc_title.test.ts index af352de0cc6e7..8d4996ceb8259 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/doc_title.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/doc_title.test.ts @@ -9,7 +9,7 @@ import { getCurrentDocTitle } from './doc_title'; describe('getCurrentDocTitle', () => { test('if change calls return the proper doc title ', async () => { - expect(getCurrentDocTitle('home') === 'Rules and Connectors').toBeTruthy(); + expect(getCurrentDocTitle('home') === 'Rules').toBeTruthy(); expect(getCurrentDocTitle('connectors') === 'Connectors').toBeTruthy(); expect(getCurrentDocTitle('rules') === 'Rules').toBeTruthy(); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/doc_title.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/doc_title.ts index fab9e19c8acee..16699e750d223 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/doc_title.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/doc_title.ts @@ -11,6 +11,11 @@ export const getCurrentDocTitle = (page: string): string => { let updatedTitle: string; switch (page) { + case 'logs': + updatedTitle = i18n.translate('xpack.triggersActionsUI.logs.breadcrumbTitle', { + defaultMessage: 'Logs', + }); + break; case 'connectors': updatedTitle = i18n.translate('xpack.triggersActionsUI.connectors.breadcrumbTitle', { defaultMessage: 'Connectors', @@ -23,7 +28,7 @@ export const getCurrentDocTitle = (page: string): string => { break; default: updatedTitle = i18n.translate('xpack.triggersActionsUI.home.breadcrumbTitle', { - defaultMessage: 'Rules and Connectors', + defaultMessage: 'Rules', }); } return updatedTitle; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx index e973fce282dcb..55885aa3c14c3 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx @@ -22,6 +22,7 @@ import { Criteria, EuiButtonEmpty, EuiBadge, + EuiPageTemplate, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { omit } from 'lodash'; @@ -52,6 +53,8 @@ import { } from '../../../../common/connectors_selection'; import { CreateConnectorFlyout } from '../../action_connector_form/create_connector_flyout'; import { EditConnectorFlyout } from '../../action_connector_form/edit_connector_flyout'; +import { getAlertingSectionBreadcrumb } from '../../../lib/breadcrumb'; +import { getCurrentDocTitle } from '../../../lib/doc_title'; const ConnectorIconTipWithSpacing = withTheme(({ theme }: { theme: EuiTheme }) => { return ( @@ -83,6 +86,9 @@ const ActionsConnectorsList: React.FunctionComponent = () => { notifications: { toasts }, application: { capabilities }, actionTypeRegistry, + setBreadcrumbs, + chrome, + docLinks, } = useKibana().services; const canDelete = hasDeleteActionsCapability(capabilities); const canExecute = hasExecuteActionsCapability(capabilities); @@ -107,6 +113,12 @@ const ActionsConnectorsList: React.FunctionComponent = () => { }, []); const [showWarningText, setShowWarningText] = useState(false); + // Set breadcrumb and page title + useEffect(() => { + setBreadcrumbs([getAlertingSectionBreadcrumb('connectors')]); + chrome.docTitle.change(getCurrentDocTitle('connectors')); + }, [chrome, setBreadcrumbs]); + useEffect(() => { (async () => { try { @@ -428,110 +440,144 @@ const ActionsConnectorsList: React.FunctionComponent = () => { /> , ], - toolsRight: canSave - ? [ - setAddFlyoutVisibility(true)} - > - - , - ] - : [], }} /> ); return ( -
- { - if (selectedItems.length === 0 || selectedItems.length === deleted.length) { - const updatedActions = actions.filter( - (action) => action.id && !connectorsToDelete.includes(action.id) - ); - setActions(updatedActions); - setSelectedItems([]); - } - setConnectorsToDelete([]); - }} - onErrors={async () => { - // Refresh the actions from the server, some actions may have beend deleted - await loadActions(); - setConnectorsToDelete([]); - }} - onCancel={async () => { - setConnectorsToDelete([]); - }} - apiDeleteCall={deleteActions} - idsToDelete={connectorsToDelete} - singleTitle={i18n.translate( - 'xpack.triggersActionsUI.sections.actionsConnectorsList.singleTitle', - { defaultMessage: 'connector' } - )} - multipleTitle={i18n.translate( - 'xpack.triggersActionsUI.sections.actionsConnectorsList.multipleTitle', - { defaultMessage: 'connectors' } - )} - showWarningText={showWarningText} - warningText={i18n.translate( - 'xpack.triggersActionsUI.sections.actionsConnectorsList.warningText', - { - defaultMessage: - '{connectors, plural, one {This connector is} other {Some connectors are}} currently in use.', - values: { - connectors: connectorsToDelete.length, - }, - } - )} - setIsLoadingState={(isLoading: boolean) => setIsLoadingActionTypes(isLoading)} - /> - - - {/* Render the view based on if there's data or if they can save */} - {(isLoadingActions || isLoadingActionTypes) && } - {actionConnectorTableItems.length !== 0 && table} - {actionConnectorTableItems.length === 0 && - canSave && - !isLoadingActions && - !isLoadingActionTypes && ( - setAddFlyoutVisibility(true)} /> - )} - {actionConnectorTableItems.length === 0 && !canSave && } - {addFlyoutVisible ? ( - { - setAddFlyoutVisibility(false); - }} - onTestConnector={(connector) => editItem(connector, EditConnectorTabs.Test)} - onConnectorCreated={loadActions} - actionTypeRegistry={actionTypeRegistry} + <> + {actionConnectorTableItems.length !== 0 && ( + setAddFlyoutVisibility(true)} + iconType="plusInCircle" + > + + , + ] + : [] + ).concat([ + + + , + ])} /> - ) : null} - {editConnectorProps.initialConnector ? ( - { - setEditConnectorProps(omit(editConnectorProps, 'initialConnector')); + )} + + { + if (selectedItems.length === 0 || selectedItems.length === deleted.length) { + const updatedActions = actions.filter( + (action) => action.id && !connectorsToDelete.includes(action.id) + ); + setActions(updatedActions); + setSelectedItems([]); + } + setConnectorsToDelete([]); }} - onConnectorUpdated={(connector) => { - setEditConnectorProps({ ...editConnectorProps, initialConnector: connector }); - loadActions(); + onErrors={async () => { + // Refresh the actions from the server, some actions may have beend deleted + await loadActions(); + setConnectorsToDelete([]); }} - actionTypeRegistry={actionTypeRegistry} + onCancel={async () => { + setConnectorsToDelete([]); + }} + apiDeleteCall={deleteActions} + idsToDelete={connectorsToDelete} + singleTitle={i18n.translate( + 'xpack.triggersActionsUI.sections.actionsConnectorsList.singleTitle', + { defaultMessage: 'connector' } + )} + multipleTitle={i18n.translate( + 'xpack.triggersActionsUI.sections.actionsConnectorsList.multipleTitle', + { defaultMessage: 'connectors' } + )} + showWarningText={showWarningText} + warningText={i18n.translate( + 'xpack.triggersActionsUI.sections.actionsConnectorsList.warningText', + { + defaultMessage: + '{connectors, plural, one {This connector is} other {Some connectors are}} currently in use.', + values: { + connectors: connectorsToDelete.length, + }, + } + )} + setIsLoadingState={(isLoading: boolean) => setIsLoadingActionTypes(isLoading)} /> - ) : null} -
+ + + {/* Render the view based on if there's data or if they can save */} + {(isLoadingActions || isLoadingActionTypes) && } + {actionConnectorTableItems.length !== 0 && table} + {actionConnectorTableItems.length === 0 && + canSave && + !isLoadingActions && + !isLoadingActionTypes && ( + setAddFlyoutVisibility(true)} + docLinks={docLinks} + /> + )} + {actionConnectorTableItems.length === 0 && !canSave && } + {addFlyoutVisible ? ( + { + setAddFlyoutVisibility(false); + }} + onTestConnector={(connector) => editItem(connector, EditConnectorTabs.Test)} + onConnectorCreated={loadActions} + actionTypeRegistry={actionTypeRegistry} + /> + ) : null} + {editConnectorProps.initialConnector ? ( + { + setEditConnectorProps(omit(editConnectorProps, 'initialConnector')); + }} + onConnectorUpdated={(connector) => { + setEditConnectorProps({ ...editConnectorProps, initialConnector: connector }); + loadActions(); + }} + actionTypeRegistry={actionTypeRegistry} + /> + ) : null} + + ); }; diff --git a/x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts b/x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts index 794a7e90bf53f..1db1551ecfd38 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts @@ -12,3 +12,4 @@ export { builtInGroupByTypes } from './group_by_types'; export const VIEW_LICENSE_OPTIONS_LINK = 'https://www.elastic.co/subscriptions'; export const PLUGIN_ID = 'triggersActions'; +export const CONNECTORS_PLUGIN_ID = 'triggersActionsConnectors'; diff --git a/x-pack/plugins/triggers_actions_ui/public/plugin.ts b/x-pack/plugins/triggers_actions_ui/public/plugin.ts index 1374f10355e16..9e4645b164f21 100644 --- a/x-pack/plugins/triggers_actions_ui/public/plugin.ts +++ b/x-pack/plugins/triggers_actions_ui/public/plugin.ts @@ -69,7 +69,7 @@ import type { } from './types'; import { TriggersActionsUiConfigType } from '../common/types'; import { registerAlertsTableConfiguration } from './application/sections/alerts_table/alerts_page/register_alerts_table_configuration'; -import { PLUGIN_ID } from './common/constants'; +import { PLUGIN_ID, CONNECTORS_PLUGIN_ID } from './common/constants'; import type { AlertsTableStateProps } from './application/sections/alerts_table/alerts_table_state'; import { getAlertsTableStateLazy } from './common/get_alerts_table_state'; import { ActionAccordionFormProps } from './application/sections/action_connector_form/action_form'; @@ -182,12 +182,24 @@ export class Plugin ExperimentalFeaturesService.init({ experimentalFeatures: this.experimentalFeatures }); const featureTitle = i18n.translate('xpack.triggersActionsUI.managementSection.displayName', { - defaultMessage: 'Rules and Connectors', + defaultMessage: 'Rules', }); const featureDescription = i18n.translate( 'xpack.triggersActionsUI.managementSection.displayDescription', { - defaultMessage: 'Detect conditions using rules, and take actions using connectors.', + defaultMessage: 'Detect conditions using rules.', + } + ); + const connectorsFeatureTitle = i18n.translate( + 'xpack.triggersActionsUI.managementSection.connectors.displayName', + { + defaultMessage: 'Connectors', + } + ); + const connectorsFeatureDescription = i18n.translate( + 'xpack.triggersActionsUI.managementSection.connectors.displayDescription', + { + defaultMessage: 'Connect third-party software with your alerting data.', } ); @@ -201,6 +213,15 @@ export class Plugin showOnHomePage: false, category: 'admin', }); + plugins.home.featureCatalogue.register({ + id: CONNECTORS_PLUGIN_ID, + title: connectorsFeatureTitle, + description: connectorsFeatureDescription, + icon: 'watchesApp', + path: '/app/management/insightsAndAlerting/triggersActions', + showOnHomePage: false, + category: 'admin', + }); } plugins.management.sections.section.insightsAndAlerting.registerApp({ @@ -250,6 +271,53 @@ export class Plugin }, }); + plugins.management.sections.section.insightsAndAlerting.registerApp({ + id: CONNECTORS_PLUGIN_ID, + title: connectorsFeatureTitle, + order: 2, + async mount(params: ManagementAppMountParams) { + const [coreStart, pluginsStart] = (await core.getStartServices()) as [ + CoreStart, + PluginsStart, + unknown + ]; + + const { renderApp } = await import('./application/connectors_app'); + + // The `/api/features` endpoint requires the "Global All" Kibana privilege. Users with a + // subset of this privilege are not authorized to access this endpoint and will receive a 404 + // error that causes the Alerting view to fail to load. + let kibanaFeatures: KibanaFeature[]; + try { + kibanaFeatures = await pluginsStart.features.getFeatures(); + } catch (err) { + kibanaFeatures = []; + } + + return renderApp({ + ...coreStart, + actions: plugins.actions, + data: pluginsStart.data, + dataViews: pluginsStart.dataViews, + dataViewEditor: pluginsStart.dataViewEditor, + charts: pluginsStart.charts, + alerting: pluginsStart.alerting, + spaces: pluginsStart.spaces, + unifiedSearch: pluginsStart.unifiedSearch, + isCloud: Boolean(plugins.cloud?.isCloudEnabled), + element: params.element, + theme$: params.theme$, + storage: new Storage(window.localStorage), + setBreadcrumbs: params.setBreadcrumbs, + history: params.history, + actionTypeRegistry, + ruleTypeRegistry, + alertsTableConfigurationRegistry, + kibanaFeatures, + }); + }, + }); + if (this.experimentalFeatures.internalAlertsTable) { registerAlertsTableConfiguration({ alertsTableConfigurationRegistry: this.alertsTableConfigurationRegistry, diff --git a/x-pack/plugins/watcher/public/plugin.ts b/x-pack/plugins/watcher/public/plugin.ts index 8f3f549654130..9a6564e6e286c 100644 --- a/x-pack/plugins/watcher/public/plugin.ts +++ b/x-pack/plugins/watcher/public/plugin.ts @@ -41,7 +41,7 @@ export class WatcherUIPlugin implements Plugin { const watcherESApp = esSection.registerApp({ id: 'watcher', title: pluginName, - order: 3, + order: 5, mount: async ({ element, setBreadcrumbs, history, theme$ }) => { const [coreStart] = await getStartServices(); const { diff --git a/x-pack/test/functional/apps/management/feature_controls/management_security.ts b/x-pack/test/functional/apps/management/feature_controls/management_security.ts index c1e09d9f3eaab..87e6e4611a3fd 100644 --- a/x-pack/test/functional/apps/management/feature_controls/management_security.ts +++ b/x-pack/test/functional/apps/management/feature_controls/management_security.ts @@ -64,7 +64,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(sections).to.have.length(2); expect(sections[0]).to.eql({ sectionId: 'insightsAndAlerting', - sectionLinks: ['triggersActions', 'cases', 'jobsListLink'], + sectionLinks: ['triggersActions', 'cases', 'triggersActionsConnectors', 'jobsListLink'], }); expect(sections[1]).to.eql({ sectionId: 'kibana', diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts index d2ad05486a18a..ea9ee9ddbdf38 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts @@ -122,7 +122,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { afterEach(async () => { // Reset the Rules tab without reloading the entire page // This is safer than trying to close the alert flyout, which may or may not be open at the end of a test - await testSubjects.click('connectorsTab'); + await testSubjects.click('logsTab'); await testSubjects.click('rulesTab'); }); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors.ts index cabbadb43ac57..c0e9a145fe47e 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors.ts @@ -18,6 +18,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const retry = getService('retry'); const supertest = getService('supertest'); const objectRemover = new ObjectRemover(supertest); + const browser = getService('browser'); describe('Connectors', function () { before(async () => { @@ -26,8 +27,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { .set('kbn-xsrf', 'foo') .send(getTestActionData()) .expect(200); - await pageObjects.common.navigateToApp('triggersActions'); - await testSubjects.click('connectorsTab'); + await pageObjects.common.navigateToApp('triggersActionsConnectors'); objectRemover.add(createdAction.id, 'action', 'actions'); }); @@ -75,6 +75,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const updatedConnectorName = `${connectorName}updated`; const createdAction = await createConnector(connectorName); objectRemover.add(createdAction.id, 'action', 'actions'); + await browser.refresh(); await pageObjects.triggersActionsUI.searchConnectors(connectorName); @@ -112,6 +113,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const indexName = generateUniqueKey(); const createdAction = await createIndexConnector(connectorName, indexName); objectRemover.add(createdAction.id, 'action', 'actions'); + await browser.refresh(); await pageObjects.triggersActionsUI.searchConnectors(connectorName); @@ -141,6 +143,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const indexName = generateUniqueKey(); const createdAction = await createIndexConnector(connectorName, indexName); objectRemover.add(createdAction.id, 'action', 'actions'); + await browser.refresh(); await pageObjects.triggersActionsUI.searchConnectors(connectorName); @@ -168,6 +171,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const connectorName = generateUniqueKey(); const createdAction = await createConnector(connectorName); objectRemover.add(createdAction.id, 'action', 'actions'); + await browser.refresh(); + await pageObjects.triggersActionsUI.searchConnectors(connectorName); const searchResultsBeforeEdit = await pageObjects.triggersActionsUI.getConnectorsList(); @@ -195,6 +200,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await createConnector(connectorName); const createdAction = await createConnector(generateUniqueKey()); objectRemover.add(createdAction.id, 'action', 'actions'); + await browser.refresh(); await pageObjects.triggersActionsUI.searchConnectors(connectorName); @@ -220,6 +226,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await createConnector(connectorName); const createdAction = await createConnector(generateUniqueKey()); objectRemover.add(createdAction.id, 'action', 'actions'); + await browser.refresh(); await pageObjects.triggersActionsUI.searchConnectors(connectorName); @@ -285,7 +292,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { connector_type_id: '.slack', }) .expect(200); - await testSubjects.click('connectorsTab'); return createdAction; } @@ -303,7 +309,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { secrets: {}, }) .expect(200); - await testSubjects.click('connectorsTab'); return createdAction; } diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts index 7af323fdee7c1..6c5de895ed1fd 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts @@ -437,7 +437,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await testSubjects.existOrFail('rulesList'); // delete connector - await pageObjects.triggersActionsUI.changeTabs('connectorsTab'); + await pageObjects.common.navigateToApp('triggersActionsConnectors'); await pageObjects.triggersActionsUI.searchConnectors(connector.name); await testSubjects.click('deleteConnector'); await testSubjects.existOrFail('deleteIdsConfirmation'); @@ -447,8 +447,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const toastTitle = await pageObjects.common.closeToast(); expect(toastTitle).to.eql('Deleted 1 connector'); + // Wait to ensure the table is finished loading + await pageObjects.triggersActionsUI.tableFinishedLoading(); + // click on first alert - await pageObjects.triggersActionsUI.changeTabs('rulesTab'); + await pageObjects.common.navigateToApp('triggersActions'); await pageObjects.triggersActionsUI.clickOnAlertInAlertsList(rule.name); const editButton = await testSubjects.find('openEditRuleFlyoutButton'); @@ -501,7 +504,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await testSubjects.existOrFail('rulesList'); // delete connector - await pageObjects.triggersActionsUI.changeTabs('connectorsTab'); + await pageObjects.common.navigateToApp('triggersActionsConnectors'); await pageObjects.triggersActionsUI.searchConnectors(connector.name); await testSubjects.click('deleteConnector'); await testSubjects.existOrFail('deleteIdsConfirmation'); @@ -511,8 +514,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const toastTitle = await pageObjects.common.closeToast(); expect(toastTitle).to.eql('Deleted 1 connector'); + // Wait to ensure the table is finished loading + await pageObjects.triggersActionsUI.tableFinishedLoading(); + // click on first rule - await pageObjects.triggersActionsUI.changeTabs('rulesTab'); + await pageObjects.common.navigateToApp('triggersActions'); await pageObjects.triggersActionsUI.clickOnAlertInAlertsList(alert.name); const editButton = await testSubjects.find('openEditRuleFlyoutButton'); @@ -553,7 +559,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { // verify content await testSubjects.existOrFail('rulesList'); - await pageObjects.triggersActionsUI.changeTabs('connectorsTab'); + await pageObjects.common.navigateToApp('triggersActionsConnectors'); await pageObjects.triggersActionsUI.searchConnectors('new connector'); await testSubjects.click('deleteConnector'); await testSubjects.existOrFail('deleteIdsConfirmation'); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts index 4769f01e8d4f0..77ece6d043a59 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts @@ -31,7 +31,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('Loads the Alerts page', async () => { await pageObjects.common.navigateToApp('triggersActions'); const headingText = await pageObjects.triggersActionsUI.getSectionHeadingText(); - expect(headingText).to.be('Rules and Connectors'); + expect(headingText).to.be('Rules'); }); }); @@ -45,8 +45,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('Loads the Alerts page but with error', async () => { await pageObjects.common.navigateToApp('triggersActions'); - const headingText = await pageObjects.triggersActionsUI.getRulesListTitle(); - expect(headingText).to.be('No permissions to create rules'); + const exists = await testSubjects.exists('noPermissionPrompt'); + expect(exists).to.be(true); }); }); @@ -60,26 +60,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); it('Loads the Alerts page', async () => { - await log.debug('Checking for section heading to say Rules and Connectors.'); + await log.debug('Checking for section heading to say Rules.'); const headingText = await pageObjects.triggersActionsUI.getSectionHeadingText(); - expect(headingText).to.be('Rules and Connectors'); - }); - - describe('Connectors tab', () => { - it('renders the connectors tab', async () => { - // Navigate to the connectors tab - await pageObjects.triggersActionsUI.changeTabs('connectorsTab'); - - await pageObjects.header.waitUntilLoadingHasFinished(); - - // Verify url - const url = await browser.getCurrentUrl(); - expect(url).to.contain(`/connectors`); - - // Verify content - await testSubjects.existOrFail('actionsList'); - }); + expect(headingText).to.be('Rules'); }); describe('Alerts tab', () => { diff --git a/x-pack/test/functional_with_es_ssl/config.ts b/x-pack/test/functional_with_es_ssl/config.ts index fea3ffcf9233d..36b2b0ae44aee 100644 --- a/x-pack/test/functional_with_es_ssl/config.ts +++ b/x-pack/test/functional_with_es_ssl/config.ts @@ -61,6 +61,9 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { triggersActions: { pathname: '/app/management/insightsAndAlerting/triggersActions', }, + triggersActionsConnectors: { + pathname: '/app/management/insightsAndAlerting/triggersActionsConnectors', + }, }, esTestCluster: { ...xpackFunctionalConfig.get('esTestCluster'), diff --git a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts index 2b17eb48a2afc..d26b1124f8271 100644 --- a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts +++ b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts @@ -61,6 +61,11 @@ export function TriggersActionsPageProvider({ getService }: FtrProviderContext) await this.clickCreateFirstConnectorButton(); } }, + async tableFinishedLoading() { + await find.byCssSelector( + '.euiBasicTable[data-test-subj="actionsTable"]:not(.euiBasicTable-loading)' + ); + }, async searchConnectors(searchText: string) { const searchBox = await find.byCssSelector('[data-test-subj="actionsList"] .euiFieldSearch'); await searchBox.click(); From 97eb9b61632f90648b04162e5c1c0dc153ecbd08 Mon Sep 17 00:00:00 2001 From: Kevin Logan <56395104+kevinlog@users.noreply.github.com> Date: Thu, 13 Oct 2022 12:14:47 -0400 Subject: [PATCH 21/35] [Security Solution] Move component tests to jest integration (#143233) --- .../search_bar.test.tsx | 20 +++++++++---------- .../event_filters_list.test.tsx | 14 ++++++------- .../{ => integration_tests}/index.test.tsx | 17 ++++++++-------- 3 files changed, 24 insertions(+), 27 deletions(-) rename x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/{ => integration_tests}/search_bar.test.tsx (84%) rename x-pack/plugins/security_solution/public/management/pages/event_filters/view/{ => integration_tests}/event_filters_list.test.tsx (79%) rename x-pack/plugins/security_solution/public/management/pages/{ => integration_tests}/index.test.tsx (68%) diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx similarity index 84% rename from x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.test.tsx rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx index 57611fcdf2484..1b1debe616844 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx @@ -6,18 +6,17 @@ */ import React from 'react'; -import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; -import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; -import { endpointPageHttpMock } from '../../mocks'; +import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; +import { endpointPageHttpMock } from '../../../mocks'; import { act, waitFor, cleanup } from '@testing-library/react'; -import { getEndpointListPath } from '../../../../common/routing'; -import { AdminSearchBar } from './search_bar'; +import { getEndpointListPath } from '../../../../../common/routing'; +import { AdminSearchBar } from '../search_bar'; import { fireEvent } from '@testing-library/dom'; -import { uiQueryParams } from '../../store/selectors'; -import type { EndpointIndexUIQueryParams } from '../../types'; +import { uiQueryParams } from '../../../store/selectors'; +import type { EndpointIndexUIQueryParams } from '../../../types'; -// FLAKY: https://github.com/elastic/kibana/issues/140618 -describe.skip('when rendering the endpoint list `AdminSearchBar`', () => { +describe('when rendering the endpoint list `AdminSearchBar`', () => { let render: ( urlParams?: EndpointIndexUIQueryParams ) => Promise>; @@ -85,8 +84,7 @@ describe.skip('when rendering the endpoint list `AdminSearchBar`', () => { expect(getQueryParamsFromStore().admin_query).toBe("(language:kuery,query:'host.name: foo')"); }); - // FLAKY: https://github.com/elastic/kibana/issues/132398 - it.skip.each([ + it.each([ ['nothing', ''], ['spaces', ' '], ])( diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/integration_tests/event_filters_list.test.tsx similarity index 79% rename from x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.test.tsx rename to x-pack/plugins/security_solution/public/management/pages/event_filters/view/integration_tests/event_filters_list.test.tsx index 0ef525418f385..75b35eaea2be7 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/integration_tests/event_filters_list.test.tsx @@ -8,13 +8,13 @@ import { act, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; -import { EVENT_FILTERS_PATH } from '../../../../../common/constants'; -import type { AppContextTestRender } from '../../../../common/mock/endpoint'; -import { createAppRootMockRenderer } from '../../../../common/mock/endpoint'; -import { EventFiltersList } from './event_filters_list'; -import { exceptionsListAllHttpMocks } from '../../../mocks/exceptions_list_http_mocks'; -import { SEARCHABLE_FIELDS } from '../constants'; -import { parseQueryFilterToKQL } from '../../../common/utils'; +import { EVENT_FILTERS_PATH } from '../../../../../../common/constants'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; +import { EventFiltersList } from '../event_filters_list'; +import { exceptionsListAllHttpMocks } from '../../../../mocks/exceptions_list_http_mocks'; +import { SEARCHABLE_FIELDS } from '../../constants'; +import { parseQueryFilterToKQL } from '../../../../common/utils'; describe('When on the Event Filters list page', () => { let render: () => ReturnType; diff --git a/x-pack/plugins/security_solution/public/management/pages/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/integration_tests/index.test.tsx similarity index 68% rename from x-pack/plugins/security_solution/public/management/pages/index.test.tsx rename to x-pack/plugins/security_solution/public/management/pages/integration_tests/index.test.tsx index 1df471633c3c2..0fcc8aa1f0ca5 100644 --- a/x-pack/plugins/security_solution/public/management/pages/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/integration_tests/index.test.tsx @@ -7,14 +7,14 @@ import React from 'react'; -import { ManagementContainer } from '.'; -import '../../common/mock/match_media'; -import type { AppContextTestRender } from '../../common/mock/endpoint'; -import { createAppRootMockRenderer } from '../../common/mock/endpoint'; -import { useUserPrivileges } from '../../common/components/user_privileges'; -import { endpointPageHttpMock } from './endpoint_hosts/mocks'; +import { ManagementContainer } from '..'; +import '../../../common/mock/match_media'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import { useUserPrivileges } from '../../../common/components/user_privileges'; +import { endpointPageHttpMock } from '../endpoint_hosts/mocks'; -jest.mock('../../common/components/user_privileges'); +jest.mock('../../../common/components/user_privileges'); describe('when in the Administration tab', () => { let render: () => ReturnType; @@ -34,8 +34,7 @@ describe('when in the Administration tab', () => { expect(await render().findByTestId('noIngestPermissions')).not.toBeNull(); }); - // FLAKY: https://github.com/elastic/kibana/issues/135166 - it.skip('should display the Management view if user has privileges', async () => { + it('should display the Management view if user has privileges', async () => { (useUserPrivileges as jest.Mock).mockReturnValue({ endpointPrivileges: { loading: false, canAccessEndpointManagement: true }, }); From e45170e50ab2bf2e5a3fcf5d98f30e4ba298d8cd Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Thu, 13 Oct 2022 10:23:43 -0600 Subject: [PATCH 22/35] [Maps] layer groups (#142528) * [Maps] layer groups * createLayerGroup * create layer group * setChildren * display layer group legend * display nested layers in TOC * setLayerVisibility * set parent on layer re-order * LayerGroup.getBounds * clean-up LayerGroup * edit layer panel * LayerGroup.cloneDescriptor * clean up * remove layer * fix reorder bug * move children on layer move * fix re-order bug when dragging layer group with collapsed details * add check for dragging to same location * add logic to prevent dragging layer group into its own family tree * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * add layer to layer group combine action with layer group * clean up * fix bug where unable to move layer to bottom * mouse cursor styles * clean up combine styling * fix jest tests * update toc_entry_actions_popover snapshots * click confirm model on removeLayer in functional tests * update cloneLayer to move clones beneath parent * LayerGroup.getErrors * Update x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts Co-authored-by: Nick Peihl * fix show this layer only action when layer is nested * recursive count children for remove layer warning * Update x-pack/plugins/maps/public/components/remove_layer_confirm_modal.tsx Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * resolve error with show this layer only on layer group * update remove statement to support plural * perserve layer order when cloning layer group Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Nick Peihl Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- x-pack/plugins/maps/common/constants.ts | 1 + .../layer_descriptor_types.ts | 8 + .../public/actions/data_request_actions.ts | 69 +- .../maps/public/actions/get_layers_extent.tsx | 66 + x-pack/plugins/maps/public/actions/index.ts | 1 + .../maps/public/actions/layer_actions.ts | 159 ++- .../layers/heatmap_layer/heatmap_layer.ts | 4 +- .../maps/public/classes/layers/layer.test.ts | 2 +- .../maps/public/classes/layers/layer.tsx | 26 +- .../classes/layers/layer_group/index.ts | 8 + .../layers/layer_group/layer_group.tsx | 385 +++++ .../blended_vector_layer.test.tsx | 8 +- .../blended_vector_layer.ts | 10 +- .../geojson_vector_layer.tsx | 12 +- .../mvt_vector_layer/mvt_vector_layer.tsx | 19 +- .../layers/vector_layer/vector_layer.test.tsx | 8 +- .../layers/vector_layer/vector_layer.tsx | 15 +- .../components/remove_layer_confirm_modal.tsx | 74 + .../edit_layer_panel/edit_layer_panel.tsx | 108 +- .../flyout_footer/flyout_footer.tsx | 139 +- .../edit_layer_panel/flyout_footer/index.ts | 3 +- .../layer_settings/layer_settings.tsx | 13 +- .../layer_control/_index.scss | 1 + .../__snapshots__/layer_toc.test.tsx.snap | 7 + .../layer_control/layer_toc/_layer_toc.scss | 11 + .../layer_control/layer_toc/index.ts | 18 +- .../layer_toc/layer_toc.test.tsx | 12 +- .../layer_control/layer_toc/layer_toc.tsx | 232 ++- .../__snapshots__/toc_entry.test.tsx.snap | 92 ++ .../layer_toc/toc_entry/toc_entry.test.tsx | 12 + .../layer_toc/toc_entry/toc_entry.tsx | 7 +- .../toc_entry_actions_popover.test.tsx.snap | 1256 +++++++++-------- .../toc_entry_actions_popover.tsx | 70 +- .../toc_entry_button/toc_entry_button.tsx | 141 +- .../maps/public/reducers/map/layer_utils.ts | 7 +- .../maps/public/selectors/map_selectors.ts | 32 +- .../test/functional/page_objects/gis_page.ts | 1 + 37 files changed, 2063 insertions(+), 974 deletions(-) create mode 100644 x-pack/plugins/maps/public/actions/get_layers_extent.tsx create mode 100644 x-pack/plugins/maps/public/classes/layers/layer_group/index.ts create mode 100644 x-pack/plugins/maps/public/classes/layers/layer_group/layer_group.tsx create mode 100644 x-pack/plugins/maps/public/components/remove_layer_confirm_modal.tsx create mode 100644 x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/_layer_toc.scss diff --git a/x-pack/plugins/maps/common/constants.ts b/x-pack/plugins/maps/common/constants.ts index 96318890a2d94..94ae72a050e21 100644 --- a/x-pack/plugins/maps/common/constants.ts +++ b/x-pack/plugins/maps/common/constants.ts @@ -53,6 +53,7 @@ export enum LAYER_TYPE { HEATMAP = 'HEATMAP', BLENDED_VECTOR = 'BLENDED_VECTOR', MVT_VECTOR = 'MVT_VECTOR', + LAYER_GROUP = 'LAYER_GROUP', } export enum SOURCE_TYPES { diff --git a/x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts b/x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts index 160a34f8bcc0d..a547ef9c6d93a 100644 --- a/x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts +++ b/x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts @@ -71,6 +71,7 @@ export type LayerDescriptor = { style?: StyleDescriptor | null; query?: Query; includeInFitToBounds?: boolean; + parent?: string; }; export type VectorLayerDescriptor = LayerDescriptor & { @@ -89,3 +90,10 @@ export type EMSVectorTileLayerDescriptor = LayerDescriptor & { type: LAYER_TYPE.EMS_VECTOR_TILE; style: EMSVectorTileStyleDescriptor; }; + +export type LayerGroupDescriptor = LayerDescriptor & { + type: LAYER_TYPE.LAYER_GROUP; + label: string; + sourceDescriptor: null; + visible: boolean; +}; diff --git a/x-pack/plugins/maps/public/actions/data_request_actions.ts b/x-pack/plugins/maps/public/actions/data_request_actions.ts index b5ce42ebefc09..5e27b488065ab 100644 --- a/x-pack/plugins/maps/public/actions/data_request_actions.ts +++ b/x-pack/plugins/maps/public/actions/data_request_actions.ts @@ -9,9 +9,7 @@ import { AnyAction, Dispatch } from 'redux'; import { ThunkDispatch } from 'redux-thunk'; -import bbox from '@turf/bbox'; import uuid from 'uuid/v4'; -import { multiPoint } from '@turf/helpers'; import { FeatureCollection } from 'geojson'; import { Adapters } from '@kbn/inspector-plugin/common/adapters'; import { MapStoreState } from '../reducers/store'; @@ -49,7 +47,9 @@ import { ILayer } from '../classes/layers/layer'; import { IVectorLayer } from '../classes/layers/vector_layer'; import { DataRequestMeta, MapExtent, DataFilters } from '../../common/descriptor_types'; import { DataRequestAbortError } from '../classes/util/data_request'; -import { scaleBounds, turfBboxToBounds } from '../../common/elasticsearch_util'; +import { scaleBounds } from '../../common/elasticsearch_util'; +import { getLayersExtent } from './get_layers_extent'; +import { isLayerGroup } from '../classes/layers/layer_group'; const FIT_TO_BOUNDS_SCALE_FACTOR = 0.1; @@ -101,7 +101,7 @@ export function cancelAllInFlightRequests() { export function updateStyleMeta(layerId: string | null) { return async (dispatch: Dispatch, getState: () => MapStoreState) => { const layer = getLayerById(layerId, getState()); - if (!layer) { + if (!layer || isLayerGroup(layer)) { return; } @@ -378,8 +378,8 @@ export function fitToLayerExtent(layerId: string) { if (targetLayer) { try { - const bounds = await targetLayer.getBounds( - getDataRequestContext(dispatch, getState, layerId, false, false) + const bounds = await targetLayer.getBounds((boundsLayerId) => + getDataRequestContext(dispatch, getState, boundsLayerId, false, false) ); if (bounds) { await dispatch(setGotoWithBounds(scaleBounds(bounds, FIT_TO_BOUNDS_SCALE_FACTOR))); @@ -401,65 +401,22 @@ export function fitToLayerExtent(layerId: string) { export function fitToDataBounds(onNoBounds?: () => void) { return async (dispatch: Dispatch, getState: () => MapStoreState) => { - const layerList = getLayerList(getState()); - - if (!layerList.length) { - return; - } - - const boundsPromises = layerList.map(async (layer: ILayer) => { - if (!(await layer.isFittable())) { - return null; - } - return layer.getBounds( - getDataRequestContext(dispatch, getState, layer.getId(), false, false) - ); + const rootLayers = getLayerList(getState()).filter((layer) => { + return layer.getParent() === undefined; }); - let bounds; - try { - bounds = await Promise.all(boundsPromises); - } catch (error) { - if (!(error instanceof DataRequestAbortError)) { - // eslint-disable-next-line no-console - console.warn( - 'Unhandled getBounds error for layer. Only DataRequestAbortError should be surfaced', - error - ); - } - // new fitToDataBounds request has superseded this thread of execution. Results no longer needed. - return; - } - - const corners = []; - for (let i = 0; i < bounds.length; i++) { - const b = bounds[i]; - - // filter out undefined bounds (uses Infinity due to turf responses) - if ( - b === null || - b.minLon === Infinity || - b.maxLon === Infinity || - b.minLat === -Infinity || - b.maxLat === -Infinity - ) { - continue; - } - - corners.push([b.minLon, b.minLat]); - corners.push([b.maxLon, b.maxLat]); - } + const extent = await getLayersExtent(rootLayers, (boundsLayerId) => + getDataRequestContext(dispatch, getState, boundsLayerId, false, false) + ); - if (!corners.length) { + if (extent === null) { if (onNoBounds) { onNoBounds(); } return; } - const dataBounds = turfBboxToBounds(bbox(multiPoint(corners))); - - dispatch(setGotoWithBounds(scaleBounds(dataBounds, FIT_TO_BOUNDS_SCALE_FACTOR))); + dispatch(setGotoWithBounds(scaleBounds(extent, FIT_TO_BOUNDS_SCALE_FACTOR))); }; } diff --git a/x-pack/plugins/maps/public/actions/get_layers_extent.tsx b/x-pack/plugins/maps/public/actions/get_layers_extent.tsx new file mode 100644 index 0000000000000..81d8367bd2803 --- /dev/null +++ b/x-pack/plugins/maps/public/actions/get_layers_extent.tsx @@ -0,0 +1,66 @@ +/* + * 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 bbox from '@turf/bbox'; +import { multiPoint } from '@turf/helpers'; +import { MapExtent } from '../../common/descriptor_types'; +import { turfBboxToBounds } from '../../common/elasticsearch_util'; +import { ILayer } from '../classes/layers/layer'; +import type { DataRequestContext } from './data_request_actions'; +import { DataRequestAbortError } from '../classes/util/data_request'; + +export async function getLayersExtent( + layers: ILayer[], + getDataRequestContext: (layerId: string) => DataRequestContext +): Promise { + if (!layers.length) { + return null; + } + + const boundsPromises = layers.map(async (layer: ILayer) => { + if (!(await layer.isFittable())) { + return null; + } + return layer.getBounds(getDataRequestContext); + }); + + let bounds; + try { + bounds = await Promise.all(boundsPromises); + } catch (error) { + if (!(error instanceof DataRequestAbortError)) { + // eslint-disable-next-line no-console + console.warn( + 'Unhandled getBounds error for layer. Only DataRequestAbortError should be surfaced', + error + ); + } + // new fitToDataBounds request has superseded this thread of execution. Results no longer needed. + return null; + } + + const corners = []; + for (let i = 0; i < bounds.length; i++) { + const b = bounds[i]; + + // filter out undefined bounds (uses Infinity due to turf responses) + if ( + b === null || + b.minLon === Infinity || + b.maxLon === Infinity || + b.minLat === -Infinity || + b.maxLat === -Infinity + ) { + continue; + } + + corners.push([b.minLon, b.minLat]); + corners.push([b.maxLon, b.maxLat]); + } + + return corners.length ? turfBboxToBounds(bbox(multiPoint(corners))) : null; +} diff --git a/x-pack/plugins/maps/public/actions/index.ts b/x-pack/plugins/maps/public/actions/index.ts index 96db1cebe7d39..235f8d141411e 100644 --- a/x-pack/plugins/maps/public/actions/index.ts +++ b/x-pack/plugins/maps/public/actions/index.ts @@ -24,3 +24,4 @@ export { openOnHoverTooltip, updateOpenTooltips, } from './tooltip_actions'; +export { getLayersExtent } from './get_layers_extent'; diff --git a/x-pack/plugins/maps/public/actions/layer_actions.ts b/x-pack/plugins/maps/public/actions/layer_actions.ts index 317f6e09053e5..5ba9edaee58d0 100644 --- a/x-pack/plugins/maps/public/actions/layer_actions.ts +++ b/x-pack/plugins/maps/public/actions/layer_actions.ts @@ -75,6 +75,7 @@ import { IESAggField } from '../classes/fields/agg'; import { IField } from '../classes/fields/field'; import type { IESSource } from '../classes/sources/es_source'; import { getDrawMode, getOpenTOCDetails } from '../selectors/ui_selectors'; +import { isLayerGroup, LayerGroup } from '../classes/layers/layer_group'; export function trackCurrentLayerState(layerId: string) { return { @@ -160,8 +161,12 @@ export function cloneLayer(layerId: string) { return; } - const clonedDescriptor = await layer.cloneDescriptor(); - dispatch(addLayer(clonedDescriptor)); + (await layer.cloneDescriptor()).forEach((layerDescriptor) => { + dispatch(addLayer(layerDescriptor)); + if (layer.getParent()) { + dispatch(moveLayerToLeftOfTarget(layerDescriptor.id, layerId)); + } + }); }; } @@ -249,12 +254,19 @@ export function setLayerVisibility(layerId: string, makeVisible: boolean) { dispatch: ThunkDispatch, getState: () => MapStoreState ) => { - // if the current-state is invisible, we also want to sync data - // e.g. if a layer was invisible at start-up, it won't have any data loaded const layer = getLayerById(layerId, getState()); + if (!layer) { + return; + } + + if (isLayerGroup(layer)) { + (layer as LayerGroup).getChildren().forEach((childLayer) => { + dispatch(setLayerVisibility(childLayer.getId(), makeVisible)); + }); + } // If the layer visibility is already what we want it to be, do nothing - if (!layer || layer.isVisible() === makeVisible) { + if (layer.isVisible() === makeVisible) { return; } @@ -263,6 +275,9 @@ export function setLayerVisibility(layerId: string, makeVisible: boolean) { layerId, visibility: makeVisible, }); + + // if the current-state is invisible, we also want to sync data + // e.g. if a layer was invisible at start-up, it won't have any data loaded if (makeVisible) { dispatch(syncDataForLayerId(layerId, false)); } @@ -290,7 +305,7 @@ export function hideAllLayers() { getState: () => MapStoreState ) => { getLayerList(getState()).forEach((layer: ILayer, index: number) => { - if (layer.isVisible() && !layer.isBasemap(index)) { + if (!layer.isBasemap(index)) { dispatch(setLayerVisibility(layer.getId(), false)); } }); @@ -303,9 +318,7 @@ export function showAllLayers() { getState: () => MapStoreState ) => { getLayerList(getState()).forEach((layer: ILayer, index: number) => { - if (!layer.isVisible()) { - dispatch(setLayerVisibility(layer.getId(), true)); - } + dispatch(setLayerVisibility(layer.getId(), true)); }); }; } @@ -316,23 +329,20 @@ export function showThisLayerOnly(layerId: string) { getState: () => MapStoreState ) => { getLayerList(getState()).forEach((layer: ILayer, index: number) => { - if (layer.isBasemap(index)) { - return; - } - - // show target layer - if (layer.getId() === layerId) { - if (!layer.isVisible()) { - dispatch(setLayerVisibility(layerId, true)); - } + if (layer.isBasemap(index) || layer.getId() === layerId) { return; } // hide all other layers - if (layer.isVisible()) { - dispatch(setLayerVisibility(layer.getId(), false)); - } + dispatch(setLayerVisibility(layer.getId(), false)); }); + + // show target layer after hiding all other layers + // since hiding layer group will hide its children + const targetLayer = getLayerById(layerId, getState()); + if (targetLayer) { + dispatch(setLayerVisibility(layerId, true)); + } }; } @@ -602,6 +612,15 @@ export function setLayerQuery(id: string, query: Query) { }; } +export function setLayerParent(id: string, parent: string | undefined) { + return { + type: UPDATE_LAYER_PROP, + id, + propName: 'parent', + newValue: parent, + }; +} + export function removeSelectedLayer() { return ( dispatch: ThunkDispatch, @@ -657,6 +676,12 @@ function removeLayerFromLayerList(layerId: string) { if (openTOCDetails.includes(layerId)) { dispatch(hideTOCDetails(layerId)); } + + if (isLayerGroup(layerGettingRemoved)) { + (layerGettingRemoved as LayerGroup).getChildren().forEach((childLayer) => { + dispatch(removeLayerFromLayerList(childLayer.getId())); + }); + } }; } @@ -786,7 +811,7 @@ export function updateMetaFromTiles(layerId: string, mbMetaFeatures: TileMetaFea } function clearInspectorAdapters(layer: ILayer, adapters: Adapters) { - if (!layer.getSource().isESSource()) { + if (isLayerGroup(layer) || !layer.getSource().isESSource()) { return; } @@ -811,3 +836,93 @@ function hasByValueStyling(styleDescriptor: StyleDescriptor) { }) ); } + +export function createLayerGroup(draggedLayerId: string, combineLayerId: string) { + return ( + dispatch: ThunkDispatch, + getState: () => MapStoreState + ) => { + const group = LayerGroup.createDescriptor({}); + const combineLayerDescriptor = getLayerDescriptor(getState(), combineLayerId); + if (combineLayerDescriptor?.parent) { + group.parent = combineLayerDescriptor.parent; + } + dispatch({ + type: ADD_LAYER, + layer: group, + }); + // Move group to left of combine-layer + dispatch(moveLayerToLeftOfTarget(group.id, combineLayerId)); + + dispatch(showTOCDetails(group.id)); + dispatch(setLayerParent(draggedLayerId, group.id)); + dispatch(setLayerParent(combineLayerId, group.id)); + + // Move dragged-layer to left of combine-layer + dispatch(moveLayerToLeftOfTarget(draggedLayerId, combineLayerId)); + }; +} + +export function moveLayerToLeftOfTarget(moveLayerId: string, targetLayerId: string) { + return ( + dispatch: ThunkDispatch, + getState: () => MapStoreState + ) => { + const layers = getLayerList(getState()); + const moveLayerIndex = layers.findIndex((layer) => layer.getId() === moveLayerId); + const targetLayerIndex = layers.findIndex((layer) => layer.getId() === targetLayerId); + if (moveLayerIndex === -1 || targetLayerIndex === -1) { + return; + } + const moveLayer = layers[moveLayerIndex]; + + const newIndex = + moveLayerIndex > targetLayerIndex + ? // When layer is moved to the right, new left sibling index is to the left of destination + targetLayerIndex + 1 + : // When layer is moved to the left, new left sibling index is the destination index + targetLayerIndex; + const newOrder = []; + for (let i = 0; i < layers.length; i++) { + newOrder.push(i); + } + newOrder.splice(moveLayerIndex, 1); + newOrder.splice(newIndex, 0, moveLayerIndex); + dispatch(updateLayerOrder(newOrder)); + + if (isLayerGroup(moveLayer)) { + (moveLayer as LayerGroup).getChildren().forEach((childLayer) => { + dispatch(moveLayerToLeftOfTarget(childLayer.getId(), targetLayerId)); + }); + } + }; +} + +export function moveLayerToBottom(moveLayerId: string) { + return ( + dispatch: ThunkDispatch, + getState: () => MapStoreState + ) => { + const layers = getLayerList(getState()); + const moveLayerIndex = layers.findIndex((layer) => layer.getId() === moveLayerId); + if (moveLayerIndex === -1) { + return; + } + const moveLayer = layers[moveLayerIndex]; + + const newIndex = 0; + const newOrder = []; + for (let i = 0; i < layers.length; i++) { + newOrder.push(i); + } + newOrder.splice(moveLayerIndex, 1); + newOrder.splice(newIndex, 0, moveLayerIndex); + dispatch(updateLayerOrder(newOrder)); + + if (isLayerGroup(moveLayer)) { + (moveLayer as LayerGroup).getChildren().forEach((childLayer) => { + dispatch(moveLayerToBottom(childLayer.getId())); + }); + } + }; +} diff --git a/x-pack/plugins/maps/public/classes/layers/heatmap_layer/heatmap_layer.ts b/x-pack/plugins/maps/public/classes/layers/heatmap_layer/heatmap_layer.ts index ec9cec3a914ba..bc013cb958a4f 100644 --- a/x-pack/plugins/maps/public/classes/layers/heatmap_layer/heatmap_layer.ts +++ b/x-pack/plugins/maps/public/classes/layers/heatmap_layer/heatmap_layer.ts @@ -200,10 +200,10 @@ export class HeatmapLayer extends AbstractLayer { return this.getCurrentStyle().renderLegendDetails(metricFields[0]); } - async getBounds(syncContext: DataRequestContext) { + async getBounds(getDataRequestContext: (layerId: string) => DataRequestContext) { return await syncBoundsData({ layerId: this.getId(), - syncContext, + syncContext: getDataRequestContext(this.getId()), source: this.getSource(), sourceQuery: this.getQuery(), }); diff --git a/x-pack/plugins/maps/public/classes/layers/layer.test.ts b/x-pack/plugins/maps/public/classes/layers/layer.test.ts index 194b41680872c..908c38a2eef27 100644 --- a/x-pack/plugins/maps/public/classes/layers/layer.test.ts +++ b/x-pack/plugins/maps/public/classes/layers/layer.test.ts @@ -18,7 +18,7 @@ class MockSource { this._fitToBounds = fitToBounds; } cloneDescriptor() { - return {}; + return [{}]; } async supportsFitToBounds() { diff --git a/x-pack/plugins/maps/public/classes/layers/layer.tsx b/x-pack/plugins/maps/public/classes/layers/layer.tsx index b01f2b9b8ca04..ef1a72649bbf0 100644 --- a/x-pack/plugins/maps/public/classes/layers/layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/layer.tsx @@ -20,7 +20,6 @@ import { MAX_ZOOM, MB_SOURCE_ID_LAYER_ID_PREFIX_DELIMITER, MIN_ZOOM, - SOURCE_BOUNDS_DATA_REQUEST_ID, SOURCE_DATA_REQUEST_ID, } from '../../../common/constants'; import { copyPersistentState } from '../../reducers/copy_persistent_state'; @@ -41,7 +40,9 @@ import { LICENSED_FEATURES } from '../../licensed_features'; import { IESSource } from '../sources/es_source'; export interface ILayer { - getBounds(dataRequestContext: DataRequestContext): Promise; + getBounds( + getDataRequestContext: (layerId: string) => DataRequestContext + ): Promise; getDataRequest(id: string): DataRequest | undefined; getDisplayName(source?: ISource): Promise; getId(): string; @@ -68,7 +69,6 @@ export interface ILayer { getImmutableSourceProperties(): Promise; renderSourceSettingsEditor(sourceEditorArgs: SourceEditorArgs): ReactElement | null; isLayerLoading(): boolean; - isLoadingBounds(): boolean; isFilteredByGlobalTime(): Promise; hasErrors(): boolean; getErrors(): string; @@ -92,7 +92,7 @@ export interface ILayer { getQueryableIndexPatternIds(): string[]; getType(): LAYER_TYPE; isVisible(): boolean; - cloneDescriptor(): Promise; + cloneDescriptor(): Promise; renderStyleEditor( onStyleDescriptorChange: (styleDescriptor: StyleDescriptor) => void, onCustomIconsChange: (customIcons: CustomIcon[]) => void @@ -117,6 +117,7 @@ export interface ILayer { getGeoFieldNames(): string[]; getStyleMetaDescriptorFromLocalFeatures(): Promise; isBasemap(order: number): boolean; + getParent(): string | undefined; } export type LayerIcon = { @@ -174,14 +175,14 @@ export class AbstractLayer implements ILayer { return this._descriptor; } - async cloneDescriptor(): Promise { + async cloneDescriptor(): Promise { const clonedDescriptor = copyPersistentState(this._descriptor); // layer id is uuid used to track styles/layers in mapbox clonedDescriptor.id = uuid(); const displayName = await this.getDisplayName(); clonedDescriptor.label = `Clone of ${displayName}`; clonedDescriptor.sourceDescriptor = this.getSource().cloneDescriptor(); - return clonedDescriptor; + return [clonedDescriptor]; } makeMbLayerId(layerNameSuffix: string): string { @@ -383,11 +384,6 @@ export class AbstractLayer implements ILayer { return areTilesLoading || this._dataRequests.some((dataRequest) => dataRequest.isLoading()); } - isLoadingBounds() { - const boundsDataRequest = this.getDataRequest(SOURCE_BOUNDS_DATA_REQUEST_ID); - return !!boundsDataRequest && boundsDataRequest.isLoading(); - } - hasErrors(): boolean { return _.get(this._descriptor, '__isInErrorState', false); } @@ -427,7 +423,9 @@ export class AbstractLayer implements ILayer { return sourceDataRequest ? sourceDataRequest.hasData() : false; } - async getBounds(dataRequestContext: DataRequestContext): Promise { + async getBounds( + getDataRequestContext: (layerId: string) => DataRequestContext + ): Promise { return null; } @@ -488,6 +486,10 @@ export class AbstractLayer implements ILayer { return false; } + getParent(): string | undefined { + return this._descriptor.parent; + } + _getMetaFromTiles(): TileMetaFeature[] { return this._descriptor.__metaFromTiles || []; } diff --git a/x-pack/plugins/maps/public/classes/layers/layer_group/index.ts b/x-pack/plugins/maps/public/classes/layers/layer_group/index.ts new file mode 100644 index 0000000000000..3b2848d03f5ff --- /dev/null +++ b/x-pack/plugins/maps/public/classes/layers/layer_group/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { isLayerGroup, LayerGroup } from './layer_group'; diff --git a/x-pack/plugins/maps/public/classes/layers/layer_group/layer_group.tsx b/x-pack/plugins/maps/public/classes/layers/layer_group/layer_group.tsx new file mode 100644 index 0000000000000..c0e3c4ee56402 --- /dev/null +++ b/x-pack/plugins/maps/public/classes/layers/layer_group/layer_group.tsx @@ -0,0 +1,385 @@ +/* + * 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 _ from 'lodash'; +import { i18n } from '@kbn/i18n'; +import type { Map as MbMap } from '@kbn/mapbox-gl'; +import type { Query } from '@kbn/es-query'; +import { asyncMap } from '@kbn/std'; +import React, { ReactElement } from 'react'; +import { EuiIcon } from '@elastic/eui'; +import uuid from 'uuid/v4'; +import { LAYER_TYPE, MAX_ZOOM, MIN_ZOOM } from '../../../../common/constants'; +import { DataRequest } from '../../util/data_request'; +import { copyPersistentState } from '../../../reducers/copy_persistent_state'; +import { + Attribution, + CustomIcon, + LayerDescriptor, + LayerGroupDescriptor, + MapExtent, + StyleDescriptor, + StyleMetaDescriptor, +} from '../../../../common/descriptor_types'; +import { ImmutableSourceProperty, ISource, SourceEditorArgs } from '../../sources/source'; +import { type DataRequestContext } from '../../../actions'; +import { getLayersExtent } from '../../../actions/get_layers_extent'; +import { ILayer, LayerIcon } from '../layer'; +import { IStyle } from '../../styles/style'; +import { LICENSED_FEATURES } from '../../../licensed_features'; + +export function isLayerGroup(layer: ILayer) { + return layer instanceof LayerGroup; +} + +export class LayerGroup implements ILayer { + protected readonly _descriptor: LayerGroupDescriptor; + private _children: ILayer[] = []; + + static createDescriptor(options: Partial): LayerGroupDescriptor { + return { + ...options, + type: LAYER_TYPE.LAYER_GROUP, + id: typeof options.id === 'string' && options.id.length ? options.id : uuid(), + label: + typeof options.label === 'string' && options.label.length + ? options.label + : i18n.translate('xpack.maps.layerGroup.defaultName', { + defaultMessage: 'Layer group', + }), + sourceDescriptor: null, + visible: typeof options.visible === 'boolean' ? options.visible : true, + }; + } + + constructor({ layerDescriptor }: { layerDescriptor: LayerGroupDescriptor }) { + this._descriptor = LayerGroup.createDescriptor(layerDescriptor); + } + + setChildren(children: ILayer[]) { + this._children = children; + } + + getChildren(): ILayer[] { + return [...this._children]; + } + + async _asyncSomeChildren(methodName: string) { + const promises = this.getChildren().map(async (child) => { + // @ts-ignore + return (child[methodName] as () => Promise)(); + }); + return ((await Promise.all(promises)) as boolean[]).some((result) => { + return result; + }); + } + + getDescriptor(): LayerGroupDescriptor { + return this._descriptor; + } + + async cloneDescriptor(): Promise { + const clonedDescriptor = copyPersistentState(this._descriptor); + clonedDescriptor.id = uuid(); + const displayName = await this.getDisplayName(); + clonedDescriptor.label = `Clone of ${displayName}`; + + const childrenDescriptors = await asyncMap(this.getChildren(), async (childLayer) => { + return (await childLayer.cloneDescriptor()).map((childLayerDescriptor) => { + if (childLayerDescriptor.parent === this.getId()) { + childLayerDescriptor.parent = clonedDescriptor.id; + } + return childLayerDescriptor; + }); + }); + + return [..._.flatten(childrenDescriptors), clonedDescriptor]; + } + + makeMbLayerId(layerNameSuffix: string): string { + throw new Error( + 'makeMbLayerId should not be called on LayerGroup, LayerGroup does not render to map' + ); + } + + isPreviewLayer(): boolean { + return !!this._descriptor.__isPreviewLayer; + } + + supportsElasticsearchFilters(): boolean { + return this.getChildren().some((child) => { + return child.supportsElasticsearchFilters(); + }); + } + + async supportsFitToBounds(): Promise { + return this._asyncSomeChildren('supportsFitToBounds'); + } + + async isFittable(): Promise { + return this._asyncSomeChildren('isFittable'); + } + + isIncludeInFitToBounds(): boolean { + return this.getChildren().some((child) => { + return child.isIncludeInFitToBounds(); + }); + } + + async isFilteredByGlobalTime(): Promise { + return this._asyncSomeChildren('isFilteredByGlobalTime'); + } + + async getDisplayName(source?: ISource): Promise { + return this.getLabel(); + } + + async getAttributions(): Promise { + return []; + } + + getStyleForEditing(): IStyle { + throw new Error( + 'getStyleForEditing should not be called on LayerGroup, LayerGroup does not render to map' + ); + } + + getStyle(): IStyle { + throw new Error( + 'getStyle should not be called on LayerGroup, LayerGroup does not render to map' + ); + } + + getCurrentStyle(): IStyle { + throw new Error( + 'getCurrentStyle should not be called on LayerGroup, LayerGroup does not render to map' + ); + } + + getLabel(): string { + return this._descriptor.label ? this._descriptor.label : ''; + } + + getLocale(): string | null { + return null; + } + + getLayerIcon(isTocIcon: boolean): LayerIcon { + return { + icon: , + tooltipContent: '', + }; + } + + async hasLegendDetails(): Promise { + return this._children.length > 0; + } + + renderLegendDetails(): ReactElement | null { + return null; + } + + getId(): string { + return this._descriptor.id; + } + + getSource(): ISource { + throw new Error( + 'getSource should not be called on LayerGroup, LayerGroup does not render to map' + ); + } + + getSourceForEditing(): ISource { + throw new Error( + 'getSourceForEditing should not be called on LayerGroup, LayerGroup does not render to map' + ); + } + + isVisible(): boolean { + return !!this._descriptor.visible; + } + + showAtZoomLevel(zoom: number): boolean { + return zoom >= this.getMinZoom() && zoom <= this.getMaxZoom(); + } + + getMinZoom(): number { + let min = MIN_ZOOM; + this._children.forEach((child) => { + min = Math.max(min, child.getMinZoom()); + }); + return min; + } + + getMaxZoom(): number { + let max = MAX_ZOOM; + this._children.forEach((child) => { + max = Math.min(max, child.getMaxZoom()); + }); + return max; + } + + getMinSourceZoom(): number { + let min = MIN_ZOOM; + this._children.forEach((child) => { + min = Math.max(min, child.getMinSourceZoom()); + }); + return min; + } + + getMbSourceId(): string { + throw new Error( + 'getMbSourceId should not be called on LayerGroup, LayerGroup does not render to map' + ); + } + + getAlpha(): number { + throw new Error( + 'getAlpha should not be called on LayerGroup, LayerGroup does not render to map' + ); + } + + getQuery(): Query | null { + return null; + } + + async getImmutableSourceProperties(): Promise { + return []; + } + + renderSourceSettingsEditor(sourceEditorArgs: SourceEditorArgs) { + return null; + } + + getPrevRequestToken(dataId: string): symbol | undefined { + return undefined; + } + + getInFlightRequestTokens(): symbol[] { + return []; + } + + getSourceDataRequest(): DataRequest | undefined { + return undefined; + } + + getDataRequest(id: string): DataRequest | undefined { + return undefined; + } + + isLayerLoading(): boolean { + return this._children.some((child) => { + return child.isLayerLoading(); + }); + } + + hasErrors(): boolean { + return this._children.some((child) => { + return child.hasErrors(); + }); + } + + getErrors(): string { + const firstChildWithError = this._children.find((child) => { + return child.hasErrors(); + }); + return firstChildWithError ? firstChildWithError.getErrors() : ''; + } + + async syncData(syncContext: DataRequestContext) { + // layer group does not render to map so there is never sync data request + } + + getMbLayerIds(): string[] { + return []; + } + + ownsMbLayerId(layerId: string): boolean { + return false; + } + + ownsMbSourceId(mbSourceId: string): boolean { + return false; + } + + syncLayerWithMB(mbMap: MbMap) { + // layer group does not render to map so there is never sync data request + } + + getLayerTypeIconName(): string { + return 'layers'; + } + + isInitialDataLoadComplete(): boolean { + return true; + } + + async getBounds( + getDataRequestContext: (layerId: string) => DataRequestContext + ): Promise { + return getLayersExtent(this.getChildren(), getDataRequestContext); + } + + renderStyleEditor( + onStyleDescriptorChange: (styleDescriptor: StyleDescriptor) => void, + onCustomIconsChange: (customIcons: CustomIcon[]) => void + ): ReactElement | null { + return null; + } + + getIndexPatternIds(): string[] { + return []; + } + + getQueryableIndexPatternIds(): string[] { + return []; + } + + syncVisibilityWithMb(mbMap: unknown, mbLayerId: string) { + throw new Error( + 'syncVisibilityWithMb should not be called on LayerGroup, LayerGroup does not render to map' + ); + } + + getType(): LAYER_TYPE { + return LAYER_TYPE.LAYER_GROUP; + } + + areLabelsOnTop(): boolean { + return false; + } + + supportsLabelsOnTop(): boolean { + return false; + } + + supportsLabelLocales(): boolean { + return false; + } + + async getLicensedFeatures(): Promise { + return []; + } + + getGeoFieldNames(): string[] { + return []; + } + + async getStyleMetaDescriptorFromLocalFeatures(): Promise { + throw new Error( + 'getStyleMetaDescriptorFromLocalFeatures should not be called on LayerGroup, LayerGroup does not render to map' + ); + } + + isBasemap(order: number): boolean { + return false; + } + + getParent(): string | undefined { + return this._descriptor.parent; + } +} diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/blended_vector_layer/blended_vector_layer.test.tsx b/x-pack/plugins/maps/public/classes/layers/vector_layer/blended_vector_layer/blended_vector_layer.test.tsx index f2ef7ca9588be..03da177cddbd9 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/blended_vector_layer/blended_vector_layer.test.tsx +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/blended_vector_layer/blended_vector_layer.test.tsx @@ -141,7 +141,9 @@ describe('cloneDescriptor', () => { customIcons, }); - const clonedLayerDescriptor = await blendedVectorLayer.cloneDescriptor(); + const clones = await blendedVectorLayer.cloneDescriptor(); + expect(clones.length).toBe(1); + const clonedLayerDescriptor = clones[0]; expect(clonedLayerDescriptor.sourceDescriptor!.type).toBe(SOURCE_TYPES.ES_SEARCH); expect(clonedLayerDescriptor.label).toBe('Clone of myIndexPattern'); }); @@ -161,7 +163,9 @@ describe('cloneDescriptor', () => { customIcons, }); - const clonedLayerDescriptor = await blendedVectorLayer.cloneDescriptor(); + const clones = await blendedVectorLayer.cloneDescriptor(); + expect(clones.length).toBe(1); + const clonedLayerDescriptor = clones[0]; expect(clonedLayerDescriptor.sourceDescriptor!.type).toBe(SOURCE_TYPES.ES_SEARCH); expect(clonedLayerDescriptor.label).toBe('Clone of myIndexPattern'); }); diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/blended_vector_layer/blended_vector_layer.ts b/x-pack/plugins/maps/public/classes/layers/vector_layer/blended_vector_layer/blended_vector_layer.ts index a4b06fe043ff2..ee9fdaf410abb 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/blended_vector_layer/blended_vector_layer.ts +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/blended_vector_layer/blended_vector_layer.ts @@ -250,8 +250,12 @@ export class BlendedVectorLayer extends GeoJsonVectorLayer implements IVectorLay return false; } - async cloneDescriptor(): Promise { - const clonedDescriptor = await super.cloneDescriptor(); + async cloneDescriptor(): Promise { + const clones = await super.cloneDescriptor(); + if (clones.length === 0) { + return []; + } + const clonedDescriptor = clones[0]; // Use super getDisplayName instead of instance getDisplayName to avoid getting 'Clustered Clone of Clustered' const displayName = await super.getDisplayName(); @@ -260,7 +264,7 @@ export class BlendedVectorLayer extends GeoJsonVectorLayer implements IVectorLay // sourceDescriptor must be document source descriptor clonedDescriptor.sourceDescriptor = this._documentSource.cloneDescriptor(); - return clonedDescriptor; + return [clonedDescriptor]; } getSource(): IVectorSource { diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/geojson_vector_layer/geojson_vector_layer.tsx b/x-pack/plugins/maps/public/classes/layers/vector_layer/geojson_vector_layer/geojson_vector_layer.tsx index bc7ba78c84d98..14a5092606b4d 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/geojson_vector_layer/geojson_vector_layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/geojson_vector_layer/geojson_vector_layer.tsx @@ -15,6 +15,7 @@ import { EMPTY_FEATURE_COLLECTION, FEATURE_VISIBLE_PROPERTY_NAME, LAYER_TYPE, + SOURCE_BOUNDS_DATA_REQUEST_ID, } from '../../../../../common/constants'; import { StyleMetaDescriptor, @@ -59,11 +60,11 @@ export class GeoJsonVectorLayer extends AbstractVectorLayer { return layerDescriptor; } - async getBounds(syncContext: DataRequestContext) { + async getBounds(getDataRequestContext: (layerId: string) => DataRequestContext) { const isStaticLayer = !this.getSource().isBoundsAware(); return isStaticLayer || this.hasJoins() ? getFeatureCollectionBounds(this._getSourceFeatureCollection(), this.hasJoins()) - : super.getBounds(syncContext); + : super.getBounds(getDataRequestContext); } getLayerIcon(isTocIcon: boolean): LayerIcon { @@ -211,6 +212,11 @@ export class GeoJsonVectorLayer extends AbstractVectorLayer { await this._syncData(syncContext, this.getSource(), this.getCurrentStyle()); } + _isLoadingBounds() { + const boundsDataRequest = this.getDataRequest(SOURCE_BOUNDS_DATA_REQUEST_ID); + return !!boundsDataRequest && boundsDataRequest.isLoading(); + } + // TLDR: Do not call getSource or getCurrentStyle in syncData flow. Use 'source' and 'style' arguments instead. // // 1) State is contained in the redux store. Layer instance state is readonly. @@ -222,7 +228,7 @@ export class GeoJsonVectorLayer extends AbstractVectorLayer { // Given 2 above, which source/style to use can not be pulled from data request state. // Therefore, source and style are provided as arugments and must be used instead of calling getSource or getCurrentStyle. async _syncData(syncContext: DataRequestContext, source: IVectorSource, style: IVectorStyle) { - if (this.isLoadingBounds()) { + if (this._isLoadingBounds()) { return; } diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx b/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx index 7eaec94eac0a2..a16093af20426 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx @@ -45,6 +45,7 @@ import { getAggsMeta, getHitsMeta, } from '../../../util/tile_meta_feature_utils'; +import { syncBoundsData } from '../bounds_data'; const MAX_RESULT_WINDOW_DATA_REQUEST_ID = 'maxResultWindow'; @@ -77,7 +78,7 @@ export class MvtVectorLayer extends AbstractVectorLayer { : super.isInitialDataLoadComplete(); } - async getBounds(syncContext: DataRequestContext) { + async getBounds(getDataRequestContext: (layerId: string) => DataRequestContext) { // Add filter to narrow bounds to features with matching join keys let joinKeyFilter; if (this.getSource().isESSource()) { @@ -93,12 +94,18 @@ export class MvtVectorLayer extends AbstractVectorLayer { } } - return super.getBounds({ - ...syncContext, - dataFilters: { - ...syncContext.dataFilters, - joinKeyFilter, + const syncContext = getDataRequestContext(this.getId()); + return syncBoundsData({ + layerId: this.getId(), + syncContext: { + ...syncContext, + dataFilters: { + ...syncContext.dataFilters, + joinKeyFilter, + }, }, + source: this.getSource(), + sourceQuery: this.getQuery(), }); } diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.test.tsx b/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.test.tsx index b71fef484de01..d450f92467e46 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.test.tsx +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.test.tsx @@ -87,7 +87,9 @@ describe('cloneDescriptor', () => { source: new MockSource() as unknown as IVectorSource, customIcons: [], }); - const clonedDescriptor = await layer.cloneDescriptor(); + const clones = await layer.cloneDescriptor(); + expect(clones.length).toBe(1); + const clonedDescriptor = clones[0]; const clonedStyleProps = (clonedDescriptor.style as VectorStyleDescriptor).properties; // Should update style field belonging to join // @ts-expect-error @@ -124,7 +126,9 @@ describe('cloneDescriptor', () => { source: new MockSource() as unknown as IVectorSource, customIcons: [], }); - const clonedDescriptor = await layer.cloneDescriptor(); + const clones = await layer.cloneDescriptor(); + expect(clones.length).toBe(1); + const clonedDescriptor = clones[0]; const clonedStyleProps = (clonedDescriptor.style as VectorStyleDescriptor).properties; // Should update style field belonging to join // @ts-expect-error diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx b/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx index 35a5caa7ff9b8..27768dc717bd7 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx @@ -162,8 +162,13 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer { ); } - async cloneDescriptor(): Promise { - const clonedDescriptor = (await super.cloneDescriptor()) as VectorLayerDescriptor; + async cloneDescriptor(): Promise { + const clones = await super.cloneDescriptor(); + if (clones.length === 0) { + return []; + } + + const clonedDescriptor = clones[0] as VectorLayerDescriptor; if (clonedDescriptor.joins) { clonedDescriptor.joins.forEach((joinDescriptor: JoinDescriptor) => { if (joinDescriptor.right && joinDescriptor.right.type === SOURCE_TYPES.TABLE_SOURCE) { @@ -215,7 +220,7 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer { } }); } - return clonedDescriptor; + return [clonedDescriptor]; } getSource(): IVectorSource { @@ -295,10 +300,10 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer { return this.getCurrentStyle().renderLegendDetails(); } - async getBounds(syncContext: DataRequestContext) { + async getBounds(getDataRequestContext: (layerId: string) => DataRequestContext) { return syncBoundsData({ layerId: this.getId(), - syncContext, + syncContext: getDataRequestContext(this.getId()), source: this.getSource(), sourceQuery: this.getQuery(), }); diff --git a/x-pack/plugins/maps/public/components/remove_layer_confirm_modal.tsx b/x-pack/plugins/maps/public/components/remove_layer_confirm_modal.tsx new file mode 100644 index 0000000000000..8c35750265cd6 --- /dev/null +++ b/x-pack/plugins/maps/public/components/remove_layer_confirm_modal.tsx @@ -0,0 +1,74 @@ +/* + * 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 from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiConfirmModal, EuiText } from '@elastic/eui'; +import { ILayer } from '../classes/layers/layer'; +import { isLayerGroup, LayerGroup } from '../classes/layers/layer_group'; + +export interface Props { + layer: ILayer; + onCancel: () => void; + onConfirm: () => void; +} + +export function RemoveLayerConfirmModal(props: Props) { + function getChildrenCount(layerGroup: LayerGroup) { + let count = 0; + layerGroup.getChildren().forEach((childLayer) => { + count++; + if (isLayerGroup(childLayer)) { + count = count + getChildrenCount(childLayer as LayerGroup); + } + }); + return count; + } + + function renderMultiLayerWarning() { + if (!isLayerGroup(props.layer)) { + return null; + } + + const numChildren = getChildrenCount(props.layer as LayerGroup); + return numChildren > 0 ? ( +

+ {i18n.translate('xpack.maps.deleteLayerConfirmModal.multiLayerWarning', { + defaultMessage: `Removing this layer also removes {numChildren} nested {numChildren, plural, one {layer} other {layers}}.`, + values: { numChildren }, + })} +

+ ) : null; + } + + return ( + + + {renderMultiLayerWarning()} +

+ {i18n.translate('xpack.maps.deleteLayerConfirmModal.unrecoverableWarning', { + defaultMessage: `You can't recover removed layers.`, + })} +

+
+
+ ); +} diff --git a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/edit_layer_panel.tsx b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/edit_layer_panel.tsx index 906947562f940..8ef8319a82798 100644 --- a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/edit_layer_panel.tsx +++ b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/edit_layer_panel.tsx @@ -35,6 +35,7 @@ import { ILayer } from '../../classes/layers/layer'; import { isVectorLayer, IVectorLayer } from '../../classes/layers/vector_layer'; import { ImmutableSourceProperty, OnSourceChangeArgs } from '../../classes/sources/source'; import { IField } from '../../classes/fields/field'; +import { isLayerGroup } from '../../classes/layers/layer_group'; const localStorage = new Storage(window.localStorage); @@ -95,7 +96,7 @@ export class EditLayerPanel extends Component { }; _loadImmutableSourceProperties = async () => { - if (!this.props.selectedLayer) { + if (!this.props.selectedLayer || isLayerGroup(this.props.selectedLayer)) { return; } @@ -160,7 +161,11 @@ export class EditLayerPanel extends Component { } _renderFilterSection() { - if (!this.props.selectedLayer || !this.props.selectedLayer.supportsElasticsearchFilters()) { + if ( + !this.props.selectedLayer || + isLayerGroup(this.props.selectedLayer) || + !this.props.selectedLayer.supportsElasticsearchFilters() + ) { return null; } @@ -197,35 +202,70 @@ export class EditLayerPanel extends Component { ); } - _renderSourceProperties() { - return this.state.immutableSourceProps.map( - ({ label, value, link }: ImmutableSourceProperty) => { - function renderValue() { - if (link) { - return ( - - {value} - - ); - } - return {value}; - } - return ( -

- {label} {renderValue()} -

- ); - } + _renderSourceDetails() { + return !this.props.selectedLayer || isLayerGroup(this.props.selectedLayer) ? null : ( +
+ + + + {this.state.immutableSourceProps.map( + ({ label, value, link }: ImmutableSourceProperty) => { + function renderValue() { + if (link) { + return ( + + {value} + + ); + } + return {value}; + } + return ( +

+ {label} {renderValue()} +

+ ); + } + )} +
+
+
); } - render() { + _renderSourceEditor() { if (!this.props.selectedLayer) { return null; } const descriptor = this.props.selectedLayer.getDescriptor() as VectorLayerDescriptor; const numberOfJoins = descriptor.joins ? descriptor.joins.length : 0; + return isLayerGroup(this.props.selectedLayer) + ? null + : this.props.selectedLayer.renderSourceSettingsEditor({ + currentLayerType: this.props.selectedLayer.getType(), + numberOfJoins, + onChange: this._onSourceChange, + onStyleDescriptorChange: this.props.updateStyleDescriptor, + style: this.props.selectedLayer.getStyleForEditing(), + }); + } + + _renderStyleEditor() { + return !this.props.selectedLayer || isLayerGroup(this.props.selectedLayer) ? null : ( + + ); + } + + render() { + if (!this.props.selectedLayer) { + return null; + } return ( { -
- - - - {this._renderSourceProperties()} - - -
+ {this._renderSourceDetails()}
@@ -273,19 +301,13 @@ export class EditLayerPanel extends Component { supportsFitToBounds={this.state.supportsFitToBounds} /> - {this.props.selectedLayer.renderSourceSettingsEditor({ - currentLayerType: this.props.selectedLayer.getType(), - numberOfJoins, - onChange: this._onSourceChange, - onStyleDescriptorChange: this.props.updateStyleDescriptor, - style: this.props.selectedLayer.getStyleForEditing(), - })} + {this._renderSourceEditor()} {this._renderFilterSection()} {this._renderJoinSection()} - + {this._renderStyleEditor()}
diff --git a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/flyout_footer/flyout_footer.tsx b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/flyout_footer/flyout_footer.tsx index b9761f5d48430..614fbfcebe4e1 100644 --- a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/flyout_footer/flyout_footer.tsx +++ b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/flyout_footer/flyout_footer.tsx @@ -5,69 +5,102 @@ * 2.0. */ -import React from 'react'; +import React, { Component } from 'react'; import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiButtonEmpty } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; +import { ILayer } from '../../../classes/layers/layer'; +import { RemoveLayerConfirmModal } from '../../../components/remove_layer_confirm_modal'; export interface Props { + selectedLayer?: ILayer; cancelLayerPanel: () => void; saveLayerEdits: () => void; removeLayer: () => void; hasStateChanged: boolean; } -export const FlyoutFooter = ({ - cancelLayerPanel, - saveLayerEdits, - removeLayer, - hasStateChanged, -}: Props) => { - const removeBtn = ( - - - - - - ); +interface State { + showRemoveModal: boolean; +} + +export class FlyoutFooter extends Component { + state: State = { + showRemoveModal: false, + }; + + _showRemoveModal = () => { + this.setState({ showRemoveModal: true }); + }; - const cancelButtonLabel = hasStateChanged ? ( - - ) : ( - - ); + render() { + const cancelButtonLabel = this.props.hasStateChanged ? ( + + ) : ( + + ); - return ( - - - - {cancelButtonLabel} - - - - - - {removeBtn} - - - - - - - ); -}; + const removeModal = + this.props.selectedLayer && this.state.showRemoveModal ? ( + { + this.setState({ showRemoveModal: false }); + }} + onConfirm={() => { + this.setState({ showRemoveModal: false }); + this.props.removeLayer(); + }} + /> + ) : null; + + return ( + <> + {removeModal} + + + + {cancelButtonLabel} + + + + + + + + + + + + + + + + + + ); + } +} diff --git a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/flyout_footer/index.ts b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/flyout_footer/index.ts index 8546b8088d40a..093f0524b271b 100644 --- a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/flyout_footer/index.ts +++ b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/flyout_footer/index.ts @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; import { FlyoutFooter } from './flyout_footer'; import { FLYOUT_STATE } from '../../../reducers/ui'; -import { hasDirtyState } from '../../../selectors/map_selectors'; +import { getSelectedLayer, hasDirtyState } from '../../../selectors/map_selectors'; import { setSelectedLayer, removeSelectedLayer, @@ -23,6 +23,7 @@ import { MapStoreState } from '../../../reducers/store'; function mapStateToProps(state: MapStoreState) { return { hasStateChanged: hasDirtyState(state), + selectedLayer: getSelectedLayer(state), }; } diff --git a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/layer_settings/layer_settings.tsx b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/layer_settings/layer_settings.tsx index 794064e09d3c6..6d63fc08ef85e 100644 --- a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/layer_settings/layer_settings.tsx +++ b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/layer_settings/layer_settings.tsx @@ -26,6 +26,7 @@ import { AlphaSlider } from '../../../components/alpha_slider'; import { ILayer } from '../../../classes/layers/layer'; import { isVectorLayer, IVectorLayer } from '../../../classes/layers/vector_layer'; import { AttributionFormRow } from './attribution_form_row'; +import { isLayerGroup } from '../../../classes/layers/layer_group'; export interface Props { layer: ILayer; @@ -87,7 +88,7 @@ export function LayerSettings(props: Props) { }; const renderIncludeInFitToBounds = () => { - if (!props.supportsFitToBounds) { + if (!props.supportsFitToBounds || isLayerGroup(props.layer)) { return null; } return ( @@ -113,7 +114,7 @@ export function LayerSettings(props: Props) { }; const renderZoomSliders = () => { - return ( + return isLayerGroup(props.layer) ? null : ( {renderLabel()} {renderZoomSliders()} - + {isLayerGroup(props.layer) ? null : ( + + )} {renderShowLabelsOnTop()} {renderShowLocaleSelector()} - + {isLayerGroup(props.layer) ? null : ( + + )} {renderIncludeInFitToBounds()} {renderDisableTooltips()} diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/_index.scss b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/_index.scss index 9a3e3a45d6c4e..9ca24d055432b 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/_index.scss +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/_index.scss @@ -1,2 +1,3 @@ @import 'layer_control'; +@import 'layer_toc/layer_toc'; @import 'layer_toc/toc_entry/toc_entry'; diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/__snapshots__/layer_toc.test.tsx.snap b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/__snapshots__/layer_toc.test.tsx.snap index fbd83ed145a08..7b0741e4bc74a 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/__snapshots__/layer_toc.test.tsx.snap +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/__snapshots__/layer_toc.test.tsx.snap @@ -6,9 +6,12 @@ exports[`LayerTOC is rendered 1`] = ` > @@ -22,19 +25,23 @@ exports[`LayerTOC props isReadOnly 1`] = ` data-test-subj="mapLayerTOC" > ) { return { - updateLayerOrder: (newOrder: number[]) => dispatch(updateLayerOrder(newOrder)), + createLayerGroup: (draggedLayerId: string, combineWithLayerId: string) => + dispatch(createLayerGroup(draggedLayerId, combineWithLayerId)), + moveLayerToBottom: (moveLayerId: string) => dispatch(moveLayerToBottom(moveLayerId)), + moveLayerToLeftOfTarget: (moveLayerId: string, targetLayerId: string) => + dispatch(moveLayerToLeftOfTarget(moveLayerId, targetLayerId)), + setLayerParent: (layerId: string, parent: string | undefined) => + dispatch(setLayerParent(layerId, parent)), }; } diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/layer_toc.test.tsx b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/layer_toc.test.tsx index 359794f1468f6..b7ee829b67368 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/layer_toc.test.tsx +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/layer_toc.test.tsx @@ -22,6 +22,9 @@ const mockLayers = [ getId: () => { return '1'; }, + getParent: () => { + return undefined; + }, supportsFitToBounds: () => { return true; }, @@ -30,6 +33,9 @@ const mockLayers = [ getId: () => { return '2'; }, + getParent: () => { + return undefined; + }, supportsFitToBounds: () => { return false; }, @@ -39,7 +45,11 @@ const mockLayers = [ const defaultProps = { layerList: mockLayers, isReadOnly: false, - updateLayerOrder: () => {}, + openTOCDetails: [], + moveLayerToBottom: () => {}, + moveLayerToLeftOfTarget: () => {}, + setLayerParent: () => {}, + createLayerGroup: () => {}, }; describe('LayerTOC', () => { diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/layer_toc.tsx b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/layer_toc.tsx index 1800f2dc33618..f152d1686b3bd 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/layer_toc.tsx +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/layer_toc.tsx @@ -9,15 +9,38 @@ import _ from 'lodash'; import React, { Component } from 'react'; import { DropResult, EuiDragDropContext, EuiDroppable, EuiDraggable } from '@elastic/eui'; import { TOCEntry } from './toc_entry'; +import { isLayerGroup } from '../../../../classes/layers/layer_group'; import { ILayer } from '../../../../classes/layers/layer'; export interface Props { isReadOnly: boolean; layerList: ILayer[]; - updateLayerOrder: (newOrder: number[]) => void; + openTOCDetails: string[]; + createLayerGroup: (draggedLayerId: string, combineWithLayerId: string) => void; + setLayerParent: (layerId: string, parent: string | undefined) => void; + moveLayerToBottom: (moveLayerId: string) => void; + moveLayerToLeftOfTarget: (moveLayerId: string, targetLayerId: string) => void; } +interface State { + combineLayer: ILayer | null; + isOwnAncestor: boolean; + newRightSiblingLayer: ILayer | null; + sourceLayer: ILayer | null; +} + +const CLEAR_DND_STATE = { + combineLayer: null, + isOwnAncestor: false, + newRightSiblingLayer: null, + sourceLayer: null, +}; + export class LayerTOC extends Component { + state: State = { + ...CLEAR_DND_STATE, + }; + componentWillUnmount() { this._updateDebounced.cancel(); } @@ -29,60 +52,201 @@ export class LayerTOC extends Component { _updateDebounced = _.debounce(this.forceUpdate, 100); - _onDragEnd = ({ source, destination }: DropResult) => { - // Dragging item out of EuiDroppable results in destination of null - if (!destination) { + _reverseIndex(index: number) { + return this.props.layerList.length - index - 1; + } + + _getForebearers(layer: ILayer): string[] { + const parentId = layer.getParent(); + if (!parentId) { + return []; + } + + const parentLayer = this.props.layerList.find((findLayer) => { + return findLayer.getId() === parentId; + }); + if (!parentLayer) { + return []; + } + + return [...this._getForebearers(parentLayer), parentId]; + } + + _onDragStart = ({ source }: DropResult) => { + const sourceIndex = this._reverseIndex(source.index); + const sourceLayer = this.props.layerList[sourceIndex]; + this.setState({ ...CLEAR_DND_STATE, sourceLayer }); + }; + + _onDragUpdate = ({ combine, destination, source }: DropResult) => { + const sourceIndex = this._reverseIndex(source.index); + const sourceLayer = this.props.layerList[sourceIndex]; + + if (combine) { + const combineIndex = this.props.layerList.findIndex((findLayer) => { + return findLayer.getId() === combine.draggableId; + }); + const combineLayer = combineIndex !== -1 ? this.props.layerList[combineIndex] : null; + + const newRightSiblingIndex = combineIndex - 1; + const newRightSiblingLayer = + newRightSiblingIndex < 0 ? null : this.props.layerList[newRightSiblingIndex]; + + const forebearers = combineLayer ? this._getForebearers(combineLayer) : []; + + this.setState({ + combineLayer, + newRightSiblingLayer, + sourceLayer, + isOwnAncestor: forebearers.includes(sourceLayer.getId()), + }); + return; + } + + if (!destination || source.index === destination.index) { + this.setState({ ...CLEAR_DND_STATE }); return; } - // Layer list is displayed in reverse order so index needs to reversed to get back to original reference. - const reverseIndex = (index: number) => { - return this.props.layerList.length - index - 1; - }; + const destinationIndex = this._reverseIndex(destination.index); + const newRightSiblingIndex = + sourceIndex > destinationIndex + ? // When layer is moved to the right, new right sibling is layer to the right of destination + destinationIndex - 1 + : // When layer is moved to the left, new right sibling is the destination + destinationIndex; + const newRightSiblingLayer = + newRightSiblingIndex < 0 ? null : this.props.layerList[newRightSiblingIndex]; + + const forebearers = newRightSiblingLayer ? this._getForebearers(newRightSiblingLayer) : []; - const prevIndex = reverseIndex(source.index); - const newIndex = reverseIndex(destination.index); - const newOrder = []; - for (let i = 0; i < this.props.layerList.length; i++) { - newOrder.push(i); + this.setState({ + combineLayer: null, + newRightSiblingLayer, + sourceLayer, + isOwnAncestor: forebearers.includes(sourceLayer.getId()), + }); + }; + + _onDragEnd = () => { + const { combineLayer, isOwnAncestor, sourceLayer, newRightSiblingLayer } = this.state; + this.setState({ ...CLEAR_DND_STATE }); + + if (isOwnAncestor || !sourceLayer) { + return; + } + + if (combineLayer) { + // add source to layer group when combine is layer group + if (isLayerGroup(combineLayer) && newRightSiblingLayer) { + this.props.setLayerParent(sourceLayer.getId(), combineLayer.getId()); + this.props.moveLayerToLeftOfTarget(sourceLayer.getId(), newRightSiblingLayer.getId()); + return; + } + + // creage layer group that contains source and combine + this.props.createLayerGroup(sourceLayer.getId(), combineLayer.getId()); + return; } - newOrder.splice(prevIndex, 1); - newOrder.splice(newIndex, 0, prevIndex); - this.props.updateLayerOrder(newOrder); + + if (newRightSiblingLayer) { + this.props.setLayerParent(sourceLayer.getId(), newRightSiblingLayer.getParent()); + this.props.moveLayerToLeftOfTarget(sourceLayer.getId(), newRightSiblingLayer.getId()); + return; + } + + this.props.moveLayerToBottom(sourceLayer.getId()); }; + _getDepth(layer: ILayer, depth: number): { depth: number; showInTOC: boolean } { + if (layer.getParent() === undefined) { + return { depth, showInTOC: true }; + } + + const parent = this.props.layerList.find((nextLayer) => { + return layer.getParent() === nextLayer.getId(); + }); + if (!parent) { + return { depth, showInTOC: false }; + } + + return this.props.openTOCDetails.includes(parent.getId()) + ? this._getDepth(parent, depth + 1) + : { depth, showInTOC: false }; + } + + _getDroppableClass() { + if (!this.state.sourceLayer) { + // nothing is dragged + return ''; + } + + if (this.state.isOwnAncestor) { + return 'mapLayerToc-droppable-dropNotAllowed'; + } + + if (this.state.combineLayer) { + return 'mapLayerToc-droppable-isCombining'; + } + + return 'mapLayerToc-droppable-isDragging'; + } + _renderLayers() { - // Reverse layer list so first layer drawn on map is at the bottom and - // last layer drawn on map is at the top. - const reverseLayerList = [...this.props.layerList].reverse(); + const tocEntryList = this.props.layerList + .map((layer, index) => { + return { + ...this._getDepth(layer, 0), + draggableIndex: this._reverseIndex(index), + layer, + }; + }) + .filter(({ showInTOC }) => { + return showInTOC; + }) + // Reverse layer list so first layer drawn on map is at the bottom and + // last layer drawn on map is at the top. + .reverse(); if (this.props.isReadOnly) { - return reverseLayerList.map((layer) => { - return ; + return tocEntryList.map(({ depth, layer }) => { + return ; }); } return ( - - - {(droppableProvided, snapshot) => { - const tocEntries = reverseLayerList.map((layer, idx: number) => ( + + + {(droppableProvided, droppableSnapshot) => { + const tocEntries = tocEntryList.map(({ draggableIndex, depth, layer }) => ( - {(provided, state) => ( - - )} + {(draggableProvided, draggableSnapshot) => { + return ( + + ); + }} )); return
{tocEntries}
; diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/__snapshots__/toc_entry.test.tsx.snap b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/__snapshots__/toc_entry.test.tsx.snap index cec85cb0e1cd6..0973bd4f24459 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/__snapshots__/toc_entry.test.tsx.snap +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/__snapshots__/toc_entry.test.tsx.snap @@ -5,6 +5,94 @@ exports[`TOCEntry is rendered 1`] = ` className="mapTocEntry" data-layerid="1" id="1" + style={Object {}} +> +
+ +
+ + + + +
+
+ + + +
+`; + +exports[`TOCEntry props Should indent child layer 1`] = ` +
{}, @@ -93,6 +94,17 @@ describe('TOCEntry', () => { expect(component).toMatchSnapshot(); }); + test('Should indent child layer', async () => { + const component = shallow(); + + // Ensure all promises resolve + await new Promise((resolve) => process.nextTick(resolve)); + // Ensure the state changes are reflected + component.update(); + + expect(component).toMatchSnapshot(); + }); + test('should display layer details when isLegendDetailsOpen is true', async () => { const component = shallow(); diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry.tsx b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry.tsx index 65431432d8c6d..72eb38f07257e 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry.tsx +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry.tsx @@ -44,6 +44,7 @@ export interface ReduxDispatchProps { } export interface OwnProps { + depth: number; layer: ILayer; dragHandleProps?: DraggableProvidedDragHandleProps; isDragging?: boolean; @@ -226,7 +227,7 @@ export class TOCEntry extends Component { } _renderDetailsToggle() { - if (!this.state.hasLegendDetails) { + if (this.props.isDragging || !this.state.hasLegendDetails) { return null; } @@ -319,8 +320,12 @@ export class TOCEntry extends Component { 'mapTocEntry-isInEditingMode': this.props.isFeatureEditorOpenForLayer, }); + const depthStyle = + this.props.depth > 0 ? { paddingLeft: `${8 + this.props.depth * 24}px` } : {}; + return (
+ + } + className="mapLayTocActions" + closePopover={[Function]} + display="inline-block" + hasArrow={true} + id="testLayer" + isOpen={false} + ownFocus={true} + panelPaddingSize="none" + > + , + "name": "Fit to data", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "layerVisibilityToggleButton", + "icon": , + "name": "Hide layer", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "layerSettingsButton", + "disabled": false, + "icon": , + "name": "Edit layer settings", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "cloneLayerButton", + "icon": , + "name": "Clone layer", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "removeLayerButton", + "icon": , + "name": "Remove layer", + "onClick": [Function], + "toolTipContent": null, + }, + ], + "title": "Layer actions", + }, + ] } - onClick={[Function]} + size="m" /> - } - className="mapLayTocActions" - closePopover={[Function]} - display="inline-block" - hasArrow={true} - id="testLayer" - isOpen={false} - ownFocus={true} - panelPaddingSize="none" -> - , - "name": "Fit to data", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "layerVisibilityToggleButton", - "icon": , - "name": "Hide layer", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "layerSettingsButton", - "disabled": false, - "icon": , - "name": "Edit layer settings", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "cloneLayerButton", - "icon": , - "name": "Clone layer", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "removeLayerButton", - "icon": , - "name": "Remove layer", - "onClick": [Function], - "toolTipContent": null, - }, - ], - "title": "Layer actions", - }, - ] - } - size="m" - /> - + + `; exports[`TOCEntryActionsPopover should disable Edit features when edit mode active for layer 1`] = ` - + + } + className="mapLayTocActions" + closePopover={[Function]} + display="inline-block" + hasArrow={true} + id="testLayer" + isOpen={false} + ownFocus={true} + panelPaddingSize="none" + > + , + "name": "Fit to data", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "layerVisibilityToggleButton", + "icon": , + "name": "Hide layer", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "layerSettingsButton", + "disabled": false, + "icon": , + "name": "Edit layer settings", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "cloneLayerButton", + "icon": , + "name": "Clone layer", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "removeLayerButton", + "icon": , + "name": "Remove layer", + "onClick": [Function], + "toolTipContent": null, + }, + ], + "title": "Layer actions", + }, + ] } - onClick={[Function]} + size="m" /> - } - className="mapLayTocActions" - closePopover={[Function]} - display="inline-block" - hasArrow={true} - id="testLayer" - isOpen={false} - ownFocus={true} - panelPaddingSize="none" -> - , - "name": "Fit to data", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "layerVisibilityToggleButton", - "icon": , - "name": "Hide layer", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "layerSettingsButton", - "disabled": false, - "icon": , - "name": "Edit layer settings", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "cloneLayerButton", - "icon": , - "name": "Clone layer", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "removeLayerButton", - "icon": , - "name": "Remove layer", - "onClick": [Function], - "toolTipContent": null, - }, - ], - "title": "Layer actions", - }, - ] - } - size="m" - /> - + + `; exports[`TOCEntryActionsPopover should disable fit to data when supportsFitToBounds is false 1`] = ` - + + } + className="mapLayTocActions" + closePopover={[Function]} + display="inline-block" + hasArrow={true} + id="testLayer" + isOpen={false} + ownFocus={true} + panelPaddingSize="none" + > + , + "name": "Fit to data", + "onClick": [Function], + "toolTipContent": "Layer does not support fit to data", + }, + Object { + "data-test-subj": "layerVisibilityToggleButton", + "icon": , + "name": "Hide layer", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "layerSettingsButton", + "disabled": false, + "icon": , + "name": "Edit layer settings", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "cloneLayerButton", + "icon": , + "name": "Clone layer", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "removeLayerButton", + "icon": , + "name": "Remove layer", + "onClick": [Function], + "toolTipContent": null, + }, + ], + "title": "Layer actions", + }, + ] } - onClick={[Function]} + size="m" /> - } - className="mapLayTocActions" - closePopover={[Function]} - display="inline-block" - hasArrow={true} - id="testLayer" - isOpen={false} - ownFocus={true} - panelPaddingSize="none" -> - , - "name": "Fit to data", - "onClick": [Function], - "toolTipContent": "Layer does not support fit to data", - }, - Object { - "data-test-subj": "layerVisibilityToggleButton", - "icon": , - "name": "Hide layer", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "layerSettingsButton", - "disabled": false, - "icon": , - "name": "Edit layer settings", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "cloneLayerButton", - "icon": , - "name": "Clone layer", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "removeLayerButton", - "icon": , - "name": "Remove layer", - "onClick": [Function], - "toolTipContent": null, - }, - ], - "title": "Layer actions", - }, - ] - } - size="m" - /> - + + `; exports[`TOCEntryActionsPopover should have "show layer" action when layer is not visible 1`] = ` - + + } + className="mapLayTocActions" + closePopover={[Function]} + display="inline-block" + hasArrow={true} + id="testLayer" + isOpen={false} + ownFocus={true} + panelPaddingSize="none" + > + , + "name": "Fit to data", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "layerVisibilityToggleButton", + "icon": , + "name": "Show layer", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "layerSettingsButton", + "disabled": false, + "icon": , + "name": "Edit layer settings", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "cloneLayerButton", + "icon": , + "name": "Clone layer", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "removeLayerButton", + "icon": , + "name": "Remove layer", + "onClick": [Function], + "toolTipContent": null, + }, + ], + "title": "Layer actions", + }, + ] } - onClick={[Function]} + size="m" /> - } - className="mapLayTocActions" - closePopover={[Function]} - display="inline-block" - hasArrow={true} - id="testLayer" - isOpen={false} - ownFocus={true} - panelPaddingSize="none" -> - , - "name": "Fit to data", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "layerVisibilityToggleButton", - "icon": , - "name": "Show layer", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "layerSettingsButton", - "disabled": false, - "icon": , - "name": "Edit layer settings", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "cloneLayerButton", - "icon": , - "name": "Clone layer", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "removeLayerButton", - "icon": , - "name": "Remove layer", - "onClick": [Function], - "toolTipContent": null, - }, - ], - "title": "Layer actions", - }, - ] - } - size="m" - /> - + + `; exports[`TOCEntryActionsPopover should not show edit actions in read only mode 1`] = ` - + + } + className="mapLayTocActions" + closePopover={[Function]} + display="inline-block" + hasArrow={true} + id="testLayer" + isOpen={false} + ownFocus={true} + panelPaddingSize="none" + > + , + "name": "Fit to data", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "layerVisibilityToggleButton", + "icon": , + "name": "Hide layer", + "onClick": [Function], + "toolTipContent": null, + }, + ], + "title": "Layer actions", + }, + ] } - onClick={[Function]} + size="m" /> - } - className="mapLayTocActions" - closePopover={[Function]} - display="inline-block" - hasArrow={true} - id="testLayer" - isOpen={false} - ownFocus={true} - panelPaddingSize="none" -> - , - "name": "Fit to data", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "layerVisibilityToggleButton", - "icon": , - "name": "Hide layer", - "onClick": [Function], - "toolTipContent": null, - }, - ], - "title": "Layer actions", - }, - ] - } - size="m" - /> - + + `; exports[`TOCEntryActionsPopover should show "show this layer only" action when there are more then 2 layers 1`] = ` - + + } + className="mapLayTocActions" + closePopover={[Function]} + display="inline-block" + hasArrow={true} + id="testLayer" + isOpen={false} + ownFocus={true} + panelPaddingSize="none" + > + , + "name": "Fit to data", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "layerVisibilityToggleButton", + "icon": , + "name": "Hide layer", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "showThisLayerOnlyButton", + "icon": , + "name": "Show this layer only", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "layerSettingsButton", + "disabled": false, + "icon": , + "name": "Edit layer settings", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "cloneLayerButton", + "icon": , + "name": "Clone layer", + "onClick": [Function], + "toolTipContent": null, + }, + Object { + "data-test-subj": "removeLayerButton", + "icon": , + "name": "Remove layer", + "onClick": [Function], + "toolTipContent": null, + }, + ], + "title": "Layer actions", + }, + ] } - onClick={[Function]} + size="m" /> - } - className="mapLayTocActions" - closePopover={[Function]} - display="inline-block" - hasArrow={true} - id="testLayer" - isOpen={false} - ownFocus={true} - panelPaddingSize="none" -> - , - "name": "Fit to data", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "layerVisibilityToggleButton", - "icon": , - "name": "Hide layer", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "showThisLayerOnlyButton", - "icon": , - "name": "Show this layer only", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "layerSettingsButton", - "disabled": false, - "icon": , - "name": "Edit layer settings", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "cloneLayerButton", - "icon": , - "name": "Clone layer", - "onClick": [Function], - "toolTipContent": null, - }, - Object { - "data-test-subj": "removeLayerButton", - "icon": , - "name": "Remove layer", - "onClick": [Function], - "toolTipContent": null, - }, - ], - "title": "Layer actions", - }, - ] - } - size="m" - /> - + + `; diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx index 5e33931a8943e..a67c12d2928a4 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx @@ -20,6 +20,7 @@ import { import { ESSearchSource } from '../../../../../../classes/sources/es_search_source'; import { isVectorLayer, IVectorLayer } from '../../../../../../classes/layers/vector_layer'; import { SCALING_TYPES, VECTOR_SHAPE_TYPE } from '../../../../../../../common/constants'; +import { RemoveLayerConfirmModal } from '../../../../../../components/remove_layer_confirm_modal'; export interface Props { cloneLayer: (layerId: string) => void; @@ -41,6 +42,7 @@ export interface Props { interface State { isPopoverOpen: boolean; + showRemoveModal: boolean; supportsFeatureEditing: boolean; isFeatureEditingEnabled: boolean; } @@ -48,6 +50,7 @@ interface State { export class TOCEntryActionsPopover extends Component { state: State = { isPopoverOpen: false, + showRemoveModal: false, supportsFeatureEditing: false, isFeatureEditingEnabled: false, }; @@ -119,10 +122,6 @@ export class TOCEntryActionsPopover extends Component { this.props.fitToBounds(this.props.layer.getId()); } - _removeLayer() { - this.props.removeLayer(this.props.layer.getId()); - } - _toggleVisible() { this.props.toggleVisible(this.props.layer.getId()); } @@ -230,8 +229,7 @@ export class TOCEntryActionsPopover extends Component { toolTipContent: null, 'data-test-subj': 'removeLayerButton', onClick: () => { - this._closePopover(); - this._removeLayer(); + this.setState({ showRemoveModal: true }); }, }); } @@ -246,30 +244,46 @@ export class TOCEntryActionsPopover extends Component { } render() { + const removeModal = this.state.showRemoveModal ? ( + { + this.setState({ showRemoveModal: false }); + }} + onConfirm={() => { + this.setState({ showRemoveModal: false }); + this._closePopover(); + this.props.removeLayer(this.props.layer.getId()); + }} + /> + ) : null; return ( - + {removeModal} + + } + isOpen={this.state.isPopoverOpen} + closePopover={this._closePopover} + panelPaddingSize="none" + anchorPosition="leftUp" + anchorClassName="mapLayTocActions__popoverAnchor" + > + - } - isOpen={this.state.isPopoverOpen} - closePopover={this._closePopover} - panelPaddingSize="none" - anchorPosition="leftUp" - anchorClassName="mapLayTocActions__popoverAnchor" - > - - + + ); } } diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_button/toc_entry_button.tsx b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_button/toc_entry_button.tsx index c55821c522d14..7e35447d45e41 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_button/toc_entry_button.tsx +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_button/toc_entry_button.tsx @@ -11,6 +11,7 @@ import { EuiButtonEmpty, EuiIcon, EuiToolTip, EuiLoadingSpinner } from '@elastic import { i18n } from '@kbn/i18n'; import { ILayer } from '../../../../../../classes/layers/layer'; import { IVectorSource } from '../../../../../../classes/sources/vector_source'; +import { isLayerGroup } from '../../../../../../classes/layers/layer_group'; interface Footnote { icon: ReactNode; @@ -69,72 +70,88 @@ export class TOCEntryButton extends Component { } getIconAndTooltipContent(): IconAndTooltipContent { - let icon; - let tooltipContent = null; - const footnotes = []; if (this.props.layer.hasErrors()) { - icon = ( - - ); - tooltipContent = this.props.layer.getErrors(); - } else if (!this.props.layer.isVisible()) { - icon = ; - tooltipContent = i18n.translate('xpack.maps.layer.layerHiddenTooltip', { - defaultMessage: `Layer is hidden.`, - }); - } else if (this.props.layer.isLayerLoading()) { - icon = ; - } else if (!this.props.layer.showAtZoomLevel(this.props.zoom)) { + return { + icon: ( + + ), + tooltipContent: this.props.layer.getErrors(), + footnotes: [], + }; + } + + if (!this.props.layer.isVisible()) { + return { + icon: , + tooltipContent: i18n.translate('xpack.maps.layer.layerHiddenTooltip', { + defaultMessage: `Layer is hidden.`, + }), + footnotes: [], + }; + } + + if (this.props.layer.isLayerLoading()) { + return { + icon: , + tooltipContent: '', + footnotes: [], + }; + } + + if (!this.props.layer.showAtZoomLevel(this.props.zoom)) { const minZoom = this.props.layer.getMinZoom(); const maxZoom = this.props.layer.getMaxZoom(); - icon = ; - tooltipContent = i18n.translate('xpack.maps.layer.zoomFeedbackTooltip', { - defaultMessage: `Layer is visible between zoom levels {minZoom} and {maxZoom}.`, - values: { minZoom, maxZoom }, + return { + icon: , + tooltipContent: i18n.translate('xpack.maps.layer.zoomFeedbackTooltip', { + defaultMessage: `Layer is visible between zoom levels {minZoom} and {maxZoom}.`, + values: { minZoom, maxZoom }, + }), + footnotes: [], + }; + } + + const { icon, tooltipContent } = this.props.layer.getLayerIcon(true); + + if (isLayerGroup(this.props.layer)) { + return { icon, tooltipContent, footnotes: [] }; + } + + const footnotes = []; + if (this.props.isUsingSearch && this.props.layer.getQueryableIndexPatternIds().length) { + footnotes.push({ + icon: , + message: i18n.translate('xpack.maps.layer.isUsingSearchMsg', { + defaultMessage: 'Results narrowed by global search', + }), + }); + } + if (this.state.isFilteredByGlobalTime) { + footnotes.push({ + icon: , + message: i18n.translate('xpack.maps.layer.isUsingTimeFilter', { + defaultMessage: 'Results narrowed by global time', + }), + }); + } + const source = this.props.layer.getSource(); + if ( + typeof source.isFilterByMapBounds === 'function' && + (source as IVectorSource).isFilterByMapBounds() + ) { + footnotes.push({ + icon: , + message: i18n.translate('xpack.maps.layer.isUsingBoundsFilter', { + defaultMessage: 'Results narrowed by visible map area', + }), }); - } else { - const { icon: layerIcon, tooltipContent: layerTooltipContent } = - this.props.layer.getLayerIcon(true); - icon = layerIcon; - if (layerTooltipContent) { - tooltipContent = layerTooltipContent; - } - - if (this.props.isUsingSearch && this.props.layer.getQueryableIndexPatternIds().length) { - footnotes.push({ - icon: , - message: i18n.translate('xpack.maps.layer.isUsingSearchMsg', { - defaultMessage: 'Results narrowed by global search', - }), - }); - } - if (this.state.isFilteredByGlobalTime) { - footnotes.push({ - icon: , - message: i18n.translate('xpack.maps.layer.isUsingTimeFilter', { - defaultMessage: 'Results narrowed by global time', - }), - }); - } - const source = this.props.layer.getSource(); - if ( - typeof source.isFilterByMapBounds === 'function' && - (source as IVectorSource).isFilterByMapBounds() - ) { - footnotes.push({ - icon: , - message: i18n.translate('xpack.maps.layer.isUsingBoundsFilter', { - defaultMessage: 'Results narrowed by visible map area', - }), - }); - } } return { diff --git a/x-pack/plugins/maps/public/reducers/map/layer_utils.ts b/x-pack/plugins/maps/public/reducers/map/layer_utils.ts index 206cc4a740192..bfe7b39fe2868 100644 --- a/x-pack/plugins/maps/public/reducers/map/layer_utils.ts +++ b/x-pack/plugins/maps/public/reducers/map/layer_utils.ts @@ -62,12 +62,7 @@ export function updateLayerInList( const updatedLayer = { ...layerList[layerIdx], - // Update layer w/ new value. If no value provided, toggle boolean value - // allow empty strings, 0-value - [attribute]: - newValue || newValue === '' || newValue === 0 - ? newValue - : !(layerList[layerIdx][attribute] as boolean), + [attribute]: newValue, }; const updatedList = [ ...layerList.slice(0, layerIdx), diff --git a/x-pack/plugins/maps/public/selectors/map_selectors.ts b/x-pack/plugins/maps/public/selectors/map_selectors.ts index 6ee55bd72e49d..1d46ef3015046 100644 --- a/x-pack/plugins/maps/public/selectors/map_selectors.ts +++ b/x-pack/plugins/maps/public/selectors/map_selectors.ts @@ -20,6 +20,7 @@ import { GeoJsonVectorLayer, } from '../classes/layers/vector_layer'; import { VectorStyle } from '../classes/styles/vector/vector_style'; +import { isLayerGroup, LayerGroup } from '../classes/layers/layer_group'; import { HeatmapLayer } from '../classes/layers/heatmap_layer'; import { getTimeFilter } from '../kibana_services'; import { getChartsPaletteServiceGetColor } from '../reducers/non_serializable_instances'; @@ -47,6 +48,7 @@ import { Goto, HeatmapLayerDescriptor, LayerDescriptor, + LayerGroupDescriptor, MapCenter, MapExtent, MapSettings, @@ -74,8 +76,11 @@ export function createLayerInstance( customIcons: CustomIcon[], chartsPaletteServiceGetColor?: (value: string) => string | null ): ILayer { - const source: ISource = createSourceInstance(layerDescriptor.sourceDescriptor); + if (layerDescriptor.type === LAYER_TYPE.LAYER_GROUP) { + return new LayerGroup({ layerDescriptor: layerDescriptor as LayerGroupDescriptor }); + } + const source: ISource = createSourceInstance(layerDescriptor.sourceDescriptor); switch (layerDescriptor.type) { case LAYER_TYPE.RASTER_TILE: return new RasterTileLayer({ layerDescriptor, source: source as IRasterSource }); @@ -324,9 +329,32 @@ export const getLayerList = createSelector( getChartsPaletteServiceGetColor, getCustomIcons, (layerDescriptorList, chartsPaletteServiceGetColor, customIcons) => { - return layerDescriptorList.map((layerDescriptor) => + const layers = layerDescriptorList.map((layerDescriptor) => createLayerInstance(layerDescriptor, customIcons, chartsPaletteServiceGetColor) ); + + const childrenMap = new Map(); + layers.forEach((layer) => { + const parent = layer.getParent(); + if (!parent) { + return; + } + + const children = childrenMap.has(parent) ? childrenMap.get(parent)! : []; + childrenMap.set(parent, [...children, layer]); + }); + + childrenMap.forEach((children, parent) => { + const parentLayer = layers.find((layer) => { + return layer.getId() === parent; + }); + if (!parentLayer || !isLayerGroup(parentLayer)) { + return; + } + (parentLayer as LayerGroup).setChildren(children); + }); + + return layers; } ); diff --git a/x-pack/test/functional/page_objects/gis_page.ts b/x-pack/test/functional/page_objects/gis_page.ts index be0d8c9aaf07f..3ad5b00279926 100644 --- a/x-pack/test/functional/page_objects/gis_page.ts +++ b/x-pack/test/functional/page_objects/gis_page.ts @@ -556,6 +556,7 @@ export class GisPageObject extends FtrService { this.log.debug(`Remove layer ${layerName}`); await this.openLayerPanel(layerName); await this.testSubjects.click(`mapRemoveLayerButton`); + await this.common.clickConfirmOnModal(); await this.waitForLayerDeleted(layerName); } From 8ea512c2b492109a07b9933355f9d8d0d48c70de Mon Sep 17 00:00:00 2001 From: Mark Hopkin Date: Thu, 13 Oct 2022 18:05:52 +0100 Subject: [PATCH 23/35] [Fleet] Only return data streams managed by fleet (#143300) --- .../server/routes/data_streams/handlers.ts | 12 ++++++++-- .../apis/data_streams/list.ts | 23 +++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts b/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts index d761f8b5e7f30..274ab22999ff8 100644 --- a/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts @@ -59,8 +59,16 @@ export const getListHandler: RequestHandler = async (context, request, response) getPackageSavedObjects(savedObjects.client), ]); - const dataStreamsInfoByName = keyBy(dataStreamsInfo, 'name'); - const dataStreamsStatsByName = keyBy(dataStreamStats, 'data_stream'); + const filteredDataStreamsInfo = dataStreamsInfo.filter( + (ds) => ds?._meta?.managed_by === 'fleet' + ); + + const dataStreamsInfoByName = keyBy(filteredDataStreamsInfo, 'name'); + + const filteredDataStreamsStats = dataStreamStats.filter( + (dss) => !!dataStreamsInfoByName[dss.data_stream] + ); + const dataStreamsStatsByName = keyBy(filteredDataStreamsStats, 'data_stream'); // Combine data stream info const dataStreams = merge(dataStreamsInfoByName, dataStreamsStatsByName); diff --git a/x-pack/test/fleet_api_integration/apis/data_streams/list.ts b/x-pack/test/fleet_api_integration/apis/data_streams/list.ts index 72fea406bcbf9..3866002647285 100644 --- a/x-pack/test/fleet_api_integration/apis/data_streams/list.ts +++ b/x-pack/test/fleet_api_integration/apis/data_streams/list.ts @@ -23,6 +23,7 @@ export default function (providerContext: FtrProviderContext) { const pkgVersion = '0.1.0'; const logsTemplateName = `logs-${pkgName}.test_logs`; const metricsTemplateName = `metrics-${pkgName}.test_metrics`; + const notFleetTemplateName = `metrics-${pkgName}.test_metrics_not_fleet`; const uninstallPackage = async (name: string, version: string) => { await supertest.delete(`/api/fleet/epm/packages/${name}/${version}`).set('kbn-xsrf', 'xxxx'); @@ -69,6 +70,24 @@ export default function (providerContext: FtrProviderContext) { }) ); + // This stream should never be returned as it is not + // managed by fleet (it isnt added to a fleet managed data stream) + responses.push( + await es.transport.request({ + method: 'POST', + path: `/${notFleetTemplateName}-default/_doc`, + body: { + '@timestamp': '2015-01-01', + logs_test_name: 'test', + data_stream: { + dataset: `${pkgName}.test_metrics_not_fleet`, + namespace: 'default', + type: 'metrics', + }, + }, + }) + ); + return responses as IndexResponse[]; }; @@ -104,6 +123,10 @@ export default function (providerContext: FtrProviderContext) { method: 'DELETE', path: `/_data_stream/${metricsTemplateName}-default`, }); + await es.transport.request({ + method: 'DELETE', + path: `/_data_stream/${notFleetTemplateName}-default`, + }); } catch (e) { // Silently swallow errors here as not all tests seed data streams } From 825f61bb25e8ac0f8c76a34c395d395caca212df Mon Sep 17 00:00:00 2001 From: liza-mae Date: Thu, 13 Oct 2022 11:18:16 -0600 Subject: [PATCH 24/35] [upgrade] Fix dashboard smoke test (#143110) * [upgrade] Fix dashboard smoke test * Update version check * Set timepicker to last year * Fix time * Revert back time * Try year time span again --- .../apps/dashboard/dashboard_smoke_tests.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts b/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts index b156f909d7a5d..341d4af0e4c64 100644 --- a/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts +++ b/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import moment from 'moment'; +import semver from 'semver'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { @@ -24,7 +24,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { ]; const dashboardTests = [ - { name: 'flights', numPanels: 16 }, + { name: 'flights', numPanels: 15 }, { name: 'logs', numPanels: 10 }, { name: 'ecommerce', numPanels: 11 }, ]; @@ -41,12 +41,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { dashboardTests.forEach(({ name, numPanels }) => { it('should launch sample ' + name + ' data set dashboard', async () => { await PageObjects.home.launchSampleDashboard(name); + await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year'); await PageObjects.header.waitUntilLoadingHasFinished(); await renderable.waitForRender(); - const todayYearMonthDay = moment().format('MMM D, YYYY'); - const fromTime = `${todayYearMonthDay} @ 00:00:00.000`; - const toTime = `${todayYearMonthDay} @ 23:59:59.999`; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); const panelCount = await PageObjects.dashboard.getPanelCount(); expect(panelCount).to.be.above(numPanels); }); @@ -58,7 +55,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { log.debug('Checking saved searches rendered'); await dashboardExpect.savedSearchRowCount(49); log.debug('Checking input controls rendered'); - await dashboardExpect.controlCount(3); + if (semver.lt(process.env.ORIGINAL_VERSION!, '8.6.0-SNAPSHOT')) { + await dashboardExpect.inputControlItemCount(3); + } else { + await dashboardExpect.controlCount(3); + } log.debug('Checking tag cloud rendered'); await dashboardExpect.tagCloudWithValuesFound([ 'Sunny', From bdeedea4bd14a2aa95df8030ebab7a17ce315896 Mon Sep 17 00:00:00 2001 From: Marco Liberati Date: Thu, 13 Oct 2022 19:28:27 +0200 Subject: [PATCH 25/35] :sparkles: Add autosuggestion for double eq sign (#143286) --- .../formula/editor/formula_editor.tsx | 61 ++++++++++--------- .../formula/editor/math_completion.ts | 19 +++++- 2 files changed, 49 insertions(+), 31 deletions(-) diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx index 4464b54fb8a32..fa293a57903fc 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx @@ -41,6 +41,8 @@ import { getTokenInfo, offsetToRowColumn, monacoPositionToOffset, + createEditOperation, + MARKER, } from './math_completion'; import { LANGUAGE_ID } from './math_tokenization'; import { MemoizedFormulaHelp } from './formula_help'; @@ -85,6 +87,8 @@ export const WrappedFormulaEditor = ({ const MemoizedFormulaEditor = React.memo(FormulaEditor); +const namedArgumentsTypes = new Set(['kql', 'lucene', 'shift', 'reducedTimeRange']); + export function FormulaEditor({ layer, paramEditorUpdater, @@ -533,47 +537,44 @@ export function FormulaEditor({ const isSingleQuoteCase = /'LENS_MATH_MARKER/; // Make sure that we are only adding kql='' or lucene='', and also // check that the = sign isn't inside the KQL expression like kql='=' - if ( - !tokenInfo || - typeof tokenInfo.ast === 'number' || - tokenInfo.ast.type !== 'namedArgument' || - (tokenInfo.ast.name !== 'kql' && - tokenInfo.ast.name !== 'lucene' && - tokenInfo.ast.name !== 'shift' && - tokenInfo.ast.name !== 'reducedTimeRange') || - (tokenInfo.ast.value !== 'LENS_MATH_MARKER' && - !isSingleQuoteCase.test(tokenInfo.ast.value)) - ) { - return; + if (tokenInfo) { + if ( + typeof tokenInfo.ast === 'number' || + tokenInfo.ast.type !== 'namedArgument' || + !namedArgumentsTypes.has(tokenInfo.ast.name) || + (tokenInfo.ast.value !== MARKER && !isSingleQuoteCase.test(tokenInfo.ast.value)) + ) { + return; + } } let editOperation: monaco.editor.IIdentifiedSingleEditOperation | null = null; + const cursorOffset = 2; if (char === '=') { - editOperation = { - range: { - ...currentPosition, - // Insert after the current char - startColumn: currentPosition.startColumn + 1, - endColumn: currentPosition.startColumn + 1, - }, - text: `''`, - }; + // check also the previous char whether it was already a = + // to avoid infinite loops + if (!tokenInfo && currentText.charAt(offset - 1) !== '=') { + editOperation = createEditOperation('=', currentPosition, 1); + } + if (tokenInfo) { + editOperation = createEditOperation(`''`, currentPosition, 1); + } } + + if (!tokenInfo && !editOperation) { + return; + } + if ( char === "'" && + tokenInfo?.ast && + typeof tokenInfo.ast !== 'number' && + 'name' in tokenInfo.ast && tokenInfo.ast.name !== 'shift' && tokenInfo.ast.name !== 'reducedTimeRange' ) { - editOperation = { - range: { - ...currentPosition, - // Insert after the current char - startColumn: currentPosition.startColumn, - endColumn: currentPosition.startColumn + 1, - }, - text: `\\'`, - }; + editOperation = createEditOperation(`\\'`, currentPosition); } if (editOperation) { diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts index 0dba9dc993151..8d0c9fd4d6b6b 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts @@ -61,7 +61,7 @@ function inLocation(cursorPosition: number, location: TinymathLocation) { return cursorPosition >= location.min && cursorPosition < location.max; } -const MARKER = 'LENS_MATH_MARKER'; +export const MARKER = 'LENS_MATH_MARKER'; export function getInfoAtZeroIndexedPosition( ast: TinymathAST, @@ -94,6 +94,23 @@ export function getInfoAtZeroIndexedPosition( }; } +export function createEditOperation( + textToInject: string, + currentPosition: monaco.IRange, + startOffset: number = 0, + endOffset: number = 1 +) { + return { + range: { + ...currentPosition, + // Insert after the current char + startColumn: currentPosition.startColumn + startOffset, + endColumn: currentPosition.startColumn + endOffset, + }, + text: textToInject, + }; +} + export function offsetToRowColumn(expression: string, offset: number): monaco.Position { const lines = expression.split(/\n/); let remainingChars = offset; From 3971a989ba5b01faccafa69d781eea1e36a95283 Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Thu, 13 Oct 2022 13:30:07 -0400 Subject: [PATCH 26/35] [Guided onboarding] Update search config (#143302) --- .../public/constants/guides_config/search.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/guided_onboarding/public/constants/guides_config/search.ts b/src/plugins/guided_onboarding/public/constants/guides_config/search.ts index f91c0af1ba446..3c083a3bd96c1 100644 --- a/src/plugins/guided_onboarding/public/constants/guides_config/search.ts +++ b/src/plugins/guided_onboarding/public/constants/guides_config/search.ts @@ -25,8 +25,8 @@ export const searchConfig: GuideConfig = { 'Vivamus pretium, elit dictum lacinia aliquet, libero nibh dictum enim, a rhoncus leo magna in sapien.', ], location: { - appID: 'guidedOnboardingExample', - path: 'stepOne', + appID: 'enterpriseSearch', + path: '', }, }, { From 04ebe4e19aff3fe6b290def67541b64ed5d188bc Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Thu, 13 Oct 2022 20:37:55 +0300 Subject: [PATCH 27/35] [Lens] Fixes the dark theme inconcistency in text based mode (#143284) --- .../text_based/text_based_languages.tsx | 138 ++++++++++-------- 1 file changed, 74 insertions(+), 64 deletions(-) diff --git a/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx index 4b56b633715b4..f7e78e830669a 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx @@ -14,6 +14,7 @@ import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import type { AggregateQuery } from '@kbn/es-query'; import type { SavedObjectReference } from '@kbn/core/public'; import { EuiButtonEmpty, EuiFormRow } from '@elastic/eui'; +import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import type { ExpressionsStart, DatatableColumnType } from '@kbn/expressions-plugin/public'; import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { DataPublicPluginStart } from '@kbn/data-plugin/public'; @@ -343,15 +344,17 @@ export function getTextBasedDatasource({ renderDataPanel(domElement: Element, props: DatasourceDataPanelProps) { const layerFields = TextBasedDatasource?.getSelectedFields?.(props.state); render( - - - , + + + + + , domElement ); }, @@ -398,60 +401,65 @@ export function getTextBasedDatasource({ (column) => column.columnId === props.columnId ); render( - - { - const meta = fields.find((f) => f.name === choice.field)?.meta; - const newColumn = { - columnId: props.columnId, - fieldName: choice.field, - meta, - }; - return props.setState( - !selectedField - ? { - ...props.state, - layers: { - ...props.state.layers, - [props.layerId]: { - ...props.state.layers[props.layerId], - columns: [...props.state.layers[props.layerId].columns, newColumn], - allColumns: [...props.state.layers[props.layerId].allColumns, newColumn], + + + { + const meta = fields.find((f) => f.name === choice.field)?.meta; + const newColumn = { + columnId: props.columnId, + fieldName: choice.field, + meta, + }; + return props.setState( + !selectedField + ? { + ...props.state, + layers: { + ...props.state.layers, + [props.layerId]: { + ...props.state.layers[props.layerId], + columns: [...props.state.layers[props.layerId].columns, newColumn], + allColumns: [ + ...props.state.layers[props.layerId].allColumns, + newColumn, + ], + }, }, - }, - } - : { - ...props.state, - layers: { - ...props.state.layers, - [props.layerId]: { - ...props.state.layers[props.layerId], - columns: props.state.layers[props.layerId].columns.map((col) => - col.columnId !== props.columnId - ? col - : { ...col, fieldName: choice.field } - ), - allColumns: props.state.layers[props.layerId].allColumns.map((col) => - col.columnId !== props.columnId - ? col - : { ...col, fieldName: choice.field } - ), + } + : { + ...props.state, + layers: { + ...props.state.layers, + [props.layerId]: { + ...props.state.layers[props.layerId], + columns: props.state.layers[props.layerId].columns.map((col) => + col.columnId !== props.columnId + ? col + : { ...col, fieldName: choice.field } + ), + allColumns: props.state.layers[props.layerId].allColumns.map((col) => + col.columnId !== props.columnId + ? col + : { ...col, fieldName: choice.field } + ), + }, }, - }, - } - ); - }} - /> - , + } + ); + }} + /> + + , domElement ); }, @@ -461,9 +469,11 @@ export function getTextBasedDatasource({ props: DatasourceLayerPanelProps ) => { render( - - - , + + + + + , domElement ); }, From f60e22b4c3e885f5d073c17f98e0415b021199f5 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Thu, 13 Oct 2022 14:32:55 -0400 Subject: [PATCH 28/35] Bump xml-crypto to version 3.0.0 (#143305) --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 6b72c857c310c..11ec23ee61232 100644 --- a/package.json +++ b/package.json @@ -1450,7 +1450,7 @@ "webpack-dev-server": "^4.9.3", "webpack-merge": "^4.2.2", "webpack-sources": "^1.4.1", - "xml-crypto": "^2.1.4", + "xml-crypto": "^3.0.0", "xmlbuilder": "13.0.2", "yargs": "^15.4.1" } diff --git a/yarn.lock b/yarn.lock index bfdb7a7a171cb..1564d863f4305 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9475,10 +9475,10 @@ object.fromentries "^2.0.0" prop-types "^15.7.0" -"@xmldom/xmldom@^0.7.0": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.7.4.tgz#93b2f9486c88b6464e97f76c9ab49b0a548fbe57" - integrity sha512-wdxC79cvO7PjSM34jATd/RYZuYWQ8y/R7MidZl1NYYlbpFn1+spfjkiR3ZsJfcaTs2IyslBN7VwBBJwrYKM+zw== +"@xmldom/xmldom@^0.8.3": + version "0.8.3" + resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.3.tgz#beaf980612532aa9a3004aff7e428943aeaa0711" + integrity sha512-Lv2vySXypg4nfa51LY1nU8yDAGo/5YwF+EY/rUZgIbfvwVARcd67ttCM8SMsTeJy51YhHYavEq+FS6R0hW9PFQ== "@xobotyi/scrollbar-width@1.9.5": version "1.9.5" @@ -29066,12 +29066,12 @@ xdg-basedir@^4.0.0: resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== -xml-crypto@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/xml-crypto/-/xml-crypto-2.1.4.tgz#85b3c62fa0debc4956ee72cb2dfee65651e865b5" - integrity sha512-ModFeGOy67L/XXHcuepnYGF7DASEDw7fhvy+qIs1ORoH55G1IIr+fN0kaMtttwvmNFFMskD9AHro8wx352/mUg== +xml-crypto@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xml-crypto/-/xml-crypto-3.0.0.tgz#e3342f9c9a94455d4700431ac9803493bf51cf81" + integrity sha512-vdmZOsWgjnFxYGY7OwCgxs+HLWzwvLgX2n0NSYWh3gudckQyNOmtJTT6ooOWEvDZSpC9qRjRs2bEXqKFi1oCHw== dependencies: - "@xmldom/xmldom" "^0.7.0" + "@xmldom/xmldom" "^0.8.3" xpath "0.0.32" xml-name-validator@^3.0.0: From 314678a9d2c6dda77aa4fbe593ac2aac5fd04998 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Thu, 13 Oct 2022 20:51:55 +0200 Subject: [PATCH 29/35] [Synthetics] Added monitor duration sparkline (#143266) --- .../availability_sparklines.tsx | 2 +- .../monitor_summary/duration_sparklines.tsx | 45 +++++++++++++++++++ .../monitor_summary/monitor_summary.tsx | 5 ++- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/duration_sparklines.tsx diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/availability_sparklines.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/availability_sparklines.tsx index 3a9cfcf72812a..bc05d8fcc7a51 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/availability_sparklines.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/availability_sparklines.tsx @@ -31,7 +31,7 @@ export const AvailabilitySparklines = () => { attributes={[ { seriesType: 'area', - time: { from: 'now-15m/m', to: 'now' }, + time: { from: 'now-30d/d', to: 'now' }, name: 'Monitor availability', dataType: 'synthetics', selectedMetricField: 'monitor_availability', diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/duration_sparklines.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/duration_sparklines.tsx new file mode 100644 index 0000000000000..f388decd14ddb --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/duration_sparklines.tsx @@ -0,0 +1,45 @@ +/* + * 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 from 'react'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { ReportTypes, useTheme } from '@kbn/observability-plugin/public'; +import { useParams } from 'react-router-dom'; +import { ClientPluginsStart } from '../../../../../plugin'; + +export const DurationSparklines = () => { + const { + services: { + observability: { ExploratoryViewEmbeddable }, + }, + } = useKibana(); + const { monitorId } = useParams<{ monitorId: string }>(); + + const theme = useTheme(); + + return ( + <> + + + ); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx index efba55158c5b8..6d4dd6018acaf 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx @@ -17,6 +17,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { DurationSparklines } from './duration_sparklines'; import { MonitorDurationTrend } from './duration_trend'; import { StepDurationPanel } from './step_duration_panel'; import { AvailabilityPanel } from './availability_panel'; @@ -56,7 +57,9 @@ export const MonitorSummary = () => { - {/* TODO: Add duration metric sparkline*/} + + + From 3f2c71e8d8829264ac132aa413e2868b2ab2320d Mon Sep 17 00:00:00 2001 From: Xavier Mouligneau Date: Thu, 13 Oct 2022 16:26:44 -0400 Subject: [PATCH 30/35] [RAM] Restructure our migrations in alert plugins (#143208) * re-structure migrations code * fix check types * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * rename function with M for major, m for minor and p for patch * fix 7.11.0 * review Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../server/saved_objects/migrations.ts | 1082 ----------------- .../saved_objects/migrations/7.10/index.ts | 96 ++ .../saved_objects/migrations/7.11/index.ts | 200 +++ .../saved_objects/migrations/7.13/index.ts | 87 ++ .../saved_objects/migrations/7.14/index.ts | 46 + .../saved_objects/migrations/7.15/index.ts | 115 ++ .../saved_objects/migrations/7.16/index.ts | 159 +++ .../saved_objects/migrations/8.0/index.ts | 133 ++ .../saved_objects/migrations/8.2/index.ts | 41 + .../saved_objects/migrations/8.3/index.ts | 96 ++ .../saved_objects/migrations/8.4/index.ts | 30 + .../saved_objects/migrations/8.5/index.ts | 65 + .../saved_objects/migrations/constants.ts | 12 + .../index.test.ts} | 6 +- .../server/saved_objects/migrations/index.ts | 155 +++ .../server/saved_objects/migrations/types.ts | 18 + .../server/saved_objects/migrations/utils.ts | 59 + 17 files changed, 1316 insertions(+), 1084 deletions(-) delete mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/7.10/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/7.13/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/7.14/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/7.16/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/8.0/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/8.2/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/8.3/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/8.4/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/8.5/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/constants.ts rename x-pack/plugins/alerting/server/saved_objects/{migrations.test.ts => migrations/index.test.ts} (99%) create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/index.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/types.ts create mode 100644 x-pack/plugins/alerting/server/saved_objects/migrations/utils.ts diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations.ts b/x-pack/plugins/alerting/server/saved_objects/migrations.ts deleted file mode 100644 index 20ebb7b4eb8e9..0000000000000 --- a/x-pack/plugins/alerting/server/saved_objects/migrations.ts +++ /dev/null @@ -1,1082 +0,0 @@ -/* - * 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 { isRuleType, ruleTypeMappings } from '@kbn/securitysolution-rules'; -import { isString } from 'lodash/fp'; -import { omit, pick } from 'lodash'; -import moment from 'moment-timezone'; -import { gte } from 'semver'; -import { - LogMeta, - SavedObjectMigrationMap, - SavedObjectUnsanitizedDoc, - SavedObjectMigrationFn, - SavedObjectMigrationContext, - SavedObjectAttributes, - SavedObjectAttribute, - SavedObjectReference, -} from '@kbn/core/server'; -import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; -import type { IsMigrationNeededPredicate } from '@kbn/encrypted-saved-objects-plugin/server'; -import { MigrateFunctionsObject, MigrateFunction } from '@kbn/kibana-utils-plugin/common'; -import { mergeSavedObjectMigrationMaps } from '@kbn/core/server'; -import { isSerializedSearchSource, SerializedSearchSourceFields } from '@kbn/data-plugin/common'; -import { extractRefsFromGeoContainmentAlert } from './geo_containment/migrations'; -import { RawRule, RawRuleAction, RawRuleExecutionStatus } from '../types'; -import { getMappedParams } from '../rules_client/lib/mapped_params_utils'; - -const SIEM_APP_ID = 'securitySolution'; -const SIEM_SERVER_APP_ID = 'siem'; -const MINIMUM_SS_MIGRATION_VERSION = '8.3.0'; -export const LEGACY_LAST_MODIFIED_VERSION = 'pre-7.10.0'; -export const FILEBEAT_7X_INDICATOR_PATH = 'threatintel.indicator'; - -interface AlertLogMeta extends LogMeta { - migrations: { alertDocument: SavedObjectUnsanitizedDoc }; -} - -type AlertMigration = ( - doc: SavedObjectUnsanitizedDoc, - context: SavedObjectMigrationContext -) => SavedObjectUnsanitizedDoc; - -function createEsoMigration( - encryptedSavedObjects: EncryptedSavedObjectsPluginSetup, - isMigrationNeededPredicate: IsMigrationNeededPredicate, - migrationFunc: AlertMigration -) { - return encryptedSavedObjects.createMigration({ - isMigrationNeededPredicate, - migration: migrationFunc, - shouldMigrateIfDecryptionFails: true, // shouldMigrateIfDecryptionFails flag that applies the migration to undecrypted document if decryption fails - }); -} - -const SUPPORT_INCIDENTS_ACTION_TYPES = ['.servicenow', '.jira', '.resilient']; - -export const isAnyActionSupportIncidents = (doc: SavedObjectUnsanitizedDoc): boolean => - doc.attributes.actions.some((action) => - SUPPORT_INCIDENTS_ACTION_TYPES.includes(action.actionTypeId) - ); - -// Deprecated in 8.0 -export const isSiemSignalsRuleType = (doc: SavedObjectUnsanitizedDoc): boolean => - doc.attributes.alertTypeId === 'siem.signals'; - -export const isEsQueryRuleType = (doc: SavedObjectUnsanitizedDoc) => - doc.attributes.alertTypeId === '.es-query'; - -export const isDetectionEngineAADRuleType = (doc: SavedObjectUnsanitizedDoc): boolean => - (Object.values(ruleTypeMappings) as string[]).includes(doc.attributes.alertTypeId); - -/** - * Returns true if the alert type is that of "siem.notifications" which is a legacy notification system that was deprecated in 7.16.0 - * in favor of using the newer alerting notifications system. - * @param doc The saved object alert type document - * @returns true if this is a legacy "siem.notifications" rule, otherwise false - * @deprecated Once we are confident all rules relying on side-car actions SO's have been migrated to SO references we should remove this function - */ -export const isSecuritySolutionLegacyNotification = ( - doc: SavedObjectUnsanitizedDoc -): boolean => doc.attributes.alertTypeId === 'siem.notifications'; - -export function getMigrations( - encryptedSavedObjects: EncryptedSavedObjectsPluginSetup, - searchSourceMigrations: MigrateFunctionsObject, - isPreconfigured: (connectorId: string) => boolean -): SavedObjectMigrationMap { - const migrationWhenRBACWasIntroduced = createEsoMigration( - encryptedSavedObjects, - // migrate all documents in 7.10 in order to add the "meta" RBAC field - (doc): doc is SavedObjectUnsanitizedDoc => true, - pipeMigrations( - markAsLegacyAndChangeConsumer, - setAlertIdAsDefaultDedupkeyOnPagerDutyActions, - initializeExecutionStatus - ) - ); - - const migrationAlertUpdatedAtAndNotifyWhen = createEsoMigration( - encryptedSavedObjects, - // migrate all documents in 7.11 in order to add the "updatedAt" and "notifyWhen" fields - (doc): doc is SavedObjectUnsanitizedDoc => true, - pipeMigrations(setAlertUpdatedAtDate, setNotifyWhen) - ); - - const migrationActions7112 = createEsoMigration( - encryptedSavedObjects, - (doc): doc is SavedObjectUnsanitizedDoc => isAnyActionSupportIncidents(doc), - pipeMigrations(restructureConnectorsThatSupportIncident) - ); - - const migrationSecurityRules713 = createEsoMigration( - encryptedSavedObjects, - (doc): doc is SavedObjectUnsanitizedDoc => isSiemSignalsRuleType(doc), - pipeMigrations(removeNullsFromSecurityRules) - ); - - const migrationSecurityRules714 = createEsoMigration( - encryptedSavedObjects, - (doc): doc is SavedObjectUnsanitizedDoc => isSiemSignalsRuleType(doc), - pipeMigrations(removeNullAuthorFromSecurityRules) - ); - - const migrationSecurityRules715 = createEsoMigration( - encryptedSavedObjects, - (doc): doc is SavedObjectUnsanitizedDoc => isSiemSignalsRuleType(doc), - pipeMigrations(addExceptionListsToReferences) - ); - - const migrateRules716 = createEsoMigration( - encryptedSavedObjects, - (doc): doc is SavedObjectUnsanitizedDoc => true, - pipeMigrations( - setLegacyId, - getRemovePreconfiguredConnectorsFromReferencesFn(isPreconfigured), - addRuleIdsToLegacyNotificationReferences, - extractRefsFromGeoContainmentAlert - ) - ); - - const migrationRules800 = createEsoMigration( - encryptedSavedObjects, - (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => true, - pipeMigrations( - addThreatIndicatorPathToThreatMatchRules, - addSecuritySolutionAADRuleTypes, - fixInventoryThresholdGroupId - ) - ); - - const migrationRules801 = createEsoMigration( - encryptedSavedObjects, - (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => true, - pipeMigrations(addSecuritySolutionAADRuleTypeTags) - ); - - const migrationRules820 = createEsoMigration( - encryptedSavedObjects, - (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => true, - pipeMigrations(addMappedParams) - ); - - const migrationRules830 = createEsoMigration( - encryptedSavedObjects, - (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => true, - pipeMigrations(addSearchType, removeInternalTags, convertSnoozes) - ); - - const migrationRules841 = createEsoMigration( - encryptedSavedObjects, - (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => true, - pipeMigrations(removeIsSnoozedUntil) - ); - - const migrationRules850 = createEsoMigration( - encryptedSavedObjects, - (doc): doc is SavedObjectUnsanitizedDoc => isEsQueryRuleType(doc), - pipeMigrations(stripOutRuntimeFieldsInOldESQuery) - ); - - return mergeSavedObjectMigrationMaps( - { - '7.10.0': executeMigrationWithErrorHandling(migrationWhenRBACWasIntroduced, '7.10.0'), - '7.11.0': executeMigrationWithErrorHandling(migrationAlertUpdatedAtAndNotifyWhen, '7.11.0'), - '7.11.2': executeMigrationWithErrorHandling(migrationActions7112, '7.11.2'), - '7.13.0': executeMigrationWithErrorHandling(migrationSecurityRules713, '7.13.0'), - '7.14.1': executeMigrationWithErrorHandling(migrationSecurityRules714, '7.14.1'), - '7.15.0': executeMigrationWithErrorHandling(migrationSecurityRules715, '7.15.0'), - '7.16.0': executeMigrationWithErrorHandling(migrateRules716, '7.16.0'), - '8.0.0': executeMigrationWithErrorHandling(migrationRules800, '8.0.0'), - '8.0.1': executeMigrationWithErrorHandling(migrationRules801, '8.0.1'), - '8.2.0': executeMigrationWithErrorHandling(migrationRules820, '8.2.0'), - '8.3.0': executeMigrationWithErrorHandling(migrationRules830, '8.3.0'), - '8.4.1': executeMigrationWithErrorHandling(migrationRules841, '8.4.1'), - '8.5.0': executeMigrationWithErrorHandling(migrationRules850, '8.5.0'), - }, - getSearchSourceMigrations(encryptedSavedObjects, searchSourceMigrations) - ); -} - -function executeMigrationWithErrorHandling( - migrationFunc: SavedObjectMigrationFn, - version: string -) { - return (doc: SavedObjectUnsanitizedDoc, context: SavedObjectMigrationContext) => { - try { - return migrationFunc(doc, context); - } catch (ex) { - context.log.error( - `encryptedSavedObject ${version} migration failed for alert ${doc.id} with error: ${ex.message}`, - { - migrations: { - alertDocument: doc, - }, - } - ); - throw ex; - } - }; -} - -const setAlertUpdatedAtDate = ( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc => { - const updatedAt = doc.updated_at || doc.attributes.createdAt; - return { - ...doc, - attributes: { - ...doc.attributes, - updatedAt, - }, - }; -}; - -const setNotifyWhen = ( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc => { - const notifyWhen = doc.attributes.throttle ? 'onThrottleInterval' : 'onActiveAlert'; - return { - ...doc, - attributes: { - ...doc.attributes, - notifyWhen, - }, - }; -}; - -const consumersToChange: Map = new Map( - Object.entries({ - alerting: 'alerts', - metrics: 'infrastructure', - [SIEM_APP_ID]: SIEM_SERVER_APP_ID, - }) -); - -function markAsLegacyAndChangeConsumer( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const { - attributes: { consumer }, - } = doc; - return { - ...doc, - attributes: { - ...doc.attributes, - consumer: consumersToChange.get(consumer) ?? consumer, - // mark any alert predating 7.10 as a legacy alert - meta: { - versionApiKeyLastmodified: LEGACY_LAST_MODIFIED_VERSION, - }, - }, - }; -} - -function setAlertIdAsDefaultDedupkeyOnPagerDutyActions( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const { attributes } = doc; - return { - ...doc, - attributes: { - ...attributes, - ...(attributes.actions - ? { - actions: attributes.actions.map((action) => { - if (action.actionTypeId !== '.pagerduty' || action.params.eventAction === 'trigger') { - return action; - } - return { - ...action, - params: { - ...action.params, - dedupKey: action.params.dedupKey ?? '{{alertId}}', - }, - }; - }), - } - : {}), - }, - }; -} - -function initializeExecutionStatus( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const { attributes } = doc; - return { - ...doc, - attributes: { - ...attributes, - executionStatus: { - status: 'pending', - lastExecutionDate: new Date().toISOString(), - error: null, - } as RawRuleExecutionStatus, - }, - }; -} - -function isEmptyObject(obj: {}) { - for (const attr in obj) { - if (Object.prototype.hasOwnProperty.call(obj, attr)) { - return false; - } - } - return true; -} - -function restructureConnectorsThatSupportIncident( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const { actions } = doc.attributes; - const newActions = actions.reduce((acc, action) => { - if ( - ['.servicenow', '.jira', '.resilient'].includes(action.actionTypeId) && - action.params.subAction === 'pushToService' - ) { - // Future developer, we needed to do that because when we created this migration - // we forget to think about user already using 7.11.0 and having an incident attribute build the right way - // IMPORTANT -> if you change this code please do the same inside of this file - // x-pack/plugins/alerting/server/saved_objects/migrations.ts - const subActionParamsIncident = - (action.params?.subActionParams as SavedObjectAttributes)?.incident ?? null; - if (subActionParamsIncident != null && !isEmptyObject(subActionParamsIncident)) { - return [...acc, action]; - } - if (action.actionTypeId === '.servicenow') { - const { - title, - comments, - comment, - description, - severity, - urgency, - impact, - short_description: shortDescription, - } = action.params.subActionParams as { - title: string; - description?: string; - severity?: string; - urgency?: string; - impact?: string; - comment?: string; - comments?: Array<{ commentId: string; comment: string }>; - short_description?: string; - }; - return [ - ...acc, - { - ...action, - params: { - subAction: 'pushToService', - subActionParams: { - incident: { - short_description: shortDescription ?? title, - description, - severity, - urgency, - impact, - }, - comments: [ - ...(comments ?? []), - ...(comment != null ? [{ commentId: '1', comment }] : []), - ], - }, - }, - }, - ] as RawRuleAction[]; - } else if (action.actionTypeId === '.jira') { - const { title, comments, description, issueType, priority, labels, parent, summary } = - action.params.subActionParams as { - title: string; - description: string; - issueType: string; - priority?: string; - labels?: string[]; - parent?: string; - comments?: unknown[]; - summary?: string; - }; - return [ - ...acc, - { - ...action, - params: { - subAction: 'pushToService', - subActionParams: { - incident: { - summary: summary ?? title, - description, - issueType, - priority, - labels, - parent, - }, - comments, - }, - }, - }, - ] as RawRuleAction[]; - } else if (action.actionTypeId === '.resilient') { - const { title, comments, description, incidentTypes, severityCode, name } = action.params - .subActionParams as { - title: string; - description: string; - incidentTypes?: number[]; - severityCode?: number; - comments?: unknown[]; - name?: string; - }; - return [ - ...acc, - { - ...action, - params: { - subAction: 'pushToService', - subActionParams: { - incident: { - name: name ?? title, - description, - incidentTypes, - severityCode, - }, - comments, - }, - }, - }, - ] as RawRuleAction[]; - } - } - - return [...acc, action]; - }, [] as RawRuleAction[]); - - return { - ...doc, - attributes: { - ...doc.attributes, - actions: newActions, - }, - }; -} - -function convertNullToUndefined(attribute: SavedObjectAttribute) { - return attribute != null ? attribute : undefined; -} - -function removeNullsFromSecurityRules( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const { - attributes: { params }, - } = doc; - return { - ...doc, - attributes: { - ...doc.attributes, - params: { - ...params, - buildingBlockType: convertNullToUndefined(params.buildingBlockType), - note: convertNullToUndefined(params.note), - index: convertNullToUndefined(params.index), - language: convertNullToUndefined(params.language), - license: convertNullToUndefined(params.license), - outputIndex: convertNullToUndefined(params.outputIndex), - savedId: convertNullToUndefined(params.savedId), - timelineId: convertNullToUndefined(params.timelineId), - timelineTitle: convertNullToUndefined(params.timelineTitle), - meta: convertNullToUndefined(params.meta), - query: convertNullToUndefined(params.query), - filters: convertNullToUndefined(params.filters), - riskScoreMapping: params.riskScoreMapping != null ? params.riskScoreMapping : [], - ruleNameOverride: convertNullToUndefined(params.ruleNameOverride), - severityMapping: params.severityMapping != null ? params.severityMapping : [], - threat: params.threat != null ? params.threat : [], - threshold: - params.threshold != null && - typeof params.threshold === 'object' && - !Array.isArray(params.threshold) - ? { - field: Array.isArray(params.threshold.field) - ? params.threshold.field - : params.threshold.field === '' || params.threshold.field == null - ? [] - : [params.threshold.field], - value: params.threshold.value, - cardinality: - params.threshold.cardinality != null ? params.threshold.cardinality : [], - } - : undefined, - timestampOverride: convertNullToUndefined(params.timestampOverride), - exceptionsList: - params.exceptionsList != null - ? params.exceptionsList - : params.exceptions_list != null - ? params.exceptions_list - : params.lists != null - ? params.lists - : [], - threatFilters: convertNullToUndefined(params.threatFilters), - machineLearningJobId: - params.machineLearningJobId == null - ? undefined - : Array.isArray(params.machineLearningJobId) - ? params.machineLearningJobId - : [params.machineLearningJobId], - }, - }, - }; -} - -/** - * The author field was introduced later and was not part of the original rules. We overlooked - * the filling in the author field as an empty array in an earlier upgrade routine from - * 'removeNullsFromSecurityRules' during the 7.13.0 upgrade. Since we don't change earlier migrations, - * but rather only move forward with the "arrow of time" we are going to upgrade and fix - * it if it is missing for anyone in 7.14.0 and above release. Earlier releases if we want to fix them, - * would have to be modified as a "7.13.1", etc... if we want to fix it there. - * @param doc The document that is not migrated and contains a "null" or "undefined" author field - * @returns The document with the author field fleshed in. - */ -function removeNullAuthorFromSecurityRules( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const { - attributes: { params }, - } = doc; - return { - ...doc, - attributes: { - ...doc.attributes, - params: { - ...params, - author: params.author != null ? params.author : [], - }, - }, - }; -} - -/** - * This migrates exception list containers to saved object references on an upgrade. - * We only migrate if we find these conditions: - * - exceptionLists are an array and not null, undefined, or malformed data. - * - The exceptionList item is an object and id is a string and not null, undefined, or malformed data - * - The existing references do not already have an exceptionItem reference already found within it. - * Some of these issues could crop up during either user manual errors of modifying things, earlier migration - * issues, etc... - * @param doc The document that might have exceptionListItems to migrate - * @returns The document migrated with saved object references - */ -function addExceptionListsToReferences( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const { - attributes: { - params: { exceptionsList }, - }, - references, - } = doc; - if (!Array.isArray(exceptionsList)) { - // early return if we are not an array such as being undefined or null or malformed. - return doc; - } else { - const exceptionsToTransform = removeMalformedExceptionsList(exceptionsList); - const newReferences = exceptionsToTransform.flatMap( - (exceptionItem, index) => { - const existingReferenceFound = references?.find((reference) => { - return ( - reference.id === exceptionItem.id && - ((reference.type === 'exception-list' && exceptionItem.namespace_type === 'single') || - (reference.type === 'exception-list-agnostic' && - exceptionItem.namespace_type === 'agnostic')) - ); - }); - if (existingReferenceFound) { - // skip if the reference already exists for some uncommon reason so we do not add an additional one. - // This enables us to be idempotent and you can run this migration multiple times and get the same output. - return []; - } else { - return [ - { - name: `param:exceptionsList_${index}`, - id: String(exceptionItem.id), - type: - exceptionItem.namespace_type === 'agnostic' - ? 'exception-list-agnostic' - : 'exception-list', - }, - ]; - } - } - ); - if (references == null && newReferences.length === 0) { - // Avoid adding an empty references array if the existing saved object never had one to begin with - return doc; - } else { - return { ...doc, references: [...(references ?? []), ...newReferences] }; - } - } -} - -/** - * This will do a flatMap reduce where we only return exceptionsLists and their items if: - * - exceptionLists are an array and not null, undefined, or malformed data. - * - The exceptionList item is an object and id is a string and not null, undefined, or malformed data - * - * Some of these issues could crop up during either user manual errors of modifying things, earlier migration - * issues, etc... - * @param exceptionsList The list of exceptions - * @returns The exception lists if they are a valid enough shape - */ -function removeMalformedExceptionsList( - exceptionsList: SavedObjectAttribute -): SavedObjectAttributes[] { - if (!Array.isArray(exceptionsList)) { - // early return if we are not an array such as being undefined or null or malformed. - return []; - } else { - return exceptionsList.flatMap((exceptionItem) => { - if (!(exceptionItem instanceof Object) || !isString(exceptionItem.id)) { - // return early if we are not an object such as being undefined or null or malformed - // or the exceptionItem.id is not a string from being malformed - return []; - } else { - return [exceptionItem]; - } - }); - } -} - -/** - * This migrates rule_id's within the legacy siem.notification to saved object references on an upgrade. - * We only migrate if we find these conditions: - * - ruleAlertId is a string and not null, undefined, or malformed data. - * - The existing references do not already have a ruleAlertId found within it. - * Some of these issues could crop up during either user manual errors of modifying things, earlier migration - * issues, etc... so we are safer to check them as possibilities - * @deprecated Once we are confident all rules relying on side-car actions SO's have been migrated to SO references we should remove this function - * @param doc The document that might have "ruleAlertId" to migrate into the references - * @returns The document migrated with saved object references - */ -function addRuleIdsToLegacyNotificationReferences( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const { - attributes: { - params: { ruleAlertId }, - }, - references, - } = doc; - if (!isSecuritySolutionLegacyNotification(doc) || !isString(ruleAlertId)) { - // early return if we are not a string or if we are not a security solution notification saved object. - return doc; - } else { - const existingReferences = references ?? []; - const existingReferenceFound = existingReferences.find((reference) => { - return reference.id === ruleAlertId && reference.type === 'alert'; - }); - if (existingReferenceFound) { - // skip this if the references already exists for some uncommon reason so we do not add an additional one. - return doc; - } else { - const savedObjectReference: SavedObjectReference = { - id: ruleAlertId, - name: 'param:alert_0', - type: 'alert', - }; - const newReferences = [...existingReferences, savedObjectReference]; - return { ...doc, references: newReferences }; - } - } -} - -function setLegacyId(doc: SavedObjectUnsanitizedDoc): SavedObjectUnsanitizedDoc { - const { id } = doc; - return { - ...doc, - attributes: { - ...doc.attributes, - legacyId: id, - }, - }; -} - -function addSecuritySolutionAADRuleTypes( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const ruleType = doc.attributes.params.type; - return isSiemSignalsRuleType(doc) && isRuleType(ruleType) - ? { - ...doc, - attributes: { - ...doc.attributes, - alertTypeId: ruleTypeMappings[ruleType], - enabled: false, - params: { - ...doc.attributes.params, - outputIndex: '', - }, - }, - } - : doc; -} - -function addSearchType(doc: SavedObjectUnsanitizedDoc) { - const searchType = doc.attributes.params.searchType; - - return isEsQueryRuleType(doc) && !searchType - ? { - ...doc, - attributes: { - ...doc.attributes, - params: { - ...doc.attributes.params, - searchType: 'esQuery', - }, - }, - } - : doc; -} - -function addSecuritySolutionAADRuleTypeTags( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const ruleType = doc.attributes.params.type; - return isDetectionEngineAADRuleType(doc) && isRuleType(ruleType) - ? { - ...doc, - attributes: { - ...doc.attributes, - // If the rule is disabled at this point, then the rule has not been re-enabled after - // running the 8.0.0 migrations. If `doc.attributes.scheduledTaskId` exists, then the - // rule was enabled prior to running the migration. Thus we know we should add the - // tag to indicate it was auto-disabled. - tags: - !doc.attributes.enabled && doc.attributes.scheduledTaskId - ? [...(doc.attributes.tags ?? []), 'auto_disabled_8.0'] - : doc.attributes.tags ?? [], - }, - } - : doc; -} - -function stripOutRuntimeFieldsInOldESQuery( - doc: SavedObjectUnsanitizedDoc, - context: SavedObjectMigrationContext -): SavedObjectUnsanitizedDoc { - const isESDSLrule = - isEsQueryRuleType(doc) && !isSerializedSearchSource(doc.attributes.params.searchConfiguration); - - if (isESDSLrule) { - try { - const parsedQuery = JSON.parse(doc.attributes.params.esQuery as string); - // parsing and restringifying will cause us to lose the formatting so we only do so if this rule has - // fields other than `query` which is the only valid field at this stage - const hasFieldsOtherThanQuery = Object.keys(parsedQuery).some((key) => key !== 'query'); - return hasFieldsOtherThanQuery - ? { - ...doc, - attributes: { - ...doc.attributes, - params: { - ...doc.attributes.params, - esQuery: JSON.stringify(pick(parsedQuery, 'query'), null, 4), - }, - }, - } - : doc; - } catch (err) { - // Instead of failing the upgrade when an unparsable rule is encountered, we log that the rule caouldn't be migrated and - // as a result legacy parameters might cause the rule to behave differently if it is, in fact, still running at all - context.log.error( - `unable to migrate and remove legacy runtime fields in rule ${doc.id} due to invalid query: "${doc.attributes.params.esQuery}" - query must be JSON`, - { - migrations: { - alertDocument: doc, - }, - } - ); - } - } - return doc; -} - -function addThreatIndicatorPathToThreatMatchRules( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - return isSiemSignalsRuleType(doc) && - doc.attributes.params?.type === 'threat_match' && - !doc.attributes.params.threatIndicatorPath - ? { - ...doc, - attributes: { - ...doc.attributes, - params: { - ...doc.attributes.params, - threatIndicatorPath: FILEBEAT_7X_INDICATOR_PATH, - }, - }, - } - : doc; -} - -function getRemovePreconfiguredConnectorsFromReferencesFn( - isPreconfigured: (connectorId: string) => boolean -) { - return (doc: SavedObjectUnsanitizedDoc) => { - return removePreconfiguredConnectorsFromReferences(doc, isPreconfigured); - }; -} - -function removePreconfiguredConnectorsFromReferences( - doc: SavedObjectUnsanitizedDoc, - isPreconfigured: (connectorId: string) => boolean -): SavedObjectUnsanitizedDoc { - const { - attributes: { actions }, - references, - } = doc; - - // Look for connector references - const connectorReferences = (references ?? []).filter((ref: SavedObjectReference) => - ref.name.startsWith('action_') - ); - if (connectorReferences.length > 0) { - const restReferences = (references ?? []).filter( - (ref: SavedObjectReference) => !ref.name.startsWith('action_') - ); - - const updatedConnectorReferences: SavedObjectReference[] = []; - const updatedActions: RawRule['actions'] = []; - - // For each connector reference, check if connector is preconfigured - // If yes, we need to remove from the references array and update - // the corresponding action so it directly references the preconfigured connector id - connectorReferences.forEach((connectorRef: SavedObjectReference) => { - // Look for the corresponding entry in the actions array - const correspondingAction = getCorrespondingAction(actions, connectorRef.name); - if (correspondingAction) { - if (isPreconfigured(connectorRef.id)) { - updatedActions.push({ - ...correspondingAction, - actionRef: `preconfigured:${connectorRef.id}`, - }); - } else { - updatedActions.push(correspondingAction); - updatedConnectorReferences.push(connectorRef); - } - } else { - // Couldn't find the matching action, leave as is - updatedConnectorReferences.push(connectorRef); - } - }); - - return { - ...doc, - attributes: { - ...doc.attributes, - actions: [...updatedActions], - }, - references: [...updatedConnectorReferences, ...restReferences], - }; - } - return doc; -} - -// This fixes an issue whereby metrics.alert.inventory.threshold rules had the -// group for actions incorrectly spelt as metrics.invenotry_threshold.fired vs metrics.inventory_threshold.fired -function fixInventoryThresholdGroupId( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - if (doc.attributes.alertTypeId === 'metrics.alert.inventory.threshold') { - const { - attributes: { actions }, - } = doc; - - const updatedActions = actions - ? actions.map((action) => { - // Wrong spelling - if (action.group === 'metrics.invenotry_threshold.fired') { - return { - ...action, - group: 'metrics.inventory_threshold.fired', - }; - } else { - return action; - } - }) - : []; - - return { - ...doc, - attributes: { - ...doc.attributes, - actions: updatedActions, - }, - }; - } else { - return doc; - } -} - -function addMappedParams( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const { - attributes: { params }, - } = doc; - - const mappedParams = getMappedParams(params); - - if (Object.keys(mappedParams).length) { - return { - ...doc, - attributes: { - ...doc.attributes, - mapped_params: mappedParams, - }, - }; - } - - return doc; -} - -function convertSnoozes( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - const { - attributes: { snoozeEndTime }, - } = doc; - - return { - ...doc, - attributes: { - ...(omit(doc.attributes, ['snoozeEndTime']) as RawRule), - snoozeSchedule: snoozeEndTime - ? [ - { - duration: Date.parse(snoozeEndTime as string) - Date.now(), - rRule: { - dtstart: new Date().toISOString(), - tzid: moment.tz.guess(), - count: 1, - }, - }, - ] - : [], - }, - }; -} - -function getCorrespondingAction( - actions: SavedObjectAttribute, - connectorRef: string -): RawRuleAction | null { - if (!Array.isArray(actions)) { - return null; - } else { - return actions.find( - (action) => (action as RawRuleAction)?.actionRef === connectorRef - ) as RawRuleAction; - } -} -/** - * removes internal tags(starts with '__internal') from Security Solution rules - * @param doc rule to be migrated - * @returns migrated rule if it's Security Solution rule or unchanged if not - */ -function removeInternalTags( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - if (!isDetectionEngineAADRuleType(doc)) { - return doc; - } - - const { - attributes: { tags }, - } = doc; - - const filteredTags = (tags ?? []).filter((tag) => !tag.startsWith('__internal_')); - - return { - ...doc, - attributes: { - ...doc.attributes, - tags: filteredTags, - }, - }; -} - -function pipeMigrations(...migrations: AlertMigration[]): AlertMigration { - return (doc: SavedObjectUnsanitizedDoc, context: SavedObjectMigrationContext) => - migrations.reduce((migratedDoc, nextMigration) => nextMigration(migratedDoc, context), doc); -} - -function mapSearchSourceMigrationFunc( - migrateSerializedSearchSourceFields: MigrateFunction -): MigrateFunction { - return (doc) => { - const _doc = doc as { attributes: RawRule }; - - const serializedSearchSource = _doc.attributes.params.searchConfiguration; - - if (isSerializedSearchSource(serializedSearchSource)) { - return { - ..._doc, - attributes: { - ..._doc.attributes, - params: { - ..._doc.attributes.params, - searchConfiguration: migrateSerializedSearchSourceFields(serializedSearchSource), - }, - }, - }; - } - return _doc; - }; -} - -/** - * This creates a migration map that applies search source migrations to legacy es query rules. - * It doesn't modify existing migrations. The following migrations will occur at minimum version of 8.3+. - */ -function getSearchSourceMigrations( - encryptedSavedObjects: EncryptedSavedObjectsPluginSetup, - searchSourceMigrations: MigrateFunctionsObject -) { - const filteredMigrations: SavedObjectMigrationMap = {}; - for (const versionKey in searchSourceMigrations) { - if (gte(versionKey, MINIMUM_SS_MIGRATION_VERSION)) { - const migrateSearchSource = mapSearchSourceMigrationFunc( - searchSourceMigrations[versionKey] - ) as unknown as AlertMigration; - - filteredMigrations[versionKey] = executeMigrationWithErrorHandling( - createEsoMigration( - encryptedSavedObjects, - (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => - isEsQueryRuleType(doc), - pipeMigrations(migrateSearchSource) - ), - versionKey - ); - } - } - return filteredMigrations; -} - -function removeIsSnoozedUntil( - doc: SavedObjectUnsanitizedDoc -): SavedObjectUnsanitizedDoc { - return { - ...doc, - attributes: { - ...(omit(doc.attributes, ['isSnoozedUntil']) as RawRule), - }, - }; -} diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.10/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.10/index.ts new file mode 100644 index 0000000000000..b432ff01618df --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.10/index.ts @@ -0,0 +1,96 @@ +/* + * 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 { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { RawRule, RawRuleExecutionStatus } from '../../../types'; +import { LEGACY_LAST_MODIFIED_VERSION, SIEM_APP_ID, SIEM_SERVER_APP_ID } from '../constants'; +import { createEsoMigration, pipeMigrations } from '../utils'; + +const consumersToChange: Map = new Map( + Object.entries({ + alerting: 'alerts', + metrics: 'infrastructure', + [SIEM_APP_ID]: SIEM_SERVER_APP_ID, + }) +); + +function markAsLegacyAndChangeConsumer( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const { + attributes: { consumer }, + } = doc; + return { + ...doc, + attributes: { + ...doc.attributes, + consumer: consumersToChange.get(consumer) ?? consumer, + // mark any alert predating 7.10 as a legacy alert + meta: { + versionApiKeyLastmodified: LEGACY_LAST_MODIFIED_VERSION, + }, + }, + }; +} + +function setAlertIdAsDefaultDedupkeyOnPagerDutyActions( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const { attributes } = doc; + return { + ...doc, + attributes: { + ...attributes, + ...(attributes.actions + ? { + actions: attributes.actions.map((action) => { + if (action.actionTypeId !== '.pagerduty' || action.params.eventAction === 'trigger') { + return action; + } + return { + ...action, + params: { + ...action.params, + dedupKey: action.params.dedupKey ?? '{{alertId}}', + }, + }; + }), + } + : {}), + }, + }; +} + +function initializeExecutionStatus( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const { attributes } = doc; + return { + ...doc, + attributes: { + ...attributes, + executionStatus: { + status: 'pending', + lastExecutionDate: new Date().toISOString(), + error: null, + } as RawRuleExecutionStatus, + }, + }; +} + +export const getMigrations7100 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + // migrate all documents in 7.10 in order to add the "meta" RBAC field + (doc): doc is SavedObjectUnsanitizedDoc => true, + pipeMigrations( + markAsLegacyAndChangeConsumer, + setAlertIdAsDefaultDedupkeyOnPagerDutyActions, + initializeExecutionStatus + ) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts new file mode 100644 index 0000000000000..186b20679c00d --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts @@ -0,0 +1,200 @@ +/* + * 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 { SavedObjectAttributes } from '@kbn/core-saved-objects-common'; +import { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { RawRule, RawRuleAction } from '../../../types'; +import { createEsoMigration, pipeMigrations } from '../utils'; + +const SUPPORT_INCIDENTS_ACTION_TYPES = ['.servicenow', '.jira', '.resilient']; +export const isAnyActionSupportIncidents = (doc: SavedObjectUnsanitizedDoc): boolean => + doc.attributes.actions.some((action) => + SUPPORT_INCIDENTS_ACTION_TYPES.includes(action.actionTypeId) + ); + +function isEmptyObject(obj: {}) { + for (const attr in obj) { + if (Object.prototype.hasOwnProperty.call(obj, attr)) { + return false; + } + } + return true; +} + +function setAlertUpdatedAtDate( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const updatedAt = doc.updated_at || doc.attributes.createdAt; + return { + ...doc, + attributes: { + ...doc.attributes, + updatedAt, + }, + }; +} + +function setNotifyWhen( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const notifyWhen = doc.attributes.throttle ? 'onThrottleInterval' : 'onActiveAlert'; + return { + ...doc, + attributes: { + ...doc.attributes, + notifyWhen, + }, + }; +} + +function restructureConnectorsThatSupportIncident( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const { actions } = doc.attributes; + const newActions = actions.reduce((acc, action) => { + if ( + ['.servicenow', '.jira', '.resilient'].includes(action.actionTypeId) && + action.params.subAction === 'pushToService' + ) { + // Future developer, we needed to do that because when we created this migration + // we forget to think about user already using 7.11.0 and having an incident attribute build the right way + const subActionParamsIncident = + (action.params?.subActionParams as SavedObjectAttributes)?.incident ?? null; + if (subActionParamsIncident != null && !isEmptyObject(subActionParamsIncident)) { + return [...acc, action]; + } + if (action.actionTypeId === '.servicenow') { + const { + title, + comments, + comment, + description, + severity, + urgency, + impact, + short_description: shortDescription, + } = action.params.subActionParams as { + title: string; + description?: string; + severity?: string; + urgency?: string; + impact?: string; + comment?: string; + comments?: Array<{ commentId: string; comment: string }>; + short_description?: string; + }; + return [ + ...acc, + { + ...action, + params: { + subAction: 'pushToService', + subActionParams: { + incident: { + short_description: shortDescription ?? title, + description, + severity, + urgency, + impact, + }, + comments: [ + ...(comments ?? []), + ...(comment != null ? [{ commentId: '1', comment }] : []), + ], + }, + }, + }, + ] as RawRuleAction[]; + } else if (action.actionTypeId === '.jira') { + const { title, comments, description, issueType, priority, labels, parent, summary } = + action.params.subActionParams as { + title: string; + description: string; + issueType: string; + priority?: string; + labels?: string[]; + parent?: string; + comments?: unknown[]; + summary?: string; + }; + return [ + ...acc, + { + ...action, + params: { + subAction: 'pushToService', + subActionParams: { + incident: { + summary: summary ?? title, + description, + issueType, + priority, + labels, + parent, + }, + comments, + }, + }, + }, + ] as RawRuleAction[]; + } else if (action.actionTypeId === '.resilient') { + const { title, comments, description, incidentTypes, severityCode, name } = action.params + .subActionParams as { + title: string; + description: string; + incidentTypes?: number[]; + severityCode?: number; + comments?: unknown[]; + name?: string; + }; + return [ + ...acc, + { + ...action, + params: { + subAction: 'pushToService', + subActionParams: { + incident: { + name: name ?? title, + description, + incidentTypes, + severityCode, + }, + comments, + }, + }, + }, + ] as RawRuleAction[]; + } + } + + return [...acc, action]; + }, [] as RawRuleAction[]); + + return { + ...doc, + attributes: { + ...doc.attributes, + actions: newActions, + }, + }; +} + +export const getMigrations7110 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc): doc is SavedObjectUnsanitizedDoc => true, + pipeMigrations(setAlertUpdatedAtDate, setNotifyWhen) + ); + +export const getMigrations7112 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc): doc is SavedObjectUnsanitizedDoc => isAnyActionSupportIncidents(doc), + pipeMigrations(restructureConnectorsThatSupportIncident) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.13/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.13/index.ts new file mode 100644 index 0000000000000..67b595531dfdb --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.13/index.ts @@ -0,0 +1,87 @@ +/* + * 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 { SavedObjectAttribute } from '@kbn/core-saved-objects-common'; +import { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { RawRule } from '../../../types'; +import { createEsoMigration, isSiemSignalsRuleType, pipeMigrations } from '../utils'; + +function convertNullToUndefined(attribute: SavedObjectAttribute) { + return attribute != null ? attribute : undefined; +} + +function removeNullsFromSecurityRules( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const { + attributes: { params }, + } = doc; + return { + ...doc, + attributes: { + ...doc.attributes, + params: { + ...params, + buildingBlockType: convertNullToUndefined(params.buildingBlockType), + note: convertNullToUndefined(params.note), + index: convertNullToUndefined(params.index), + language: convertNullToUndefined(params.language), + license: convertNullToUndefined(params.license), + outputIndex: convertNullToUndefined(params.outputIndex), + savedId: convertNullToUndefined(params.savedId), + timelineId: convertNullToUndefined(params.timelineId), + timelineTitle: convertNullToUndefined(params.timelineTitle), + meta: convertNullToUndefined(params.meta), + query: convertNullToUndefined(params.query), + filters: convertNullToUndefined(params.filters), + riskScoreMapping: params.riskScoreMapping != null ? params.riskScoreMapping : [], + ruleNameOverride: convertNullToUndefined(params.ruleNameOverride), + severityMapping: params.severityMapping != null ? params.severityMapping : [], + threat: params.threat != null ? params.threat : [], + threshold: + params.threshold != null && + typeof params.threshold === 'object' && + !Array.isArray(params.threshold) + ? { + field: Array.isArray(params.threshold.field) + ? params.threshold.field + : params.threshold.field === '' || params.threshold.field == null + ? [] + : [params.threshold.field], + value: params.threshold.value, + cardinality: + params.threshold.cardinality != null ? params.threshold.cardinality : [], + } + : undefined, + timestampOverride: convertNullToUndefined(params.timestampOverride), + exceptionsList: + params.exceptionsList != null + ? params.exceptionsList + : params.exceptions_list != null + ? params.exceptions_list + : params.lists != null + ? params.lists + : [], + threatFilters: convertNullToUndefined(params.threatFilters), + machineLearningJobId: + params.machineLearningJobId == null + ? undefined + : Array.isArray(params.machineLearningJobId) + ? params.machineLearningJobId + : [params.machineLearningJobId], + }, + }, + }; +} + +export const getMigrations7130 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc): doc is SavedObjectUnsanitizedDoc => isSiemSignalsRuleType(doc), + pipeMigrations(removeNullsFromSecurityRules) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.14/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.14/index.ts new file mode 100644 index 0000000000000..8a4aa555127ce --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.14/index.ts @@ -0,0 +1,46 @@ +/* + * 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 { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { RawRule } from '../../../types'; +import { createEsoMigration, isSiemSignalsRuleType, pipeMigrations } from '../utils'; + +/** + * The author field was introduced later and was not part of the original rules. We overlooked + * the filling in the author field as an empty array in an earlier upgrade routine from + * 'removeNullsFromSecurityRules' during the 7.13.0 upgrade. Since we don't change earlier migrations, + * but rather only move forward with the "arrow of time" we are going to upgrade and fix + * it if it is missing for anyone in 7.14.0 and above release. Earlier releases if we want to fix them, + * would have to be modified as a "7.13.1", etc... if we want to fix it there. + * @param doc The document that is not migrated and contains a "null" or "undefined" author field + * @returns The document with the author field fleshed in. + */ +function removeNullAuthorFromSecurityRules( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const { + attributes: { params }, + } = doc; + return { + ...doc, + attributes: { + ...doc.attributes, + params: { + ...params, + author: params.author != null ? params.author : [], + }, + }, + }; +} + +export const getMigrations7140 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc): doc is SavedObjectUnsanitizedDoc => isSiemSignalsRuleType(doc), + pipeMigrations(removeNullAuthorFromSecurityRules) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts new file mode 100644 index 0000000000000..a7b90ab347a71 --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts @@ -0,0 +1,115 @@ +/* + * 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 { + SavedObjectAttribute, + SavedObjectAttributes, + SavedObjectReference, +} from '@kbn/core-saved-objects-common'; +import { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { isString } from 'lodash/fp'; +import { RawRule } from '../../../types'; +import { createEsoMigration, isSiemSignalsRuleType, pipeMigrations } from '../utils'; + +/** + * This will do a flatMap reduce where we only return exceptionsLists and their items if: + * - exceptionLists are an array and not null, undefined, or malformed data. + * - The exceptionList item is an object and id is a string and not null, undefined, or malformed data + * + * Some of these issues could crop up during either user manual errors of modifying things, earlier migration + * issues, etc... + * @param exceptionsList The list of exceptions + * @returns The exception lists if they are a valid enough shape + */ +function removeMalformedExceptionsList( + exceptionsList: SavedObjectAttribute +): SavedObjectAttributes[] { + if (!Array.isArray(exceptionsList)) { + // early return if we are not an array such as being undefined or null or malformed. + return []; + } else { + return exceptionsList.flatMap((exceptionItem) => { + if (!(exceptionItem instanceof Object) || !isString(exceptionItem.id)) { + // return early if we are not an object such as being undefined or null or malformed + // or the exceptionItem.id is not a string from being malformed + return []; + } else { + return [exceptionItem]; + } + }); + } +} + +/** + * This migrates exception list containers to saved object references on an upgrade. + * We only migrate if we find these conditions: + * - exceptionLists are an array and not null, undefined, or malformed data. + * - The exceptionList item is an object and id is a string and not null, undefined, or malformed data + * - The existing references do not already have an exceptionItem reference already found within it. + * Some of these issues could crop up during either user manual errors of modifying things, earlier migration + * issues, etc... + * @param doc The document that might have exceptionListItems to migrate + * @returns The document migrated with saved object references + */ +function addExceptionListsToReferences( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const { + attributes: { + params: { exceptionsList }, + }, + references, + } = doc; + if (!Array.isArray(exceptionsList)) { + // early return if we are not an array such as being undefined or null or malformed. + return doc; + } else { + const exceptionsToTransform = removeMalformedExceptionsList(exceptionsList); + const newReferences = exceptionsToTransform.flatMap( + (exceptionItem, index) => { + const existingReferenceFound = references?.find((reference) => { + return ( + reference.id === exceptionItem.id && + ((reference.type === 'exception-list' && exceptionItem.namespace_type === 'single') || + (reference.type === 'exception-list-agnostic' && + exceptionItem.namespace_type === 'agnostic')) + ); + }); + if (existingReferenceFound) { + // skip if the reference already exists for some uncommon reason so we do not add an additional one. + // This enables us to be idempotent and you can run this migration multiple times and get the same output. + return []; + } else { + return [ + { + name: `param:exceptionsList_${index}`, + id: String(exceptionItem.id), + type: + exceptionItem.namespace_type === 'agnostic' + ? 'exception-list-agnostic' + : 'exception-list', + }, + ]; + } + } + ); + if (references == null && newReferences.length === 0) { + // Avoid adding an empty references array if the existing saved object never had one to begin with + return doc; + } else { + return { ...doc, references: [...(references ?? []), ...newReferences] }; + } + } +} + +export const getMigrations7150 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc): doc is SavedObjectUnsanitizedDoc => isSiemSignalsRuleType(doc), + pipeMigrations(addExceptionListsToReferences) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.16/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.16/index.ts new file mode 100644 index 0000000000000..35aded8311803 --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.16/index.ts @@ -0,0 +1,159 @@ +/* + * 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 { SavedObjectAttribute, SavedObjectReference } from '@kbn/core-saved-objects-common'; +import { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { isString } from 'lodash/fp'; +import { RawRule, RawRuleAction } from '../../../types'; +import { extractRefsFromGeoContainmentAlert } from '../../geo_containment/migrations'; +import { createEsoMigration, isSecuritySolutionLegacyNotification, pipeMigrations } from '../utils'; + +function setLegacyId(doc: SavedObjectUnsanitizedDoc): SavedObjectUnsanitizedDoc { + const { id } = doc; + return { + ...doc, + attributes: { + ...doc.attributes, + legacyId: id, + }, + }; +} + +function getRemovePreconfiguredConnectorsFromReferencesFn( + isPreconfigured: (connectorId: string) => boolean +) { + return (doc: SavedObjectUnsanitizedDoc) => { + return removePreconfiguredConnectorsFromReferences(doc, isPreconfigured); + }; +} + +function getCorrespondingAction( + actions: SavedObjectAttribute, + connectorRef: string +): RawRuleAction | null { + if (!Array.isArray(actions)) { + return null; + } else { + return actions.find( + (action) => (action as RawRuleAction)?.actionRef === connectorRef + ) as RawRuleAction; + } +} + +function removePreconfiguredConnectorsFromReferences( + doc: SavedObjectUnsanitizedDoc, + isPreconfigured: (connectorId: string) => boolean +): SavedObjectUnsanitizedDoc { + const { + attributes: { actions }, + references, + } = doc; + + // Look for connector references + const connectorReferences = (references ?? []).filter((ref: SavedObjectReference) => + ref.name.startsWith('action_') + ); + if (connectorReferences.length > 0) { + const restReferences = (references ?? []).filter( + (ref: SavedObjectReference) => !ref.name.startsWith('action_') + ); + + const updatedConnectorReferences: SavedObjectReference[] = []; + const updatedActions: RawRule['actions'] = []; + + // For each connector reference, check if connector is preconfigured + // If yes, we need to remove from the references array and update + // the corresponding action so it directly references the preconfigured connector id + connectorReferences.forEach((connectorRef: SavedObjectReference) => { + // Look for the corresponding entry in the actions array + const correspondingAction = getCorrespondingAction(actions, connectorRef.name); + if (correspondingAction) { + if (isPreconfigured(connectorRef.id)) { + updatedActions.push({ + ...correspondingAction, + actionRef: `preconfigured:${connectorRef.id}`, + }); + } else { + updatedActions.push(correspondingAction); + updatedConnectorReferences.push(connectorRef); + } + } else { + // Couldn't find the matching action, leave as is + updatedConnectorReferences.push(connectorRef); + } + }); + + return { + ...doc, + attributes: { + ...doc.attributes, + actions: [...updatedActions], + }, + references: [...updatedConnectorReferences, ...restReferences], + }; + } + return doc; +} + +/** + * This migrates rule_id's within the legacy siem.notification to saved object references on an upgrade. + * We only migrate if we find these conditions: + * - ruleAlertId is a string and not null, undefined, or malformed data. + * - The existing references do not already have a ruleAlertId found within it. + * Some of these issues could crop up during either user manual errors of modifying things, earlier migration + * issues, etc... so we are safer to check them as possibilities + * @deprecated Once we are confident all rules relying on side-car actions SO's have been migrated to SO references we should remove this function + * @param doc The document that might have "ruleAlertId" to migrate into the references + * @returns The document migrated with saved object references + */ +function addRuleIdsToLegacyNotificationReferences( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const { + attributes: { + params: { ruleAlertId }, + }, + references, + } = doc; + if (!isSecuritySolutionLegacyNotification(doc) || !isString(ruleAlertId)) { + // early return if we are not a string or if we are not a security solution notification saved object. + return doc; + } else { + const existingReferences = references ?? []; + const existingReferenceFound = existingReferences.find((reference) => { + return reference.id === ruleAlertId && reference.type === 'alert'; + }); + if (existingReferenceFound) { + // skip this if the references already exists for some uncommon reason so we do not add an additional one. + return doc; + } else { + const savedObjectReference: SavedObjectReference = { + id: ruleAlertId, + name: 'param:alert_0', + type: 'alert', + }; + const newReferences = [...existingReferences, savedObjectReference]; + return { ...doc, references: newReferences }; + } + } +} + +export const getMigrations7160 = ( + encryptedSavedObjects: EncryptedSavedObjectsPluginSetup, + isPreconfigured: (connectorId: string) => boolean +) => + createEsoMigration( + encryptedSavedObjects, + (doc): doc is SavedObjectUnsanitizedDoc => true, + pipeMigrations( + setLegacyId, + getRemovePreconfiguredConnectorsFromReferencesFn(isPreconfigured), + addRuleIdsToLegacyNotificationReferences, + extractRefsFromGeoContainmentAlert + ) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/8.0/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/8.0/index.ts new file mode 100644 index 0000000000000..5d8efd4585af7 --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/8.0/index.ts @@ -0,0 +1,133 @@ +/* + * 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 { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { isRuleType, ruleTypeMappings } from '@kbn/securitysolution-rules'; +import { RawRule } from '../../../types'; +import { FILEBEAT_7X_INDICATOR_PATH } from '../constants'; +import { + createEsoMigration, + isDetectionEngineAADRuleType, + isSiemSignalsRuleType, + pipeMigrations, +} from '../utils'; + +function addThreatIndicatorPathToThreatMatchRules( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + return isSiemSignalsRuleType(doc) && + doc.attributes.params?.type === 'threat_match' && + !doc.attributes.params.threatIndicatorPath + ? { + ...doc, + attributes: { + ...doc.attributes, + params: { + ...doc.attributes.params, + threatIndicatorPath: FILEBEAT_7X_INDICATOR_PATH, + }, + }, + } + : doc; +} + +function addSecuritySolutionAADRuleTypes( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const ruleType = doc.attributes.params.type; + return isSiemSignalsRuleType(doc) && isRuleType(ruleType) + ? { + ...doc, + attributes: { + ...doc.attributes, + alertTypeId: ruleTypeMappings[ruleType], + enabled: false, + params: { + ...doc.attributes.params, + outputIndex: '', + }, + }, + } + : doc; +} + +function addSecuritySolutionAADRuleTypeTags( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const ruleType = doc.attributes.params.type; + return isDetectionEngineAADRuleType(doc) && isRuleType(ruleType) + ? { + ...doc, + attributes: { + ...doc.attributes, + // If the rule is disabled at this point, then the rule has not been re-enabled after + // running the 8.0.0 migrations. If `doc.attributes.scheduledTaskId` exists, then the + // rule was enabled prior to running the migration. Thus we know we should add the + // tag to indicate it was auto-disabled. + tags: + !doc.attributes.enabled && doc.attributes.scheduledTaskId + ? [...(doc.attributes.tags ?? []), 'auto_disabled_8.0'] + : doc.attributes.tags ?? [], + }, + } + : doc; +} + +// This fixes an issue whereby metrics.alert.inventory.threshold rules had the +// group for actions incorrectly spelt as metrics.invenotry_threshold.fired vs metrics.inventory_threshold.fired +function fixInventoryThresholdGroupId( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + if (doc.attributes.alertTypeId === 'metrics.alert.inventory.threshold') { + const { + attributes: { actions }, + } = doc; + + const updatedActions = actions + ? actions.map((action) => { + // Wrong spelling + if (action.group === 'metrics.invenotry_threshold.fired') { + return { + ...action, + group: 'metrics.inventory_threshold.fired', + }; + } else { + return action; + } + }) + : []; + + return { + ...doc, + attributes: { + ...doc.attributes, + actions: updatedActions, + }, + }; + } else { + return doc; + } +} + +export const getMigrations800 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => true, + pipeMigrations( + addThreatIndicatorPathToThreatMatchRules, + addSecuritySolutionAADRuleTypes, + fixInventoryThresholdGroupId + ) + ); + +export const getMigrations801 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => true, + pipeMigrations(addSecuritySolutionAADRuleTypeTags) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/8.2/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/8.2/index.ts new file mode 100644 index 0000000000000..6de67875ba2eb --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/8.2/index.ts @@ -0,0 +1,41 @@ +/* + * 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 { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { getMappedParams } from '../../../rules_client/lib/mapped_params_utils'; +import { RawRule } from '../../../types'; +import { createEsoMigration, pipeMigrations } from '../utils'; + +function addMappedParams( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const { + attributes: { params }, + } = doc; + + const mappedParams = getMappedParams(params); + + if (Object.keys(mappedParams).length) { + return { + ...doc, + attributes: { + ...doc.attributes, + mapped_params: mappedParams, + }, + }; + } + + return doc; +} + +export const getMigrations820 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => true, + pipeMigrations(addMappedParams) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/8.3/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/8.3/index.ts new file mode 100644 index 0000000000000..833971a71dbbe --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/8.3/index.ts @@ -0,0 +1,96 @@ +/* + * 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 { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { omit } from 'lodash'; +import moment from 'moment-timezone'; +import { RawRule } from '../../../types'; +import { + createEsoMigration, + isDetectionEngineAADRuleType, + isEsQueryRuleType, + pipeMigrations, +} from '../utils'; + +function addSearchType(doc: SavedObjectUnsanitizedDoc) { + const searchType = doc.attributes.params.searchType; + + return isEsQueryRuleType(doc) && !searchType + ? { + ...doc, + attributes: { + ...doc.attributes, + params: { + ...doc.attributes.params, + searchType: 'esQuery', + }, + }, + } + : doc; +} + +/** + * removes internal tags(starts with '__internal') from Security Solution rules + * @param doc rule to be migrated + * @returns migrated rule if it's Security Solution rule or unchanged if not + */ +function removeInternalTags( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + if (!isDetectionEngineAADRuleType(doc)) { + return doc; + } + + const { + attributes: { tags }, + } = doc; + + const filteredTags = (tags ?? []).filter((tag) => !tag.startsWith('__internal_')); + + return { + ...doc, + attributes: { + ...doc.attributes, + tags: filteredTags, + }, + }; +} + +function convertSnoozes( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + const { + attributes: { snoozeEndTime }, + } = doc; + + return { + ...doc, + attributes: { + ...(omit(doc.attributes, ['snoozeEndTime']) as RawRule), + snoozeSchedule: snoozeEndTime + ? [ + { + duration: Date.parse(snoozeEndTime as string) - Date.now(), + rRule: { + dtstart: new Date().toISOString(), + tzid: moment.tz.guess(), + count: 1, + }, + }, + ] + : [], + }, + }; +} + +export const getMigrations830 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => true, + pipeMigrations(addSearchType, removeInternalTags, convertSnoozes) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/8.4/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/8.4/index.ts new file mode 100644 index 0000000000000..3a02425a7c194 --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/8.4/index.ts @@ -0,0 +1,30 @@ +/* + * 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 { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { omit } from 'lodash'; +import { RawRule } from '../../../types'; +import { createEsoMigration, pipeMigrations } from '../utils'; + +function removeIsSnoozedUntil( + doc: SavedObjectUnsanitizedDoc +): SavedObjectUnsanitizedDoc { + return { + ...doc, + attributes: { + ...(omit(doc.attributes, ['isSnoozedUntil']) as RawRule), + }, + }; +} + +export const getMigrations841 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => true, + pipeMigrations(removeIsSnoozedUntil) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/8.5/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/8.5/index.ts new file mode 100644 index 0000000000000..a40bcafd0bf35 --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/8.5/index.ts @@ -0,0 +1,65 @@ +/* + * 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 { + SavedObjectMigrationContext, + SavedObjectUnsanitizedDoc, +} from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { isSerializedSearchSource } from '@kbn/data-plugin/common'; +import { pick } from 'lodash'; +import { RawRule } from '../../../types'; +import { createEsoMigration, isEsQueryRuleType, pipeMigrations } from '../utils'; +import { AlertLogMeta } from '../types'; + +function stripOutRuntimeFieldsInOldESQuery( + doc: SavedObjectUnsanitizedDoc, + context: SavedObjectMigrationContext +): SavedObjectUnsanitizedDoc { + const isESDSLrule = + isEsQueryRuleType(doc) && !isSerializedSearchSource(doc.attributes.params.searchConfiguration); + + if (isESDSLrule) { + try { + const parsedQuery = JSON.parse(doc.attributes.params.esQuery as string); + // parsing and restringifying will cause us to lose the formatting so we only do so if this rule has + // fields other than `query` which is the only valid field at this stage + const hasFieldsOtherThanQuery = Object.keys(parsedQuery).some((key) => key !== 'query'); + return hasFieldsOtherThanQuery + ? { + ...doc, + attributes: { + ...doc.attributes, + params: { + ...doc.attributes.params, + esQuery: JSON.stringify(pick(parsedQuery, 'query'), null, 4), + }, + }, + } + : doc; + } catch (err) { + // Instead of failing the upgrade when an unparsable rule is encountered, we log that the rule caouldn't be migrated and + // as a result legacy parameters might cause the rule to behave differently if it is, in fact, still running at all + context.log.error( + `unable to migrate and remove legacy runtime fields in rule ${doc.id} due to invalid query: "${doc.attributes.params.esQuery}" - query must be JSON`, + { + migrations: { + alertDocument: doc, + }, + } + ); + } + } + return doc; +} + +export const getMigrations850 = (encryptedSavedObjects: EncryptedSavedObjectsPluginSetup) => + createEsoMigration( + encryptedSavedObjects, + (doc): doc is SavedObjectUnsanitizedDoc => isEsQueryRuleType(doc), + pipeMigrations(stripOutRuntimeFieldsInOldESQuery) + ); diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/constants.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/constants.ts new file mode 100644 index 0000000000000..849021f3c58c3 --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/constants.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +export const SIEM_APP_ID = 'securitySolution'; +export const SIEM_SERVER_APP_ID = 'siem'; +export const MINIMUM_SS_MIGRATION_VERSION = '8.3.0'; +export const LEGACY_LAST_MODIFIED_VERSION = 'pre-7.10.0'; +export const FILEBEAT_7X_INDICATOR_PATH = 'threatintel.indicator'; diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations.test.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/index.test.ts similarity index 99% rename from x-pack/plugins/alerting/server/saved_objects/migrations.test.ts rename to x-pack/plugins/alerting/server/saved_objects/migrations/index.test.ts index be9bee7634990..09f466a8e9a37 100644 --- a/x-pack/plugins/alerting/server/saved_objects/migrations.test.ts +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/index.test.ts @@ -7,12 +7,13 @@ import sinon from 'sinon'; import uuid from 'uuid'; -import { getMigrations, isAnyActionSupportIncidents } from './migrations'; -import { RawRule } from '../types'; +import { getMigrations } from '.'; +import { RawRule } from '../../types'; import { SavedObjectMigrationContext, SavedObjectUnsanitizedDoc } from '@kbn/core/server'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { migrationMocks } from '@kbn/core/server/mocks'; import { RuleType, ruleTypeMappings } from '@kbn/securitysolution-rules'; +import { isAnyActionSupportIncidents } from './7.11'; const migrationContext = migrationMocks.createContext(); const encryptedSavedObjectsSetup = encryptedSavedObjectsMock.createSetup(); @@ -24,6 +25,7 @@ describe('successful migrations', () => { jest.resetAllMocks(); encryptedSavedObjectsSetup.createMigration.mockImplementation(({ migration }) => migration); }); + describe('7.10.0', () => { test('marks alerts as legacy', () => { const migration710 = getMigrations(encryptedSavedObjectsSetup, {}, isPreconfigured)['7.10.0']; diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/index.ts new file mode 100644 index 0000000000000..a3a06614ec4c5 --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/index.ts @@ -0,0 +1,155 @@ +/* + * 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 { gte } from 'semver'; +import { + SavedObjectMigrationMap, + SavedObjectUnsanitizedDoc, + SavedObjectMigrationFn, + SavedObjectMigrationContext, +} from '@kbn/core/server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { MigrateFunctionsObject, MigrateFunction } from '@kbn/kibana-utils-plugin/common'; +import { mergeSavedObjectMigrationMaps } from '@kbn/core/server'; +import { isSerializedSearchSource, SerializedSearchSourceFields } from '@kbn/data-plugin/common'; +import { RawRule } from '../../types'; +import { getMigrations7100 } from './7.10'; +import { getMigrations7110, getMigrations7112 } from './7.11'; +import { getMigrations7130 } from './7.13'; +import { getMigrations7140 } from './7.14'; +import { getMigrations7150 } from './7.15'; +import { getMigrations7160 } from './7.16'; +import { getMigrations800, getMigrations801 } from './8.0'; +import { getMigrations820 } from './8.2'; +import { getMigrations830 } from './8.3'; +import { getMigrations841 } from './8.4'; +import { getMigrations850 } from './8.5'; +import { AlertLogMeta, AlertMigration } from './types'; +import { MINIMUM_SS_MIGRATION_VERSION } from './constants'; +import { createEsoMigration, isEsQueryRuleType, pipeMigrations } from './utils'; + +export { FILEBEAT_7X_INDICATOR_PATH } from './constants'; + +export function getMigrations( + encryptedSavedObjects: EncryptedSavedObjectsPluginSetup, + searchSourceMigrations: MigrateFunctionsObject, + isPreconfigured: (connectorId: string) => boolean +): SavedObjectMigrationMap { + return mergeSavedObjectMigrationMaps( + { + '7.10.0': executeMigrationWithErrorHandling( + getMigrations7100(encryptedSavedObjects), + '7.10.0' + ), + '7.11.0': executeMigrationWithErrorHandling( + getMigrations7110(encryptedSavedObjects), + '7.11.0' + ), + '7.11.2': executeMigrationWithErrorHandling( + getMigrations7112(encryptedSavedObjects), + '7.11.2' + ), + '7.13.0': executeMigrationWithErrorHandling( + getMigrations7130(encryptedSavedObjects), + '7.13.0' + ), + '7.14.1': executeMigrationWithErrorHandling( + getMigrations7140(encryptedSavedObjects), + '7.14.1' + ), + '7.15.0': executeMigrationWithErrorHandling( + getMigrations7150(encryptedSavedObjects), + '7.15.0' + ), + '7.16.0': executeMigrationWithErrorHandling( + getMigrations7160(encryptedSavedObjects, isPreconfigured), + '7.16.0' + ), + '8.0.0': executeMigrationWithErrorHandling(getMigrations800(encryptedSavedObjects), '8.0.0'), + '8.0.1': executeMigrationWithErrorHandling(getMigrations801(encryptedSavedObjects), '8.0.1'), + '8.2.0': executeMigrationWithErrorHandling(getMigrations820(encryptedSavedObjects), '8.2.0'), + '8.3.0': executeMigrationWithErrorHandling(getMigrations830(encryptedSavedObjects), '8.3.0'), + '8.4.1': executeMigrationWithErrorHandling(getMigrations841(encryptedSavedObjects), '8.4.1'), + '8.5.0': executeMigrationWithErrorHandling(getMigrations850(encryptedSavedObjects), '8.5.0'), + }, + getSearchSourceMigrations(encryptedSavedObjects, searchSourceMigrations) + ); +} + +function executeMigrationWithErrorHandling( + migrationFunc: SavedObjectMigrationFn, + version: string +) { + return (doc: SavedObjectUnsanitizedDoc, context: SavedObjectMigrationContext) => { + try { + return migrationFunc(doc, context); + } catch (ex) { + context.log.error( + `encryptedSavedObject ${version} migration failed for alert ${doc.id} with error: ${ex.message}`, + { + migrations: { + alertDocument: doc, + }, + } + ); + throw ex; + } + }; +} + +function mapSearchSourceMigrationFunc( + migrateSerializedSearchSourceFields: MigrateFunction +): MigrateFunction { + return (doc) => { + const _doc = doc as { attributes: RawRule }; + + const serializedSearchSource = _doc.attributes.params.searchConfiguration; + + if (isSerializedSearchSource(serializedSearchSource)) { + return { + ..._doc, + attributes: { + ..._doc.attributes, + params: { + ..._doc.attributes.params, + searchConfiguration: migrateSerializedSearchSourceFields(serializedSearchSource), + }, + }, + }; + } + return _doc; + }; +} + +/** + * This creates a migration map that applies search source migrations to legacy es query rules. + * It doesn't modify existing migrations. The following migrations will occur at minimum version of 8.3+. + */ +function getSearchSourceMigrations( + encryptedSavedObjects: EncryptedSavedObjectsPluginSetup, + searchSourceMigrations: MigrateFunctionsObject +) { + const filteredMigrations: SavedObjectMigrationMap = {}; + for (const versionKey in searchSourceMigrations) { + if (gte(versionKey, MINIMUM_SS_MIGRATION_VERSION)) { + const migrateSearchSource = mapSearchSourceMigrationFunc( + searchSourceMigrations[versionKey] + ) as unknown as AlertMigration; + + filteredMigrations[versionKey] = executeMigrationWithErrorHandling( + createEsoMigration( + encryptedSavedObjects, + (doc: SavedObjectUnsanitizedDoc): doc is SavedObjectUnsanitizedDoc => + isEsQueryRuleType(doc), + pipeMigrations(migrateSearchSource) + ), + versionKey + ); + } + } + return filteredMigrations; +} diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/types.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/types.ts new file mode 100644 index 0000000000000..6d657e168187e --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/types.ts @@ -0,0 +1,18 @@ +/* + * 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 { LogMeta, SavedObjectMigrationContext, SavedObjectUnsanitizedDoc } from '@kbn/core/server'; +import { RawRule } from '../../types'; + +export interface AlertLogMeta extends LogMeta { + migrations: { alertDocument: SavedObjectUnsanitizedDoc }; +} + +export type AlertMigration = ( + doc: SavedObjectUnsanitizedDoc, + context: SavedObjectMigrationContext +) => SavedObjectUnsanitizedDoc; diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/utils.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/utils.ts new file mode 100644 index 0000000000000..c96d0cfa5d7fc --- /dev/null +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/utils.ts @@ -0,0 +1,59 @@ +/* + * 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 { ruleTypeMappings } from '@kbn/securitysolution-rules'; +import { + SavedObjectMigrationContext, + SavedObjectUnsanitizedDoc, +} from '@kbn/core-saved-objects-server'; +import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import type { IsMigrationNeededPredicate } from '@kbn/encrypted-saved-objects-plugin/server'; + +import { RawRule } from '../../types'; + +type AlertMigration = ( + doc: SavedObjectUnsanitizedDoc, + context: SavedObjectMigrationContext +) => SavedObjectUnsanitizedDoc; + +export function createEsoMigration( + encryptedSavedObjects: EncryptedSavedObjectsPluginSetup, + isMigrationNeededPredicate: IsMigrationNeededPredicate, + migrationFunc: AlertMigration +) { + return encryptedSavedObjects.createMigration({ + isMigrationNeededPredicate, + migration: migrationFunc, + shouldMigrateIfDecryptionFails: true, // shouldMigrateIfDecryptionFails flag that applies the migration to undecrypted document if decryption fails + }); +} + +export function pipeMigrations(...migrations: AlertMigration[]): AlertMigration { + return (doc: SavedObjectUnsanitizedDoc, context: SavedObjectMigrationContext) => + migrations.reduce((migratedDoc, nextMigration) => nextMigration(migratedDoc, context), doc); +} + +// Deprecated in 8.0 +export const isSiemSignalsRuleType = (doc: SavedObjectUnsanitizedDoc): boolean => + doc.attributes.alertTypeId === 'siem.signals'; + +export const isEsQueryRuleType = (doc: SavedObjectUnsanitizedDoc) => + doc.attributes.alertTypeId === '.es-query'; + +export const isDetectionEngineAADRuleType = (doc: SavedObjectUnsanitizedDoc): boolean => + (Object.values(ruleTypeMappings) as string[]).includes(doc.attributes.alertTypeId); + +/** + * Returns true if the alert type is that of "siem.notifications" which is a legacy notification system that was deprecated in 7.16.0 + * in favor of using the newer alerting notifications system. + * @param doc The saved object alert type document + * @returns true if this is a legacy "siem.notifications" rule, otherwise false + * @deprecated Once we are confident all rules relying on side-car actions SO's have been migrated to SO references we should remove this function + */ +export const isSecuritySolutionLegacyNotification = ( + doc: SavedObjectUnsanitizedDoc +): boolean => doc.attributes.alertTypeId === 'siem.notifications'; From c51d133a40d3f97bc236dd024001d72594daa791 Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Thu, 13 Oct 2022 22:29:40 +0200 Subject: [PATCH 31/35] Fix Failing test: Jest Tests.src/plugins/data/server/search/session - SearchSessionService Feature enabled trackId batches updates for the same session (#143173) --- .../server/search/session/session_service.test.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/plugins/data/server/search/session/session_service.test.ts b/src/plugins/data/server/search/session/session_service.test.ts index 36b5d16e68a78..38a4f027765df 100644 --- a/src/plugins/data/server/search/session/session_service.test.ts +++ b/src/plugins/data/server/search/session/session_service.test.ts @@ -762,7 +762,13 @@ describe('SearchSessionService', () => { expect(savedObjectsClient.update).toHaveBeenCalledTimes(2); // 3 trackIds calls batched into 2 update calls (2 different sessions) expect(savedObjectsClient.create).not.toHaveBeenCalled(); - const [type1, id1, callAttributes1] = savedObjectsClient.update.mock.calls[0]; + const sessionId1UpdateCallArgs = savedObjectsClient.update.mock.calls.find( + (args) => args[1] === sessionId1 + ); + + expect(sessionId1UpdateCallArgs).toBeDefined(); + + const [type1, id1, callAttributes1] = sessionId1UpdateCallArgs!; expect(type1).toBe(SEARCH_SESSION_TYPE); expect(id1).toBe(sessionId1); expect(callAttributes1).toHaveProperty('idMapping', { @@ -776,7 +782,11 @@ describe('SearchSessionService', () => { }, }); - const [type2, id2, callAttributes2] = savedObjectsClient.update.mock.calls[1]; + const sessionId2UpdateCallArgs = savedObjectsClient.update.mock.calls.find( + (args) => args[1] === sessionId2 + ); + expect(sessionId2UpdateCallArgs).toBeDefined(); + const [type2, id2, callAttributes2] = sessionId2UpdateCallArgs!; expect(type2).toBe(SEARCH_SESSION_TYPE); expect(id2).toBe(sessionId2); expect(callAttributes2).toHaveProperty('idMapping', { From f2bbc534f55486e49b70e02b46c073a1358f50ab Mon Sep 17 00:00:00 2001 From: Hannah Mudge Date: Thu, 13 Oct 2022 16:01:26 -0600 Subject: [PATCH 32/35] [Dashboard] [Controls] Add support for IP field to options list (#142507) * Add support for IP field * Add jest tests * Allow exact match searches * Add support for partial IP searches * Clean up code * Restructure logic to only use `ip_range` aggregation * Expand logic to include both ipv4 and ipv6 * Prevent server request when search string is invalid * Add extra layer of error handling to server side code * Clean up + fix jest tests * Clear suggestions when invalid search * Fix full `ipv6` search * Update jest test * Add Jest tests for IP helpers + clean up code * Respond to feedback --- .../common/options_list/ip_search.test.ts | 129 +++++++ .../controls/common/options_list/ip_search.ts | 118 +++++++ .../controls/common/options_list/mocks.tsx | 2 +- .../components/options_list_popover.tsx | 5 +- .../embeddable/options_list_embeddable.tsx | 145 ++++---- .../options_list_embeddable_factory.tsx | 3 +- .../options_list/options_list_reducers.ts | 13 +- .../controls/public/options_list/types.ts | 7 +- .../options_list/options_list_queries.test.ts | 315 +++++++++++++++--- .../options_list/options_list_queries.ts | 80 ++++- .../options_list_suggestions_route.ts | 11 +- 11 files changed, 708 insertions(+), 120 deletions(-) create mode 100644 src/plugins/controls/common/options_list/ip_search.test.ts create mode 100644 src/plugins/controls/common/options_list/ip_search.ts diff --git a/src/plugins/controls/common/options_list/ip_search.test.ts b/src/plugins/controls/common/options_list/ip_search.test.ts new file mode 100644 index 0000000000000..1c935b1875311 --- /dev/null +++ b/src/plugins/controls/common/options_list/ip_search.test.ts @@ -0,0 +1,129 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { getIpRangeQuery, getIpSegments, getMinMaxIp } from './ip_search'; + +describe('test IP search functionality', () => { + test('get IP segments', () => { + expect(getIpSegments('')).toStrictEqual({ segments: [''], type: 'unknown' }); + expect(getIpSegments('test')).toStrictEqual({ segments: ['test'], type: 'unknown' }); + expect(getIpSegments('123.456')).toStrictEqual({ segments: ['123', '456'], type: 'ipv4' }); + expect(getIpSegments('123..456...')).toStrictEqual({ segments: ['123', '456'], type: 'ipv4' }); + expect(getIpSegments('abc:def:')).toStrictEqual({ segments: ['abc', 'def'], type: 'ipv6' }); + expect(getIpSegments(':::x:::abc:::def:::')).toStrictEqual({ + segments: ['x', 'abc', 'def'], + type: 'ipv6', + }); + }); + + test('get min/max IP', () => { + expect(getMinMaxIp('ipv4', ['123'])).toStrictEqual({ + min: '123.0.0.0', + max: '123.255.255.255', + }); + expect(getMinMaxIp('ipv4', ['123', '456', '789'])).toStrictEqual({ + min: '123.456.789.0', + max: '123.456.789.255', + }); + expect(getMinMaxIp('ipv6', ['abc', 'def'])).toStrictEqual({ + min: 'abc:def::', + max: 'abc:def:ffff:ffff:ffff:ffff:ffff:ffff', + }); + expect(getMinMaxIp('ipv6', ['a', 'b', 'c', 'd', 'e', 'f', 'g'])).toStrictEqual({ + min: 'a:b:c:d:e:f:g::', + max: 'a:b:c:d:e:f:g:ffff', + }); + }); + + test('get IP range query', () => { + // invalid searches + expect(getIpRangeQuery('xyz')).toStrictEqual({ + validSearch: false, + }); + expect(getIpRangeQuery('123.456.OVER 9000')).toStrictEqual({ + validSearch: false, + }); + expect(getIpRangeQuery('abc:def:ghi')).toStrictEqual({ + validSearch: false, + }); + + // full IP searches + expect(getIpRangeQuery('1.2.3.4')).toStrictEqual({ + validSearch: true, + rangeQuery: [ + { + key: 'ipv4', + mask: '1.2.3.4/32', + }, + ], + }); + expect(getIpRangeQuery('1.2.3.256')).toStrictEqual({ + validSearch: false, + rangeQuery: undefined, + }); + expect(getIpRangeQuery('fbbe:a363:9e14:987c:49cf:d4d0:d8c8:bc42')).toStrictEqual({ + validSearch: true, + rangeQuery: [ + { + key: 'ipv6', + mask: 'fbbe:a363:9e14:987c:49cf:d4d0:d8c8:bc42/128', + }, + ], + }); + + // partial IP searches - ipv4 + const partialIpv4 = getIpRangeQuery('12.34.'); + expect(partialIpv4.validSearch).toBe(true); + expect(partialIpv4.rangeQuery?.[0]).toStrictEqual({ + key: 'ipv4', + from: '12.34.0.0', + to: '12.34.255.255', + }); + expect(getIpRangeQuery('123.456.7')).toStrictEqual({ + validSearch: false, + rangeQuery: [], + }); + expect(getIpRangeQuery('12:34.56')).toStrictEqual({ + validSearch: false, + rangeQuery: [], + }); + + // partial IP searches - ipv6 + const partialIpv6 = getIpRangeQuery('fbbe:a363:9e14:987c:49cf'); + expect(partialIpv6.validSearch).toBe(true); + expect(partialIpv6.rangeQuery?.[0]).toStrictEqual({ + key: 'ipv6', + from: 'fbbe:a363:9e14:987c:49cf::', + to: 'fbbe:a363:9e14:987c:49cf:ffff:ffff:ffff', + }); + + // partial IP searches - unknown type + let partialUnknownIp = getIpRangeQuery('1234'); + expect(partialUnknownIp.validSearch).toBe(true); + expect(partialUnknownIp.rangeQuery?.length).toBe(1); + expect(partialUnknownIp.rangeQuery?.[0]).toStrictEqual({ + key: 'ipv6', + from: '1234::', + to: '1234:ffff:ffff:ffff:ffff:ffff:ffff:ffff', + }); + + partialUnknownIp = getIpRangeQuery('123'); + expect(partialUnknownIp.validSearch).toBe(true); + expect(partialUnknownIp.rangeQuery?.length).toBe(2); + expect(partialUnknownIp.rangeQuery?.[0]).toStrictEqual({ + key: 'ipv4', + from: '123.0.0.0', + to: '123.255.255.255', + }); + expect(partialUnknownIp.rangeQuery?.[1]).toStrictEqual({ + key: 'ipv6', + from: '123::', + to: '123:ffff:ffff:ffff:ffff:ffff:ffff:ffff', + }); + }); +}); diff --git a/src/plugins/controls/common/options_list/ip_search.ts b/src/plugins/controls/common/options_list/ip_search.ts new file mode 100644 index 0000000000000..f371fbb1f6506 --- /dev/null +++ b/src/plugins/controls/common/options_list/ip_search.ts @@ -0,0 +1,118 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import ipaddr from 'ipaddr.js'; + +export interface IpRangeQuery { + validSearch: boolean; + rangeQuery?: Array<{ key: string; from: string; to: string } | { key: string; mask: string }>; +} +interface IpSegments { + segments: string[]; + type: 'ipv4' | 'ipv6' | 'unknown'; +} + +export const getIpSegments = (searchString: string): IpSegments => { + if (searchString.indexOf('.') !== -1) { + // ipv4 takes priority - so if search string contains both `.` and `:` then it will just be an invalid ipv4 search + const ipv4Segments = searchString.split('.').filter((segment) => segment !== ''); + return { segments: ipv4Segments, type: 'ipv4' }; + } else if (searchString.indexOf(':') !== -1) { + // note that currently, because of the logic of splitting here, searching for shorthand IPv6 IPs is not supported (for example, + // must search for `59fb:0:0:0:0:1005:cc57:6571` and not `59fb::1005:cc57:6571` to get the expected match) + const ipv6Segments = searchString.split(':').filter((segment) => segment !== ''); + return { segments: ipv6Segments, type: 'ipv6' }; + } + return { segments: [searchString], type: 'unknown' }; +}; + +export const getMinMaxIp = ( + type: 'ipv4' | 'ipv6', + segments: IpSegments['segments'] +): { min: string; max: string } => { + const isIpv4 = type === 'ipv4'; + const minIp = isIpv4 + ? segments.concat(Array(4 - segments.length).fill('0')).join('.') + : segments.join(':') + '::'; + const maxIp = isIpv4 + ? segments.concat(Array(4 - segments.length).fill('255')).join('.') + : segments.concat(Array(8 - segments.length).fill('ffff')).join(':'); + return { + min: minIp, + max: maxIp, + }; +}; + +const buildFullIpSearchRangeQuery = (segments: IpSegments): IpRangeQuery['rangeQuery'] => { + const { type: ipType, segments: ipSegments } = segments; + + const isIpv4 = ipType === 'ipv4'; + const searchIp = ipSegments.join(isIpv4 ? '.' : ':'); + if (ipaddr.isValid(searchIp)) { + return [ + { + key: ipType, + mask: isIpv4 ? searchIp + '/32' : searchIp + '/128', + }, + ]; + } + return undefined; +}; + +const buildPartialIpSearchRangeQuery = (segments: IpSegments): IpRangeQuery['rangeQuery'] => { + const { type: ipType, segments: ipSegments } = segments; + + const ranges = []; + if (ipType === 'unknown' || ipType === 'ipv4') { + const { min: minIpv4, max: maxIpv4 } = getMinMaxIp('ipv4', ipSegments); + + if (ipaddr.isValid(minIpv4) && ipaddr.isValid(maxIpv4)) { + ranges.push({ + key: 'ipv4', + from: minIpv4, + to: maxIpv4, + }); + } + } + + if (ipType === 'unknown' || ipType === 'ipv6') { + const { min: minIpv6, max: maxIpv6 } = getMinMaxIp('ipv6', ipSegments); + + if (ipaddr.isValid(minIpv6) && ipaddr.isValid(maxIpv6)) { + ranges.push({ + key: 'ipv6', + from: minIpv6, + to: maxIpv6, + }); + } + } + + return ranges; +}; + +export const getIpRangeQuery = (searchString: string): IpRangeQuery => { + if (searchString.match(/^[A-Fa-f0-9.:]*$/) === null) { + return { validSearch: false }; + } + + const ipSegments = getIpSegments(searchString); + if (ipSegments.type === 'ipv4' && ipSegments.segments.length === 4) { + const ipv4RangeQuery = buildFullIpSearchRangeQuery(ipSegments); + return { validSearch: Boolean(ipv4RangeQuery), rangeQuery: ipv4RangeQuery }; + } + if (ipSegments.type === 'ipv6' && ipSegments.segments.length === 8) { + const ipv6RangeQuery = buildFullIpSearchRangeQuery(ipSegments); + return { validSearch: Boolean(ipv6RangeQuery), rangeQuery: ipv6RangeQuery }; + } + + const partialRangeQuery = buildPartialIpSearchRangeQuery(ipSegments); + return { + validSearch: !(partialRangeQuery?.length === 0), + rangeQuery: partialRangeQuery, + }; +}; diff --git a/src/plugins/controls/common/options_list/mocks.tsx b/src/plugins/controls/common/options_list/mocks.tsx index 2fd4d31a54b21..09f6d9caa33b4 100644 --- a/src/plugins/controls/common/options_list/mocks.tsx +++ b/src/plugins/controls/common/options_list/mocks.tsx @@ -18,7 +18,7 @@ const mockOptionsListComponentState = { availableOptions: ['woof', 'bark', 'meow', 'quack', 'moo'], invalidSelections: [], validSelections: [], - searchString: '', + searchString: { value: '', valid: true }, } as OptionsListComponentState; const mockOptionsListEmbeddableInput = { diff --git a/src/plugins/controls/public/options_list/components/options_list_popover.tsx b/src/plugins/controls/public/options_list/components/options_list_popover.tsx index 0cdfcefb9baa5..8863a3d1978a3 100644 --- a/src/plugins/controls/public/options_list/components/options_list_popover.tsx +++ b/src/plugins/controls/public/options_list/components/options_list_popover.tsx @@ -26,8 +26,8 @@ import { import { useReduxEmbeddableContext } from '@kbn/presentation-util-plugin/public'; import { optionsListReducers } from '../options_list_reducers'; -import { OptionsListStrings } from './options_list_strings'; import { OptionsListReduxState } from '../types'; +import { OptionsListStrings } from './options_list_strings'; export interface OptionsListPopoverProps { width: number; @@ -80,11 +80,12 @@ export const OptionsListPopover = ({ width, updateSearchString }: OptionsListPop > updateSearchString(event.target.value)} - value={searchString} + value={searchString.value} data-test-subj="optionsList-control-search-input" placeholder={ totalCardinality diff --git a/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx b/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx index 0ccd5d49cabc2..292e7cb6b0597 100644 --- a/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx +++ b/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx @@ -35,7 +35,7 @@ import { OptionsListEmbeddableInput, OPTIONS_LIST_CONTROL, } from '../..'; -import { optionsListReducers } from '../options_list_reducers'; +import { getDefaultComponentState, optionsListReducers } from '../options_list_reducers'; import { OptionsListControl } from '../components/options_list_control'; import { ControlsDataViewsService } from '../../services/data_views/types'; import { ControlsOptionsListService } from '../../services/options_list/types'; @@ -105,6 +105,7 @@ export class OptionsListEmbeddable extends Embeddable({ embeddable: this, reducers: optionsListReducers, + initialComponentState: getDefaultComponentState(), }); this.initialize(); @@ -277,73 +278,87 @@ export class OptionsListEmbeddable extends Embeddable { + dispatch(setLoading(false)); + dispatch(publishFilters(newFilters)); + }); } else { - const valid: string[] = []; - const invalid: string[] = []; - - for (const selectedOption of selectedOptions) { - if (invalidSelections?.includes(selectedOption)) invalid.push(selectedOption); - else valid.push(selectedOption); - } - dispatch( - updateQueryResults({ - availableOptions: suggestions, - invalidSelections: invalid, - validSelections: valid, - totalCardinality, - }) - ); + batch(() => { + dispatch( + updateQueryResults({ + availableOptions: [], + }) + ); + dispatch(setLoading(false)); + }); } - - // publish filter - const newFilters = await this.buildFilter(); - batch(() => { - dispatch(setLoading(false)); - dispatch(publishFilters(newFilters)); - }); }; private buildFilter = async () => { diff --git a/src/plugins/controls/public/options_list/embeddable/options_list_embeddable_factory.tsx b/src/plugins/controls/public/options_list/embeddable/options_list_embeddable_factory.tsx index d0b779e566c31..ea36ede0e1c9d 100644 --- a/src/plugins/controls/public/options_list/embeddable/options_list_embeddable_factory.tsx +++ b/src/plugins/controls/public/options_list/embeddable/options_list_embeddable_factory.tsx @@ -57,7 +57,8 @@ export class OptionsListEmbeddableFactory public isFieldCompatible = (dataControlField: DataControlField) => { if ( (dataControlField.field.aggregatable && dataControlField.field.type === 'string') || - dataControlField.field.type === 'boolean' + dataControlField.field.type === 'boolean' || + dataControlField.field.type === 'ip' ) { dataControlField.compatibleControlTypes.push(this.type); } diff --git a/src/plugins/controls/public/options_list/options_list_reducers.ts b/src/plugins/controls/public/options_list/options_list_reducers.ts index 3b48e6f989f6c..2a0c69126c135 100644 --- a/src/plugins/controls/public/options_list/options_list_reducers.ts +++ b/src/plugins/controls/public/options_list/options_list_reducers.ts @@ -12,6 +12,11 @@ import { Filter } from '@kbn/es-query'; import { OptionsListReduxState, OptionsListComponentState } from './types'; import { OptionsListField } from '../../common/options_list/types'; +import { getIpRangeQuery } from '../../common/options_list/ip_search'; + +export const getDefaultComponentState = (): OptionsListReduxState['componentState'] => ({ + searchString: { value: '', valid: true }, +}); export const optionsListReducers = { deselectOption: (state: WritableDraft, action: PayloadAction) => { @@ -38,7 +43,13 @@ export const optionsListReducers = { } }, setSearchString: (state: WritableDraft, action: PayloadAction) => { - state.componentState.searchString = action.payload; + state.componentState.searchString.value = action.payload; + if ( + action.payload !== '' && // empty string search is never invalid + state.componentState.field?.type === 'ip' // only IP searches can currently be invalid + ) { + state.componentState.searchString.valid = getIpRangeQuery(action.payload).validSearch; + } }, selectOption: (state: WritableDraft, action: PayloadAction) => { if (!state.explicitInput.selectedOptions) state.explicitInput.selectedOptions = []; diff --git a/src/plugins/controls/public/options_list/types.ts b/src/plugins/controls/public/options_list/types.ts index aca0c05fe0893..4001299a9ab53 100644 --- a/src/plugins/controls/public/options_list/types.ts +++ b/src/plugins/controls/public/options_list/types.ts @@ -10,6 +10,11 @@ import { ReduxEmbeddableState } from '@kbn/presentation-util-plugin/public'; import { ControlOutput } from '../types'; import { OptionsListEmbeddableInput, OptionsListField } from '../../common/options_list/types'; +interface SearchString { + value: string; + valid: boolean; +} + // Component state is only used by public components. export interface OptionsListComponentState { field?: OptionsListField; @@ -17,7 +22,7 @@ export interface OptionsListComponentState { availableOptions?: string[]; invalidSelections?: string[]; validSelections?: string[]; - searchString: string; + searchString: SearchString; } // public only - redux embeddable state type diff --git a/src/plugins/controls/server/options_list/options_list_queries.test.ts b/src/plugins/controls/server/options_list/options_list_queries.test.ts index 399154c5518aa..40536822833da 100644 --- a/src/plugins/controls/server/options_list/options_list_queries.test.ts +++ b/src/plugins/controls/server/options_list/options_list_queries.test.ts @@ -102,53 +102,55 @@ describe('options list queries', () => { }); }); - describe('suggestion aggregation and parsing', () => { - test('creates case insensitive aggregation for a text / keyword field with a search string', () => { - const optionsListRequestBodyMock: OptionsListRequestBody = { - fieldName: 'coolTestField.keyword', - textFieldName: 'coolTestField', - searchString: 'cooool', - fieldSpec: { aggregatable: true } as unknown as FieldSpec, - }; - const suggestionAggBuilder = getSuggestionAggregationBuilder(optionsListRequestBodyMock); - expect(suggestionAggBuilder.buildAggregation(optionsListRequestBodyMock)) - .toMatchInlineSnapshot(` - Object { - "aggs": Object { - "keywordSuggestions": Object { - "terms": Object { - "field": "coolTestField.keyword", - "shard_size": 10, + describe('suggestion aggregation', () => { + describe('text / keyword field', () => { + test('with a search string, creates case insensitive aggregation', () => { + const optionsListRequestBodyMock: OptionsListRequestBody = { + fieldName: 'coolTestField.keyword', + textFieldName: 'coolTestField', + searchString: 'cooool', + fieldSpec: { aggregatable: true } as unknown as FieldSpec, + }; + const suggestionAggBuilder = getSuggestionAggregationBuilder(optionsListRequestBodyMock); + expect(suggestionAggBuilder.buildAggregation(optionsListRequestBodyMock)) + .toMatchInlineSnapshot(` + Object { + "aggs": Object { + "keywordSuggestions": Object { + "terms": Object { + "field": "coolTestField.keyword", + "shard_size": 10, + }, }, }, - }, - "filter": Object { - "match_phrase_prefix": Object { - "coolTestField": "cooool", + "filter": Object { + "match_phrase_prefix": Object { + "coolTestField": "cooool", + }, }, - }, - } - `); - }); + } + `); + }); - test('creates keyword aggregation for a text / keyword field without a search string', () => { - const optionsListRequestBodyMock: OptionsListRequestBody = { - fieldName: 'coolTestField.keyword', - textFieldName: 'coolTestField', - fieldSpec: { aggregatable: true } as unknown as FieldSpec, - }; - const suggestionAggBuilder = getSuggestionAggregationBuilder(optionsListRequestBodyMock); - expect(suggestionAggBuilder.buildAggregation(optionsListRequestBodyMock)) - .toMatchInlineSnapshot(` - Object { - "terms": Object { - "execution_hint": "map", - "field": "coolTestField.keyword", - "include": ".*", - "shard_size": 10, - }, - } - `); + test('without a search string, creates keyword aggregation', () => { + const optionsListRequestBodyMock: OptionsListRequestBody = { + fieldName: 'coolTestField.keyword', + textFieldName: 'coolTestField', + fieldSpec: { aggregatable: true } as unknown as FieldSpec, + }; + const suggestionAggBuilder = getSuggestionAggregationBuilder(optionsListRequestBodyMock); + expect(suggestionAggBuilder.buildAggregation(optionsListRequestBodyMock)) + .toMatchInlineSnapshot(` + Object { + "terms": Object { + "execution_hint": "map", + "field": "coolTestField.keyword", + "include": ".*", + "shard_size": 10, + }, + } + `); + }); }); test('creates boolean aggregation for boolean field', () => { @@ -216,6 +218,177 @@ describe('options list queries', () => { `); }); + describe('IP field', () => { + test('without a search string, creates IP range aggregation with default range', () => { + const optionsListRequestBodyMock: OptionsListRequestBody = { + fieldName: 'clientip', + fieldSpec: { type: 'ip' } as unknown as FieldSpec, + }; + const suggestionAggBuilder = getSuggestionAggregationBuilder(optionsListRequestBodyMock); + expect(suggestionAggBuilder.buildAggregation(optionsListRequestBodyMock)) + .toMatchInlineSnapshot(` + Object { + "aggs": Object { + "filteredSuggestions": Object { + "terms": Object { + "execution_hint": "map", + "field": "clientip", + "shard_size": 10, + }, + }, + }, + "ip_range": Object { + "field": "clientip", + "keyed": true, + "ranges": Array [ + Object { + "from": "::", + "key": "ipv6", + "to": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + }, + ], + }, + } + `); + }); + + test('full IPv4 in the search string, creates IP range aggregation with CIDR mask', () => { + const optionsListRequestBodyMock: OptionsListRequestBody = { + fieldName: 'clientip', + fieldSpec: { type: 'ip' } as unknown as FieldSpec, + searchString: '41.77.243.255', + }; + const suggestionAggBuilder = getSuggestionAggregationBuilder(optionsListRequestBodyMock); + expect(suggestionAggBuilder.buildAggregation(optionsListRequestBodyMock)) + .toMatchInlineSnapshot(` + Object { + "aggs": Object { + "filteredSuggestions": Object { + "terms": Object { + "execution_hint": "map", + "field": "clientip", + "shard_size": 10, + }, + }, + }, + "ip_range": Object { + "field": "clientip", + "keyed": true, + "ranges": Array [ + Object { + "key": "ipv4", + "mask": "41.77.243.255/32", + }, + ], + }, + } + `); + }); + + test('full IPv6 in the search string, creates IP range aggregation with CIDR mask', () => { + const optionsListRequestBodyMock: OptionsListRequestBody = { + fieldName: 'clientip', + fieldSpec: { type: 'ip' } as unknown as FieldSpec, + searchString: 'f688:fb50:6433:bba2:604:f2c:194a:d3c5', + }; + const suggestionAggBuilder = getSuggestionAggregationBuilder(optionsListRequestBodyMock); + expect(suggestionAggBuilder.buildAggregation(optionsListRequestBodyMock)) + .toMatchInlineSnapshot(` + Object { + "aggs": Object { + "filteredSuggestions": Object { + "terms": Object { + "execution_hint": "map", + "field": "clientip", + "shard_size": 10, + }, + }, + }, + "ip_range": Object { + "field": "clientip", + "keyed": true, + "ranges": Array [ + Object { + "key": "ipv6", + "mask": "f688:fb50:6433:bba2:604:f2c:194a:d3c5/128", + }, + ], + }, + } + `); + }); + + test('partial IPv4 in the search string, creates IP range aggregation with min and max', () => { + const optionsListRequestBodyMock: OptionsListRequestBody = { + fieldName: 'clientip', + fieldSpec: { type: 'ip' } as unknown as FieldSpec, + searchString: '41.77', + }; + const suggestionAggBuilder = getSuggestionAggregationBuilder(optionsListRequestBodyMock); + expect(suggestionAggBuilder.buildAggregation(optionsListRequestBodyMock)) + .toMatchInlineSnapshot(` + Object { + "aggs": Object { + "filteredSuggestions": Object { + "terms": Object { + "execution_hint": "map", + "field": "clientip", + "shard_size": 10, + }, + }, + }, + "ip_range": Object { + "field": "clientip", + "keyed": true, + "ranges": Array [ + Object { + "from": "41.77.0.0", + "key": "ipv4", + "to": "41.77.255.255", + }, + ], + }, + } + `); + }); + + test('partial IPv46 in the search string, creates IP range aggregation with min and max', () => { + const optionsListRequestBodyMock: OptionsListRequestBody = { + fieldName: 'clientip', + fieldSpec: { type: 'ip' } as unknown as FieldSpec, + searchString: 'cdb6:', + }; + const suggestionAggBuilder = getSuggestionAggregationBuilder(optionsListRequestBodyMock); + expect(suggestionAggBuilder.buildAggregation(optionsListRequestBodyMock)) + .toMatchInlineSnapshot(` + Object { + "aggs": Object { + "filteredSuggestions": Object { + "terms": Object { + "execution_hint": "map", + "field": "clientip", + "shard_size": 10, + }, + }, + }, + "ip_range": Object { + "field": "clientip", + "keyed": true, + "ranges": Array [ + Object { + "from": "cdb6::", + "key": "ipv6", + "to": "cdb6:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + }, + ], + }, + } + `); + }); + }); + }); + + describe('suggestion parsing', () => { test('parses keyword / text result', () => { const optionsListRequestBodyMock: OptionsListRequestBody = { fieldName: 'coolTestField.keyword', @@ -318,4 +491,60 @@ describe('options list queries', () => { `); }); }); + + test('parses mixed IPv4 and IPv6 result', () => { + const optionsListRequestBodyMock: OptionsListRequestBody = { + fieldName: 'clientip', + fieldSpec: { type: 'ip' } as unknown as FieldSpec, + }; + const suggestionAggBuilder = getSuggestionAggregationBuilder(optionsListRequestBodyMock); + rawSearchResponseMock.aggregations = { + suggestions: { + buckets: { + ipv4: { + from: '0.0.0.0', + to: '255.255.255.255', + filteredSuggestions: { + buckets: [ + { doc_count: 8, key: '21.35.91.62' }, + { doc_count: 8, key: '21.35.91.61' }, + { doc_count: 11, key: '111.52.174.2' }, + { doc_count: 1, key: '56.73.58.63' }, + { doc_count: 9, key: '23.216.241.120' }, + { doc_count: 10, key: '196.162.13.39' }, + { doc_count: 7, key: '203.88.33.151' }, + ], + }, + }, + ipv6: { + from: '::', + to: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', + filteredSuggestions: { + buckets: [ + { doc_count: 12, key: '52:ae76:5947:5e2a:551:fe6a:712a:c72' }, + { doc_count: 1, key: 'fd:4aa0:c27c:b04:997f:2de1:51b4:8418' }, + { doc_count: 9, key: '28c7:c9a4:42fd:16b0:4de5:e41e:28d9:9172' }, + { doc_count: 6, key: '1ec:aa98:b0a6:d07c:590:18a0:8a33:2eb8' }, + { doc_count: 10, key: 'f7a9:640b:b5a0:1219:8d75:ed94:3c3e:2e63' }, + ], + }, + }, + }, + }, + }; + expect(suggestionAggBuilder.parse(rawSearchResponseMock)).toMatchInlineSnapshot(` + Array [ + "52:ae76:5947:5e2a:551:fe6a:712a:c72", + "111.52.174.2", + "196.162.13.39", + "f7a9:640b:b5a0:1219:8d75:ed94:3c3e:2e63", + "23.216.241.120", + "28c7:c9a4:42fd:16b0:4de5:e41e:28d9:9172", + "21.35.91.62", + "21.35.91.61", + "203.88.33.151", + "1ec:aa98:b0a6:d07c:590:18a0:8a33:2eb8", + ] + `); + }); }); diff --git a/src/plugins/controls/server/options_list/options_list_queries.ts b/src/plugins/controls/server/options_list/options_list_queries.ts index 4e88c449a7e8e..d1fa89bbc9358 100644 --- a/src/plugins/controls/server/options_list/options_list_queries.ts +++ b/src/plugins/controls/server/options_list/options_list_queries.ts @@ -7,17 +7,21 @@ */ import { get, isEmpty } from 'lodash'; - import { SearchResponse } from '@elastic/elasticsearch/lib/api/types'; import { getFieldSubtypeNested } from '@kbn/data-views-plugin/common'; import { OptionsListRequestBody } from '../../common/options_list/types'; - +import { getIpRangeQuery, type IpRangeQuery } from '../../common/options_list/ip_search'; export interface OptionsListAggregationBuilder { buildAggregation: (req: OptionsListRequestBody) => unknown; parse: (response: SearchResponse) => string[]; } +interface EsBucket { + key: string; + doc_count: number; +} + /** * Validation aggregations */ @@ -62,6 +66,9 @@ export const getSuggestionAggregationBuilder = ({ if (fieldSpec?.type === 'boolean') { return suggestionAggSubtypes.boolean; } + if (fieldSpec?.type === 'ip') { + return suggestionAggSubtypes.ip; + } if (fieldSpec && getFieldSubtypeNested(fieldSpec)) { return suggestionAggSubtypes.subtypeNested; } @@ -71,6 +78,16 @@ export const getSuggestionAggregationBuilder = ({ const getEscapedQuery = (q: string = '') => q.replace(/[.?+*|{}[\]()"\\#@&<>~]/g, (match) => `\\${match}`); +const getIpBuckets = (rawEsResult: any, combinedBuckets: EsBucket[], type: 'ipv4' | 'ipv6') => { + const results = get( + rawEsResult, + `aggregations.suggestions.buckets.${type}.filteredSuggestions.buckets` + ); + if (results) { + results.forEach((suggestion: EsBucket) => combinedBuckets.push(suggestion)); + } +}; + const suggestionAggSubtypes: { [key: string]: OptionsListAggregationBuilder } = { /** * the "Keyword only" query / parser should be used when the options list is built on a field which has only keyword mappings. @@ -139,6 +156,65 @@ const suggestionAggSubtypes: { [key: string]: OptionsListAggregationBuilder } = ), }, + /** + * the "IP" query / parser should be used when the options list is built on a field of type IP. + */ + ip: { + buildAggregation: ({ fieldName, searchString }: OptionsListRequestBody) => { + let ipRangeQuery: IpRangeQuery = { + validSearch: true, + rangeQuery: [ + { + key: 'ipv6', + from: '::', + to: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', + }, + ], + }; + + if (searchString) { + ipRangeQuery = getIpRangeQuery(searchString); + if (!ipRangeQuery.validSearch) { + // ideally should be prevented on the client side but, if somehow an invalid search gets through to the server, + // simply don't return an aggregation query for the ES search request + return undefined; + } + } + + return { + ip_range: { + field: fieldName, + ranges: ipRangeQuery.rangeQuery, + keyed: true, + }, + aggs: { + filteredSuggestions: { + terms: { + field: fieldName, + execution_hint: 'map', + shard_size: 10, + }, + }, + }, + }; + }, + parse: (rawEsResult) => { + if (!Boolean(rawEsResult.aggregations?.suggestions)) { + // if this is happens, that means there is an invalid search that snuck through to the server side code; + // so, might as well early return with no suggestions + return []; + } + + const buckets: EsBucket[] = []; + getIpBuckets(rawEsResult, buckets, 'ipv4'); // modifies buckets array directly, i.e. "by reference" + getIpBuckets(rawEsResult, buckets, 'ipv6'); + return buckets + .sort((bucketA: EsBucket, bucketB: EsBucket) => bucketB.doc_count - bucketA.doc_count) + .slice(0, 10) // only return top 10 results + .map((bucket: EsBucket) => bucket.key); + }, + }, + /** * the "Subtype Nested" query / parser should be used when the options list is built on a field with subtype nested. */ diff --git a/src/plugins/controls/server/options_list/options_list_suggestions_route.ts b/src/plugins/controls/server/options_list/options_list_suggestions_route.ts index 0d7654f318f31..c9af30bb07b82 100644 --- a/src/plugins/controls/server/options_list/options_list_suggestions_route.ts +++ b/src/plugins/controls/server/options_list/options_list_suggestions_route.ts @@ -95,9 +95,12 @@ export const setupOptionsListSuggestionsRoute = ( const suggestionBuilder = getSuggestionAggregationBuilder(request); const validationBuilder = getValidationAggregationBuilder(); - const suggestionAggregations = { - suggestions: suggestionBuilder.buildAggregation(request), - }; + const builtSuggestionAggregation = suggestionBuilder.buildAggregation(request); + const suggestionAggregation = builtSuggestionAggregation + ? { + suggestions: builtSuggestionAggregation, + } + : {}; const builtValidationAggregation = validationBuilder.buildAggregation(request); const validationAggregations = builtValidationAggregation ? { @@ -114,7 +117,7 @@ export const setupOptionsListSuggestionsRoute = ( }, }, aggs: { - ...suggestionAggregations, + ...suggestionAggregation, ...validationAggregations, unique_terms: { cardinality: { From 660a24e94f2a9555896de0c5ce4eb634fcf8dd5a Mon Sep 17 00:00:00 2001 From: Ersin Erdal <92688503+ersin-erdal@users.noreply.github.com> Date: Fri, 14 Oct 2022 00:17:30 +0200 Subject: [PATCH 33/35] Add filter field to index threshold rule type (#142255) * Add filter field to index threshold rule type --- packages/kbn-optimizer/limits.yml | 2 +- .../alert_types/threshold/expression.test.tsx | 4 + .../alert_types/threshold/expression.tsx | 47 ++++- .../threshold/index_threshold_api.ts | 1 + .../public/alert_types/threshold/types.ts | 1 + .../alert_types/threshold/validation.test.ts | 17 ++ .../alert_types/threshold/validation.ts | 16 ++ .../index_threshold/rule_type.test.ts | 4 + .../alert_types/index_threshold/rule_type.ts | 1 + .../server/data/lib/core_query_types.test.ts | 8 + .../server/data/lib/core_query_types.ts | 16 ++ .../server/data/lib/time_series_query.test.ts | 164 +++++++++++------- .../server/data/lib/time_series_query.ts | 30 +++- .../index_threshold/alert.ts | 63 ++++++- .../alert_create_flyout.ts | 7 + 15 files changed, 303 insertions(+), 78 deletions(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 67064af8cddc5..6e6172c014371 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -110,7 +110,7 @@ pageLoadAssetSize: share: 71239 snapshotRestore: 79032 spaces: 57868 - stackAlerts: 29684 + stackAlerts: 58316 stackConnectors: 36314 synthetics: 40958 telemetry: 51957 diff --git a/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.test.tsx b/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.test.tsx index 6fb83aad7287d..4b79a68f2125c 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.test.tsx +++ b/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.test.tsx @@ -121,6 +121,7 @@ describe('IndexThresholdAlertTypeExpression', () => { expect(wrapper.find('[data-test-subj="forLastExpression"]').exists()).toBeTruthy(); expect(wrapper.find('[data-test-subj="visualizationPlaceholder"]').exists()).toBeTruthy(); expect(wrapper.find('[data-test-subj="thresholdVisualization"]').exists()).toBeFalsy(); + expect(wrapper.find('[data-test-subj="filterKuery"]').exists()).toBeTruthy(); }); test(`should render IndexThresholdAlertTypeExpression with expected components when aggType does require field`, async () => { @@ -133,6 +134,7 @@ describe('IndexThresholdAlertTypeExpression', () => { expect(wrapper.find('[data-test-subj="forLastExpression"]').exists()).toBeTruthy(); expect(wrapper.find('[data-test-subj="visualizationPlaceholder"]').exists()).toBeTruthy(); expect(wrapper.find('[data-test-subj="thresholdVisualization"]').exists()).toBeFalsy(); + expect(wrapper.find('[data-test-subj="filterKuery"]').exists()).toBeTruthy(); }); test(`should render IndexThresholdAlertTypeExpression with visualization when there are no expression errors`, async () => { @@ -175,6 +177,7 @@ describe('IndexThresholdAlertTypeExpression', () => { expect( wrapper.find('EuiEmptyPrompt[data-test-subj="visualizationPlaceholder"]').text() ).toEqual(`Complete the expression to generate a preview.`); + expect(wrapper.find('input[data-test-subj="filterKuery"]').text()).toEqual(''); }); test(`should use alert params when params are defined`, async () => { @@ -186,6 +189,7 @@ describe('IndexThresholdAlertTypeExpression', () => { const groupBy = 'top'; const termSize = '27'; const termField = 'host.name'; + const wrapper = await setup( getAlertParams({ aggType, diff --git a/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.tsx b/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.tsx index de8b1ec484afc..37ad715aae18b 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.tsx +++ b/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.tsx @@ -5,10 +5,18 @@ * 2.0. */ -import React, { useState, Fragment, useEffect } from 'react'; +import React, { useState, Fragment, useEffect, useCallback, ChangeEvent } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiSpacer, EuiCallOut, EuiEmptyPrompt, EuiText, EuiTitle } from '@elastic/eui'; +import { + EuiSpacer, + EuiCallOut, + EuiEmptyPrompt, + EuiText, + EuiTitle, + EuiFieldSearch, + EuiFormRow, +} from '@elastic/eui'; import { HttpSetup } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { @@ -78,6 +86,7 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent< threshold, timeWindowSize, timeWindowUnit, + filterKuery, } = ruleParams; const indexArray = indexParamToArray(index); @@ -133,6 +142,13 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent< setEsFields(currentEsFields); }; + const handleFilterChange = useCallback( + (e: ChangeEvent) => { + setRuleParams('filterKuery', e.target.value || undefined); + }, + [setRuleParams] + ); + useEffect(() => { setDefaultExpressionValues(); // eslint-disable-next-line react-hooks/exhaustive-deps @@ -261,6 +277,33 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent< } /> + +
+ +
+
+ + 0} + error={errors.filterKuery} + > + 0} + /> + +
{cannotShowVisualization ? ( diff --git a/x-pack/plugins/stack_alerts/public/alert_types/threshold/index_threshold_api.ts b/x-pack/plugins/stack_alerts/public/alert_types/threshold/index_threshold_api.ts index d1e5613c659f7..9dfcfa0bffc31 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/threshold/index_threshold_api.ts +++ b/x-pack/plugins/stack_alerts/public/alert_types/threshold/index_threshold_api.ts @@ -36,6 +36,7 @@ export async function getThresholdAlertVisualizationData({ termSize: model.termSize, timeWindowSize: model.timeWindowSize, timeWindowUnit: model.timeWindowUnit, + filterKuery: model.filterKuery, dateStart: new Date(visualizeOptions.rangeFrom).toISOString(), dateEnd: new Date(visualizeOptions.rangeTo).toISOString(), interval: visualizeOptions.interval, diff --git a/x-pack/plugins/stack_alerts/public/alert_types/threshold/types.ts b/x-pack/plugins/stack_alerts/public/alert_types/threshold/types.ts index ed6758e6d7326..20a4bd5c6a2c0 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/threshold/types.ts +++ b/x-pack/plugins/stack_alerts/public/alert_types/threshold/types.ts @@ -39,4 +39,5 @@ export interface IndexThresholdAlertParams extends RuleTypeParams { threshold: number[]; timeWindowSize: number; timeWindowUnit: string; + filterKuery?: string; } diff --git a/x-pack/plugins/stack_alerts/public/alert_types/threshold/validation.test.ts b/x-pack/plugins/stack_alerts/public/alert_types/threshold/validation.test.ts index 459949f18528e..d02afc87ad4f4 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/threshold/validation.test.ts +++ b/x-pack/plugins/stack_alerts/public/alert_types/threshold/validation.test.ts @@ -94,4 +94,21 @@ describe('expression params validation', () => { expect(validateExpression(initialParams).errors.threshold1.length).toBeGreaterThan(0); expect(validateExpression(initialParams).errors.threshold1[0]).toBe('Threshold1 is required.'); }); + + test('if filterKuery is invalid should return proper error message', () => { + const initialParams: IndexThresholdAlertParams = { + index: ['test'], + aggType: 'count', + groupBy: 'top', + threshold: [1], + timeWindowSize: 1, + timeWindowUnit: 's', + thresholdComparator: 'between', + filterKuery: 'group:', + }; + expect(validateExpression(initialParams).errors.filterKuery.length).toBeGreaterThan(0); + expect(validateExpression(initialParams).errors.filterKuery[0]).toBe( + 'Filter query is invalid.' + ); + }); }); diff --git a/x-pack/plugins/stack_alerts/public/alert_types/threshold/validation.ts b/x-pack/plugins/stack_alerts/public/alert_types/threshold/validation.ts index a7f695094ce31..3b92fe8ae2dbf 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/threshold/validation.ts +++ b/x-pack/plugins/stack_alerts/public/alert_types/threshold/validation.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { toElasticsearchQuery, fromKueryExpression } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; import { ValidationResult, @@ -26,6 +27,7 @@ export const validateExpression = (alertParams: IndexThresholdAlertParams): Vali threshold, timeWindowSize, thresholdComparator, + filterKuery, } = alertParams; const validationResult = { errors: {} }; const errors = { @@ -37,8 +39,22 @@ export const validateExpression = (alertParams: IndexThresholdAlertParams): Vali threshold1: new Array(), index: new Array(), timeField: new Array(), + filterKuery: new Array(), }; validationResult.errors = errors; + + if (!!filterKuery) { + try { + toElasticsearchQuery(fromKueryExpression(filterKuery as string)); + } catch (e) { + errors.filterKuery.push( + i18n.translate('xpack.stackAlerts.threshold.ui.validation.error.invalidKql', { + defaultMessage: 'Filter query is invalid.', + }) + ); + } + } + if (!index || index.length === 0) { errors.index.push( i18n.translate('xpack.stackAlerts.threshold.ui.validation.error.requiredIndexText', { diff --git a/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/rule_type.test.ts b/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/rule_type.test.ts index 656a1e5f275e5..adb722ef094d2 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/rule_type.test.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/rule_type.test.ts @@ -104,6 +104,10 @@ describe('ruleType', () => { "description": "termField", "name": "termField", }, + Object { + "description": "filterKuery", + "name": "filterKuery", + }, Object { "description": "termSize", "name": "termSize", diff --git a/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/rule_type.ts b/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/rule_type.ts index 3b3480407fcfc..32f30c2db437d 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/rule_type.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/rule_type.ts @@ -169,6 +169,7 @@ export function getRuleType( timeWindowSize: params.timeWindowSize, timeWindowUnit: params.timeWindowUnit, interval: undefined, + filterKuery: params.filterKuery, }; // console.log(`index_threshold: query: ${JSON.stringify(queryParams, null, 4)}`); const result = await ( diff --git a/x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.test.ts b/x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.test.ts index 9909297da1063..6ffed5accf9cd 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.test.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.test.ts @@ -19,6 +19,7 @@ const DefaultParams: Writable> = { groupBy: 'all', timeWindowSize: 5, timeWindowUnit: 'm', + filterKuery: 'event.provider: alerting', }; export function runTests(schema: ObjectType, defaultTypeParams: Record): void { @@ -183,6 +184,13 @@ export function runTests(schema: ObjectType, defaultTypeParams: Record { + params.filterKuery = 'event:'; + expect(onValidate()).toThrowErrorMatchingInlineSnapshot( + '"[filterKuery]: Filter query is invalid."' + ); + }); }); function onValidate(): () => void { diff --git a/x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.ts b/x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.ts index 605a06ab7ab5e..06e7c75d9795b 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.ts @@ -10,6 +10,7 @@ import { i18n } from '@kbn/i18n'; import { schema, TypeOf } from '@kbn/config-schema'; +import { toElasticsearchQuery, fromKueryExpression } from '@kbn/es-query'; import { MAX_GROUPS } from '..'; export const CoreQueryParamsSchemaProperties = { @@ -28,6 +29,8 @@ export const CoreQueryParamsSchemaProperties = { groupBy: schema.string({ validate: validateGroupBy }), // field to group on (for groupBy: top) termField: schema.maybe(schema.string({ minLength: 1 })), + // filter field + filterKuery: schema.maybe(schema.string({ validate: validateKuery })), // limit on number of groups returned termSize: schema.maybe(schema.number({ min: 1 })), // size of time window for date range aggregations @@ -135,3 +138,16 @@ export function validateTimeWindowUnits(timeWindowUnit: string): string | undefi } ); } + +export function validateKuery(query: string): string | undefined { + try { + toElasticsearchQuery(fromKueryExpression(query)); + } catch (e) { + return i18n.translate( + 'xpack.triggersActionsUI.data.coreQueryParams.invalidKQLQueryErrorMessage', + { + defaultMessage: 'Filter query is invalid.', + } + ); + } +} diff --git a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.test.ts b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.test.ts index 5e2550e15f35d..514601612db21 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.test.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.test.ts @@ -54,6 +54,26 @@ describe('timeSeriesQuery', () => { ).rejects.toThrowErrorMatchingInlineSnapshot(`"invalid date format for dateStart: \\"x\\""`); }); + it('filters the results when filter param is passed', async () => { + await timeSeriesQuery({ + ...params, + query: { ...params.query, filterKuery: 'event.provider: alerting' }, + }); + // @ts-ignore + expect(esClient.search.mock.calls[0]![0].body.query.bool.filter[1]).toEqual({ + bool: { + minimum_should_match: 1, + should: [ + { + match: { + 'event.provider': 'alerting', + }, + }, + ], + }, + }); + }); + it('should create correct query when aggType=count and termField is undefined (count over all) and selector params are undefined', async () => { await timeSeriesQuery(params); expect(esClient.search).toHaveBeenCalledWith( @@ -80,15 +100,17 @@ describe('timeSeriesQuery', () => { }, query: { bool: { - filter: { - range: { - 'time-field': { - format: 'strict_date_time', - gte: '2021-04-22T15:14:31.000Z', - lt: '2021-04-22T15:20:31.000Z', + filter: [ + { + range: { + 'time-field': { + format: 'strict_date_time', + gte: '2021-04-22T15:14:31.000Z', + lt: '2021-04-22T15:20:31.000Z', + }, }, }, - }, + ], }, }, size: 0, @@ -132,15 +154,17 @@ describe('timeSeriesQuery', () => { }, query: { bool: { - filter: { - range: { - 'time-field': { - format: 'strict_date_time', - gte: '2021-04-22T15:14:31.000Z', - lt: '2021-04-22T15:20:31.000Z', + filter: [ + { + range: { + 'time-field': { + format: 'strict_date_time', + gte: '2021-04-22T15:14:31.000Z', + lt: '2021-04-22T15:20:31.000Z', + }, }, }, - }, + ], }, }, size: 0, @@ -193,15 +217,17 @@ describe('timeSeriesQuery', () => { }, query: { bool: { - filter: { - range: { - 'time-field': { - format: 'strict_date_time', - gte: '2021-04-22T15:14:31.000Z', - lt: '2021-04-22T15:20:31.000Z', + filter: [ + { + range: { + 'time-field': { + format: 'strict_date_time', + gte: '2021-04-22T15:14:31.000Z', + lt: '2021-04-22T15:20:31.000Z', + }, }, }, - }, + ], }, }, size: 0, @@ -271,15 +297,17 @@ describe('timeSeriesQuery', () => { }, query: { bool: { - filter: { - range: { - 'time-field': { - format: 'strict_date_time', - gte: '2021-04-22T15:14:31.000Z', - lt: '2021-04-22T15:20:31.000Z', + filter: [ + { + range: { + 'time-field': { + format: 'strict_date_time', + gte: '2021-04-22T15:14:31.000Z', + lt: '2021-04-22T15:20:31.000Z', + }, }, }, - }, + ], }, }, size: 0, @@ -336,15 +364,17 @@ describe('timeSeriesQuery', () => { }, query: { bool: { - filter: { - range: { - 'time-field': { - format: 'strict_date_time', - gte: '2021-04-22T15:14:31.000Z', - lt: '2021-04-22T15:20:31.000Z', + filter: [ + { + range: { + 'time-field': { + format: 'strict_date_time', + gte: '2021-04-22T15:14:31.000Z', + lt: '2021-04-22T15:20:31.000Z', + }, }, }, - }, + ], }, }, size: 0, @@ -405,15 +435,17 @@ describe('timeSeriesQuery', () => { }, query: { bool: { - filter: { - range: { - 'time-field': { - format: 'strict_date_time', - gte: '2021-04-22T15:14:31.000Z', - lt: '2021-04-22T15:20:31.000Z', + filter: [ + { + range: { + 'time-field': { + format: 'strict_date_time', + gte: '2021-04-22T15:14:31.000Z', + lt: '2021-04-22T15:20:31.000Z', + }, }, }, - }, + ], }, }, size: 0, @@ -483,15 +515,17 @@ describe('timeSeriesQuery', () => { }, query: { bool: { - filter: { - range: { - 'time-field': { - format: 'strict_date_time', - gte: '2021-04-22T15:14:31.000Z', - lt: '2021-04-22T15:20:31.000Z', + filter: [ + { + range: { + 'time-field': { + format: 'strict_date_time', + gte: '2021-04-22T15:14:31.000Z', + lt: '2021-04-22T15:20:31.000Z', + }, }, }, - }, + ], }, }, size: 0, @@ -578,15 +612,17 @@ describe('timeSeriesQuery', () => { }, query: { bool: { - filter: { - range: { - 'time-field': { - format: 'strict_date_time', - gte: '2021-04-22T15:14:31.000Z', - lt: '2021-04-22T15:20:31.000Z', + filter: [ + { + range: { + 'time-field': { + format: 'strict_date_time', + gte: '2021-04-22T15:14:31.000Z', + lt: '2021-04-22T15:20:31.000Z', + }, }, }, - }, + ], }, }, size: 0, @@ -656,15 +692,17 @@ describe('timeSeriesQuery', () => { }, query: { bool: { - filter: { - range: { - 'time-field': { - format: 'strict_date_time', - gte: '2021-04-22T15:14:31.000Z', - lt: '2021-04-22T15:20:31.000Z', + filter: [ + { + range: { + 'time-field': { + format: 'strict_date_time', + gte: '2021-04-22T15:14:31.000Z', + lt: '2021-04-22T15:20:31.000Z', + }, }, }, - }, + ], }, }, size: 0, diff --git a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts index 885be0bf59f5b..ccf4ae631bf8e 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts @@ -9,6 +9,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { Logger } from '@kbn/core/server'; import type { ElasticsearchClient } from '@kbn/core/server'; import { getEsErrorMessage } from '@kbn/alerting-plugin/server'; +import { toElasticsearchQuery, fromKueryExpression } from '@kbn/es-query'; import { DEFAULT_GROUPS } from '..'; import { getDateRangeInfo } from './date_range_info'; @@ -34,8 +35,16 @@ export async function timeSeriesQuery( params: TimeSeriesQueryParameters ): Promise { const { logger, esClient, query: queryParams, condition: conditionParams } = params; - const { index, timeWindowSize, timeWindowUnit, interval, timeField, dateStart, dateEnd } = - queryParams; + const { + index, + timeWindowSize, + timeWindowUnit, + interval, + timeField, + dateStart, + dateEnd, + filterKuery, + } = queryParams; const window = `${timeWindowSize}${timeWindowUnit}`; const dateRangeInfo = getDateRangeInfo({ dateStart, dateEnd, window, interval }); @@ -49,15 +58,18 @@ export async function timeSeriesQuery( size: 0, query: { bool: { - filter: { - range: { - [timeField]: { - gte: dateRangeInfo.dateStart, - lt: dateRangeInfo.dateEnd, - format: 'strict_date_time', + filter: [ + { + range: { + [timeField]: { + gte: dateRangeInfo.dateStart, + lt: dateRangeInfo.dateEnd, + format: 'strict_date_time', + }, }, }, - }, + ...(!!filterKuery ? [toElasticsearchQuery(fromKueryExpression(filterKuery))] : []), + ], }, }, // aggs: {...}, filled in below diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/builtin_alert_types/index_threshold/alert.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/builtin_alert_types/index_threshold/alert.ts index c06eb41759d63..4dae8cdccd1cb 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/builtin_alert_types/index_threshold/alert.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/builtin_alert_types/index_threshold/alert.ts @@ -55,9 +55,6 @@ export default function ruleTests({ getService }: FtrProviderContext) { const endDateMillis = Date.now() + (RULE_INTERVALS_TO_WRITE - 1) * RULE_INTERVAL_MILLIS; endDate = new Date(endDateMillis).toISOString(); - // write documents from now to the future end date in 3 groups - await createEsDocumentsInGroups(3); - await createDataStream(es, ES_TEST_DATA_STREAM_NAME); }); @@ -72,6 +69,9 @@ export default function ruleTests({ getService }: FtrProviderContext) { // never fire; the tests ensure the ones that should fire, do fire, and // those that shouldn't fire, do not fire. it('runs correctly: count all < >', async () => { + // write documents from now to the future end date in 3 groups + await createEsDocumentsInGroups(3); + await createRule({ name: 'never fire', aggType: 'count', @@ -106,6 +106,9 @@ export default function ruleTests({ getService }: FtrProviderContext) { }); it('runs correctly: count grouped <= =>', async () => { + // write documents from now to the future end date in 3 groups + await createEsDocumentsInGroups(3); + await createRule({ name: 'never fire', aggType: 'count', @@ -150,6 +153,9 @@ export default function ruleTests({ getService }: FtrProviderContext) { }); it('runs correctly: sum all between', async () => { + // write documents from now to the future end date in 3 groups + await createEsDocumentsInGroups(3); + await createRule({ name: 'never fire', aggType: 'sum', @@ -184,6 +190,9 @@ export default function ruleTests({ getService }: FtrProviderContext) { }); it('runs correctly: avg all', async () => { + // write documents from now to the future end date in 3 groups + await createEsDocumentsInGroups(3); + // this never fires because of bad fields error await createRule({ name: 'never fire', @@ -220,6 +229,9 @@ export default function ruleTests({ getService }: FtrProviderContext) { }); it('runs correctly: max grouped', async () => { + // write documents from now to the future end date in 3 groups + await createEsDocumentsInGroups(3); + await createRule({ name: 'never fire', aggType: 'max', @@ -266,6 +278,8 @@ export default function ruleTests({ getService }: FtrProviderContext) { }); it('runs correctly: max grouped on float', async () => { + // write documents from now to the future end date in 3 groups + await createEsDocumentsInGroups(3); await createRule({ name: 'never fire', aggType: 'max', @@ -305,6 +319,9 @@ export default function ruleTests({ getService }: FtrProviderContext) { }); it('runs correctly: max grouped on unsigned long', async () => { + // write documents from now to the future end date in 3 groups + await createEsDocumentsInGroups(3); + await createRule({ name: 'never fire', aggType: 'max', @@ -344,6 +361,9 @@ export default function ruleTests({ getService }: FtrProviderContext) { }); it('runs correctly: min grouped', async () => { + // write documents from now to the future end date in 3 groups + await createEsDocumentsInGroups(3); + await createRule({ name: 'never fire', aggType: 'min', @@ -390,6 +410,9 @@ export default function ruleTests({ getService }: FtrProviderContext) { }); it('runs correctly and populates recovery context', async () => { + // write documents from now to the future end date in 3 groups + await createEsDocumentsInGroups(3); + // This rule should be active initially when the number of documents is below the threshold // and then recover when we add more documents. await createRule({ @@ -438,6 +461,9 @@ export default function ruleTests({ getService }: FtrProviderContext) { }); it('runs correctly over a data stream: count all < >', async () => { + // write documents from now to the future end date in 3 groups + await createEsDocumentsInGroups(3); + await createRule({ name: 'never fire', aggType: 'count', @@ -477,6 +503,35 @@ export default function ruleTests({ getService }: FtrProviderContext) { } }); + it('runs correctly: filters by Kuery', async () => { + // add documents that have timestamp as "now" + await createEsDocumentsWithGroups({ + es, + esTestIndexTool, + endDate: new Date().toISOString(), + intervals: 5, + intervalMillis: 5000, + groups: 3, + indexName: ES_TEST_INDEX_NAME, + }); + + await createRule({ + name: 'always fire', + aggType: 'count', + groupBy: 'all', + thresholdComparator: '>', + timeWindowSize: 3000, + threshold: [-1], + filterKuery: 'group: group-0', + }); + + const docs = await waitForDocs(1); + const doc = docs[0]; + const { message } = doc._source.params; + + expect(message).to.contain('Value: 5'); + }); + async function createEsDocumentsInGroups( groups: number, indexName: string = ES_TEST_INDEX_NAME @@ -513,6 +568,7 @@ export default function ruleTests({ getService }: FtrProviderContext) { threshold: number[]; notifyWhen?: string; indexName?: string; + filterKuery?: string; } async function createRule(params: CreateRuleParams): Promise { @@ -584,6 +640,7 @@ export default function ruleTests({ getService }: FtrProviderContext) { timeWindowUnit: 's', thresholdComparator: params.thresholdComparator, threshold: params.threshold, + filterKuery: params.filterKuery, }, }); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts index ea9ee9ddbdf38..a83d8de0a2cb8 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts @@ -134,6 +134,13 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await testSubjects.click('onThrottleInterval'); await testSubjects.setValue('throttleInput', '10'); + // filterKuery validation + await testSubjects.setValue('filterKuery', 'group:'); + const filterKueryInput = await testSubjects.find('filterKuery'); + expect(await filterKueryInput.elementHasClass('euiFieldSearch-isInvalid')).to.eql(true); + await testSubjects.setValue('filterKuery', 'group: group-0'); + expect(await filterKueryInput.elementHasClass('euiFieldSearch-isInvalid')).to.eql(false); + await testSubjects.click('.slack-alerting-ActionTypeSelectOption'); await testSubjects.click('addNewActionConnectorButton-.slack'); const slackConnectorName = generateUniqueKey(); From 195ce74b104b14708d1cfa2213c96c72d551c3e7 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 13 Oct 2022 22:43:48 -0600 Subject: [PATCH 34/35] [api-docs] Daily api_docs build (#143338) --- api_docs/actions.mdx | 2 +- api_docs/advanced_settings.mdx | 2 +- api_docs/aiops.mdx | 2 +- api_docs/alerting.mdx | 2 +- api_docs/apm.mdx | 2 +- api_docs/banners.mdx | 2 +- api_docs/bfetch.mdx | 2 +- api_docs/canvas.mdx | 2 +- api_docs/cases.mdx | 2 +- api_docs/charts.mdx | 2 +- api_docs/cloud.mdx | 2 +- api_docs/cloud_chat.mdx | 2 +- api_docs/cloud_experiments.mdx | 2 +- api_docs/cloud_security_posture.mdx | 2 +- api_docs/console.mdx | 2 +- api_docs/controls.mdx | 2 +- api_docs/core.devdocs.json | 80 +++++++++++++------ api_docs/core.mdx | 2 +- api_docs/custom_integrations.mdx | 2 +- api_docs/dashboard.mdx | 2 +- api_docs/dashboard_enhanced.mdx | 2 +- api_docs/data.mdx | 2 +- api_docs/data_query.mdx | 2 +- api_docs/data_search.mdx | 2 +- api_docs/data_view_editor.mdx | 2 +- api_docs/data_view_field_editor.mdx | 2 +- api_docs/data_view_management.mdx | 2 +- api_docs/data_views.mdx | 2 +- api_docs/data_visualizer.mdx | 2 +- api_docs/deprecations_by_api.mdx | 2 +- api_docs/deprecations_by_plugin.mdx | 6 +- api_docs/deprecations_by_team.mdx | 2 +- api_docs/dev_tools.mdx | 2 +- api_docs/discover.mdx | 2 +- api_docs/discover_enhanced.mdx | 2 +- api_docs/embeddable.mdx | 2 +- api_docs/embeddable_enhanced.mdx | 2 +- api_docs/encrypted_saved_objects.mdx | 2 +- api_docs/enterprise_search.mdx | 2 +- api_docs/es_ui_shared.mdx | 2 +- api_docs/event_annotation.mdx | 2 +- api_docs/event_log.mdx | 2 +- api_docs/expression_error.mdx | 2 +- api_docs/expression_gauge.mdx | 2 +- api_docs/expression_heatmap.mdx | 2 +- api_docs/expression_image.mdx | 2 +- api_docs/expression_legacy_metric_vis.mdx | 2 +- api_docs/expression_metric.mdx | 2 +- api_docs/expression_metric_vis.mdx | 2 +- api_docs/expression_partition_vis.mdx | 2 +- api_docs/expression_repeat_image.mdx | 2 +- api_docs/expression_reveal_image.mdx | 2 +- api_docs/expression_shape.mdx | 2 +- api_docs/expression_tagcloud.mdx | 2 +- api_docs/expression_x_y.mdx | 2 +- api_docs/expressions.mdx | 2 +- api_docs/features.mdx | 2 +- api_docs/field_formats.mdx | 2 +- api_docs/file_upload.mdx | 2 +- api_docs/files.mdx | 2 +- api_docs/fleet.mdx | 2 +- api_docs/global_search.mdx | 2 +- api_docs/guided_onboarding.devdocs.json | 2 +- api_docs/guided_onboarding.mdx | 2 +- api_docs/home.mdx | 2 +- api_docs/index_lifecycle_management.mdx | 2 +- api_docs/index_management.mdx | 2 +- api_docs/infra.mdx | 2 +- api_docs/inspector.mdx | 2 +- api_docs/interactive_setup.mdx | 2 +- api_docs/kbn_ace.mdx | 2 +- api_docs/kbn_aiops_components.mdx | 2 +- api_docs/kbn_aiops_utils.mdx | 2 +- api_docs/kbn_alerts.mdx | 2 +- api_docs/kbn_analytics.mdx | 2 +- api_docs/kbn_analytics_client.mdx | 2 +- ..._analytics_shippers_elastic_v3_browser.mdx | 2 +- ...n_analytics_shippers_elastic_v3_common.mdx | 2 +- ...n_analytics_shippers_elastic_v3_server.mdx | 2 +- api_docs/kbn_analytics_shippers_fullstory.mdx | 2 +- api_docs/kbn_apm_config_loader.mdx | 2 +- api_docs/kbn_apm_synthtrace.mdx | 2 +- api_docs/kbn_apm_utils.mdx | 2 +- api_docs/kbn_axe_config.mdx | 2 +- api_docs/kbn_cases_components.mdx | 2 +- api_docs/kbn_chart_icons.mdx | 2 +- api_docs/kbn_ci_stats_core.mdx | 2 +- api_docs/kbn_ci_stats_performance_metrics.mdx | 2 +- api_docs/kbn_ci_stats_reporter.mdx | 2 +- api_docs/kbn_cli_dev_mode.mdx | 2 +- api_docs/kbn_coloring.mdx | 2 +- api_docs/kbn_config.mdx | 2 +- api_docs/kbn_config_mocks.mdx | 2 +- api_docs/kbn_config_schema.mdx | 2 +- .../kbn_content_management_table_list.mdx | 2 +- api_docs/kbn_core_analytics_browser.mdx | 2 +- .../kbn_core_analytics_browser_internal.mdx | 2 +- api_docs/kbn_core_analytics_browser_mocks.mdx | 2 +- api_docs/kbn_core_analytics_server.mdx | 2 +- .../kbn_core_analytics_server_internal.mdx | 2 +- api_docs/kbn_core_analytics_server_mocks.mdx | 2 +- api_docs/kbn_core_application_browser.mdx | 2 +- .../kbn_core_application_browser_internal.mdx | 2 +- .../kbn_core_application_browser_mocks.mdx | 2 +- api_docs/kbn_core_application_common.mdx | 2 +- api_docs/kbn_core_apps_browser_internal.mdx | 2 +- api_docs/kbn_core_apps_browser_mocks.mdx | 2 +- api_docs/kbn_core_base_browser_mocks.mdx | 2 +- api_docs/kbn_core_base_common.mdx | 2 +- api_docs/kbn_core_base_server_internal.mdx | 2 +- api_docs/kbn_core_base_server_mocks.mdx | 2 +- .../kbn_core_capabilities_browser_mocks.mdx | 2 +- api_docs/kbn_core_capabilities_common.mdx | 2 +- api_docs/kbn_core_capabilities_server.mdx | 2 +- .../kbn_core_capabilities_server_mocks.mdx | 2 +- api_docs/kbn_core_chrome_browser.mdx | 2 +- api_docs/kbn_core_chrome_browser_mocks.mdx | 2 +- api_docs/kbn_core_config_server_internal.mdx | 2 +- api_docs/kbn_core_deprecations_browser.mdx | 2 +- ...kbn_core_deprecations_browser_internal.mdx | 2 +- .../kbn_core_deprecations_browser_mocks.mdx | 2 +- api_docs/kbn_core_deprecations_common.mdx | 2 +- api_docs/kbn_core_deprecations_server.mdx | 2 +- .../kbn_core_deprecations_server_internal.mdx | 2 +- .../kbn_core_deprecations_server_mocks.mdx | 2 +- api_docs/kbn_core_doc_links_browser.mdx | 2 +- api_docs/kbn_core_doc_links_browser_mocks.mdx | 2 +- api_docs/kbn_core_doc_links_server.mdx | 2 +- api_docs/kbn_core_doc_links_server_mocks.mdx | 2 +- ...e_elasticsearch_client_server_internal.mdx | 2 +- ...core_elasticsearch_client_server_mocks.mdx | 2 +- api_docs/kbn_core_elasticsearch_server.mdx | 2 +- ...kbn_core_elasticsearch_server_internal.mdx | 2 +- .../kbn_core_elasticsearch_server_mocks.mdx | 2 +- .../kbn_core_environment_server_internal.mdx | 2 +- .../kbn_core_environment_server_mocks.mdx | 2 +- .../kbn_core_execution_context_browser.mdx | 2 +- ...ore_execution_context_browser_internal.mdx | 2 +- ...n_core_execution_context_browser_mocks.mdx | 2 +- .../kbn_core_execution_context_common.mdx | 2 +- .../kbn_core_execution_context_server.mdx | 2 +- ...core_execution_context_server_internal.mdx | 2 +- ...bn_core_execution_context_server_mocks.mdx | 2 +- api_docs/kbn_core_fatal_errors_browser.mdx | 2 +- .../kbn_core_fatal_errors_browser_mocks.mdx | 2 +- api_docs/kbn_core_http_browser.mdx | 2 +- api_docs/kbn_core_http_browser_internal.mdx | 2 +- api_docs/kbn_core_http_browser_mocks.mdx | 2 +- api_docs/kbn_core_http_common.mdx | 2 +- .../kbn_core_http_context_server_mocks.mdx | 2 +- ...re_http_request_handler_context_server.mdx | 2 +- api_docs/kbn_core_http_resources_server.mdx | 2 +- ...bn_core_http_resources_server_internal.mdx | 2 +- .../kbn_core_http_resources_server_mocks.mdx | 2 +- .../kbn_core_http_router_server_internal.mdx | 2 +- .../kbn_core_http_router_server_mocks.mdx | 2 +- api_docs/kbn_core_http_server.mdx | 2 +- api_docs/kbn_core_http_server_internal.mdx | 2 +- api_docs/kbn_core_http_server_mocks.mdx | 2 +- api_docs/kbn_core_i18n_browser.mdx | 2 +- api_docs/kbn_core_i18n_browser_mocks.mdx | 2 +- api_docs/kbn_core_i18n_server.mdx | 2 +- api_docs/kbn_core_i18n_server_internal.mdx | 2 +- api_docs/kbn_core_i18n_server_mocks.mdx | 2 +- .../kbn_core_injected_metadata_browser.mdx | 2 +- ...n_core_injected_metadata_browser_mocks.mdx | 2 +- ...kbn_core_integrations_browser_internal.mdx | 2 +- .../kbn_core_integrations_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_browser.mdx | 2 +- api_docs/kbn_core_lifecycle_browser_mocks.mdx | 2 +- api_docs/kbn_core_logging_server.mdx | 2 +- api_docs/kbn_core_logging_server_internal.mdx | 2 +- api_docs/kbn_core_logging_server_mocks.mdx | 2 +- ...ore_metrics_collectors_server_internal.mdx | 2 +- ...n_core_metrics_collectors_server_mocks.mdx | 2 +- api_docs/kbn_core_metrics_server.mdx | 2 +- api_docs/kbn_core_metrics_server_internal.mdx | 2 +- api_docs/kbn_core_metrics_server_mocks.mdx | 2 +- api_docs/kbn_core_mount_utils_browser.mdx | 2 +- api_docs/kbn_core_node_server.mdx | 2 +- api_docs/kbn_core_node_server_internal.mdx | 2 +- api_docs/kbn_core_node_server_mocks.mdx | 2 +- api_docs/kbn_core_notifications_browser.mdx | 2 +- ...bn_core_notifications_browser_internal.mdx | 2 +- .../kbn_core_notifications_browser_mocks.mdx | 2 +- api_docs/kbn_core_overlays_browser.mdx | 2 +- .../kbn_core_overlays_browser_internal.mdx | 2 +- api_docs/kbn_core_overlays_browser_mocks.mdx | 2 +- api_docs/kbn_core_plugins_browser.mdx | 2 +- api_docs/kbn_core_plugins_browser_mocks.mdx | 2 +- api_docs/kbn_core_preboot_server.mdx | 2 +- api_docs/kbn_core_preboot_server_mocks.mdx | 2 +- api_docs/kbn_core_rendering_browser_mocks.mdx | 2 +- .../kbn_core_rendering_server_internal.mdx | 2 +- api_docs/kbn_core_rendering_server_mocks.mdx | 2 +- .../kbn_core_saved_objects_api_browser.mdx | 2 +- .../kbn_core_saved_objects_api_server.mdx | 2 +- ...core_saved_objects_api_server_internal.mdx | 2 +- ...bn_core_saved_objects_api_server_mocks.mdx | 2 +- ...ore_saved_objects_base_server_internal.mdx | 2 +- ...n_core_saved_objects_base_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_browser.mdx | 2 +- ...bn_core_saved_objects_browser_internal.mdx | 2 +- .../kbn_core_saved_objects_browser_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_common.mdx | 2 +- ..._objects_import_export_server_internal.mdx | 2 +- ...ved_objects_import_export_server_mocks.mdx | 2 +- ...aved_objects_migration_server_internal.mdx | 2 +- ...e_saved_objects_migration_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_server.mdx | 2 +- ...kbn_core_saved_objects_server_internal.mdx | 2 +- .../kbn_core_saved_objects_server_mocks.mdx | 2 +- .../kbn_core_saved_objects_utils_server.mdx | 2 +- api_docs/kbn_core_status_common.mdx | 2 +- api_docs/kbn_core_status_common_internal.mdx | 2 +- api_docs/kbn_core_status_server.mdx | 2 +- api_docs/kbn_core_status_server_internal.mdx | 2 +- api_docs/kbn_core_status_server_mocks.mdx | 2 +- ...core_test_helpers_deprecations_getters.mdx | 2 +- ...n_core_test_helpers_http_setup_browser.mdx | 2 +- ...n_core_test_helpers_so_type_serializer.mdx | 2 +- api_docs/kbn_core_theme_browser.mdx | 2 +- api_docs/kbn_core_theme_browser_internal.mdx | 2 +- api_docs/kbn_core_theme_browser_mocks.mdx | 2 +- api_docs/kbn_core_ui_settings_browser.mdx | 2 +- .../kbn_core_ui_settings_browser_internal.mdx | 2 +- .../kbn_core_ui_settings_browser_mocks.mdx | 2 +- api_docs/kbn_core_ui_settings_common.mdx | 2 +- api_docs/kbn_core_ui_settings_server.mdx | 2 +- .../kbn_core_ui_settings_server_internal.mdx | 2 +- .../kbn_core_ui_settings_server_mocks.mdx | 2 +- api_docs/kbn_core_usage_data_server.mdx | 2 +- .../kbn_core_usage_data_server_internal.mdx | 2 +- api_docs/kbn_core_usage_data_server_mocks.mdx | 2 +- api_docs/kbn_crypto.mdx | 2 +- api_docs/kbn_crypto_browser.mdx | 2 +- api_docs/kbn_datemath.mdx | 2 +- api_docs/kbn_dev_cli_errors.mdx | 2 +- api_docs/kbn_dev_cli_runner.mdx | 2 +- api_docs/kbn_dev_proc_runner.mdx | 2 +- api_docs/kbn_dev_utils.mdx | 2 +- api_docs/kbn_doc_links.mdx | 2 +- api_docs/kbn_docs_utils.mdx | 2 +- api_docs/kbn_ebt_tools.mdx | 2 +- api_docs/kbn_es_archiver.mdx | 2 +- api_docs/kbn_es_errors.mdx | 2 +- api_docs/kbn_es_query.mdx | 2 +- api_docs/kbn_es_types.mdx | 2 +- api_docs/kbn_eslint_plugin_imports.mdx | 2 +- api_docs/kbn_field_types.mdx | 2 +- api_docs/kbn_find_used_node_modules.mdx | 2 +- .../kbn_ftr_common_functional_services.mdx | 2 +- api_docs/kbn_generate.mdx | 2 +- api_docs/kbn_get_repo_files.mdx | 2 +- api_docs/kbn_handlebars.mdx | 2 +- api_docs/kbn_hapi_mocks.mdx | 2 +- api_docs/kbn_home_sample_data_card.mdx | 2 +- api_docs/kbn_home_sample_data_tab.mdx | 2 +- api_docs/kbn_i18n.mdx | 2 +- api_docs/kbn_import_resolver.mdx | 2 +- api_docs/kbn_interpreter.mdx | 2 +- api_docs/kbn_io_ts_utils.mdx | 2 +- api_docs/kbn_jest_serializers.mdx | 2 +- api_docs/kbn_journeys.mdx | 2 +- api_docs/kbn_kibana_manifest_schema.mdx | 2 +- api_docs/kbn_logging.mdx | 2 +- api_docs/kbn_logging_mocks.mdx | 2 +- api_docs/kbn_managed_vscode_config.mdx | 2 +- api_docs/kbn_mapbox_gl.mdx | 2 +- api_docs/kbn_ml_agg_utils.mdx | 2 +- api_docs/kbn_ml_is_populated_object.mdx | 2 +- api_docs/kbn_ml_string_hash.mdx | 2 +- api_docs/kbn_monaco.mdx | 2 +- api_docs/kbn_optimizer.mdx | 2 +- api_docs/kbn_optimizer_webpack_helpers.mdx | 2 +- api_docs/kbn_osquery_io_ts_types.mdx | 2 +- ..._performance_testing_dataset_extractor.mdx | 2 +- api_docs/kbn_plugin_generator.mdx | 2 +- api_docs/kbn_plugin_helpers.mdx | 2 +- api_docs/kbn_react_field.mdx | 2 +- api_docs/kbn_repo_source_classifier.mdx | 2 +- api_docs/kbn_rule_data_utils.mdx | 2 +- .../kbn_securitysolution_autocomplete.mdx | 2 +- api_docs/kbn_securitysolution_es_utils.mdx | 2 +- ...ritysolution_exception_list_components.mdx | 2 +- api_docs/kbn_securitysolution_hook_utils.mdx | 2 +- ..._securitysolution_io_ts_alerting_types.mdx | 2 +- .../kbn_securitysolution_io_ts_list_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_utils.mdx | 2 +- api_docs/kbn_securitysolution_list_api.mdx | 2 +- .../kbn_securitysolution_list_constants.mdx | 2 +- api_docs/kbn_securitysolution_list_hooks.mdx | 2 +- api_docs/kbn_securitysolution_list_utils.mdx | 2 +- api_docs/kbn_securitysolution_rules.mdx | 2 +- api_docs/kbn_securitysolution_t_grid.mdx | 2 +- api_docs/kbn_securitysolution_utils.mdx | 2 +- api_docs/kbn_server_http_tools.mdx | 2 +- api_docs/kbn_server_route_repository.mdx | 2 +- api_docs/kbn_shared_svg.mdx | 2 +- ...ared_ux_avatar_user_profile_components.mdx | 2 +- ...hared_ux_button_exit_full_screen_mocks.mdx | 2 +- api_docs/kbn_shared_ux_button_toolbar.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_link_redirect_app_mocks.mdx | 2 +- .../kbn_shared_ux_page_analytics_no_data.mdx | 2 +- ...shared_ux_page_analytics_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_no_data.mdx | 2 +- ...bn_shared_ux_page_kibana_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_template.mdx | 2 +- ...n_shared_ux_page_kibana_template_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data.mdx | 2 +- .../kbn_shared_ux_page_no_data_config.mdx | 2 +- ...bn_shared_ux_page_no_data_config_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_solution_nav.mdx | 2 +- .../kbn_shared_ux_prompt_no_data_views.mdx | 2 +- ...n_shared_ux_prompt_no_data_views_mocks.mdx | 2 +- api_docs/kbn_shared_ux_router.mdx | 2 +- api_docs/kbn_shared_ux_router_mocks.mdx | 2 +- api_docs/kbn_shared_ux_storybook_config.mdx | 2 +- api_docs/kbn_shared_ux_storybook_mock.mdx | 2 +- api_docs/kbn_shared_ux_utility.mdx | 2 +- api_docs/kbn_some_dev_log.mdx | 2 +- api_docs/kbn_sort_package_json.mdx | 2 +- api_docs/kbn_std.mdx | 2 +- api_docs/kbn_stdio_dev_helpers.mdx | 2 +- api_docs/kbn_storybook.mdx | 2 +- api_docs/kbn_telemetry_tools.mdx | 2 +- api_docs/kbn_test.mdx | 2 +- api_docs/kbn_test_jest_helpers.mdx | 2 +- api_docs/kbn_test_subj_selector.mdx | 2 +- api_docs/kbn_tooling_log.mdx | 2 +- api_docs/kbn_type_summarizer.mdx | 2 +- api_docs/kbn_type_summarizer_core.mdx | 2 +- api_docs/kbn_typed_react_router_config.mdx | 2 +- api_docs/kbn_ui_theme.mdx | 2 +- api_docs/kbn_user_profile_components.mdx | 2 +- api_docs/kbn_utility_types.mdx | 2 +- api_docs/kbn_utility_types_jest.mdx | 2 +- api_docs/kbn_utils.mdx | 2 +- api_docs/kbn_yarn_lock_validator.mdx | 2 +- api_docs/kibana_overview.mdx | 2 +- api_docs/kibana_react.mdx | 2 +- api_docs/kibana_utils.mdx | 2 +- api_docs/kubernetes_security.mdx | 2 +- api_docs/lens.mdx | 2 +- api_docs/license_api_guard.mdx | 2 +- api_docs/license_management.mdx | 2 +- api_docs/licensing.mdx | 2 +- api_docs/lists.mdx | 2 +- api_docs/management.mdx | 2 +- api_docs/maps.devdocs.json | 2 +- api_docs/maps.mdx | 2 +- api_docs/maps_ems.mdx | 2 +- api_docs/ml.mdx | 2 +- api_docs/monitoring.mdx | 2 +- api_docs/monitoring_collection.mdx | 2 +- api_docs/navigation.mdx | 2 +- api_docs/newsfeed.mdx | 2 +- api_docs/observability.mdx | 2 +- api_docs/osquery.mdx | 2 +- api_docs/plugin_directory.mdx | 6 +- api_docs/presentation_util.mdx | 2 +- api_docs/profiling.mdx | 2 +- api_docs/remote_clusters.mdx | 2 +- api_docs/reporting.mdx | 2 +- api_docs/rollup.mdx | 2 +- api_docs/rule_registry.mdx | 2 +- api_docs/runtime_fields.mdx | 2 +- api_docs/saved_objects.mdx | 2 +- api_docs/saved_objects_finder.mdx | 2 +- api_docs/saved_objects_management.mdx | 2 +- api_docs/saved_objects_tagging.mdx | 2 +- api_docs/saved_objects_tagging_oss.mdx | 2 +- api_docs/saved_search.mdx | 2 +- api_docs/screenshot_mode.mdx | 2 +- api_docs/screenshotting.mdx | 2 +- api_docs/security.mdx | 2 +- api_docs/security_solution.mdx | 2 +- api_docs/session_view.mdx | 2 +- api_docs/share.mdx | 2 +- api_docs/snapshot_restore.mdx | 2 +- api_docs/spaces.mdx | 2 +- api_docs/stack_alerts.mdx | 2 +- api_docs/stack_connectors.mdx | 2 +- api_docs/task_manager.mdx | 2 +- api_docs/telemetry.mdx | 2 +- api_docs/telemetry_collection_manager.mdx | 2 +- api_docs/telemetry_collection_xpack.mdx | 2 +- api_docs/telemetry_management_section.mdx | 2 +- api_docs/threat_intelligence.mdx | 2 +- api_docs/timelines.mdx | 2 +- api_docs/transform.mdx | 2 +- api_docs/triggers_actions_ui.devdocs.json | 21 ++++- api_docs/triggers_actions_ui.mdx | 4 +- api_docs/ui_actions.mdx | 2 +- api_docs/ui_actions_enhanced.mdx | 2 +- api_docs/unified_field_list.mdx | 2 +- api_docs/unified_search.mdx | 2 +- api_docs/unified_search_autocomplete.mdx | 2 +- api_docs/url_forwarding.mdx | 2 +- api_docs/usage_collection.mdx | 2 +- api_docs/ux.mdx | 2 +- api_docs/vis_default_editor.mdx | 2 +- api_docs/vis_type_gauge.mdx | 2 +- api_docs/vis_type_heatmap.mdx | 2 +- api_docs/vis_type_pie.mdx | 2 +- api_docs/vis_type_table.mdx | 2 +- api_docs/vis_type_timelion.mdx | 2 +- api_docs/vis_type_timeseries.mdx | 2 +- api_docs/vis_type_vega.mdx | 2 +- api_docs/vis_type_vislib.mdx | 2 +- api_docs/vis_type_xy.mdx | 2 +- api_docs/visualizations.mdx | 2 +- 416 files changed, 494 insertions(+), 445 deletions(-) diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 98475403ca32b..eb1487ddb610d 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index ae099907eaf10..8efa7f8781595 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 7683a670ad0cc..c39e3fbf400c7 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index b6223f469ee75..35b9e4b271e82 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 03b40689a968d..d268ae24dbc35 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 9237485502816..646e7c8219680 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index ab75b3c20bcbf..41bbb3e7fde44 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 6cbfe95fcdb59..bd967866d8230 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index e1c0468fdc4c0..d8a87f238d651 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index e5a37209f9534..b954be6c09277 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 8ce2184ab234a..d9469e759a288 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_chat.mdx b/api_docs/cloud_chat.mdx index 89a97f55ad913..4f569492a3ce5 100644 --- a/api_docs/cloud_chat.mdx +++ b/api_docs/cloud_chat.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudChat title: "cloudChat" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudChat plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat'] --- import cloudChatObj from './cloud_chat.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index 5e5b0d5fed32f..54eb31e82e81a 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index e965852141d18..5cc76805706d6 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 850f02ae5bd07..ba26675b39cbd 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index e18730f0d1032..d6b0f70a9cf33 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json index df4c2daee6312..6ef18a3a1a34a 100644 --- a/api_docs/core.devdocs.json +++ b/api_docs/core.devdocs.json @@ -520,6 +520,10 @@ "plugin": "dashboard", "path": "src/plugins/dashboard/public/services/analytics/analytics_service.ts" }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/server/services/fleet_usage_sender.ts" + }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/lib/telemetry/sender.ts" @@ -978,6 +982,14 @@ "plugin": "@kbn/core-status-server-internal", "path": "packages/core/status/core-status-server-internal/src/status_service.ts" }, + { + "plugin": "security", + "path": "x-pack/plugins/security/public/analytics/analytics_service.test.ts" + }, + { + "plugin": "security", + "path": "x-pack/plugins/security/public/analytics/analytics_service.test.ts" + }, { "plugin": "security", "path": "x-pack/plugins/security/public/analytics/register_user_context.test.ts" @@ -11082,18 +11094,6 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts" }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/server/saved_objects/migrations.ts" - }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/server/saved_objects/migrations.ts" - }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/server/saved_objects/migrations.ts" - }, { "plugin": "alerting", "path": "x-pack/plugins/alerting/server/types.ts" @@ -11274,6 +11274,22 @@ "plugin": "ml", "path": "x-pack/plugins/ml/common/types/modules.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts" + }, { "plugin": "dashboard", "path": "src/plugins/dashboard/public/services/dashboard_saved_object/lib/save_dashboard_state_to_saved_object.ts" @@ -19275,6 +19291,10 @@ "plugin": "dashboard", "path": "src/plugins/dashboard/public/services/analytics/analytics_service.ts" }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/server/services/fleet_usage_sender.ts" + }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/lib/telemetry/sender.ts" @@ -19733,6 +19753,14 @@ "plugin": "@kbn/core-status-server-internal", "path": "packages/core/status/core-status-server-internal/src/status_service.ts" }, + { + "plugin": "security", + "path": "x-pack/plugins/security/public/analytics/analytics_service.test.ts" + }, + { + "plugin": "security", + "path": "x-pack/plugins/security/public/analytics/analytics_service.test.ts" + }, { "plugin": "security", "path": "x-pack/plugins/security/public/analytics/register_user_context.test.ts" @@ -40746,18 +40774,6 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts" }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/server/saved_objects/migrations.ts" - }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/server/saved_objects/migrations.ts" - }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/server/saved_objects/migrations.ts" - }, { "plugin": "alerting", "path": "x-pack/plugins/alerting/server/types.ts" @@ -40938,6 +40954,22 @@ "plugin": "ml", "path": "x-pack/plugins/ml/common/types/modules.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts" + }, { "plugin": "dashboard", "path": "src/plugins/dashboard/public/services/dashboard_saved_object/lib/save_dashboard_state_to_saved_object.ts" diff --git a/api_docs/core.mdx b/api_docs/core.mdx index 35cc636d8da18..4a9b93624ce46 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github description: API docs for the core plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] --- import coreObj from './core.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 8cf8442b3a671..1a241c5d3afef 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 71e3c9ae67d08..6daeff8f09e23 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 5c1fa56b3e93d..32db4218f4f97 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index abb89969d739c..174bf75e5af79 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index eb8e3e42c061a..dd592bf2517b5 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 291a7a6b787ba..f5a60d70bb2c6 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 03ade23298bb1..9c86d87a5f88a 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 9b5f32daa5cde..a5f257464b327 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index f3cf02d01efb5..0d2ae84687987 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 9be1ce0c9d549..a4a8fb7164d13 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index e1c15f0b36c71..509f317201b63 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index e65b6f2b8d747..1a6c8659439f8 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index bed0c87d8dc72..1bae8a7b2bc20 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -146,8 +146,8 @@ so TS and code-reference navigation might not highlight them. | | | [plugin.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/plugin.test.ts#:~:text=getKibanaFeatures) | 8.8.0 | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/plugin.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24) | 8.8.0 | | | [task.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/usage/task.ts#:~:text=index) | - | -| | [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/migrations.ts#:~:text=SavedObjectAttributes)+ 10 more | - | -| | [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/migrations.ts#:~:text=SavedObjectAttributes)+ 10 more | - | +| | [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/types.ts#:~:text=SavedObjectAttributes)+ 11 more | - | +| | [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/types.ts#:~:text=SavedObjectAttributes)+ 11 more | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index dfc99dbe7718f..e0042adee26db 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 3c1c313bb4e64..d9e9568875adb 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 392dfd744fed4..495a0e8ec6e81 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index b21117ef64068..3dcadce3585c0 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 1bc67b83f88e5..a23b5b4de8375 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index f763f8878f9a9..90995e3bfa964 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index c1664e7a0488d..34c1ea59c2abb 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 8434b169b1685..343431e4c5c21 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 2414f2f989d1f..5b014c7c0694a 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index fc4cd7075c95c..020dd9437577f 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 87eb0ca4239e5..0439d22f3e1b0 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 8d383dd04bc63..07f25b5592b84 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 0110beea0a830..b97850f178671 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 70498224fe725..8ee4ab363e88f 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 7f75a856a9f8a..01b9779c303de 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index d915562f517ed..77e866e689778 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index fc56222c21303..1011437ae1e1d 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index 4f0f35468da93..27aec8dea2ffd 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 6ea78a426b00f..836e7bedb1e6a 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index cbcdc174a0bd2..faeeacfabfd3f 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index 7d49523bfcede..94e1f192e8026 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index d185ed80d375f..d1b8304c51d39 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index a75a5099d8cbf..fd04d9f42ce63 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index d5e95d79161de..7f06be4f1b41f 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index fb122a1a0d183..12dabf8516cfe 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index cb4f5a47beb92..fd6c3ab75b9cf 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 4dd5241b7e864..f413678b536a7 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index d8ae8de7c78a5..1bdd39c60beb8 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 18dd2dbbd8326..d81441b17ea2d 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index d773a828ed5c0..c0447d71298df 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 9210e5f155a06..8e9ba7f45684c 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.devdocs.json b/api_docs/guided_onboarding.devdocs.json index 5b5809dbbe1e8..701721e92edd3 100644 --- a/api_docs/guided_onboarding.devdocs.json +++ b/api_docs/guided_onboarding.devdocs.json @@ -108,7 +108,7 @@ "label": "status", "description": [], "signature": [ - "\"complete\" | \"in_progress\" | \"inactive\" | \"active\"" + "\"complete\" | \"in_progress\" | \"ready_to_complete\" | \"inactive\" | \"active\"" ], "path": "src/plugins/guided_onboarding/common/types.ts", "deprecated": false, diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index 68dbb0f83f797..10b43de72130a 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 479a0c9fedc0a..4310a630f34da 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 29afac21e3b8f..186519279e1b8 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 7e1db0a05745c..0434e0878974b 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index f8ed2d3c0f53e..ccd47d562583e 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 0f1b903f620d1..e26714eb8cafb 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 3a9118e7bbf8b..1b9eafd7f4838 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index c2b1768cd69af..bd1891303fc21 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 4b950ba190115..ac428f3150d40 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index 65bc270d4af3f..e95ee7e70935d 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 9b4555587996f..7f7b670e95ea4 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] --- import kbnAlertsObj from './kbn_alerts.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 24973a77dda65..8bb00f0d887ae 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index 6ddd79212358e..f876f523e5273 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 0dc05aac8b78d..0f201ca949aa1 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index 4932a398ad9e4..cb8d81d380d24 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 65b1a4f1ba756..2d1e94bb29c62 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index c1be6165b238c..afe87b71afc62 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index e3bb48e2e0811..619782af2efab 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 5486e5f333bdb..11c063f49dba3 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index b218432f5ebcc..ac9994663428f 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index c1e0fe3aaf76e..6174a4bf432e3 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 1ce366a32d4fe..819ace3145acf 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index ad4519607eb28..216a6888c4a0a 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index a141e3ec816a0..a2f5fba60997c 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 257d08713f24c..3cbbf3a8b0e6e 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index efd3e4379a169..63f7c5fae7aaf 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index d801f0e8cfbd5..ec95959f24487 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 9f87e2c6acc73..8639ce062be28 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 0dbc5adbc45d7..6f026440a3126 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 1713e0a26faa8..42f1850973a8a 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index ff6a1d93cee14..ede74c3e33ab1 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list.mdx index f28c1ca301628..b408f084be878 100644 --- a/api_docs/kbn_content_management_table_list.mdx +++ b/api_docs/kbn_content_management_table_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list title: "@kbn/content-management-table-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list'] --- import kbnContentManagementTableListObj from './kbn_content_management_table_list.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 932ae557c8c82..b68658aa33831 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 0845bc6eb1dbc..ec73e5d071ff2 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 280eb28952d1c..eda9625a5344e 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index dda783350fca2..071292bce9026 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index d60c3c52b3775..5a8e77d56a499 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index ac55c2cde88e7..5141496a4b30f 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 7c6e4368f3095..1237be00f25ce 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index f18c33093816a..e231b5edd7cc8 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index f1bf63e29b8c9..c897daef7c921 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index f42ea015aee0b..b09c0628adaca 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index b4608b508393a..aaf3d23b63cd9 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 92bd848fa3899..2ac525d842e1c 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 0660c21f48732..212ab7afa2907 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 65aafe170374e..430cf23529165 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 81469e6c906aa..ba28547698c99 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 7eedeaf9b0e97..582e110116765 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 99414d1b3963d..307034fa3741a 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index 21aefe6dc31cb..1e1ed829a7891 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index 2b01f8b025569..f177dad9092f6 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 1837d37440d5e..c07122276c046 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 27376ddc167e0..372d4c67d5bb4 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 9f3577505fe74..7ec82e6355cee 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 387fed6489ed4..9ab241ae433ac 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index e3ed025d9d87a..4eb03664d6c5b 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index 4dba90aff09b8..159aa0c1fc1a9 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index dcf3b45235e27..ebaf334c48b94 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index 2910167c137a7..f9057f5617270 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 4dbab16afe44c..bfcf35dc3f578 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index 23d22f0347e6f..fa2b0932de510 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 305bc4011d3c5..55915243e1632 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index f8522fa3b54f0..f7645609a4c44 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index c5e253666a8e0..ae0ec6faa002d 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index 829547015add7..20d0bb33fa8c9 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index 93de60b0f64de..f32d204f036f7 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index f40347c481362..13bd5b1e73932 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index 303c757685192..34a3abf15fd6e 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index 307aba572f572..51f73e69599eb 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index f381780ff1621..0abdf0e9e12ed 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index ec0275f4c068e..f0166494018c2 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index ce0878b4721ab..4c12a773e7265 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 6997ccab732e1..8177c47a3b86f 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index d64b35a667e94..1b165cc132ac4 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 15b397cdae940..69d2180d5740a 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 916f093b1befa..53a67b3a1663a 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index bf2d6d4324b9c..d78889dd618f8 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 8acfac015abee..f6651cfd2048b 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index b1b4ca0e49e2c..f3f4fe7b53773 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index 528059e177bfa..f7f115f1566c5 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index f6f80612ce791..0ba4297747ace 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 1d663390a388c..bbbd96bbe494b 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index 299c82e402225..c5f57a6c883ef 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index c3ed353ec4826..e9b0aaddfb97d 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 4d2a276cf7f3f..0dbce22cc47cb 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 711953a27ec5a..2aeb4f6165558 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 7c6d4b3835839..5123215a0efc0 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index 43204a6a9cd59..daf40fe512ebe 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 1fb1fb2786666..3d9e99a97a464 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index 9faa5bc2b6137..4c03c0c1a4724 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index ea177fc4d5002..775edabfb9835 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 4c0525bce9ec5..14d93e4105fc7 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 55a5d1f070aae..3841d7d285ff0 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 620a1388e6792..714a76ef55feb 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index ad1750c44201d..8c5cbd86552d8 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index b3a4024ae81d9..946c471ad20a3 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 2e2244224cff6..f2fc8743dec08 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 605c21ac98c3c..a714e9cc6f4ec 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index 885ae3946f5bd..b24ccb40a6e7e 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 013d7c1bec5bf..bf364845ce652 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 0e1a372fdefe0..afb3e93c55935 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx index aa64438c1777b..22801f223555e 100644 --- a/api_docs/kbn_core_injected_metadata_browser.mdx +++ b/api_docs/kbn_core_injected_metadata_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser title: "@kbn/core-injected-metadata-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser'] --- import kbnCoreInjectedMetadataBrowserObj from './kbn_core_injected_metadata_browser.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 24007898d118c..c5cb736d207b8 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index a0bee88b6c19c..93b45bd1db2f7 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index bbd6d0002396b..9ae29f42cc95d 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 85dfaec1eddc8..c1709d33ce0d7 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index a49bb6261ca60..e28cba7d2425c 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index 20173c54048b5..db8b4462a2abb 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index b9d975fc0423b..87c1f449de2be 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index fadc64dd7abaa..87f27b7f1a2d0 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index f114fcb08c417..22ee987b7efbe 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index 395eb493b24c6..0aad11d9f2137 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index 32af8a0882a53..ced6cbacf088f 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index 7daf0893bdae7..af35d94e359e8 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index dfe7c445c0bd5..05c9718c7d43a 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index 14c4b8a5e1551..931eabbbe138a 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 738442e3af703..b0474d94827d6 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 073dfd67249bb..884ae287885d2 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 4e7500ed54889..d20d963d710f6 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 9336d4959948c..7a9006903b785 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 95c2da9061225..0b23f381804d9 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 04def10325f6e..ffcc433bf6af5 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index ffebaf144c84a..9036867be221f 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index 6c23d5d025f75..712f8251d5c61 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index 865366e453cfc..70ce98466d4fe 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index f3abb5bbfb8ad..b9c3a94cd202c 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 6798150ce6006..69b37646668bc 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index dc8687236c9bc..333a24c202e44 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 47b3483514524..1bc472c28dd8b 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index e11e48a77fb0f..e05036c1c725e 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index 5fae41f10a9e5..31008adb80bcf 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index 6ebdeb956fd4e..fea85ac884713 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 20aa7441881a6..7a8c95a97d676 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index ad9055802199a..fa83aa76f9fb5 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_internal.mdx b/api_docs/kbn_core_saved_objects_api_server_internal.mdx index e64e5b5541764..3c02a543f729d 100644 --- a/api_docs/kbn_core_saved_objects_api_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-internal title: "@kbn/core-saved-objects-api-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-internal'] --- import kbnCoreSavedObjectsApiServerInternalObj from './kbn_core_saved_objects_api_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 056df9040ed7d..68c6108d53597 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index 7e2b57df7c7e0..b14db41024525 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index 54d5fd1407508..67606ebbf5179 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index a77d40386164e..fb5ed53a336a6 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index 65b694d6cac23..dcd94fad9e5d5 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index 228b2a5142725..d3f0ceaed3cce 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index d0ebea2b1f95a..76dca2436e020 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index 0571269bebd9f..d4f9ecf0cd3a0 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index bad24d39666a1..cb9441dd59b52 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index b76039518582c..a13434c01d4a5 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index d59c7e5124283..e52f41b3be8f7 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 4bd70290bfb2f..31c988d7f9a4e 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index b5f3421a03f60..01dbefbe3a456 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index f8225a2d1b36f..7610eb55d8c14 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index 9b6a366a54049..ddb72189808d4 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 5bdae98802672..6a8f1775f9938 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index 23c6303f781f1..d53c91895c42a 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index af239cf48b3ae..decce4c4ad401 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index e634e94f5669b..32298ea4b7bd8 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 56fb65934aeaa..09e9a962fb073 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 73c8ed98bb41b..01caa1df40885 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index 0fe20d9a77ca8..831d549444af9 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index dbb8bee66ea0b..3812354e12b63 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 17905a7849ba5..3f6a67a95736e 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx index ab66657998592..dffcc6b101cfa 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal'] --- import kbnCoreThemeBrowserInternalObj from './kbn_core_theme_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 1f2bb0c19706c..dfb5b9f8354ec 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 27cd800984c75..38f797b362de5 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index b29904c0c8674..60c14feeb7f07 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 6f1b46931ad27..03176e8c91ba1 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 112a31dcee24e..d34af650d8dd9 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index f158c9e813034..402fcdccd5caf 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index c38ae7d4118a3..c5b88a3421e8b 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index a6465f693e820..f211bb66b2f4f 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index c89744f9f5778..7252e46db7ebc 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index f9f13dce813b2..52add676219f3 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index b0701abb5118d..24b67e6c76f81 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index 0f71192d008a6..fbd6a4d3cdad7 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index 1d91ad2e67db3..46233e26fbab7 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index d1fa9d3786b45..58b37afc7897a 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index e9db73c80e329..235c80480f1d4 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 26b1c70d9bced..0338ad7ba8da2 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 79686f7850b40..a86c1995e87be 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index b05bec4988f0d..e3363f9927c87 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index 57eeb56777e11..8b783d63b1e70 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index d62ab83ebcff7..20d1b9e0144ce 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 59d99761b93f3..86b7e9647bc46 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 1dc26531545a1..d7d13318bb297 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 3b9c570b113b1..85e98cbdeb15c 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 7b1c1717ee7d5..8cb400d9399d2 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 3fa373a22ad1a..0e9025ba267fe 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 0c359f4f7e8e5..bf4fa667858a6 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 41119a9d00319..b0c70bec6cc0c 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index fa6ddcdd6d95c..0bbbda976916e 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index 340a7c896ee06..e8619d48201fa 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 6a0a3f8e6726d..c52b256a5819b 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_get_repo_files.mdx b/api_docs/kbn_get_repo_files.mdx index 4e168ef4af173..fe2e42a922202 100644 --- a/api_docs/kbn_get_repo_files.mdx +++ b/api_docs/kbn_get_repo_files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-get-repo-files title: "@kbn/get-repo-files" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/get-repo-files plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files'] --- import kbnGetRepoFilesObj from './kbn_get_repo_files.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 2c7e2090a91b1..b845293fa719a 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index 71e9a366cbbbb..2280cea95ea08 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index d8bbdacea2d21..7ec6d9da1d167 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index 30eef0c1196cb..72ac2e99478bd 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index 7cfcdca31f79e..1998d0d5520c7 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index cd5e46f0c4235..1e1265090924e 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 09b9919f46e5f..c3621ff358455 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index b77b43358fb51..75e43e83fe804 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index d080e4dc7fc69..2c58a2a334895 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 921263ac94423..90b5f681cacb7 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 936419c6b285d..32e15e0991aaf 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index f1d9eaca02302..9c95fef63a351 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 5028fe685abf5..cba8c0fc1853f 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index ad72a93059af3..28c61e54ec2d9 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 796c0a11d338e..46629467a890e 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 909d35424ccd7..83afc2c06b970 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index babfb00112ec5..d81c1f5608dc0 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 07438956c25f5..590a62891fa6f 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 5fd2150c55e3d..fe0437ddecca7 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index af5e2740c0191..aa3ac9977962f 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index 36d6d11d964c6..5358c1464d3b0 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 0cc36ab118d0f..ce5c1d380fea3 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index e0eafa025e1bf..139dc072af92f 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 5e8e571e096f7..92791b020dfaf 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 3454c24690a27..c61e40ce4d5c1 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 83ce9bc555f44..88461caa1d77a 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 8edaf1daf0abb..9f0541f5a55fd 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 7b33a739414ef..a874a65d25126 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index c74bb8b86f6b1..9c925b1338223 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index bb07f02b58305..39bc3999fafc6 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 0be6ec752a657..9807bfb87229a 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 7f63210b061fe..a9042d2232d08 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index acf6f43badaee..5a9cd38f09b49 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 3962948d0e0ae..2cd4406035039 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 04ee34ca4c3e7..72cacb9ce2b3c 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 4fc89c7ec606c..8576083e813f0 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index e47c6f19d24af..4ac93e2d25960 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index b41f1d06177e0..f14d26d2edf22 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index 909fe3ea66e3d..bd5855d0cd746 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index d231fffd94181..78b6e7b88d4c7 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 93a012258b767..0eba790a12640 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 094976c30d2d9..503b13efc68d1 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index dbb6c96a59e58..31c15c4a52037 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index 14e588f8b50f5..76930deff7aec 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 7fbebab171a67..e81b04b3ae9eb 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index dda901559468e..5d388d1b3c74e 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx index 61160386978e9..aa45daa55d3cf 100644 --- a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx +++ b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-user-profile-components title: "@kbn/shared-ux-avatar-user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-user-profile-components plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-user-profile-components'] --- import kbnSharedUxAvatarUserProfileComponentsObj from './kbn_shared_ux_avatar_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx index 9f89aa73432d5..0e4323167397b 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen-mocks title: "@kbn/shared-ux-button-exit-full-screen-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen-mocks'] --- import kbnSharedUxButtonExitFullScreenMocksObj from './kbn_shared_ux_button_exit_full_screen_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 77f2fc244841c..2a75e4ca26742 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 62bb89a7a9b24..6cb107b6b7685 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index 88d539bbba324..0718bbf83840c 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index be2afdf972f3b..d9d770d2cfe89 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index 780780183872b..b760c93c1987a 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index ce9b8887ff99d..13c52febec86c 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index cfd332cb2372d..ec6631008e9fb 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index 8a599cba5bc63..7e20d5a92be16 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index e7bcd04174597..4a55d033fb255 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index 1caabc1075553..cace3c480477c 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 489a3c7b274c2..6b7dc5b1d516d 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 9312225be586e..332c17f903579 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index 608c69bd1e2f9..60dd7a32b04a8 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index 5d9359b6a226b..c43d04bd26a11 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index e765b7acfc139..ecbf3828a144c 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index 9291b410c219b..214205caf4b4e 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index 0f9a76875a8b0..8e7a998461cee 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index b1c4bcca84749..045727e8f9622 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index c2f8e1f83d46b..3e3407f1bbf06 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index 509eaaf0fec48..286d22c37bfd9 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index 826c8d4022f01..3a8e6c7e31c3b 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 69619984c403f..7c57fe2abda11 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 31a5f5fb60edc..3bc5fbf1173c1 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx index 62dab760e4a5b..bc2fbf01f59d1 100644 --- a/api_docs/kbn_sort_package_json.mdx +++ b/api_docs/kbn_sort_package_json.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json title: "@kbn/sort-package-json" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-package-json plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json'] --- import kbnSortPackageJsonObj from './kbn_sort_package_json.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 01b6a220bf865..97e2338d71629 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index b87735f14e680..8666564c891e0 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 959d827c97d4b..e6ce5d7e8246f 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 11b8436e5b02f..61c00ac271eca 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 90a8a2253ff33..5c52d6c402e32 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index c300b5f2b166e..bf22a5ec555d8 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 3ac807b4a2f2a..86f65530886b3 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index c61e10e481d27..f1b1798fab1b8 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx index db7d2d2208749..db8d1a8022b31 100644 --- a/api_docs/kbn_type_summarizer.mdx +++ b/api_docs/kbn_type_summarizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer title: "@kbn/type-summarizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer'] --- import kbnTypeSummarizerObj from './kbn_type_summarizer.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx index 0fabbc396e628..ad788a66355bb 100644 --- a/api_docs/kbn_type_summarizer_core.mdx +++ b/api_docs/kbn_type_summarizer_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core title: "@kbn/type-summarizer-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer-core plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core'] --- import kbnTypeSummarizerCoreObj from './kbn_type_summarizer_core.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index afd067b54c86f..99f07cca5249f 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index b1fba7a953f3c..d361266f4b112 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index edcf2a9ecf49f..2d3efbab3fe7a 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 706b250ca9c30..d91016709162d 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 9e2f55d44256b..6cd910e0cbd30 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 24a679d142a6f..d282fab4950b8 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index 9395a8b06dc2f..c20fcee717e8b 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 6218edc4db488..6dbe8ec638069 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 20ca815e9fe48..fe99963d954ae 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 1ae0f55ee8b47..5f72dee209292 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index b614a9cef39d5..4ea45e2d6386d 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 29bd92f4db760..d19ce3adcaead 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index fc163ff44614d..383b3680cbafb 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 0889602483dfd..a62e0b65cbab9 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 35dbfba586fb5..9703f660b6515 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index d1a0beb34b1bf..30d4ce56cb586 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index b2935e8899670..4dd4ec5e1eab8 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.devdocs.json b/api_docs/maps.devdocs.json index d40b99e5b5795..752becaa2ceb6 100644 --- a/api_docs/maps.devdocs.json +++ b/api_docs/maps.devdocs.json @@ -4470,7 +4470,7 @@ "StyleDescriptor", " | null | undefined; query?: ", "Query", - " | undefined; includeInFitToBounds?: boolean | undefined; }" + " | undefined; includeInFitToBounds?: boolean | undefined; parent?: string | undefined; }" ], "path": "x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts", "deprecated": false, diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index da7f8d0f22b80..70ac834551a4e 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index d4352b0b1b887..9a6033e47298d 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 74a1ec483cc1f..70d2472f68011 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 280dde24913c9..ffb8396bac5cf 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 71fe97576094d..19006dba40a9f 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index b304315815ff7..b2e3637164e81 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 71fe49172d536..fd6c0f9d3f4e8 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 2617e4c3ed390..f541a56f52200 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index cbaaf7fb4735f..d9d8bb530bef2 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 281fb6de01efa..dfcb932773724 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,7 +21,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 32302 | 179 | 21767 | 1023 | +| 32303 | 179 | 21767 | 1023 | ## Plugin Directory @@ -155,7 +155,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 452 | 1 | 346 | 33 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [Kibana Localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 517 | 1 | 489 | 49 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 518 | 1 | 489 | 49 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 133 | 0 | 92 | 11 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 206 | 0 | 142 | 9 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list which can be integrated into apps | 122 | 0 | 117 | 2 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 7c78b017a7cbc..2d2bd5f7cab65 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 03fd68b4dace8..a2ab179291b93 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 09f7279acc3b0..64db429de0000 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 84e0a16d1857b..3addd6c04342c 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index d4be3ea7797a2..2d950f366d145 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 1a5cdf684f518..b8177a5349db5 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 6a63f3a173cc8..b950aff4a9dc1 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 73a219490d72b..e42617d41f680 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index 4cda9e6326e05..272497ed10c72 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 3b088d075d9fe..2669f7ef767e9 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 917393033e0e7..e92816f0b4452 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 1c2c4cafda3cd..da0c09083fca1 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 6bbebd91df07c..6f7d29c36ed28 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 968e4bdfb7d2f..85551152dec24 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index cb762b0c57883..c8d8da4c7e433 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 6dbc5b530e8e1..d2c74e5c35cb5 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index f535c6aca25b3..054308e191638 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 0d114ac2efa70..69b68c2eba9a8 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 246bd975b6244..3b436f7e11ab5 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 778e9f2631c91..0e71d2a44587c 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index a08d22082148e..a1e9bb5e5f4c0 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index 818254d238eb3..8da0b5dfe30ab 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 48c732f3e1cdf..9c0b90d429892 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index b920c33a9fb49..37c810bccb7fb 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 50d9e28747563..6a9da2e3d8f30 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 49c39896be569..90931f6a3d4e5 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 6742dca554e95..fa8c62da9a483 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 71170397dd8e1..5ee8669701c62 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index fae7d35b28b7d..6dbf8f218887f 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 197ea0b93a34a..dc77ccda78c8e 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 27e02053609af..ff96d1a3e72ed 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index e9e5908c5ee26..1b74e68bed0b8 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -8164,7 +8164,7 @@ "label": "CoreQueryParams", "description": [], "signature": [ - "{ readonly aggField?: string | undefined; readonly termSize?: number | undefined; readonly termField?: string | undefined; readonly index: string | string[]; readonly timeField: string; readonly aggType: string; readonly timeWindowSize: number; readonly timeWindowUnit: string; readonly groupBy: string; }" + "{ readonly aggField?: string | undefined; readonly termSize?: number | undefined; readonly termField?: string | undefined; readonly filterKuery?: string | undefined; readonly index: string | string[]; readonly timeField: string; readonly aggType: string; readonly timeWindowSize: number; readonly timeWindowUnit: string; readonly groupBy: string; }" ], "path": "x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.ts", "deprecated": false, @@ -8236,7 +8236,7 @@ "label": "TimeSeriesQuery", "description": [], "signature": [ - "{ readonly interval?: string | undefined; readonly aggField?: string | undefined; readonly termSize?: number | undefined; readonly termField?: string | undefined; readonly dateStart?: string | undefined; readonly dateEnd?: string | undefined; readonly index: string | string[]; readonly timeField: string; readonly aggType: string; readonly timeWindowSize: number; readonly timeWindowUnit: string; readonly groupBy: string; }" + "{ readonly interval?: string | undefined; readonly aggField?: string | undefined; readonly termSize?: number | undefined; readonly termField?: string | undefined; readonly dateStart?: string | undefined; readonly dateEnd?: string | undefined; readonly filterKuery?: string | undefined; readonly index: string | string[]; readonly timeField: string; readonly aggType: string; readonly timeWindowSize: number; readonly timeWindowUnit: string; readonly groupBy: string; }" ], "path": "x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_types.ts", "deprecated": false, @@ -8358,6 +8358,23 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-server.CoreQueryParamsSchemaProperties.filterKuery", + "type": "Object", + "tags": [], + "label": "filterKuery", + "description": [ + "// filter field" + ], + "signature": [ + "Type", + "" + ], + "path": "x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "triggersActionsUi", "id": "def-server.CoreQueryParamsSchemaProperties.termSize", diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 16885f04df0fd..2148e1939ea24 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 517 | 1 | 489 | 49 | +| 518 | 1 | 489 | 49 | ## Client diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 0e6e8ffe105cf..4ec201d732105 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 863b74f7a45b2..5563c08371882 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_field_list.mdx b/api_docs/unified_field_list.mdx index 24f2e54fef747..27c55ce6e644b 100644 --- a/api_docs/unified_field_list.mdx +++ b/api_docs/unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList title: "unifiedFieldList" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedFieldList plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList'] --- import unifiedFieldListObj from './unified_field_list.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index a49ee1e7fafee..2c426b911f3d7 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 3f8c6f31330dd..f0067d2093f5c 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 36639a61773b1..f6b97fd615cad 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index e3fe9d4770da4..55882ead7e50e 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index b01561a87beb1..27b6bb43e27c8 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 149ff1941dd59..2b38a0015b600 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 0d8940eee6aff..55c0ddf204fc2 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 50a3d43aaf024..7184c050b5be0 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index f983d47428d5d..269a7121e31a4 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index df710abda7b34..e236f9b93e075 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 194ef7640a2ad..f4efbf7f4bfd5 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 3c94789158f65..ccbb3a90eb417 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index d8780d991a35d..1cd99fa5393d5 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 4d7e6813b86da..59bf0ca2e9847 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 572e99ae1f73a..13d2599680d2d 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 5f2ca49cbd46d..8862a4dc51714 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2022-10-13 +date: 2022-10-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; From 161d8b9924b5ebc68e66405992024f8624076ef2 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Fri, 14 Oct 2022 09:19:20 +0200 Subject: [PATCH 35/35] [Synthetics] Use createPointInTimeFinder to fetch savedObjects in sync (#142640) --- .../synthetics_service/test_now_monitor.ts | 2 +- .../synthetics_service.test.ts | 19 +- .../synthetics_service/synthetics_service.ts | 197 +++++++++--------- 3 files changed, 96 insertions(+), 122 deletions(-) diff --git a/x-pack/plugins/synthetics/server/routes/synthetics_service/test_now_monitor.ts b/x-pack/plugins/synthetics/server/routes/synthetics_service/test_now_monitor.ts index 82ce2ffdc5cce..0a2c3f599ff62 100644 --- a/x-pack/plugins/synthetics/server/routes/synthetics_service/test_now_monitor.ts +++ b/x-pack/plugins/synthetics/server/routes/synthetics_service/test_now_monitor.ts @@ -56,7 +56,7 @@ export const testNowMonitorRoute: SyntheticsRestApiRouteFactory = () => ({ const testRunId = uuidv4(); - const errors = await syntheticsService.triggerConfigs(request, [ + const errors = await syntheticsService.runOnceConfigs([ formatHeartbeatRequest({ // making it enabled, even if it's disabled in the UI monitor: { ...normalizedMonitor.attributes, enabled: true }, diff --git a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts index 5c935aba57dd1..472d9792a37bf 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts @@ -157,23 +157,6 @@ describe('SyntheticsService', () => { }); describe('pushConfigs', () => { - it('does not include the isEdit flag on normal push requests', async () => { - const { service, locations } = getMockedService(); - - (axios as jest.MockedFunction).mockResolvedValue({} as AxiosResponse); - - const payload = getFakePayload([locations[0]]); - - await service.pushConfigs([payload] as HeartbeatConfig[]); - - expect(axios).toHaveBeenCalledTimes(1); - expect(axios).toHaveBeenCalledWith( - expect.objectContaining({ - data: expect.objectContaining({ is_edit: false }), - }) - ); - }); - it('includes the isEdit flag on edit requests', async () => { const { service, locations } = getMockedService(); @@ -181,7 +164,7 @@ describe('SyntheticsService', () => { const payload = getFakePayload([locations[0]]); - await service.pushConfigs([payload] as HeartbeatConfig[], true); + await service.editConfig([payload] as HeartbeatConfig[]); expect(axios).toHaveBeenCalledTimes(1); expect(axios).toHaveBeenCalledWith( diff --git a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.ts b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.ts index c0f977758f6da..457d4e79e418e 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.ts @@ -8,13 +8,14 @@ /* eslint-disable max-classes-per-file */ import { SavedObject } from '@kbn/core/server'; -import { KibanaRequest, Logger } from '@kbn/core/server'; +import { Logger } from '@kbn/core/server'; import { ConcreteTaskInstance, TaskManagerSetupContract, TaskManagerStartContract, TaskInstance, } from '@kbn/task-manager-plugin/server'; +import { Subject } from 'rxjs'; import { sendErrorTelemetryEvents } from '../routes/telemetry/monitor_upgrade_sender'; import { UptimeServerSetup } from '../legacy_uptime/lib/adapters'; import { installSyntheticsIndexTemplates } from '../routes/synthetics_service/install_index_templates'; @@ -170,7 +171,7 @@ export class SyntheticsService { if (service.isAllowed) { service.setupIndexTemplates(); - service.syncErrors = await service.pushConfigs(); + await service.pushConfigs(); } } catch (e) { sendErrorTelemetryEvents(service.logger, service.server.telemetry, { @@ -306,65 +307,44 @@ export class SyntheticsService { } } - async pushConfigs(configs?: HeartbeatConfig[], isEdit?: boolean) { - const monitorConfigs = configs ?? (await this.getMonitorConfigs()); - const monitors = this.formatConfigs(monitorConfigs); - - if (monitors.length === 0) { - this.logger.debug('No monitor found which can be pushed to service.'); - return null; - } - - this.apiKey = await this.getApiKey(); - - if (!this.apiKey) { - return null; - } + async pushConfigs() { + const service = this; + const subject = new Subject(); - const data = { - monitors, - output: await this.getOutput(this.apiKey), - isEdit: !!isEdit, - }; + subject.subscribe(async (monitorConfigs) => { + const monitors = this.formatConfigs(monitorConfigs); - this.logger.debug(`${monitors.length} monitors will be pushed to synthetics service.`); + if (monitors.length === 0) { + this.logger.debug('No monitor found which can be pushed to service.'); + return null; + } - try { - this.syncErrors = await this.apiClient.put(data); - return this.syncErrors; - } catch (e) { - this.logger.error(e); - throw e; - } - } + this.apiKey = await this.getApiKey(); - async runOnceConfigs(configs?: HeartbeatConfig[]) { - const monitors = this.formatConfigs(configs || (await this.getMonitorConfigs())); - if (monitors.length === 0) { - return; - } + if (!this.apiKey) { + return null; + } - this.apiKey = await this.getApiKey(); + const data = { + monitors, + output: await this.getOutput(this.apiKey), + }; - if (!this.apiKey) { - return null; - } + this.logger.debug(`${monitors.length} monitors will be pushed to synthetics service.`); - const data = { - monitors, - output: await this.getOutput(this.apiKey), - }; + try { + service.syncErrors = await this.apiClient.put(data); + } catch (e) { + this.logger.error(e); + throw e; + } + }); - try { - return await this.apiClient.runOnce(data); - } catch (e) { - this.logger.error(e); - throw e; - } + await this.getMonitorConfigs(subject); } - async triggerConfigs(request?: KibanaRequest, configs?: HeartbeatConfig[]) { - const monitors = this.formatConfigs(configs || (await this.getMonitorConfigs())); + async runOnceConfigs(configs: HeartbeatConfig[]) { + const monitors = this.formatConfigs(configs); if (monitors.length === 0) { return; } @@ -401,81 +381,92 @@ export class SyntheticsService { }; const result = await this.apiClient.delete(data); if (this.syncErrors && this.syncErrors?.length > 0) { - this.syncErrors = await this.pushConfigs(); + await this.pushConfigs(); } return result; } async deleteAllConfigs() { - const configs = await this.getMonitorConfigs(); - return await this.deleteConfigs(configs); + const subject = new Subject(); + + subject.subscribe(async (monitors) => { + await this.deleteConfigs(monitors); + }); + + await this.getMonitorConfigs(subject); } - async getMonitorConfigs() { - const savedObjectsClient = this.server.savedObjectsClient; + async getMonitorConfigs(subject: Subject) { + const soClient = this.server.savedObjectsClient; const encryptedClient = this.server.encryptedSavedObjects.getClient(); - if (!savedObjectsClient?.find) { + if (!soClient?.find) { return [] as SyntheticsMonitorWithId[]; } - const { saved_objects: encryptedMonitors } = await savedObjectsClient.find({ + const finder = soClient.createPointInTimeFinder({ type: syntheticsMonitorType, + perPage: 500, namespaces: ['*'], - perPage: 10000, }); const start = performance.now(); - const monitors: Array> = ( - await Promise.all( - encryptedMonitors.map( - (monitor) => - new Promise((resolve) => { - encryptedClient - .getDecryptedAsInternalUser( - syntheticsMonitor.name, - monitor.id, - { - namespace: monitor.namespaces?.[0], - } - ) - .then((decryptedMonitor) => resolve(decryptedMonitor)) - .catch((e) => { - this.logger.error(e); - sendErrorTelemetryEvents(this.logger, this.server.telemetry, { - reason: 'Failed to decrypt monitor', - message: e?.message, - type: 'runTaskError', - code: e?.code, - status: e.status, - kibanaVersion: this.server.kibanaVersion, + for await (const result of finder.find()) { + const encryptedMonitors = result.saved_objects; + + const monitors: Array> = ( + await Promise.all( + encryptedMonitors.map( + (monitor) => + new Promise((resolve) => { + encryptedClient + .getDecryptedAsInternalUser( + syntheticsMonitor.name, + monitor.id, + { + namespace: monitor.namespaces?.[0], + } + ) + .then((decryptedMonitor) => resolve(decryptedMonitor)) + .catch((e) => { + this.logger.error(e); + sendErrorTelemetryEvents(this.logger, this.server.telemetry, { + reason: 'Failed to decrypt monitor', + message: e?.message, + type: 'runTaskError', + code: e?.code, + status: e.status, + kibanaVersion: this.server.kibanaVersion, + }); + resolve(null); }); - resolve(null); - }); - }) + }) + ) ) - ) - ).filter((monitor) => monitor !== null) as Array>; - - const end = performance.now(); - const duration = end - start; + ).filter((monitor) => monitor !== null) as Array>; - this.logger.debug(`Decrypted ${monitors.length} monitors. Took ${duration} milliseconds`, { - event: { - duration, - }, - monitors: monitors.length, - }); + const end = performance.now(); + const duration = end - start; - return (monitors ?? []).map((monitor) => { - const attributes = monitor.attributes as unknown as MonitorFields; - return formatHeartbeatRequest({ - monitor: normalizeSecrets(monitor).attributes, - monitorId: monitor.id, - customHeartbeatId: attributes[ConfigKey.CUSTOM_HEARTBEAT_ID], + this.logger.debug(`Decrypted ${monitors.length} monitors. Took ${duration} milliseconds`, { + event: { + duration, + }, + monitors: monitors.length, }); - }); + + subject.next( + (monitors ?? []).map((monitor) => { + const attributes = monitor.attributes as unknown as MonitorFields; + return formatHeartbeatRequest({ + monitor: normalizeSecrets(monitor).attributes, + monitorId: monitor.id, + customHeartbeatId: attributes[ConfigKey.CUSTOM_HEARTBEAT_ID], + }); + }) + ); + } } formatConfigs(configs: SyntheticsMonitorWithId[]) {