From 8f41ab0633fdefb4562c1b287c495510f0fb8e26 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Mon, 8 May 2023 06:17:22 +0200 Subject: [PATCH 001/102] [Discover] Add DiscoverSavedSearchContainer (#153528) --- .../public/__mocks__/data_view_complex.ts | 9 + .../discover/public/__mocks__/data_views.ts | 17 +- .../public/__mocks__/discover_state.mock.ts | 17 +- .../discover/public/__mocks__/saved_search.ts | 11 + .../discover/public/__mocks__/services.ts | 36 +- .../field_stats_table/field_stats_tab.tsx | 3 + .../__stories__/discover_layout.stories.tsx | 3 +- .../layout/__stories__/get_layout_props.ts | 2 +- .../layout/discover_documents.test.tsx | 7 - .../components/layout/discover_documents.tsx | 9 +- .../layout/discover_histogram_layout.test.tsx | 32 +- .../layout/discover_histogram_layout.tsx | 18 +- .../layout/discover_layout.test.tsx | 1 - .../components/layout/discover_layout.tsx | 64 +- .../layout/discover_main_content.test.tsx | 4 - .../layout/discover_main_content.tsx | 8 - .../main/components/layout/types.ts | 31 - .../top_nav/discover_topnav.test.tsx | 9 - .../components/top_nav/discover_topnav.tsx | 75 +-- .../top_nav/get_top_nav_links.test.ts | 12 - .../components/top_nav/get_top_nav_links.tsx | 28 +- .../top_nav/on_save_search.test.tsx | 42 +- .../components/top_nav/on_save_search.tsx | 46 +- .../top_nav/open_alerts_popover.test.tsx | 13 +- .../top_nav/open_alerts_popover.tsx | 58 +- .../main/discover_main_app.test.tsx | 6 +- .../application/main/discover_main_app.tsx | 112 ++-- .../main/discover_main_route.test.tsx | 21 - .../application/main/discover_main_route.tsx | 225 +++---- .../main/hooks/use_adhoc_data_views.test.tsx | 57 +- .../main/hooks/use_adhoc_data_views.ts | 69 +-- .../main/hooks/use_discover_state.test.tsx | 43 -- .../main/hooks/use_discover_state.ts | 228 ------- .../main/hooks/use_inspector.test.ts | 6 +- .../application/main/hooks/use_inspector.ts | 16 +- .../main/hooks/use_saved_search_messages.ts | 8 +- .../main/hooks/use_search_session.test.ts | 9 +- .../main/hooks/use_search_session.ts | 7 +- ...=> use_test_based_query_language.test.tsx} | 105 ++-- .../hooks/use_text_based_query_language.ts | 13 +- .../application/main/hooks/use_url.test.ts | 45 +- .../public/application/main/hooks/use_url.ts | 12 +- .../main/hooks/use_url_tracking.ts | 30 +- .../hooks/utils/build_state_subscribe.test.ts | 92 +-- .../main/hooks/utils/build_state_subscribe.ts | 70 ++- .../main/hooks/utils/change_data_view.test.ts | 15 +- .../main/hooks/utils/change_data_view.ts | 29 +- .../services/discover_app_state_container.ts | 82 +-- .../discover_data_state_container.test.ts | 12 +- .../services/discover_data_state_container.ts | 43 +- .../discover_saved_search_container.test.ts | 254 ++++++++ .../discover_saved_search_container.ts | 268 ++++++++ .../main/services/discover_search_session.ts | 1 - .../main/services/discover_state.test.ts | 575 +++++++++++++++--- .../main/services/discover_state.ts | 421 ++++++++++--- .../main/services/discover_state_provider.tsx | 27 +- .../main/services/load_saved_search.ts | 165 +++++ .../application/main/utils/fetch_all.test.ts | 41 +- .../application/main/utils/fetch_all.ts | 32 +- .../main/utils/get_fetch_observable.ts | 2 - .../main/utils/persist_saved_search.ts | 107 ---- .../main/utils/resolve_data_view.test.ts | 23 +- .../main/utils/resolve_data_view.ts | 81 ++- .../main/utils/update_saved_search.ts | 101 +++ .../main/utils/update_search_source.test.ts | 51 +- .../main/utils/update_search_source.ts | 55 +- .../hooks/use_confirm_persistence_prompt.ts | 34 +- src/plugins/discover/public/utils/add_log.ts | 13 +- .../discover/public/utils/breadcrumbs.ts | 7 +- src/plugins/discover/tsconfig.json | 1 - src/plugins/saved_search/public/index.ts | 1 + .../saved_searches/get_saved_searches.ts | 28 +- .../public/services/saved_searches/index.ts | 2 +- .../apps/discover/saved_searches.ts | 6 + 74 files changed, 2493 insertions(+), 1713 deletions(-) delete mode 100644 src/plugins/discover/public/application/main/components/layout/types.ts delete mode 100644 src/plugins/discover/public/application/main/hooks/use_discover_state.test.tsx delete mode 100644 src/plugins/discover/public/application/main/hooks/use_discover_state.ts rename src/plugins/discover/public/application/main/hooks/{use_test_based_query_language.test.ts => use_test_based_query_language.test.tsx} (79%) create mode 100644 src/plugins/discover/public/application/main/services/discover_saved_search_container.test.ts create mode 100644 src/plugins/discover/public/application/main/services/discover_saved_search_container.ts create mode 100644 src/plugins/discover/public/application/main/services/load_saved_search.ts delete mode 100644 src/plugins/discover/public/application/main/utils/persist_saved_search.ts create mode 100644 src/plugins/discover/public/application/main/utils/update_saved_search.ts diff --git a/src/plugins/discover/public/__mocks__/data_view_complex.ts b/src/plugins/discover/public/__mocks__/data_view_complex.ts index a90e858b00a3e..6953c044391ae 100644 --- a/src/plugins/discover/public/__mocks__/data_view_complex.ts +++ b/src/plugins/discover/public/__mocks__/data_view_complex.ts @@ -417,3 +417,12 @@ export const dataViewComplexMock = buildDataViewMock({ fields, timeFieldName: 'data', }); + +export const dataViewAdHoc = { + ...buildDataViewMock({ + name: 'data-view-ad-hoc', + fields, + timeFieldName: 'time', + }), + isPersisted: () => false, +} as DataView; diff --git a/src/plugins/discover/public/__mocks__/data_views.ts b/src/plugins/discover/public/__mocks__/data_views.ts index 7b599318917a0..a9e5a880e9196 100644 --- a/src/plugins/discover/public/__mocks__/data_views.ts +++ b/src/plugins/discover/public/__mocks__/data_views.ts @@ -11,27 +11,34 @@ import { dataViewMock } from './data_view'; import { dataViewComplexMock } from './data_view_complex'; import { dataViewWithTimefieldMock } from './data_view_with_timefield'; +export const dataViewMockList = [dataViewMock, dataViewComplexMock, dataViewWithTimefieldMock]; + export function createDiscoverDataViewsMock() { return { getCache: async () => { return [dataViewMock]; }, get: async (id: string) => { - if (id === 'the-data-view-id') { - return Promise.resolve(dataViewMock); - } else if (id === 'invalid-data-view-id') { - return Promise.reject('Invald'); + if (id === 'invalid-data-view-id') { + return Promise.reject('Invalid'); + } + const dataView = dataViewMockList.find((dv) => dv.id === id); + if (dataView) { + return Promise.resolve(dataView); + } else { + return Promise.reject(`DataView ${id} not found`); } }, getDefaultDataView: jest.fn(() => dataViewMock), updateSavedObject: jest.fn(), getIdsWithTitle: jest.fn(() => { - return Promise.resolve([dataViewMock, dataViewComplexMock, dataViewWithTimefieldMock]); + return Promise.resolve(dataViewMockList); }), createFilter: jest.fn(), create: jest.fn(), clearInstanceCache: jest.fn(), getFieldsForIndexPattern: jest.fn((dataView) => dataView.fields), + refreshFields: jest.fn(), } as unknown as jest.Mocked; } diff --git a/src/plugins/discover/public/__mocks__/discover_state.mock.ts b/src/plugins/discover/public/__mocks__/discover_state.mock.ts index 7155dd33ac5c0..3e0a36de1d595 100644 --- a/src/plugins/discover/public/__mocks__/discover_state.mock.ts +++ b/src/plugins/discover/public/__mocks__/discover_state.mock.ts @@ -9,13 +9,24 @@ import { createBrowserHistory } from 'history'; import { getDiscoverStateContainer } from '../application/main/services/discover_state'; import { savedSearchMockWithTimeField, savedSearchMock } from './saved_search'; import { discoverServiceMock } from './services'; +import { SavedSearch } from '@kbn/saved-search-plugin/public'; -export function getDiscoverStateMock({ isTimeBased = true }) { +export function getDiscoverStateMock({ + isTimeBased = true, + savedSearch, +}: { + isTimeBased?: boolean; + savedSearch?: SavedSearch; +}) { const history = createBrowserHistory(); history.push('/'); - return getDiscoverStateContainer({ - savedSearch: isTimeBased ? savedSearchMockWithTimeField : savedSearchMock, + const container = getDiscoverStateContainer({ services: discoverServiceMock, history, }); + container.savedSearchState.set( + savedSearch ? savedSearch : isTimeBased ? savedSearchMockWithTimeField : savedSearchMock + ); + + return container; } diff --git a/src/plugins/discover/public/__mocks__/saved_search.ts b/src/plugins/discover/public/__mocks__/saved_search.ts index de97a31d65632..c18c320063240 100644 --- a/src/plugins/discover/public/__mocks__/saved_search.ts +++ b/src/plugins/discover/public/__mocks__/saved_search.ts @@ -10,9 +10,11 @@ import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { createSearchSourceMock } from '@kbn/data-plugin/public/mocks'; import { dataViewMock } from './data_view'; import { dataViewWithTimefieldMock } from './data_view_with_timefield'; +import { dataViewAdHoc } from './data_view_complex'; export const savedSearchMock = { id: 'the-saved-search-id', + title: 'A saved search', searchSource: createSearchSourceMock({ index: dataViewMock }), } as unknown as SavedSearch; @@ -21,6 +23,10 @@ export const savedSearchMockWithTimeField = { searchSource: createSearchSourceMock({ index: dataViewWithTimefieldMock }), } as unknown as SavedSearch; +export const savedSearchMockWithTimeFieldNew = { + searchSource: createSearchSourceMock({ index: dataViewWithTimefieldMock }), +} as unknown as SavedSearch; + export const savedSearchMockWithSQL = { id: 'the-saved-search-id-sql', searchSource: createSearchSourceMock({ @@ -28,3 +34,8 @@ export const savedSearchMockWithSQL = { query: { sql: 'SELECT * FROM "the-saved-search-id-sql"' }, }), } as unknown as SavedSearch; + +export const savedSearchAdHoc = { + id: 'the-saved-search-with-ad-hoc', + searchSource: createSearchSourceMock({ index: dataViewAdHoc }), +} as unknown as SavedSearch; diff --git a/src/plugins/discover/public/__mocks__/services.ts b/src/plugins/discover/public/__mocks__/services.ts index b87c8aa32f910..3da63b5c553c7 100644 --- a/src/plugins/discover/public/__mocks__/services.ts +++ b/src/plugins/discover/public/__mocks__/services.ts @@ -20,14 +20,22 @@ import { SAMPLE_ROWS_PER_PAGE_SETTING, SORT_DEFAULT_ORDER_SETTING, HIDE_ANNOUNCEMENTS, + SEARCH_ON_PAGE_LOAD_SETTING, } from '../../common'; -import { UI_SETTINGS, calculateBounds } from '@kbn/data-plugin/public'; +import { + UI_SETTINGS, + calculateBounds, + SearchSource, + IKibanaSearchResponse, +} from '@kbn/data-plugin/public'; import { TopNavMenu } from '@kbn/navigation-plugin/public'; import { FORMATS_UI_SETTINGS } from '@kbn/field-formats-plugin/common'; import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; import { fieldFormatsMock } from '@kbn/field-formats-plugin/common/mocks'; import { LocalStorageMock } from './local_storage_mock'; import { createDiscoverDataViewsMock } from './data_views'; +import { SearchSourceDependencies } from '@kbn/data-plugin/common'; +import { SearchResponse } from '@elastic/elasticsearch/lib/api/types'; export function createDiscoverServicesMock(): DiscoverServices { const dataPlugin = dataPluginMock.createStartContract(); @@ -65,6 +73,23 @@ export function createDiscoverServicesMock(): DiscoverServices { }, }) ) as unknown as typeof expressionsPlugin.run; + dataPlugin.search.searchSource.createEmpty = jest.fn(() => { + const deps = { + getConfig: jest.fn(), + } as unknown as SearchSourceDependencies; + const searchSource = new SearchSource({}, deps); + searchSource.fetch$ = jest.fn().mockReturnValue(of({ rawResponse: { hits: { total: 2 } } })); + searchSource.createChild = jest.fn((options = {}) => { + const childSearchSource = new SearchSource({}, deps); + childSearchSource.setParent(searchSource, options); + childSearchSource.fetch$ = () => + of({ rawResponse: { hits: { hits: [] } } } as unknown as IKibanaSearchResponse< + SearchResponse + >); + return childSearchSource; + }); + return searchSource; + }); return { core: coreMock.createStart(), @@ -118,6 +143,8 @@ export function createDiscoverServicesMock(): DiscoverServices { return 50; } else if (key === HIDE_ANNOUNCEMENTS) { return false; + } else if (key === SEARCH_ON_PAGE_LOAD_SETTING) { + return true; } }), isDefault: (key: string) => { @@ -157,7 +184,12 @@ export function createDiscoverServicesMock(): DiscoverServices { addSuccess: jest.fn(), }, expressions: expressionsPlugin, - savedObjectsTagging: {}, + savedObjectsTagging: { + ui: { + getTagIdsFromReferences: jest.fn().mockResolvedValue([]), + updateTagsReferences: jest.fn(), + }, + }, dataViews: dataPlugin.dataViews, timefilter: dataPlugin.query.timefilter.timefilter, lens: { diff --git a/src/plugins/discover/public/application/main/components/field_stats_table/field_stats_tab.tsx b/src/plugins/discover/public/application/main/components/field_stats_table/field_stats_tab.tsx index 87dcbb2297c4f..9ac42f7ad863d 100644 --- a/src/plugins/discover/public/application/main/components/field_stats_table/field_stats_tab.tsx +++ b/src/plugins/discover/public/application/main/components/field_stats_table/field_stats_tab.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { useQuerySubscriber } from '@kbn/unified-field-list-plugin/public'; +import { useSavedSearch } from '../../services/discover_state_provider'; import { FieldStatisticsTable, type FieldStatisticsTableProps } from './field_stats_table'; import { useDiscoverServices } from '../../../../hooks/use_discover_services'; @@ -17,10 +18,12 @@ export const FieldStatisticsTab: React.FC diff --git a/src/plugins/discover/public/application/main/components/layout/__stories__/discover_layout.stories.tsx b/src/plugins/discover/public/application/main/components/layout/__stories__/discover_layout.stories.tsx index 27214f34d8a23..80db81bb4228b 100644 --- a/src/plugins/discover/public/application/main/components/layout/__stories__/discover_layout.stories.tsx +++ b/src/plugins/discover/public/application/main/components/layout/__stories__/discover_layout.stories.tsx @@ -14,9 +14,8 @@ import { DiscoverAppState } from '../../../services/discover_app_state_container import { getDataViewMock } from '../../../../../__mocks__/__storybook_mocks__/get_data_view_mock'; import { withDiscoverServices } from '../../../../../__mocks__/__storybook_mocks__/with_discover_services'; import { getDocumentsLayoutProps, getPlainRecordLayoutProps } from './get_layout_props'; -import { DiscoverLayout } from '../discover_layout'; +import { DiscoverLayout, DiscoverLayoutProps } from '../discover_layout'; import { setHeaderActionMenuMounter } from '../../../../../kibana_services'; -import { DiscoverLayoutProps } from '../types'; setHeaderActionMenuMounter(() => void 0); diff --git a/src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts b/src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts index 1082a5b127397..0d41251ce4542 100644 --- a/src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts +++ b/src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts @@ -23,7 +23,7 @@ import { import { buildDataTableRecordList } from '../../../../../utils/build_data_record'; import { esHits } from '../../../../../__mocks__/es_hits'; import { SavedSearch } from '../../../../..'; -import { DiscoverLayoutProps } from '../types'; +import { DiscoverLayoutProps } from '../discover_layout'; import { DiscoverStateContainer, getDiscoverStateContainer, diff --git a/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx index f366d37d8d7bb..1360a49676895 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx @@ -11,7 +11,6 @@ import { BehaviorSubject } from 'rxjs'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import { setHeaderActionMenuMounter } from '../../../../kibana_services'; import { esHits } from '../../../../__mocks__/es_hits'; -import { savedSearchMock } from '../../../../__mocks__/saved_search'; import { DataDocuments$ } from '../../services/discover_data_state_container'; import { discoverServiceMock } from '../../../../__mocks__/services'; import { FetchStatus } from '../../../types'; @@ -41,15 +40,9 @@ function mountComponent(fetchStatus: FetchStatus, hits: EsHitRecord[]) { stateContainer.dataState.data$.documents$ = documents$; const props = { - expandedDoc: undefined, dataView: dataViewMock, onAddFilter: jest.fn(), - savedSearch: savedSearchMock, - searchSource: savedSearchMock.searchSource, - setExpandedDoc: jest.fn(), - state: { columns: [] }, stateContainer, - navigateTo: jest.fn(), onFieldEdited: jest.fn(), }; diff --git a/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx b/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx index 77d6e36715dd7..3070f447712c5 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx @@ -17,8 +17,7 @@ import { import { FormattedMessage } from '@kbn/i18n-react'; import { css } from '@emotion/react'; import { DataView } from '@kbn/data-views-plugin/public'; -import { SavedSearch, SortOrder } from '@kbn/saved-search-plugin/public'; -import { DataTableRecord } from '../../../../types'; +import { SortOrder } from '@kbn/saved-search-plugin/public'; import { useInternalStateSelector } from '../../services/discover_internal_state_container'; import { useAppStateSelector } from '../../services/discover_app_state_container'; import { useDiscoverServices } from '../../../../hooks/use_discover_services'; @@ -40,9 +39,11 @@ import { DocTableInfinite } from '../../../../components/doc_table/doc_table_inf import { DocumentExplorerCallout } from '../document_explorer_callout'; import { DocumentExplorerUpdateCallout } from '../document_explorer_callout/document_explorer_update_callout'; import { DiscoverTourProvider } from '../../../../components/discover_tour'; +import { DataTableRecord } from '../../../../types'; import { getRawRecordType } from '../../utils/get_raw_record_type'; import { DiscoverGridFlyout } from '../../../../components/discover_grid/discover_grid_flyout'; import { DocViewer } from '../../../../services/doc_views/components/doc_viewer'; +import { useSavedSearchInitial } from '../../services/discover_state_provider'; const containerStyles = css` position: relative; @@ -73,19 +74,17 @@ export const onResize = ( function DiscoverDocumentsComponent({ dataView, onAddFilter, - savedSearch, stateContainer, onFieldEdited, }: { dataView: DataView; - navigateTo: (url: string) => void; onAddFilter?: DocViewFilterFn; - savedSearch: SavedSearch; stateContainer: DiscoverStateContainer; onFieldEdited?: () => void; }) { const services = useDiscoverServices(); const documents$ = stateContainer.dataState.data$.documents$; + const savedSearch = useSavedSearchInitial(); const { dataViews, capabilities, uiSettings } = services; const [query, sort, rowHeight, rowsPerPage, grid, columns, index] = useAppStateSelector( (state) => { diff --git a/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx index 2547011242081..beb09b473d2c5 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx @@ -28,7 +28,6 @@ import { SavedSearch, VIEW_MODE } from '@kbn/saved-search-plugin/public'; import { CoreTheme } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { createSearchSessionMock } from '../../../../__mocks__/search_session'; -import { RequestAdapter } from '@kbn/inspector-plugin/public'; import { searchSourceInstanceMock } from '@kbn/data-plugin/common/search/search_source/mocks'; import { getSessionServiceMock } from '@kbn/data-plugin/public/search/session/mocks'; import { ResetSearchButton } from './reset_search_button'; @@ -36,8 +35,8 @@ import { getDiscoverStateMock } from '../../../../__mocks__/discover_state.mock' import { DiscoverMainProvider } from '../../services/discover_state_provider'; import { act } from 'react-dom/test-utils'; -function getStateContainer() { - const stateContainer = getDiscoverStateMock({ isTimeBased: true }); +function getStateContainer(savedSearch?: SavedSearch) { + const stateContainer = getDiscoverStateMock({ isTimeBased: true, savedSearch }); stateContainer.appState.update({ interval: 'auto', @@ -51,14 +50,12 @@ const mountComponent = async ({ isPlainRecord = false, storage, savedSearch = savedSearchMock, - resetSavedSearch = jest.fn(), searchSessionId = '123', }: { isPlainRecord?: boolean; isTimeBased?: boolean; storage?: Storage; savedSearch?: SavedSearch; - resetSavedSearch?(): void; searchSessionId?: string | null; } = {}) => { let services = discoverServiceMock; @@ -112,22 +109,19 @@ const mountComponent = async ({ session.getSession$.mockReturnValue(new BehaviorSubject(searchSessionId ?? undefined)); - const stateContainer = getStateContainer(); + const stateContainer = getStateContainer(savedSearch); stateContainer.dataState.data$ = savedSearchData$; + stateContainer.actions.undoSavedSearchChanges = jest.fn(); const props: DiscoverHistogramLayoutProps = { isPlainRecord, dataView: dataViewMock, - navigateTo: jest.fn(), - savedSearch, stateContainer, onFieldEdited: jest.fn(), columns: [], viewMode: VIEW_MODE.DOCUMENT_LEVEL, onAddFilter: jest.fn(), - resetSavedSearch, resizeRef: { current: null }, - inspectorAdapters: { requests: new RequestAdapter() }, }; stateContainer.searchSessionManager = createSearchSessionMock(session).searchSessionManager; @@ -147,45 +141,45 @@ const mountComponent = async ({ await act(() => new Promise((resolve) => setTimeout(resolve, 0))); component.update(); - return component; + return { component, stateContainer }; }; describe('Discover histogram layout component', () => { describe('render', () => { it('should render null if there is no search session', async () => { - const component = await mountComponent({ searchSessionId: null }); + const { component } = await mountComponent({ searchSessionId: null }); expect(component.isEmptyRender()).toBe(true); }); it('should not render null if there is a search session', async () => { - const component = await mountComponent(); + const { component } = await mountComponent(); expect(component.isEmptyRender()).toBe(false); }); it('should not render null if there is no search session, but isPlainRecord is true', async () => { - const component = await mountComponent({ isPlainRecord: true }); + const { component } = await mountComponent({ isPlainRecord: true }); expect(component.isEmptyRender()).toBe(false); }); }); describe('reset search button', () => { it('renders the button when there is a saved search', async () => { - const component = await mountComponent(); + const { component } = await mountComponent(); expect(component.find(ResetSearchButton).exists()).toBe(true); }); it('does not render the button when there is no saved search', async () => { - const component = await mountComponent({ + const { component } = await mountComponent({ savedSearch: { ...savedSearchMock, id: undefined }, }); expect(component.find(ResetSearchButton).exists()).toBe(false); }); it('should call resetSavedSearch when clicked', async () => { - const resetSavedSearch = jest.fn(); - const component = await mountComponent({ resetSavedSearch }); + const { component, stateContainer } = await mountComponent(); + expect(component.find(ResetSearchButton).exists()).toBe(true); component.find(ResetSearchButton).find('button').simulate('click'); - expect(resetSavedSearch).toHaveBeenCalled(); + expect(stateContainer.actions.undoSavedSearchChanges).toHaveBeenCalled(); }); }); }); diff --git a/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.tsx b/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.tsx index 8a7592a92050d..cd6bfd6ab8b75 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.tsx @@ -10,16 +10,14 @@ import React, { RefObject } from 'react'; import { UnifiedHistogramContainer } from '@kbn/unified-histogram-plugin/public'; import { css } from '@emotion/react'; import useObservable from 'react-use/lib/useObservable'; +import { useSavedSearchInitial } from '../../services/discover_state_provider'; import { useDiscoverHistogram } from './use_discover_histogram'; -import type { InspectorAdapters } from '../../hooks/use_inspector'; import { type DiscoverMainContentProps, DiscoverMainContent } from './discover_main_content'; import { ResetSearchButton } from './reset_search_button'; import { useAppStateSelector } from '../../services/discover_app_state_container'; export interface DiscoverHistogramLayoutProps extends DiscoverMainContentProps { - resetSavedSearch: () => void; resizeRef: RefObject; - inspectorAdapters: InspectorAdapters; } const histogramLayoutCss = css` @@ -29,18 +27,17 @@ const histogramLayoutCss = css` export const DiscoverHistogramLayout = ({ isPlainRecord, dataView, - resetSavedSearch, - savedSearch, stateContainer, resizeRef, - inspectorAdapters, ...mainContentProps }: DiscoverHistogramLayoutProps) => { + const { dataState } = stateContainer; + const savedSearch = useSavedSearchInitial(); const searchSessionId = useObservable(stateContainer.searchSessionManager.searchSessionId$); const hideChart = useAppStateSelector((state) => state.hideChart); const unifiedHistogramProps = useDiscoverHistogram({ stateContainer, - inspectorAdapters, + inspectorAdapters: dataState.inspectorAdapters, hideChart, isPlainRecord, }); @@ -56,10 +53,12 @@ export const DiscoverHistogramLayout = ({ {...unifiedHistogramProps} dataView={dataView} searchSessionId={searchSessionId} - requestAdapter={inspectorAdapters.requests} + requestAdapter={dataState.inspectorAdapters.requests} resizeRef={resizeRef} appendHitsCounter={ - savedSearch?.id ? : undefined + savedSearch.id ? ( + + ) : undefined } css={histogramLayoutCss} > @@ -67,7 +66,6 @@ export const DiscoverHistogramLayout = ({ {...mainContentProps} stateContainer={stateContainer} dataView={dataView} - savedSearch={savedSearch} isPlainRecord={isPlainRecord} // The documents grid doesn't rerender when the chart visibility changes // which causes it to render blank space, so we need to force a rerender diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx index 5027fc4cfe67a..ccb70df16b88f 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx @@ -123,7 +123,6 @@ async function mountComponent( stateContainer, setExpandedDoc: jest.fn(), persistDataView: jest.fn(), - updateAdHocDataViewId: jest.fn(), updateDataViewList: jest.fn(), }; stateContainer.searchSessionManager = createSearchSessionMock(session).searchSessionManager; diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx index 1dab027ca81fd..90a18b5ee5a8a 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx @@ -23,6 +23,8 @@ import classNames from 'classnames'; import { generateFilters } from '@kbn/data-plugin/public'; import { DragContext } from '@kbn/dom-drag-drop'; import { DataView, DataViewField, DataViewType } from '@kbn/data-views-plugin/public'; +import { useSavedSearchInitial } from '../../services/discover_state_provider'; +import { DiscoverStateContainer } from '../../services/discover_state'; import { VIEW_MODE } from '../../../../../common/constants'; import { useInternalStateSelector } from '../../services/discover_internal_state_container'; import { useAppStateSelector } from '../../services/discover_app_state_container'; @@ -31,7 +33,6 @@ import { useDiscoverServices } from '../../../../hooks/use_discover_services'; import { DiscoverNoResults } from '../no_results'; import { LoadingSpinner } from '../loading_spinner/loading_spinner'; import { DiscoverSidebarResponsive } from '../sidebar'; -import { DiscoverLayoutProps } from './types'; import { SEARCH_FIELDS_FROM_SOURCE, SHOW_FIELD_STATISTICS } from '../../../../../common'; import { popularizeField } from '../../../../utils/popularize_field'; import { DiscoverTopNav } from '../top_nav/discover_topnav'; @@ -55,18 +56,16 @@ export const SIDEBAR_CLOSED_KEY = 'discover:sidebarClosed'; const SidebarMemoized = React.memo(DiscoverSidebarResponsive); const TopNavMemoized = React.memo(DiscoverTopNav); +export interface DiscoverLayoutProps { + navigateTo: (url: string) => void; + stateContainer: DiscoverStateContainer; + persistDataView: (dataView: DataView) => Promise; +} + export function DiscoverLayout({ - inspectorAdapters, navigateTo, - onChangeDataView, - onUpdateQuery, - resetSavedSearch, - savedSearch, - searchSource, stateContainer, persistDataView, - updateAdHocDataViewId, - updateDataViewList, }: DiscoverLayoutProps) { const { trackUiMetric, @@ -93,6 +92,7 @@ export function DiscoverLayout({ }); const dataView = useInternalStateSelector((state) => state.dataView!); const dataState: DataMainMsg = useDataState(main$); + const savedSearch = useSavedSearchInitial(); const fetchCounter = useRef(0); @@ -123,8 +123,6 @@ export function DiscoverLayout({ const onOpenInspector = useInspector({ inspector, stateContainer, - inspectorAdapters, - savedSearch, }); const { @@ -161,11 +159,11 @@ export function DiscoverLayout({ onRemoveColumn(removedFieldName); } if (!dataView.isPersisted()) { - await updateAdHocDataViewId(dataView); + await stateContainer.actions.updateAdHocDataViewId(); } stateContainer.dataState.refetch$.next('reset'); }, - [dataView, stateContainer, updateAdHocDataViewId, currentColumns, onRemoveColumn] + [dataView, stateContainer, currentColumns, onRemoveColumn] ); const onDisableFilters = useCallback(() => { @@ -181,19 +179,6 @@ export function DiscoverLayout({ }, [isSidebarClosed, storage]); const contentCentered = resultState === 'uninitialized' || resultState === 'none'; - const onDataViewCreated = useCallback( - async (nextDataView: DataView) => { - if (!nextDataView.isPersisted()) { - stateContainer.actions.appendAdHocDataViews(nextDataView); - } else { - await stateContainer.actions.loadDataViewList(); - } - if (nextDataView.id) { - onChangeDataView(nextDataView.id); - } - }, - [onChangeDataView, stateContainer] - ); const savedSearchTitle = useRef(null); useEffect(() => { @@ -235,11 +220,7 @@ export function DiscoverLayout({ } if (resultState === 'uninitialized') { - return ( - stateContainer.dataState.refetch$.next(undefined)} - /> - ); + return stateContainer.dataState.fetch()} />; } return ( @@ -247,16 +228,12 @@ export function DiscoverLayout({ {resultState === 'loading' && } @@ -266,16 +243,12 @@ export function DiscoverLayout({ currentColumns, data, dataView, - inspectorAdapters, isPlainRecord, isTimeBased, - navigateTo, onAddFilter, onDisableFilters, onFieldEdited, - resetSavedSearch, resultState, - savedSearch, stateContainer, viewMode, onDropFieldToTable, @@ -306,19 +279,12 @@ export function DiscoverLayout({ query={query} navigateTo={navigateTo} savedQuery={savedQuery} - savedSearch={savedSearch} - searchSource={searchSource} stateContainer={stateContainer} - updateQuery={onUpdateQuery} - resetSavedSearch={resetSavedSearch} - onChangeDataView={onChangeDataView} - onDataViewCreated={onDataViewCreated} + updateQuery={stateContainer.actions.onUpdateQuery} isPlainRecord={isPlainRecord} textBasedLanguageModeErrors={textBasedLanguageModeErrors} onFieldEdited={onFieldEdited} persistDataView={persistDataView} - updateAdHocDataViewId={updateAdHocDataViewId} - updateDataViewList={updateDataViewList} /> diff --git a/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx index b85580e75b7c1..5ab1a6e4d6e3b 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx @@ -11,7 +11,6 @@ import { BehaviorSubject, of } from 'rxjs'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import { esHits } from '../../../../__mocks__/es_hits'; import { dataViewMock } from '../../../../__mocks__/data_view'; -import { savedSearchMock } from '../../../../__mocks__/saved_search'; import { AvailableFields$, DataDocuments$, @@ -39,7 +38,6 @@ const mountComponent = ({ isPlainRecord = false, viewMode = VIEW_MODE.DOCUMENT_LEVEL, storage, - savedSearch = savedSearchMock, }: { hideChart?: boolean; isPlainRecord?: boolean; @@ -99,8 +97,6 @@ const mountComponent = ({ const props: DiscoverMainContentProps = { isPlainRecord, dataView: dataViewMock, - navigateTo: jest.fn(), - savedSearch, stateContainer, onFieldEdited: jest.fn(), columns: [], diff --git a/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx b/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx index d8f8c5463dbab..655ff5cbbb04f 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx @@ -7,7 +7,6 @@ */ import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule } from '@elastic/eui'; -import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { DragDrop, type DropType, DropOverlayWrapper } from '@kbn/dom-drag-drop'; import React, { useCallback } from 'react'; import { DataView } from '@kbn/data-views-plugin/common'; @@ -39,9 +38,7 @@ const DROP_PROPS = { export interface DiscoverMainContentProps { dataView: DataView; - savedSearch: SavedSearch; isPlainRecord: boolean; - navigateTo: (url: string) => void; stateContainer: DiscoverStateContainer; viewMode: VIEW_MODE; onAddFilter: DocViewFilterFn | undefined; @@ -53,13 +50,11 @@ export interface DiscoverMainContentProps { export const DiscoverMainContent = ({ dataView, isPlainRecord, - navigateTo, viewMode, onAddFilter, onFieldEdited, columns, stateContainer, - savedSearch, onDropFieldToTable, }: DiscoverMainContentProps) => { const { trackUiMetric } = useDiscoverServices(); @@ -121,15 +116,12 @@ export const DiscoverMainContent = ({ {viewMode === VIEW_MODE.DOCUMENT_LEVEL ? ( ) : ( void; - onChangeDataView: (id: string) => void; - onUpdateQuery: ( - payload: { dateRange: TimeRange; query?: Query | AggregateQuery }, - isUpdate?: boolean - ) => void; - resetSavedSearch: () => void; - savedSearch: SavedSearch; - searchSource: ISearchSource; - stateContainer: DiscoverStateContainer; - persistDataView: (dataView: DataView) => Promise; - updateAdHocDataViewId: (dataView: DataView) => Promise; - updateDataViewList: (newAdHocDataViews: DataView[]) => void; -} diff --git a/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.test.tsx b/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.test.tsx index 85c7e381588ea..122476b815310 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.test.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.test.tsx @@ -9,10 +9,8 @@ import React from 'react'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import { dataViewMock } from '../../../../__mocks__/data_view'; -import { savedSearchMock } from '../../../../__mocks__/saved_search'; import { DiscoverTopNav, DiscoverTopNavProps } from './discover_topnav'; import { TopNavMenu, TopNavMenuData } from '@kbn/navigation-plugin/public'; -import { ISearchSource } from '@kbn/data-plugin/public'; import { Query } from '@kbn/es-query'; import { setHeaderActionMenuMounter } from '../../../../kibana_services'; import { discoverServiceMock } from '../../../../__mocks__/services'; @@ -35,21 +33,14 @@ function getProps(savePermissions = true): DiscoverTopNavProps { return { stateContainer, - savedSearch: savedSearchMock, navigateTo: jest.fn(), query: {} as Query, savedQuery: '', updateQuery: jest.fn(), onOpenInspector: jest.fn(), - searchSource: {} as ISearchSource, - resetSavedSearch: () => {}, onFieldEdited: jest.fn(), - onChangeDataView: jest.fn(), isPlainRecord: false, persistDataView: jest.fn(), - updateAdHocDataViewId: jest.fn(), - updateDataViewList: jest.fn(), - onDataViewCreated: jest.fn(), }; } diff --git a/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx b/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx index bf4b608a3c017..4892f696477fe 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx @@ -6,23 +6,20 @@ * Side Public License, v 1. */ import React, { useCallback, useEffect, useMemo, useRef } from 'react'; -import { useHistory } from 'react-router-dom'; import type { Query, TimeRange, AggregateQuery } from '@kbn/es-query'; import { DataViewType, type DataView } from '@kbn/data-views-plugin/public'; import type { DataViewPickerProps } from '@kbn/unified-search-plugin/public'; +import { useSavedSearchInitial } from '../../services/discover_state_provider'; import { useInternalStateSelector } from '../../services/discover_internal_state_container'; import { ENABLE_SQL } from '../../../../../common'; import { useDiscoverServices } from '../../../../hooks/use_discover_services'; -import { DiscoverLayoutProps } from '../layout/types'; +import { DiscoverLayoutProps } from '../layout/discover_layout'; import { getTopNavLinks } from './get_top_nav_links'; import { getHeaderActionMenuMounter } from '../../../../kibana_services'; import { DiscoverStateContainer } from '../../services/discover_state'; import { onSaveSearch } from './on_save_search'; -export type DiscoverTopNavProps = Pick< - DiscoverLayoutProps, - 'navigateTo' | 'savedSearch' | 'searchSource' -> & { +export type DiscoverTopNavProps = Pick & { onOpenInspector: () => void; query?: Query | AggregateQuery; savedQuery?: string; @@ -31,15 +28,10 @@ export type DiscoverTopNavProps = Pick< isUpdate?: boolean ) => void; stateContainer: DiscoverStateContainer; - resetSavedSearch: () => void; - onChangeDataView: (dataView: string) => void; - onDataViewCreated: (dataView: DataView) => void; isPlainRecord: boolean; textBasedLanguageModeErrors?: Error; onFieldEdited: () => Promise; persistDataView: (dataView: DataView) => Promise; - updateAdHocDataViewId: (dataView: DataView) => Promise; - updateDataViewList: (newAdHocDataViews: DataView[]) => void; }; export const DiscoverTopNav = ({ @@ -48,23 +40,16 @@ export const DiscoverTopNav = ({ savedQuery, stateContainer, updateQuery, - searchSource, navigateTo, - savedSearch, - resetSavedSearch, - onChangeDataView, - onDataViewCreated, isPlainRecord, textBasedLanguageModeErrors, onFieldEdited, persistDataView, - updateAdHocDataViewId, - updateDataViewList, }: DiscoverTopNavProps) => { - const history = useHistory(); const adHocDataViews = useInternalStateSelector((state) => state.adHocDataViews); const dataView = useInternalStateSelector((state) => state.dataView!); const savedDataViews = useInternalStateSelector((state) => state.savedDataViews); + const savedSearch = useSavedSearchInitial(); const showDatePicker = useMemo( () => dataView.isTimeBased() && dataView.type !== DataViewType.ROLLUP, [dataView] @@ -80,17 +65,6 @@ export const DiscoverTopNav = ({ const { AggregateQueryTopNavMenu } = navigation.ui; - const onOpenSavedSearch = useCallback( - (newSavedSearchId: string) => { - if (savedSearch.id && savedSearch.id === newSavedSearchId) { - resetSavedSearch(); - } else { - history.push(`/view/${encodeURIComponent(newSavedSearchId)}`); - } - }, - [history, resetSavedSearch, savedSearch.id] - ); - useEffect(() => { return () => { // Make sure to close the editors when unmounting @@ -131,57 +105,32 @@ export const DiscoverTopNav = ({ const createNewDataView = useCallback(() => { closeDataViewEditor.current = dataViewEditor.openEditor({ - onSave: onDataViewCreated, + onSave: stateContainer.actions.onDataViewCreated, allowAdHocDataView: true, }); - }, [dataViewEditor, onDataViewCreated]); - - const onCreateDefaultAdHocDataView = useCallback( - async (pattern: string) => { - const newDataView = await dataViews.create({ - title: pattern, - }); - if (newDataView.fields.getByName('@timestamp')?.type === 'date') { - newDataView.timeFieldName = '@timestamp'; - } - - stateContainer.actions.appendAdHocDataViews(newDataView); - onChangeDataView(newDataView.id!); - }, - [dataViews, onChangeDataView, stateContainer.actions] - ); + }, [dataViewEditor, stateContainer]); const topNavMenu = useMemo( () => getTopNavLinks({ dataView, navigateTo, - savedSearch, services, state: stateContainer, onOpenInspector, - searchSource, - onOpenSavedSearch, isPlainRecord, adHocDataViews, - updateDataViewList, persistDataView, - updateAdHocDataViewId, }), [ dataView, navigateTo, - savedSearch, services, stateContainer, onOpenInspector, - searchSource, - onOpenSavedSearch, isPlainRecord, adHocDataViews, persistDataView, - updateAdHocDataViewId, - updateDataViewList, ] ); @@ -192,7 +141,7 @@ export const DiscoverTopNav = ({ dataViews.clearInstanceCache(editedDataView.id); stateContainer.actions.setDataView(await dataViews.create(editedDataView.toSpec(), true)); } else { - await updateAdHocDataViewId(editedDataView); + await stateContainer.actions.updateAdHocDataViewId(); } stateContainer.actions.loadDataViewList(); stateContainer.dataState.fetch(); @@ -228,8 +177,8 @@ export const DiscoverTopNav = ({ currentDataViewId: dataView?.id, onAddField: addField, onDataViewCreated: createNewDataView, - onCreateDefaultAdHocDataView, - onChangeDataView, + onCreateDefaultAdHocDataView: stateContainer.actions.onCreateDefaultAdHocDataView, + onChangeDataView: stateContainer.actions.onChangeDataView, textBasedLanguages: supportedTextBasedLanguages as DataViewPickerProps['textBasedLanguages'], adHocDataViews, savedDataViews, @@ -239,17 +188,15 @@ export const DiscoverTopNav = ({ const onTextBasedSavedAndExit = useCallback( ({ onSave, onCancel }) => { onSaveSearch({ - savedSearch, + savedSearch: stateContainer.savedSearchState.getState(), services, - dataView, navigateTo, state: stateContainer, onClose: onCancel, onSaveCb: onSave, - updateAdHocDataViewId, }); }, - [dataView, navigateTo, savedSearch, services, stateContainer, updateAdHocDataViewId] + [navigateTo, services, stateContainer] ); return ( diff --git a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.test.ts b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.test.ts index fcd52f1563acf..ba56d565ca1c4 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.test.ts +++ b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.test.ts @@ -6,10 +6,8 @@ * Side Public License, v 1. */ -import { ISearchSource } from '@kbn/data-plugin/public'; import { getTopNavLinks } from './get_top_nav_links'; import { dataViewMock } from '../../../../__mocks__/data_view'; -import { savedSearchMock } from '../../../../__mocks__/saved_search'; import { DiscoverServices } from '../../../../build_services'; import { DiscoverStateContainer } from '../../services/discover_state'; @@ -31,16 +29,11 @@ test('getTopNavLinks result', () => { dataView: dataViewMock, navigateTo: jest.fn(), onOpenInspector: jest.fn(), - savedSearch: savedSearchMock, services, state, - searchSource: {} as ISearchSource, - onOpenSavedSearch: () => {}, isPlainRecord: false, persistDataView: jest.fn(), - updateDataViewList: jest.fn(), adHocDataViews: [], - updateAdHocDataViewId: jest.fn(), }); expect(topNavLinks).toMatchInlineSnapshot(` Array [ @@ -97,16 +90,11 @@ test('getTopNavLinks result for sql mode', () => { dataView: dataViewMock, navigateTo: jest.fn(), onOpenInspector: jest.fn(), - savedSearch: savedSearchMock, services, state, - searchSource: {} as ISearchSource, - onOpenSavedSearch: () => {}, isPlainRecord: true, persistDataView: jest.fn(), - updateDataViewList: jest.fn(), adHocDataViews: [], - updateAdHocDataViewId: jest.fn(), }); expect(topNavLinks).toMatchInlineSnapshot(` Array [ diff --git a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx index 3707e83697fb5..b8004bc389481 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx @@ -7,11 +7,9 @@ */ import { i18n } from '@kbn/i18n'; -import type { ISearchSource } from '@kbn/data-plugin/public'; import type { DataView } from '@kbn/data-views-plugin/public'; import { unhashUrl } from '@kbn/kibana-utils-plugin/public'; import type { TopNavMenuData } from '@kbn/navigation-plugin/public'; -import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { showOpenSearchPanel } from './show_open_search_panel'; import { getSharingData, showPublicUrlSwitch } from '../../../../utils/get_sharing_data'; import { DiscoverServices } from '../../../../build_services'; @@ -26,31 +24,21 @@ import { openAlertsPopover } from './open_alerts_popover'; export const getTopNavLinks = ({ dataView, navigateTo, - savedSearch, services, state, onOpenInspector, - searchSource, - onOpenSavedSearch, isPlainRecord, persistDataView, adHocDataViews, - updateDataViewList, - updateAdHocDataViewId, }: { dataView: DataView; navigateTo: (url: string) => void; - savedSearch: SavedSearch; services: DiscoverServices; state: DiscoverStateContainer; onOpenInspector: () => void; - searchSource: ISearchSource; - onOpenSavedSearch: (id: string) => void; isPlainRecord: boolean; adHocDataViews: DataView[]; - updateDataViewList: (dataView: DataView[]) => void; persistDataView: (dataView: DataView) => Promise; - updateAdHocDataViewId: (dataView: DataView) => Promise; }): TopNavMenuData[] => { const options = { id: 'options', @@ -83,11 +71,9 @@ export const getTopNavLinks = ({ I18nContext: services.core.i18n.Context, theme$: services.core.theme.theme$, anchorElement, - searchSource: savedSearch.searchSource, services, + stateContainer: state, adHocDataViews, - updateDataViewList, - savedQueryId: state.appState.getState().savedQuery, }); }, testId: 'discoverAlertsButton', @@ -118,12 +104,10 @@ export const getTopNavLinks = ({ emphasize: true, run: (anchorElement: HTMLElement) => { onSaveSearch({ - savedSearch, + savedSearch: state.savedSearchState.getState(), services, - dataView, navigateTo, state, - updateAdHocDataViewId, onClose: () => { anchorElement?.focus(); }, @@ -142,7 +126,7 @@ export const getTopNavLinks = ({ testId: 'discoverOpenButton', run: () => showOpenSearchPanel({ - onOpenSavedSearch, + onOpenSavedSearch: state.actions.onOpenSavedSearch, I18nContext: services.core.i18n.Context, theme$: services.core.theme.theme$, services, @@ -170,11 +154,11 @@ export const getTopNavLinks = ({ return; } } + const savedSearch = state.savedSearchState.getState(); const sharingData = await getSharingData( - searchSource, + savedSearch.searchSource, state.appState.getState(), - services, - isPlainRecord + services ); services.share.toggleShareContextMenu({ diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx index a7efab7d984a9..3945a21024a34 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx @@ -8,16 +8,11 @@ import * as savedObjectsPlugin from '@kbn/saved-objects-plugin/public'; jest.mock('@kbn/saved-objects-plugin/public'); -jest.mock('../../utils/persist_saved_search', () => ({ - persistSavedSearch: jest.fn(() => ({ id: 'the-saved-search-id' })), -})); import { onSaveSearch } from './on_save_search'; -import { dataViewMock } from '../../../../__mocks__/data_view'; import { savedSearchMock } from '../../../../__mocks__/saved_search'; import { getDiscoverStateContainer } from '../../services/discover_state'; import { ReactElement } from 'react'; import { discoverServiceMock } from '../../../../__mocks__/services'; -import * as persistSavedSearchUtils from '../../utils/persist_saved_search'; import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { createBrowserHistory } from 'history'; @@ -25,10 +20,10 @@ function getStateContainer() { const savedSearch = savedSearchMock; const history = createBrowserHistory(); const stateContainer = getDiscoverStateContainer({ - savedSearch, services: discoverServiceMock, history, }); + stateContainer.savedSearchState.set(savedSearch); stateContainer.appState.getState = jest.fn(() => ({ rowsPerPage: 250, })); @@ -38,12 +33,10 @@ function getStateContainer() { describe('onSaveSearch', () => { it('should call showSaveModal', async () => { await onSaveSearch({ - dataView: dataViewMock, navigateTo: jest.fn(), savedSearch: savedSearchMock, services: discoverServiceMock, state: getStateContainer(), - updateAdHocDataViewId: jest.fn(), }); expect(savedObjectsPlugin.showSaveModal).toHaveBeenCalled(); @@ -55,7 +48,6 @@ describe('onSaveSearch', () => { saveModal = modal; }); await onSaveSearch({ - dataView: dataViewMock, navigateTo: jest.fn(), savedSearch: { ...savedSearchMock, @@ -63,7 +55,6 @@ describe('onSaveSearch', () => { }, services: discoverServiceMock, state: getStateContainer(), - updateAdHocDataViewId: jest.fn(), }); expect(saveModal?.props.tags).toEqual(['tag1', 'tag2']); }); @@ -77,21 +68,19 @@ describe('onSaveSearch', () => { ...savedSearchMock, tags: ['tag1', 'tag2'], }; + const state = getStateContainer(); await onSaveSearch({ - dataView: dataViewMock, navigateTo: jest.fn(), savedSearch, services: discoverServiceMock, - state: getStateContainer(), - updateAdHocDataViewId: jest.fn(), + state, }); expect(savedSearch.tags).toEqual(['tag1', 'tag2']); - jest - .spyOn(persistSavedSearchUtils, 'persistSavedSearch') - .mockImplementationOnce((newSavedSearch, _) => { - savedSearch = newSavedSearch; - return Promise.resolve({ id: newSavedSearch.id }); - }); + + state.savedSearchState.persist = jest.fn().mockImplementationOnce((newSavedSearch, _) => { + savedSearch = newSavedSearch; + return Promise.resolve(newSavedSearch.id); + }); saveModal?.props.onSave({ newTitle: savedSearch.title, newCopyOnSave: false, @@ -113,24 +102,21 @@ describe('onSaveSearch', () => { ...savedSearchMock, tags: ['tag1', 'tag2'], }; + const state = getStateContainer(); await onSaveSearch({ - dataView: dataViewMock, navigateTo: jest.fn(), savedSearch, services: { ...serviceMock, savedObjectsTagging: undefined, }, - state: getStateContainer(), - updateAdHocDataViewId: jest.fn(), + state, }); expect(savedSearch.tags).toEqual(['tag1', 'tag2']); - jest - .spyOn(persistSavedSearchUtils, 'persistSavedSearch') - .mockImplementationOnce((newSavedSearch, _) => { - savedSearch = newSavedSearch; - return Promise.resolve({ id: newSavedSearch.id }); - }); + state.savedSearchState.persist = jest.fn().mockImplementationOnce((newSavedSearch, _) => { + savedSearch = newSavedSearch; + return Promise.resolve(newSavedSearch.id); + }); saveModal?.props.onSave({ newTitle: savedSearch.title, newCopyOnSave: false, diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx index 4d88e48b8adf5..838575184f7d8 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx @@ -11,16 +11,12 @@ import { i18n } from '@kbn/i18n'; import { EuiFormRow, EuiSwitch } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { SavedObjectSaveModal, showSaveModal, OnSaveProps } from '@kbn/saved-objects-plugin/public'; -import { DataView } from '@kbn/data-views-plugin/public'; import { SavedSearch, SaveSavedSearchOptions } from '@kbn/saved-search-plugin/public'; import { DiscoverServices } from '../../../../build_services'; import { DiscoverStateContainer } from '../../services/discover_state'; -import { setBreadcrumbsTitle } from '../../../../utils/breadcrumbs'; -import { persistSavedSearch } from '../../utils/persist_saved_search'; import { DOC_TABLE_LEGACY } from '../../../../../common'; async function saveDataSource({ - dataView, navigateTo, savedSearch, saveOptions, @@ -28,7 +24,6 @@ async function saveDataSource({ state, navigateOrReloadSavedSearch, }: { - dataView: DataView; navigateTo: (url: string) => void; savedSearch: SavedSearch; saveOptions: SaveSavedSearchOptions; @@ -53,16 +48,7 @@ async function saveDataSource({ navigateTo(`/view/${encodeURIComponent(id)}`); } else { // Update defaults so that "reload saved query" functions correctly - state.appState.resetWithSavedSearch(savedSearch); - services.chrome.docTitle.change(savedSearch.title!); - - setBreadcrumbsTitle( - { - ...savedSearch, - id: prevSavedSearchId ?? id, - }, - services.chrome - ); + state.actions.undoSavedSearchChanges(); } } } @@ -79,32 +65,30 @@ async function saveDataSource({ text: error.message, }); } - return persistSavedSearch(savedSearch, { - dataView, - onError, - onSuccess, - saveOptions, - services, - state: state.appState.getState(), - }); + + try { + const response = await state.savedSearchState.persist(savedSearch, saveOptions); + if (response?.id) { + onSuccess(response.id!); + } + return response; + } catch (error) { + onError(error); + } } export async function onSaveSearch({ - dataView, navigateTo, savedSearch, services, state, onClose, onSaveCb, - updateAdHocDataViewId, }: { - dataView: DataView; navigateTo: (path: string) => void; savedSearch: SavedSearch; services: DiscoverServices; state: DiscoverStateContainer; - updateAdHocDataViewId: (dataView: DataView) => Promise; onClose?: () => void; onSaveCb?: () => void; }) { @@ -146,12 +130,12 @@ export async function onSaveSearch({ isTitleDuplicateConfirmed, }; - const updatedDataView = - !dataView.isPersisted() && newCopyOnSave ? await updateAdHocDataViewId(dataView) : dataView; + if (newCopyOnSave) { + await state.actions.updateAdHocDataViewId(); + } const navigateOrReloadSavedSearch = !Boolean(onSaveCb); const response = await saveDataSource({ - dataView: updatedDataView, saveOptions, services, navigateTo, @@ -160,7 +144,7 @@ export async function onSaveSearch({ navigateOrReloadSavedSearch, }); // If the save wasn't successful, put the original values back. - if (!response.id || response.error) { + if (!response) { savedSearch.title = currentTitle; savedSearch.timeRestore = currentTimeRestore; savedSearch.rowsPerPage = currentRowsPerPage; diff --git a/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.test.tsx b/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.test.tsx index 7412dfe599cbe..7a434a4673fa1 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.test.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.test.tsx @@ -9,30 +9,31 @@ import React, { ReactNode } from 'react'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import { findTestSubject } from '@elastic/eui/lib/test'; -import { createSearchSourceMock } from '@kbn/data-plugin/public/mocks'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { AlertsPopover } from './open_alerts_popover'; import { discoverServiceMock } from '../../../../__mocks__/services'; import { dataViewWithTimefieldMock } from '../../../../__mocks__/data_view_with_timefield'; import { dataViewMock } from '../../../../__mocks__/data_view'; +import { getDiscoverStateMock } from '../../../../__mocks__/discover_state.mock'; const Context = ({ children }: { children: ReactNode }) => <>{children}; -const mount = (dataView = dataViewMock) => - mountWithIntl( +const mount = (dataView = dataViewMock) => { + const stateContainer = getDiscoverStateMock({ isTimeBased: true }); + stateContainer.actions.setDataView(dataView); + return mountWithIntl( ); +}; describe('OpenAlertsPopover', () => { it('should render with the create search threshold rule button disabled if the data view has no time field', () => { diff --git a/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx b/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx index 05eac2fb933b5..f722bc5558bee 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx @@ -12,10 +12,10 @@ import type { Observable } from 'rxjs'; import type { CoreTheme, I18nStart } from '@kbn/core/public'; import { EuiWrappingPopover, EuiContextMenu } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import type { DataView, ISearchSource } from '@kbn/data-plugin/common'; +import type { DataView } from '@kbn/data-plugin/common'; import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { DiscoverStateContainer } from '../../services/discover_state'; import { DiscoverServices } from '../../../../build_services'; -import { updateSearchSource } from '../../utils/update_search_source'; const container = document.createElement('div'); let isOpen = false; @@ -25,12 +25,11 @@ const ALERT_TYPE_ID = '.es-query'; interface AlertsPopoverProps { onClose: () => void; anchorElement: HTMLElement; - searchSource: ISearchSource; + stateContainer: DiscoverStateContainer; savedQueryId?: string; adHocDataViews: DataView[]; I18nContext: I18nStart['Context']; services: DiscoverServices; - updateDataViewList: (dataViews: DataView[]) => void; } interface EsQueryAlertMetaData { @@ -39,15 +38,13 @@ interface EsQueryAlertMetaData { } export function AlertsPopover({ - searchSource, anchorElement, - savedQueryId, adHocDataViews, services, + stateContainer, onClose: originalOnClose, - updateDataViewList, }: AlertsPopoverProps) { - const dataView = searchSource.getField('index')!; + const dataView = stateContainer.internalState.getState().dataView; const { triggersActionsUi } = services; const [alertFlyoutVisible, setAlertFlyoutVisibility] = useState(false); const onClose = useCallback(() => { @@ -59,20 +56,15 @@ export function AlertsPopover({ * Provides the default parameters used to initialize the new rule */ const getParams = useCallback(() => { - const nextSearchSource = searchSource.createCopy(); - updateSearchSource(nextSearchSource, true, { - dataView: searchSource.getField('index')!, - services, - sort: [], - useNewFieldsApi: true, - }); - + const savedQueryId = stateContainer.appState.getState().savedQuery; return { searchType: 'searchSource', - searchConfiguration: nextSearchSource.getSerializedFields(), + searchConfiguration: stateContainer.savedSearchState + .getState() + .searchSource.getSerializedFields(), savedQueryId, }; - }, [savedQueryId, searchSource, services]); + }, [stateContainer]); const discoverMetadata: EsQueryAlertMetaData = useMemo( () => ({ @@ -87,8 +79,9 @@ export function AlertsPopover({ return; } - const onFinishFlyoutInteraction = (metadata: EsQueryAlertMetaData) => { - updateDataViewList(metadata.adHocDataViewList); + const onFinishFlyoutInteraction = async (metadata: EsQueryAlertMetaData) => { + await stateContainer.actions.loadDataViewList(); + stateContainer.internalState.transitions.setAdHocDataViews(metadata.adHocDataViewList); }; return triggersActionsUi?.getAddRuleFlyout({ @@ -105,16 +98,9 @@ export function AlertsPopover({ ruleTypeId: ALERT_TYPE_ID, initialValues: { params: getParams() }, }); - }, [ - alertFlyoutVisible, - triggersActionsUi, - discoverMetadata, - getParams, - updateDataViewList, - onClose, - ]); - - const hasTimeFieldName = dataView.timeFieldName; + }, [alertFlyoutVisible, triggersActionsUi, discoverMetadata, getParams, onClose, stateContainer]); + + const hasTimeFieldName = Boolean(dataView?.timeFieldName); const panels = [ { id: 'mainPanel', @@ -180,20 +166,16 @@ export function openAlertsPopover({ I18nContext, theme$, anchorElement, - searchSource, + stateContainer, services, adHocDataViews, - savedQueryId, - updateDataViewList, }: { I18nContext: I18nStart['Context']; theme$: Observable; anchorElement: HTMLElement; - searchSource: ISearchSource; + stateContainer: DiscoverStateContainer; services: DiscoverServices; adHocDataViews: DataView[]; - savedQueryId?: string; - updateDataViewList: (dataViews: DataView[]) => void; }) { if (isOpen) { closeAlertsPopover(); @@ -210,12 +192,10 @@ export function openAlertsPopover({ diff --git a/src/plugins/discover/public/application/main/discover_main_app.test.tsx b/src/plugins/discover/public/application/main/discover_main_app.test.tsx index f3cc7f9cee43d..5f28befee9301 100644 --- a/src/plugins/discover/public/application/main/discover_main_app.test.tsx +++ b/src/plugins/discover/public/application/main/discover_main_app.test.tsx @@ -12,7 +12,6 @@ import { DataViewListItem } from '@kbn/data-views-plugin/public'; import { dataViewMock } from '../../__mocks__/data_view'; import { DiscoverMainApp } from './discover_main_app'; import { DiscoverTopNav } from './components/top_nav/discover_topnav'; -import { savedSearchMock } from '../../__mocks__/saved_search'; import { setHeaderActionMenuMounter, setUrlTracker } from '../../kibana_services'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { discoverServiceMock } from '../../__mocks__/services'; @@ -36,9 +35,9 @@ describe('DiscoverMainApp', () => { }) as unknown as DataViewListItem[]; const stateContainer = getDiscoverStateMock({ isTimeBased: true }); stateContainer.actions.setDataView(dataViewMock); + stateContainer.internalState.transitions.setSavedDataViews(dataViewList); const props = { - dataViewList, - savedSearch: savedSearchMock, + stateContainer, }; const history = createMemoryHistory({ initialEntries: ['/'], @@ -60,7 +59,6 @@ describe('DiscoverMainApp', () => { await component.update(); expect(component.find(DiscoverTopNav).exists()).toBe(true); - expect(component.find(DiscoverTopNav).prop('savedSearch')).toEqual(savedSearchMock); }); }); }); diff --git a/src/plugins/discover/public/application/main/discover_main_app.tsx b/src/plugins/discover/public/application/main/discover_main_app.tsx index 047cca9f33d57..47eac24fb48b5 100644 --- a/src/plugins/discover/public/application/main/discover_main_app.tsx +++ b/src/plugins/discover/public/application/main/discover_main_app.tsx @@ -8,32 +8,30 @@ import React, { useCallback, useEffect } from 'react'; import { RootDragDropProvider } from '@kbn/dom-drag-drop'; import { useHistory } from 'react-router-dom'; -import { SavedSearch } from '@kbn/saved-search-plugin/public'; -import { DataViewListItem } from '@kbn/data-views-plugin/public'; +import { useUrlTracking } from './hooks/use_url_tracking'; +import { useSearchSession } from './hooks/use_search_session'; +import { DiscoverStateContainer } from './services/discover_state'; import { DiscoverLayout } from './components/layout'; import { setBreadcrumbsTitle } from '../../utils/breadcrumbs'; import { addHelpMenuToAppChrome } from '../../components/help_menu/help_menu_util'; -import { useDiscoverState } from './hooks/use_discover_state'; -import { useUrl } from './hooks/use_url'; import { useDiscoverServices } from '../../hooks/use_discover_services'; import { useSavedSearchAliasMatchRedirect } from '../../hooks/saved_search_alias_match_redirect'; -import { DiscoverMainProvider } from './services/discover_state_provider'; +import { useSavedSearchInitial } from './services/discover_state_provider'; +import { useAdHocDataViews } from './hooks/use_adhoc_data_views'; +import { useTextBasedQueryLanguage } from './hooks/use_text_based_query_language'; const DiscoverLayoutMemoized = React.memo(DiscoverLayout); export interface DiscoverMainProps { /** - * List of available data views + * Central state container */ - dataViewList: DataViewListItem[]; - /** - * Current instance of SavedSearch - */ - savedSearch: SavedSearch; + stateContainer: DiscoverStateContainer; } export function DiscoverMainApp(props: DiscoverMainProps) { - const { savedSearch, dataViewList } = props; + const { stateContainer } = props; + const savedSearch = useSavedSearchInitial(); const services = useDiscoverServices(); const { chrome, docLinks, data, spaces, history } = services; const usedHistory = useHistory(); @@ -44,80 +42,66 @@ export function DiscoverMainApp(props: DiscoverMainProps) { [usedHistory] ); + useUrlTracking(stateContainer.savedSearchState); + + /** + * Search session logic + */ + useSearchSession({ services, stateContainer }); + /** - * State related logic + * Adhoc data views functionality */ - const { - inspectorAdapters, - onChangeDataView, - onUpdateQuery, - persistDataView, - updateAdHocDataViewId, - resetSavedSearch, - searchSource, + const { persistDataView } = useAdHocDataViews({ stateContainer, - updateDataViewList, - } = useDiscoverState({ services, - history: usedHistory, - savedSearch, }); /** - * Url / Routing logic + * State changes (data view, columns), when a text base query result is returned */ - useUrl({ history: usedHistory, resetSavedSearch }); + useTextBasedQueryLanguage({ + dataViews: services.dataViews, + stateContainer, + }); + /** + * Start state syncing and fetch data if necessary + */ + useEffect(() => { + const unsubscribe = stateContainer.actions.initializeAndSync(); + stateContainer.actions.fetchData(true); + return () => unsubscribe(); + }, [stateContainer]); /** - * SavedSearch depended initializing + * SavedSearch dependend initializing */ useEffect(() => { const pageTitleSuffix = savedSearch.id && savedSearch.title ? `: ${savedSearch.title}` : ''; chrome.docTitle.change(`Discover${pageTitleSuffix}`); - setBreadcrumbsTitle(savedSearch, chrome); - return () => { - data.search.session.clear(); - }; - }, [savedSearch, chrome, data]); + setBreadcrumbsTitle(savedSearch.title, chrome); + }, [savedSearch.id, savedSearch.title, chrome, data]); - /** - * Initializing syncing with state and help menu - */ useEffect(() => { addHelpMenuToAppChrome(chrome, docLinks); - }, [stateContainer, chrome, docLinks]); + }, [chrome, docLinks]); - /** - * Set initial data view list - * Can be removed once the state container work was completed - */ useEffect(() => { - stateContainer.internalState.transitions.setSavedDataViews(dataViewList); - }, [stateContainer, dataViewList]); - - const resetCurrentSavedSearch = useCallback(() => { - resetSavedSearch(savedSearch.id); - }, [resetSavedSearch, savedSearch]); + return () => { + // clear session when navigating away from discover main + data.search.session.clear(); + }; + }, [data.search.session]); useSavedSearchAliasMatchRedirect({ savedSearch, spaces, history }); return ( - - - - - + + + ); } diff --git a/src/plugins/discover/public/application/main/discover_main_route.test.tsx b/src/plugins/discover/public/application/main/discover_main_route.test.tsx index ae3034896c268..b9ff72ec3baae 100644 --- a/src/plugins/discover/public/application/main/discover_main_route.test.tsx +++ b/src/plugins/discover/public/application/main/discover_main_route.test.tsx @@ -13,12 +13,7 @@ import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { discoverServiceMock } from '../../__mocks__/services'; import { DiscoverMainRoute } from './discover_main_route'; import { MemoryRouter } from 'react-router-dom'; -import { dataViewMock } from '../../__mocks__/data_view'; -import { SavedObject } from '@kbn/core/public'; -import { DataViewSavedObjectAttrs } from '@kbn/data-views-plugin/common'; import { DiscoverMainApp } from './discover_main_app'; -import { SearchSource } from '@kbn/data-plugin/common'; -import { searchSourceInstanceMock } from '@kbn/data-plugin/common/search/search_source/mocks'; import { findTestSubject } from '@elastic/eui/lib/test'; import { scopedHistoryMock } from '@kbn/core/public/mocks'; jest.mock('./discover_main_app', () => { @@ -80,27 +75,11 @@ const mountComponent = (hasESData = true, hasUserDataView = true) => { }; function getServicesMock(hasESData = true, hasUserDataView = true) { const dataViewsMock = discoverServiceMock.data.dataViews; - dataViewsMock.getCache = jest.fn(() => { - return Promise.resolve([dataViewMock as unknown as SavedObject]); - }); - dataViewsMock.get = jest.fn(() => Promise.resolve(dataViewMock)); - dataViewsMock.getDefaultDataView = jest.fn(() => Promise.resolve(dataViewMock)); dataViewsMock.hasData = { hasESData: jest.fn(() => Promise.resolve(hasESData)), hasUserDataView: jest.fn(() => Promise.resolve(hasUserDataView)), hasDataView: jest.fn(() => Promise.resolve(true)), }; - dataViewsMock.refreshFields = jest.fn(); - - discoverServiceMock.data.search.searchSource.createEmpty = jest.fn(() => { - const fields: Record = {}; - const empty = { - ...searchSourceInstanceMock, - setField: (key: string, value: unknown) => (fields[key] = value), - getField: (key: string) => fields[key], - }; - return empty as unknown as SearchSource; - }); return discoverServiceMock; } diff --git a/src/plugins/discover/public/application/main/discover_main_route.tsx b/src/plugins/discover/public/application/main/discover_main_route.tsx index 54e90c01b24f3..3f0da4a4f4a7f 100644 --- a/src/plugins/discover/public/application/main/discover_main_route.tsx +++ b/src/plugins/discover/public/application/main/discover_main_route.tsx @@ -7,32 +7,27 @@ */ import React, { useEffect, useState, memo, useCallback, useMemo } from 'react'; import { useParams, useHistory } from 'react-router-dom'; -import { DataViewListItem } from '@kbn/data-plugin/public'; -import { isOfAggregateQueryType } from '@kbn/es-query'; -import { DataViewSavedObjectConflictError, type DataView } from '@kbn/data-views-plugin/public'; -import { redirectWhenMissing } from '@kbn/kibana-utils-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/public'; +import { redirectWhenMissing, SavedObjectNotFound } from '@kbn/kibana-utils-plugin/public'; import { useExecutionContext } from '@kbn/kibana-react-plugin/public'; import { AnalyticsNoDataPageKibanaProvider, AnalyticsNoDataPage, } from '@kbn/shared-ux-page-analytics-no-data'; -import { - SavedSearch, - getSavedSearch, - getSavedSearchFullPathUrl, -} from '@kbn/saved-search-plugin/public'; +import { getSavedSearchFullPathUrl } from '@kbn/saved-search-plugin/public'; import useObservable from 'react-use/lib/useObservable'; +import { useUrl } from './hooks/use_url'; +import { useSingleton } from './hooks/use_singleton'; import { MainHistoryLocationState } from '../../../common/locator'; -import { getDiscoverStateContainer } from './services/discover_state'; -import { loadDataView, resolveDataView } from './utils/resolve_data_view'; +import { DiscoverStateContainer, getDiscoverStateContainer } from './services/discover_state'; import { DiscoverMainApp } from './discover_main_app'; import { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from '../../utils/breadcrumbs'; import { LoadingIndicator } from '../../components/common/loading_indicator'; import { DiscoverError } from '../../components/common/error_alert'; import { useDiscoverServices } from '../../hooks/use_discover_services'; import { getScopedHistory, getUrlTracker } from '../../kibana_services'; -import { restoreStateFromSavedSearch } from '../../services/saved_searches/restore_from_saved_search'; import { useAlertResultsToast } from './hooks/use_alert_results_toast'; +import { DiscoverMainProvider } from './services/discover_state_provider'; const DiscoverMainAppMemoized = memo(DiscoverMainApp); @@ -51,21 +46,24 @@ export function DiscoverMainRoute(props: Props) { const { core, chrome, - uiSettings: config, data, toastNotifications, http: { basePath }, dataViewEditor, } = services; + const { id: savedSearchId } = useParams(); + const stateContainer = useSingleton(() => + getDiscoverStateContainer({ + history, + services, + }) + ); const [error, setError] = useState(); const [loading, setLoading] = useState(true); - const [savedSearch, setSavedSearch] = useState(); - const [dataViewList, setDataViewList] = useState([]); const [hasESData, setHasESData] = useState(false); const [hasUserDataView, setHasUserDataView] = useState(false); const [showNoDataPage, setShowNoDataPage] = useState(false); const hasCustomBranding = useObservable(core.customBranding.hasCustomBranding$, false); - const { id } = useParams(); /** * Get location state of scoped history only on initial load @@ -83,118 +81,77 @@ export function DiscoverMainRoute(props: Props) { useExecutionContext(core.executionContext, { type: 'application', page: 'app', - id: id || 'new', + id: savedSearchId || 'new', }); - const loadDefaultOrCurrentDataView = useCallback( - async (nextSavedSearch: SavedSearch) => { - try { - const hasUserDataViewValue = await data.dataViews.hasData - .hasUserDataView() - .catch(() => false); - const hasESDataValue = - isDev || (await data.dataViews.hasData.hasESData().catch(() => false)); - setHasUserDataView(hasUserDataViewValue); - setHasESData(hasESDataValue); - - if (!hasUserDataViewValue) { - setShowNoDataPage(true); - return; - } - - let defaultDataView: DataView | null = null; - try { - defaultDataView = await data.dataViews.getDefaultDataView({ displayErrors: false }); - } catch (e) { - // - } - - if (!defaultDataView) { - setShowNoDataPage(true); - return; - } - - const { appState } = getDiscoverStateContainer({ - history, - savedSearch: nextSavedSearch, - services, - }); - const { index, query } = appState.getState(); - const ip = await loadDataView( - data.dataViews, - config, - index, - historyLocationState?.dataViewSpec - ); + const checkData = useCallback(async () => { + try { + const hasUserDataViewValue = await data.dataViews.hasData + .hasUserDataView() + .catch(() => false); + const hasESDataValue = isDev || (await data.dataViews.hasData.hasESData().catch(() => false)); + setHasUserDataView(hasUserDataViewValue); + setHasESData(hasESDataValue); - const ipList = ip.list; - const isTextBasedQuery = query && isOfAggregateQueryType(query); - const dataViewData = resolveDataView( - ip, - nextSavedSearch.searchSource, - toastNotifications, - isTextBasedQuery - ); - setDataViewList(ipList); + if (!hasUserDataViewValue) { + setShowNoDataPage(true); + return false; + } - return dataViewData; + let defaultDataView: DataView | null = null; + try { + defaultDataView = await data.dataViews.getDefaultDataView({ displayErrors: false }); } catch (e) { - setError(e); + // } - }, - [ - config, - data.dataViews, - history, - isDev, - historyLocationState?.dataViewSpec, - toastNotifications, - services, - ] - ); + + if (!defaultDataView) { + setShowNoDataPage(true); + return false; + } + return true; + } catch (e) { + setError(e); + return false; + } + }, [data.dataViews, isDev]); const loadSavedSearch = useCallback( async (nextDataView?: DataView) => { + setLoading(true); + if (!nextDataView && !(await checkData())) { + setLoading(false); + return; + } try { - setLoading(true); - const currentSavedSearch = await getSavedSearch(id, { - search: services.data.search, - savedObjectsClient: core.savedObjects.client, - spaces: services.spaces, - savedObjectsTagging: services.savedObjectsTagging, - }); - - const currentDataView = nextDataView - ? nextDataView - : await loadDefaultOrCurrentDataView(currentSavedSearch); - - if (!currentDataView) { - return; - } - - if (!currentSavedSearch.searchSource.getField('index')) { - currentSavedSearch.searchSource.setField('index', currentDataView); - } - - restoreStateFromSavedSearch({ - savedSearch: currentSavedSearch, - timefilter: services.timefilter, + await stateContainer.actions.loadDataViewList(); + // reset appState in case a saved search with id is loaded and the url is empty + // so the saved search is loaded in a clean state + // else it might be updated by the previous app state + const useAppState = !stateContainer.appState.isEmptyURL(); + const currentSavedSearch = await stateContainer.actions.loadSavedSearch({ + savedSearchId, + dataView: nextDataView, + dataViewSpec: historyLocationState?.dataViewSpec, + useAppState, }); - - setSavedSearch(currentSavedSearch); - - if (currentSavedSearch.id) { + if (currentSavedSearch?.id) { chrome.recentlyAccessed.add( getSavedSearchFullPathUrl(currentSavedSearch.id), currentSavedSearch.title ?? '', currentSavedSearch.id ); } + + chrome.setBreadcrumbs( + currentSavedSearch && currentSavedSearch.title + ? getSavedSearchBreadcrumbs(currentSavedSearch.title) + : getRootBreadcrumbs() + ); + setLoading(false); } catch (e) { - if (e instanceof DataViewSavedObjectConflictError) { - setError(e); - } else { + if (e instanceof SavedObjectNotFound) { redirectWhenMissing({ history, navigateToApp: core.application.navigateToApp, @@ -203,7 +160,7 @@ export function DiscoverMainRoute(props: Props) { search: '/', 'index-pattern': { app: 'management', - path: `kibana/objects/savedSearches/${id}`, + path: `kibana/objects/savedSearches/${savedSearchId}`, }, }, toastNotifications, @@ -212,21 +169,20 @@ export function DiscoverMainRoute(props: Props) { }, theme: core.theme, })(e); + } else { + setError(e); } } }, [ - id, - services.data, - services.spaces, - services.timefilter, - services.savedObjectsTagging, - core.savedObjects.client, + checkData, + stateContainer, + savedSearchId, + historyLocationState?.dataViewSpec, + chrome, + history, core.application.navigateToApp, core.theme, - loadDefaultOrCurrentDataView, - chrome.recentlyAccessed, - history, basePath, toastNotifications, ] @@ -244,17 +200,22 @@ export function DiscoverMainRoute(props: Props) { [loadSavedSearch] ); + // primary fetch: on initial search + triggered when id changes useEffect(() => { - loadSavedSearch(); - }, [loadSavedSearch]); + // restore the previously selected data view for a new state + loadSavedSearch(!savedSearchId ? stateContainer.internalState.getState().dataView : undefined); + }, [loadSavedSearch, savedSearchId, stateContainer]); - useEffect(() => { - chrome.setBreadcrumbs( - savedSearch && savedSearch.title - ? getSavedSearchBreadcrumbs(savedSearch.title) - : getRootBreadcrumbs() - ); - }, [chrome, savedSearch]); + // secondary fetch: in case URL is set to `/`, used to reset to 'new' state, keeping the current data view + useUrl({ + history, + savedSearchId, + onNewUrl: () => { + // restore the previously selected data view for a new state + const dataView = stateContainer.internalState.getState().dataView; + loadSavedSearch(dataView); + }, + }); if (showNoDataPage) { const analyticsServices = { @@ -284,9 +245,13 @@ export function DiscoverMainRoute(props: Props) { return ; } - if (loading || !savedSearch) { + if (loading) { return ; } - return ; + return ( + + + + ); } diff --git a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.tsx b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.tsx index 770373f74825f..09c5c9f1d2d31 100644 --- a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.tsx +++ b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.tsx @@ -7,16 +7,15 @@ */ import React from 'react'; -import { createSearchSourceMock } from '@kbn/data-plugin/public/mocks'; import type { DataView } from '@kbn/data-views-plugin/public'; -import { act, renderHook } from '@testing-library/react-hooks'; -import { discoverServiceMock as mockDiscoverServices } from '../../../__mocks__/services'; +import { renderHook } from '@testing-library/react-hooks'; import { useAdHocDataViews } from './use_adhoc_data_views'; import * as persistencePromptModule from '../../../hooks/use_confirm_persistence_prompt'; import { urlTrackerMock } from '../../../__mocks__/url_tracker.mock'; import { setUrlTracker } from '../../../kibana_services'; import { getDiscoverStateMock } from '../../../__mocks__/discover_state.mock'; import { DiscoverMainProvider } from '../services/discover_state_provider'; +import { discoverServiceMock } from '../../../__mocks__/services'; jest.mock('../../../hooks/use_confirm_persistence_prompt', () => { const createdDataView = { @@ -65,27 +64,21 @@ const mockDataView = { isPersisted: () => false, getName: () => 'mock-data-view', toSpec: () => ({}), + isTimeBased: () => true, } as DataView; -const savedSearchMock = { - id: 'some-id', - searchSource: createSearchSourceMock({ index: mockDataView }), -}; - describe('useAdHocDataViews', () => { it('should save data view with new id and update saved search', async () => { - const stateContainer = getDiscoverStateMock({ isTimeBased: true }); + const stateContainer = getDiscoverStateMock({ + isTimeBased: true, + }); + stateContainer.actions.setDataView(mockDataView); const hook = renderHook( () => useAdHocDataViews({ - dataView: mockDataView, - savedSearch: savedSearchMock, stateContainer, - setUrlTracking: jest.fn(), - dataViews: mockDiscoverServices.dataViews, - filterManager: mockDiscoverServices.filterManager, - toastNotifications: mockDiscoverServices.toastNotifications, + services: discoverServiceMock, }), { wrapper: ({ children }: { children: React.ReactElement }) => ( @@ -101,38 +94,4 @@ describe('useAdHocDataViews', () => { expect(updateSavedSearchCall[0].dataView.id).toEqual('updated-mock-id'); expect(savedDataView!.id).toEqual('updated-mock-id'); }); - - it('should update id of adhoc data view correctly', async () => { - const dataViewsCreateMock = mockDiscoverServices.dataViews.create as jest.Mock; - dataViewsCreateMock.mockImplementation(() => ({ - ...mockDataView, - id: 'updated-mock-id', - })); - const stateContainer = getDiscoverStateMock({ isTimeBased: true }); - const hook = renderHook( - () => - useAdHocDataViews({ - dataView: mockDataView, - savedSearch: savedSearchMock, - stateContainer: getDiscoverStateMock({ isTimeBased: true }), - setUrlTracking: jest.fn(), - dataViews: mockDiscoverServices.dataViews, - filterManager: mockDiscoverServices.filterManager, - toastNotifications: mockDiscoverServices.toastNotifications, - }), - { - wrapper: ({ children }: { children: React.ReactElement }) => ( - {children} - ), - } - ); - - let updatedDataView: DataView; - await act(async () => { - updatedDataView = await hook.result.current.updateAdHocDataViewId(mockDataView); - }); - - expect(mockDiscoverServices.dataViews.clearInstanceCache).toHaveBeenCalledWith(mockDataView.id); - expect(updatedDataView!.id).toEqual('updated-mock-id'); - }); }); diff --git a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts index 31e96f01a2b74..646861efdf255 100644 --- a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts +++ b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts @@ -7,80 +7,51 @@ */ import { useCallback, useEffect } from 'react'; -import { v4 as uuidv4 } from 'uuid'; -import type { DataView, DataViewsContract } from '@kbn/data-views-plugin/public'; -import { SavedSearch } from '@kbn/saved-search-plugin/public'; -import type { FilterManager } from '@kbn/data-plugin/public'; -import type { ToastsStart } from '@kbn/core-notifications-browser'; import { METRIC_TYPE } from '@kbn/analytics'; +import { DiscoverServices } from '../../../build_services'; +import { useSavedSearch } from '../services/discover_state_provider'; +import { isTextBasedQuery } from '../utils/is_text_based_query'; +import { useAppStateSelector } from '../services/discover_app_state_container'; +import { useInternalStateSelector } from '../services/discover_internal_state_container'; import { ADHOC_DATA_VIEW_RENDER_EVENT } from '../../../constants'; import { useConfirmPersistencePrompt } from '../../../hooks/use_confirm_persistence_prompt'; import { DiscoverStateContainer } from '../services/discover_state'; import { useFiltersValidation } from './use_filters_validation'; -import { updateFiltersReferences } from '../utils/update_filter_references'; export const useAdHocDataViews = ({ - dataView, - savedSearch, stateContainer, - setUrlTracking, - filterManager, - dataViews, - toastNotifications, - trackUiMetric, - isTextBasedMode, + services, }: { - dataView: DataView; - savedSearch: SavedSearch; stateContainer: DiscoverStateContainer; - setUrlTracking: (dataView: DataView) => void; - dataViews: DataViewsContract; - filterManager: FilterManager; - toastNotifications: ToastsStart; - trackUiMetric?: (metricType: string, eventName: string | string[], count?: number) => void; - isTextBasedMode?: boolean; + services: DiscoverServices; }) => { + const query = useAppStateSelector((state) => state.query); + const dataView = useInternalStateSelector((state) => state.dataView); + const savedSearch = useSavedSearch(); + const isTextBasedMode = isTextBasedQuery(query); + const { filterManager, toastNotifications } = services; + useEffect(() => { - if (!dataView.isPersisted()) { - trackUiMetric?.(METRIC_TYPE.COUNT, ADHOC_DATA_VIEW_RENDER_EVENT); + if (dataView && !dataView.isPersisted()) { + services.trackUiMetric?.(METRIC_TYPE.COUNT, ADHOC_DATA_VIEW_RENDER_EVENT); } - }, [dataView, isTextBasedMode, trackUiMetric]); + }, [dataView, isTextBasedMode, services]); /** * Takes care of checking data view id references in filters */ useFiltersValidation({ savedSearch, filterManager, toastNotifications }); - /** - * When saving a saved search with an ad hoc data view, a new id needs to be generated for the data view - * This is to prevent duplicate ids messing with our system - */ - const updateAdHocDataViewId = useCallback( - async (prevDataView: DataView) => { - const newDataView = await dataViews.create({ ...prevDataView.toSpec(), id: uuidv4() }); - dataViews.clearInstanceCache(prevDataView.id); - - updateFiltersReferences(prevDataView, newDataView); - - stateContainer.actions.replaceAdHocDataViewWithId(prevDataView.id!, newDataView); - await stateContainer.appState.update({ index: newDataView.id }, true); - - setUrlTracking(newDataView); - return newDataView; - }, - [dataViews, setUrlTracking, stateContainer] - ); - const { openConfirmSavePrompt, updateSavedSearch } = useConfirmPersistencePrompt(stateContainer); const persistDataView = useCallback(async () => { - const currentDataView = savedSearch.searchSource.getField('index')!; + const currentDataView = stateContainer.internalState.getState().dataView; if (!currentDataView || currentDataView.isPersisted()) { return currentDataView; } const createdDataView = await openConfirmSavePrompt(currentDataView); if (!createdDataView) { - return currentDataView; // persistance cancelled + return; // persistance cancelled } if (savedSearch.id) { @@ -90,7 +61,7 @@ export const useAdHocDataViews = ({ } return createdDataView; - }, [stateContainer, openConfirmSavePrompt, savedSearch, updateSavedSearch]); + }, [stateContainer, openConfirmSavePrompt, updateSavedSearch, savedSearch]); - return { persistDataView, updateAdHocDataViewId }; + return { persistDataView }; }; diff --git a/src/plugins/discover/public/application/main/hooks/use_discover_state.test.tsx b/src/plugins/discover/public/application/main/hooks/use_discover_state.test.tsx deleted file mode 100644 index c590722d98bac..0000000000000 --- a/src/plugins/discover/public/application/main/hooks/use_discover_state.test.tsx +++ /dev/null @@ -1,43 +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 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 { renderHook } from '@testing-library/react-hooks'; -import { SearchSource } from '@kbn/data-plugin/public'; -import { createSearchSessionMock } from '../../../__mocks__/search_session'; -import { discoverServiceMock } from '../../../__mocks__/services'; -import { savedSearchMock } from '../../../__mocks__/saved_search'; -import { useDiscoverState } from './use_discover_state'; -import { setUrlTracker } from '../../../kibana_services'; -import { urlTrackerMock } from '../../../__mocks__/url_tracker.mock'; -import { DiscoverMainProvider } from '../services/discover_state_provider'; -import { getDiscoverStateMock } from '../../../__mocks__/discover_state.mock'; -setUrlTracker(urlTrackerMock); - -describe('test useDiscoverState', () => { - test('return is valid', async () => { - const { history } = createSearchSessionMock(); - const stateContainer = getDiscoverStateMock({ isTimeBased: true }); - - const { result } = renderHook( - () => { - return useDiscoverState({ - services: discoverServiceMock, - history, - savedSearch: savedSearchMock, - }); - }, - { - wrapper: ({ children }: { children: React.ReactElement }) => ( - {children} - ), - } - ); - expect(result.current.stateContainer).toBeInstanceOf(Object); - expect(result.current.searchSource).toBeInstanceOf(SearchSource); - }); -}); diff --git a/src/plugins/discover/public/application/main/hooks/use_discover_state.ts b/src/plugins/discover/public/application/main/hooks/use_discover_state.ts deleted file mode 100644 index 00d30e74fadbc..0000000000000 --- a/src/plugins/discover/public/application/main/hooks/use_discover_state.ts +++ /dev/null @@ -1,228 +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 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 { useMemo, useEffect, useState, useCallback } from 'react'; -import { History } from 'history'; -import { isOfAggregateQueryType } from '@kbn/es-query'; -import { type DataView, DataViewType } from '@kbn/data-views-plugin/public'; -import { SavedSearch, getSavedSearch } from '@kbn/saved-search-plugin/public'; -import { buildStateSubscribe } from './utils/build_state_subscribe'; -import { changeDataView } from './utils/change_data_view'; -import { useSearchSession } from './use_search_session'; -import { FetchStatus } from '../../types'; -import { useTextBasedQueryLanguage } from './use_text_based_query_language'; -import { useUrlTracking } from './use_url_tracking'; -import { getDiscoverStateContainer } from '../services/discover_state'; -import { getStateDefaults } from '../utils/get_state_defaults'; -import { DiscoverServices } from '../../../build_services'; -import { restoreStateFromSavedSearch } from '../../../services/saved_searches/restore_from_saved_search'; -import { useAdHocDataViews } from './use_adhoc_data_views'; - -export function useDiscoverState({ - services, - history, - savedSearch, -}: { - services: DiscoverServices; - savedSearch: SavedSearch; - history: History; -}) { - const { data, filterManager, dataViews, toastNotifications, trackUiMetric } = services; - - const dataView = savedSearch.searchSource.getField('index')!; - - const searchSource = useMemo(() => { - savedSearch.searchSource.setField('index', dataView); - return savedSearch.searchSource.createChild(); - }, [savedSearch, dataView]); - - const stateContainer = useMemo(() => { - const container = getDiscoverStateContainer({ - history, - savedSearch, - services, - }); - const nextDataView = savedSearch.searchSource.getField('index')!; - container.actions.setDataView(nextDataView); - if (!nextDataView.isPersisted()) { - container.actions.appendAdHocDataViews(nextDataView); - } - return container; - }, [history, savedSearch, services]); - - const { setUrlTracking } = useUrlTracking(savedSearch, dataView); - - const { appState, searchSessionManager } = stateContainer; - - const [state, setState] = useState(appState.getState()); - - /** - * Search session logic - */ - useSearchSession({ services, stateContainer, savedSearch }); - - /** - * Adhoc data views functionality - */ - const isTextBasedMode = state?.query && isOfAggregateQueryType(state?.query); - const { persistDataView, updateAdHocDataViewId } = useAdHocDataViews({ - dataView, - dataViews, - stateContainer, - savedSearch, - setUrlTracking, - filterManager, - toastNotifications, - trackUiMetric, - isTextBasedMode, - }); - - /** - * Updates data views selector state - */ - const updateDataViewList = useCallback( - async (newAdHocDataViews: DataView[]) => { - await stateContainer.actions.loadDataViewList(); - stateContainer.actions.setAdHocDataViews(newAdHocDataViews); - }, - [stateContainer.actions] - ); - - /** - * Data fetching logic - */ - const { data$, refetch$, reset, inspectorAdapters, initialFetchStatus } = - stateContainer.dataState; - /** - * State changes (data view, columns), when a text base query result is returned - */ - useTextBasedQueryLanguage({ - documents$: data$.documents$, - dataViews, - stateContainer, - savedSearch, - }); - - /** - * Reset to display loading spinner when savedSearch is changing - */ - useEffect(() => reset(), [savedSearch.id, reset]); - - /** - * Sync URL state with local app state on saved search load - * or dataView / savedSearch switch - */ - useEffect(() => { - const stopSync = stateContainer.actions.initializeAndSync(dataView, filterManager, data); - setState(stateContainer.appState.getState()); - - return () => stopSync(); - }, [stateContainer, filterManager, data, dataView]); - - /** - * Data store subscribing to trigger fetching - */ - useEffect(() => { - const stopSync = stateContainer.dataState.subscribe(); - return () => stopSync(); - }, [stateContainer]); - - /** - * Track state changes that should trigger a fetch - */ - useEffect(() => { - const unsubscribe = appState.subscribe( - buildStateSubscribe({ stateContainer, savedSearch, setState }) - ); - return () => unsubscribe(); - }, [appState, savedSearch, services, stateContainer]); - - /** - * Function triggered when user changes data view in the sidebar - */ - const onChangeDataView = useCallback( - async (id: string) => { - await changeDataView(id, { services, discoverState: stateContainer, setUrlTracking }); - stateContainer.internalState.transitions.setExpandedDoc(undefined); - }, - [services, setUrlTracking, stateContainer] - ); - - /** - * function to revert any changes to a given saved search - */ - const resetSavedSearch = useCallback( - async (id?: string) => { - const newSavedSearch = await getSavedSearch(id, { - search: services.data.search, - savedObjectsClient: services.core.savedObjects.client, - spaces: services.spaces, - savedObjectsTagging: services.savedObjectsTagging, - }); - - const newDataView = newSavedSearch.searchSource.getField('index') || dataView; - newSavedSearch.searchSource.setField('index', newDataView); - const newAppState = getStateDefaults({ - savedSearch: newSavedSearch, - services, - }); - - restoreStateFromSavedSearch({ - savedSearch: newSavedSearch, - timefilter: services.timefilter, - }); - - await stateContainer.appState.update(newAppState, true); - setState(newAppState); - }, - [services, dataView, stateContainer] - ); - - /** - * Function triggered when the user changes the query in the search bar - */ - const onUpdateQuery = useCallback( - (_payload, isUpdate?: boolean) => { - if (isUpdate === false) { - searchSessionManager.removeSearchSessionIdFromURL({ replace: false }); - refetch$.next(undefined); - } - }, - [refetch$, searchSessionManager] - ); - - /** - * Trigger data fetching on dataView or savedSearch changes - */ - useEffect(() => { - if (dataView && initialFetchStatus === FetchStatus.LOADING) { - refetch$.next(undefined); - } - }, [initialFetchStatus, refetch$, dataView, savedSearch.id]); - - /** - * We need to make sure the auto refresh interval is disabled for - * non-time series data or rollups since we don't show the date picker - */ - useEffect(() => { - if (dataView && (!dataView.isTimeBased() || dataView.type === DataViewType.ROLLUP)) { - stateContainer.actions.pauseAutoRefreshInterval(); - } - }, [dataView, stateContainer]); - - return { - inspectorAdapters, - resetSavedSearch, - onChangeDataView, - onUpdateQuery, - searchSource, - stateContainer, - persistDataView, - updateAdHocDataViewId, - updateDataViewList, - }; -} diff --git a/src/plugins/discover/public/application/main/hooks/use_inspector.test.ts b/src/plugins/discover/public/application/main/hooks/use_inspector.test.ts index 7f30ef8c51b47..57e94aa7a0db1 100644 --- a/src/plugins/discover/public/application/main/hooks/use_inspector.test.ts +++ b/src/plugins/discover/public/application/main/hooks/use_inspector.test.ts @@ -8,7 +8,6 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { discoverServiceMock } from '../../../__mocks__/services'; -import { savedSearchMock } from '../../../__mocks__/saved_search'; import { useInspector } from './use_inspector'; import { Adapters, RequestAdapter } from '@kbn/inspector-plugin/common'; import { OverlayRef } from '@kbn/core/public'; @@ -29,15 +28,14 @@ describe('test useInspector', () => { stateContainer.internalState.transitions.setExpandedDoc({} as unknown as DataTableRecord); const { result } = renderHook(() => { return useInspector({ - inspectorAdapters: { requests, lensRequests }, - savedSearch: savedSearchMock, - inspector: discoverServiceMock.inspector, stateContainer, + inspector: discoverServiceMock.inspector, }); }); await act(async () => { result.current(); }); + expect(discoverServiceMock.inspector.open).toHaveBeenCalled(); expect(adapters?.requests).toBeInstanceOf(AggregateRequestAdapter); expect(adapters?.requests?.getRequests()).toEqual([ diff --git a/src/plugins/discover/public/application/main/hooks/use_inspector.ts b/src/plugins/discover/public/application/main/hooks/use_inspector.ts index 2d4179801faa0..45120d524144f 100644 --- a/src/plugins/discover/public/application/main/hooks/use_inspector.ts +++ b/src/plugins/discover/public/application/main/hooks/use_inspector.ts @@ -12,7 +12,6 @@ import { RequestAdapter, Start as InspectorPublicPluginStart, } from '@kbn/inspector-plugin/public'; -import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { DiscoverStateContainer } from '../services/discover_state'; import { AggregateRequestAdapter } from '../utils/aggregate_request_adapter'; @@ -24,11 +23,7 @@ export interface InspectorAdapters { export function useInspector({ inspector, stateContainer, - inspectorAdapters, - savedSearch, }: { - inspectorAdapters: InspectorAdapters; - savedSearch: SavedSearch; inspector: InspectorPublicPluginStart; stateContainer: DiscoverStateContainer; }) { @@ -37,6 +32,7 @@ export function useInspector({ const onOpenInspector = useCallback(() => { // prevent overlapping stateContainer.internalState.transitions.setExpandedDoc(undefined); + const inspectorAdapters = stateContainer.dataState.inspectorAdapters; const requestAdapters = inspectorAdapters.lensRequests ? [inspectorAdapters.requests, inspectorAdapters.lensRequests] @@ -44,17 +40,11 @@ export function useInspector({ const session = inspector.open( { requests: new AggregateRequestAdapter(requestAdapters) }, - { title: savedSearch.title } + { title: stateContainer.savedSearchState.getTitle() } ); setInspectorSession(session); - }, [ - stateContainer, - inspectorAdapters.lensRequests, - inspectorAdapters.requests, - inspector, - savedSearch.title, - ]); + }, [stateContainer, inspector]); useEffect(() => { return () => { diff --git a/src/plugins/discover/public/application/main/hooks/use_saved_search_messages.ts b/src/plugins/discover/public/application/main/hooks/use_saved_search_messages.ts index 7be14ca9c802e..060b12053c870 100644 --- a/src/plugins/discover/public/application/main/hooks/use_saved_search_messages.ts +++ b/src/plugins/discover/public/application/main/hooks/use_saved_search_messages.ts @@ -15,6 +15,7 @@ import type { DataTotalHits$, SavedSearchData, } from '../services/discover_data_state_container'; +import { RecordRawType } from '../services/discover_data_state_container'; /** * Sends COMPLETE message to the main$ observable with the information * that no documents have been found, allowing Discover to show a no @@ -86,8 +87,11 @@ export function sendErrorMsg(data$: DataMain$ | DataDocuments$ | DataTotalHits$, * Sends a RESET message to all data subjects * Needed when data view is switched or a new runtime field is added */ -export function sendResetMsg(data: SavedSearchData, initialFetchStatus: FetchStatus) { - const recordRawType = data.main$.getValue().recordRawType; +export function sendResetMsg( + data: SavedSearchData, + initialFetchStatus: FetchStatus, + recordRawType: RecordRawType +) { data.main$.next({ fetchStatus: initialFetchStatus, foundDocuments: undefined, diff --git a/src/plugins/discover/public/application/main/hooks/use_search_session.test.ts b/src/plugins/discover/public/application/main/hooks/use_search_session.test.ts index 4f483a3e01c31..0e2606c063f75 100644 --- a/src/plugins/discover/public/application/main/hooks/use_search_session.test.ts +++ b/src/plugins/discover/public/application/main/hooks/use_search_session.test.ts @@ -8,18 +8,14 @@ import { useSearchSession } from './use_search_session'; import { renderHook } from '@testing-library/react-hooks'; -import { createSearchSessionMock } from '../../../__mocks__/search_session'; import { discoverServiceMock } from '../../../__mocks__/services'; import { savedSearchMock } from '../../../__mocks__/saved_search'; -import { getDiscoverStateContainer } from '../services/discover_state'; +import { getDiscoverStateMock } from '../../../__mocks__/discover_state.mock'; describe('test useSearchSession', () => { test('getting the next session id', async () => { - const { history } = createSearchSessionMock(); - const stateContainer = getDiscoverStateContainer({ + const stateContainer = getDiscoverStateMock({ savedSearch: savedSearchMock, - history, - services: discoverServiceMock, }); const nextId = 'id'; @@ -29,7 +25,6 @@ describe('test useSearchSession', () => { return useSearchSession({ services: discoverServiceMock, stateContainer, - savedSearch: savedSearchMock, }); }); expect(stateContainer.searchSessionManager.getNextSearchSessionId()).toBe('id'); diff --git a/src/plugins/discover/public/application/main/hooks/use_search_session.ts b/src/plugins/discover/public/application/main/hooks/use_search_session.ts index 8dadbd9015f1e..dc08eb7fe0b4c 100644 --- a/src/plugins/discover/public/application/main/hooks/use_search_session.ts +++ b/src/plugins/discover/public/application/main/hooks/use_search_session.ts @@ -7,7 +7,6 @@ */ import { useEffect } from 'react'; import { noSearchSessionStorageCapabilityMessage } from '@kbn/data-plugin/public'; -import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { createSearchSessionRestorationDataProvider, DiscoverStateContainer, @@ -17,11 +16,9 @@ import { DiscoverServices } from '../../../build_services'; export function useSearchSession({ services, stateContainer, - savedSearch, }: { services: DiscoverServices; stateContainer: DiscoverStateContainer; - savedSearch: SavedSearch; }) { const { data, capabilities } = services; @@ -30,7 +27,7 @@ export function useSearchSession({ createSearchSessionRestorationDataProvider({ appStateContainer: stateContainer.appState, data, - getSavedSearch: () => savedSearch, + getSavedSearch: () => stateContainer.savedSearchState.getState(), }), { isDisabled: () => @@ -42,5 +39,5 @@ export function useSearchSession({ }, } ); - }, [capabilities.discover.storeSearchSession, data, savedSearch, stateContainer.appState]); + }, [capabilities.discover.storeSearchSession, data, stateContainer]); } diff --git a/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts b/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx similarity index 79% rename from src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts rename to src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx index d512477d9f53e..edf69444ac5e3 100644 --- a/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts +++ b/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx @@ -5,23 +5,24 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import React from 'react'; import { renderHook } from '@testing-library/react-hooks'; import { waitFor } from '@testing-library/react'; import { DataViewsContract } from '@kbn/data-plugin/public'; import { discoverServiceMock } from '../../../__mocks__/services'; import { useTextBasedQueryLanguage } from './use_text_based_query_language'; -import { BehaviorSubject } from 'rxjs'; import { FetchStatus } from '../../types'; -import { DataDocuments$, RecordRawType } from '../services/discover_data_state_container'; -import { DiscoverAppState } from '../services/discover_app_state_container'; +import { RecordRawType } from '../services/discover_data_state_container'; import { DataTableRecord } from '../../../types'; import { AggregateQuery, Query } from '@kbn/es-query'; import { dataViewMock } from '../../../__mocks__/data_view'; import { DataViewListItem } from '@kbn/data-views-plugin/common'; import { savedSearchMock } from '../../../__mocks__/saved_search'; import { getDiscoverStateMock } from '../../../__mocks__/discover_state.mock'; -import { VIEW_MODE } from '@kbn/saved-search-plugin/common'; +import { DiscoverMainProvider } from '../services/discover_state_provider'; +import { DiscoverAppState } from '../services/discover_app_state_container'; +import { DiscoverStateContainer } from '../services/discover_state'; +import { VIEW_MODE } from '@kbn/saved-search-plugin/public'; function getHookProps( query: AggregateQuery | Query | undefined, @@ -39,11 +40,9 @@ function getHookProps( fetchStatus: FetchStatus.LOADING, query, }; - - const documents$ = new BehaviorSubject(msgLoading) as DataDocuments$; + stateContainer.dataState.data$.documents$.next(msgLoading); return { - documents$, dataViews: dataViewsService ?? discoverServiceMock.dataViews, stateContainer, savedSearch: savedSearchMock, @@ -64,19 +63,49 @@ const msgComplete = { query, }; +const getDataViewsService = () => { + const dataViewsCreateMock = discoverServiceMock.dataViews.create as jest.Mock; + dataViewsCreateMock.mockImplementation(() => ({ + ...dataViewMock, + })); + return { + ...discoverServiceMock.dataViews, + create: dataViewsCreateMock, + }; +}; + +const getHookContext = (stateContainer: DiscoverStateContainer) => { + return ({ children }: { children: JSX.Element }) => ( + {children} + ); +}; +const renderHookWithContext = ( + useDataViewsService: boolean = false, + appState?: DiscoverAppState +) => { + const props = getHookProps(query, useDataViewsService ? getDataViewsService() : undefined); + if (appState) { + props.stateContainer.appState.getState = jest.fn(() => { + return appState; + }); + } + + renderHook(() => useTextBasedQueryLanguage(props), { + wrapper: getHookContext(props.stateContainer), + }); + return props; +}; + describe('useTextBasedQueryLanguage', () => { test('a text based query should change state when loading and finished', async () => { - const props = getHookProps(query); - const { documents$, replaceUrlState } = props; - - renderHook(() => useTextBasedQueryLanguage(props)); + const { replaceUrlState, stateContainer } = renderHookWithContext(false); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); expect(replaceUrlState).toHaveBeenCalledWith({ index: 'the-data-view-id' }); replaceUrlState.mockReset(); - documents$.next(msgComplete); + stateContainer.dataState.data$.documents$.next(msgComplete); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); await waitFor(() => { @@ -87,12 +116,9 @@ describe('useTextBasedQueryLanguage', () => { }); }); test('should change viewMode to DOCUMENT_LEVEL if it was AGGREGATED_LEVEL', async () => { - const props = getHookProps(query, undefined, { + const { replaceUrlState } = renderHookWithContext(false, { viewMode: VIEW_MODE.AGGREGATED_LEVEL, }); - const { replaceUrlState } = props; - - renderHook(() => useTextBasedQueryLanguage(props)); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); expect(replaceUrlState).toHaveBeenCalledWith({ @@ -101,12 +127,9 @@ describe('useTextBasedQueryLanguage', () => { }); }); test('changing a text based query with different result columns should change state when loading and finished', async () => { - const props = getHookProps(query); - const { documents$, replaceUrlState } = props; - - renderHook(() => useTextBasedQueryLanguage(props)); - - documents$.next(msgComplete); + const { replaceUrlState, stateContainer } = renderHookWithContext(false); + const documents$ = stateContainer.dataState.data$.documents$; + stateContainer.dataState.data$.documents$.next(msgComplete); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(2)); replaceUrlState.mockReset(); @@ -132,10 +155,9 @@ describe('useTextBasedQueryLanguage', () => { }); }); test('only changing a text based query with same result columns should not change columns', async () => { - const props = getHookProps(query); - const { documents$, replaceUrlState } = props; + const { replaceUrlState, stateContainer } = renderHookWithContext(false); - renderHook(() => useTextBasedQueryLanguage(props)); + const documents$ = stateContainer.dataState.data$.documents$; documents$.next(msgComplete); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(2)); @@ -176,10 +198,8 @@ describe('useTextBasedQueryLanguage', () => { }); }); test('if its not a text based query coming along, it should be ignored', async () => { - const props = getHookProps(query); - const { documents$, replaceUrlState } = props; - - renderHook(() => useTextBasedQueryLanguage(props)); + const { replaceUrlState, stateContainer } = renderHookWithContext(false); + const documents$ = stateContainer.dataState.data$.documents$; documents$.next(msgComplete); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(2)); @@ -219,13 +239,12 @@ describe('useTextBasedQueryLanguage', () => { }); test('it should not overwrite existing state columns on initial fetch', async () => { - const props = getHookProps(query); - props.stateContainer.appState.getState = jest.fn(() => { - return { columns: ['field1'], index: 'the-data-view-id' }; + const { replaceUrlState, stateContainer } = renderHookWithContext(false, { + columns: ['field1'], + index: 'the-data-view-id', }); - const { documents$, replaceUrlState } = props; + const documents$ = stateContainer.dataState.data$.documents$; - renderHook(() => useTextBasedQueryLanguage(props)); documents$.next({ recordRawType: RecordRawType.PLAIN, fetchStatus: FetchStatus.COMPLETE, @@ -258,13 +277,12 @@ describe('useTextBasedQueryLanguage', () => { }); test('it should not overwrite state column when successfully fetching after an error fetch', async () => { - const props = getHookProps(query); - props.stateContainer.appState.getState = jest.fn(() => { - return { columns: [], index: 'the-data-view-id' }; + const { replaceUrlState, stateContainer } = renderHookWithContext(false, { + columns: [], + index: 'the-data-view-id', }); - const { documents$, replaceUrlState } = props; + const documents$ = stateContainer.dataState.data$.documents$; - renderHook(() => useTextBasedQueryLanguage(props)); documents$.next({ recordRawType: RecordRawType.PLAIN, fetchStatus: FetchStatus.LOADING, @@ -284,7 +302,7 @@ describe('useTextBasedQueryLanguage', () => { query: { sql: 'SELECT * from the-data-view-title WHERE field1=2' }, }); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - props.stateContainer.appState.getState = jest.fn(() => { + stateContainer.appState.getState = jest.fn(() => { return { columns: ['field1', 'field2'], index: 'the-data-view-id' }; }); replaceUrlState.mockReset(); @@ -335,9 +353,10 @@ describe('useTextBasedQueryLanguage', () => { create: dataViewsCreateMock, }; const props = getHookProps(query, dataViewsService); - const { documents$, replaceUrlState } = props; + const { stateContainer, replaceUrlState } = props; + const documents$ = stateContainer.dataState.data$.documents$; - renderHook(() => useTextBasedQueryLanguage(props)); + renderHook(() => useTextBasedQueryLanguage(props), { wrapper: getHookContext(stateContainer) }); documents$.next(msgComplete); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(2)); diff --git a/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts b/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts index ff40121274858..b82b749d2acba 100644 --- a/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts +++ b/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts @@ -14,9 +14,9 @@ import { } from '@kbn/es-query'; import { useCallback, useEffect, useRef } from 'react'; import type { DataViewsContract } from '@kbn/data-views-plugin/public'; -import { SavedSearch, VIEW_MODE } from '@kbn/saved-search-plugin/public'; +import { VIEW_MODE } from '@kbn/saved-search-plugin/public'; +import { useSavedSearchInitial } from '../services/discover_state_provider'; import type { DiscoverStateContainer } from '../services/discover_state'; -import type { DataDocuments$ } from '../services/discover_data_state_container'; import { getValidViewMode } from '../utils/get_valid_view_mode'; import { FetchStatus } from '../../types'; @@ -27,20 +27,17 @@ const MAX_NUM_OF_COLUMNS = 50; * If necessary this is setting displayed columns and selected data view */ export function useTextBasedQueryLanguage({ - documents$, dataViews, stateContainer, - savedSearch, }: { - documents$: DataDocuments$; stateContainer: DiscoverStateContainer; dataViews: DataViewsContract; - savedSearch: SavedSearch; }) { const prev = useRef<{ query: AggregateQuery | Query | undefined; columns: string[] }>({ columns: [], query: undefined, }); + const savedSearch = useSavedSearchInitial(); const cleanup = useCallback(() => { if (prev.current.query) { @@ -53,7 +50,7 @@ export function useTextBasedQueryLanguage({ }, []); useEffect(() => { - const subscription = documents$.subscribe(async (next) => { + const subscription = stateContainer.dataState.data$.documents$.subscribe(async (next) => { const { query, recordRawType } = next; if (!query || next.fetchStatus === FetchStatus.ERROR) { return; @@ -131,5 +128,5 @@ export function useTextBasedQueryLanguage({ cleanup(); subscription.unsubscribe(); }; - }, [documents$, dataViews, stateContainer, savedSearch, cleanup]); + }, [dataViews, stateContainer, savedSearch, cleanup]); } diff --git a/src/plugins/discover/public/application/main/hooks/use_url.test.ts b/src/plugins/discover/public/application/main/hooks/use_url.test.ts index 9d8191f3581e4..a9cc1bc838fe9 100644 --- a/src/plugins/discover/public/application/main/hooks/use_url.test.ts +++ b/src/plugins/discover/public/application/main/hooks/use_url.test.ts @@ -8,20 +8,39 @@ import { renderHook } from '@testing-library/react-hooks'; import { createSearchSessionMock } from '../../../__mocks__/search_session'; import { useUrl } from './use_url'; +import { + savedSearchMockWithTimeField, + savedSearchMockWithTimeFieldNew, +} from '../../../__mocks__/saved_search'; +import { SavedSearch } from '@kbn/saved-search-plugin/public'; -describe('test useUrl', () => { - test('resetSavedSearch is triggered once path it changed to /', () => { - const { history } = createSearchSessionMock(); - history.push('/view'); - const props = { - history, - resetSavedSearch: jest.fn(), - }; - renderHook(() => useUrl(props)); - history.push('/new'); - expect(props.resetSavedSearch).toHaveBeenCalledTimes(0); +function prepareTest(savedSearch: SavedSearch, path: string) { + const { history } = createSearchSessionMock(); + const onNewUrl = jest.fn(); - history.push('/'); - expect(props.resetSavedSearch).toHaveBeenCalledTimes(1); + renderHook(() => + useUrl({ + history, + savedSearchId: savedSearch.id, + onNewUrl, + }) + ); + history.push(path); + return { load: onNewUrl }; +} +describe('test useUrl when the url is changed to /', () => { + test('loadSavedSearch is not triggered when the url is e.g. /new', () => { + // the switch to loading the new saved search is taken care in the main route + const { load } = prepareTest(savedSearchMockWithTimeFieldNew, '/new'); + expect(load).toHaveBeenCalledTimes(0); + }); + test('loadSavedSearch is not triggered when a persisted saved search is pre-selected', () => { + // the switch to loading the new saved search is taken care in the main route + const { load } = prepareTest(savedSearchMockWithTimeField, '/'); + expect(load).toHaveBeenCalledTimes(0); + }); + test('loadSavedSearch is triggered when a new saved search is pre-selected ', () => { + const { load } = prepareTest(savedSearchMockWithTimeFieldNew, '/'); + expect(load).toHaveBeenCalledTimes(1); }); }); diff --git a/src/plugins/discover/public/application/main/hooks/use_url.ts b/src/plugins/discover/public/application/main/hooks/use_url.ts index bc5554c35b36f..f5c8be6de5b21 100644 --- a/src/plugins/discover/public/application/main/hooks/use_url.ts +++ b/src/plugins/discover/public/application/main/hooks/use_url.ts @@ -9,10 +9,12 @@ import { useEffect } from 'react'; import { History } from 'history'; export function useUrl({ history, - resetSavedSearch, + savedSearchId, + onNewUrl, }: { history: History; - resetSavedSearch: (val?: string) => void; + savedSearchId: string | undefined; + onNewUrl: () => void; }) { /** * Url / Routing logic @@ -22,10 +24,10 @@ export function useUrl({ // which could be set through pressing "New" button in top nav or go to "Discover" plugin from the sidebar // to reload the page in a right way const unlistenHistoryBasePath = history.listen(({ pathname, search, hash }) => { - if (!search && !hash && pathname === '/') { - resetSavedSearch(); + if (!search && !hash && pathname === '/' && !savedSearchId) { + onNewUrl(); } }); return () => unlistenHistoryBasePath(); - }, [history, resetSavedSearch]); + }, [history, savedSearchId, onNewUrl]); } diff --git a/src/plugins/discover/public/application/main/hooks/use_url_tracking.ts b/src/plugins/discover/public/application/main/hooks/use_url_tracking.ts index 4bed6f846d234..138ca8ce011da 100644 --- a/src/plugins/discover/public/application/main/hooks/use_url_tracking.ts +++ b/src/plugins/discover/public/application/main/hooks/use_url_tracking.ts @@ -5,26 +5,26 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { useCallback, useEffect } from 'react'; -import { DataView } from '@kbn/data-views-plugin/common'; -import { SavedSearch } from '@kbn/saved-search-plugin/public'; +import { useEffect } from 'react'; +import { DiscoverSavedSearchContainer } from '../services/discover_saved_search_container'; import { getUrlTracker } from '../../../kibana_services'; /** * Enable/disable kbn url tracking (That's the URL used when selecting Discover in the side menu) */ -export function useUrlTracking(savedSearch: SavedSearch, dataView: DataView) { - const setUrlTracking = useCallback( - (actualDataView: DataView) => { - const trackingEnabled = Boolean(actualDataView.isPersisted() || savedSearch.id); - getUrlTracker().setTrackingEnabled(trackingEnabled); - }, - [savedSearch] - ); - +export function useUrlTracking(savedSearchContainer: DiscoverSavedSearchContainer) { useEffect(() => { - setUrlTracking(dataView); - }, [dataView, savedSearch.id, setUrlTracking]); + const subscription = savedSearchContainer.getCurrent$().subscribe((savedSearch) => { + const dataView = savedSearch.searchSource.getField('index'); + if (!dataView) { + return; + } + const trackingEnabled = Boolean(dataView.isPersisted() || savedSearch.id); + getUrlTracker().setTrackingEnabled(trackingEnabled); + }); - return { setUrlTracking }; + return () => { + subscription.unsubscribe(); + }; + }, [savedSearchContainer]); } diff --git a/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.test.ts b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.test.ts index 2ea8275dea013..19c1e06e64b7d 100644 --- a/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.test.ts +++ b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.test.ts @@ -5,130 +5,88 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { createBrowserHistory } from 'history'; import { buildStateSubscribe } from './build_state_subscribe'; import { savedSearchMock } from '../../../../__mocks__/saved_search'; import { FetchStatus } from '../../../types'; -import { getDiscoverStateContainer } from '../../services/discover_state'; -import { discoverServiceMock } from '../../../../__mocks__/services'; import { dataViewComplexMock } from '../../../../__mocks__/data_view_complex'; +import { getDiscoverStateMock } from '../../../../__mocks__/discover_state.mock'; +import { discoverServiceMock } from '../../../../__mocks__/services'; describe('buildStateSubscribe', () => { const savedSearch = savedSearchMock; - const history = createBrowserHistory(); - const stateContainer = getDiscoverStateContainer({ - savedSearch, - services: discoverServiceMock, - history, - }); + const stateContainer = getDiscoverStateMock({ savedSearch }); stateContainer.dataState.refetch$.next = jest.fn(); stateContainer.dataState.reset = jest.fn(); stateContainer.actions.setDataView = jest.fn(); - stateContainer.actions.loadAndResolveDataView = jest.fn(() => - Promise.resolve({ fallback: false, dataView: dataViewComplexMock }) - ); - const setState = jest.fn(); + const getSubscribeFn = () => { + return buildStateSubscribe({ + appState: stateContainer.appState, + savedSearchState: stateContainer.savedSearchState, + dataState: stateContainer.dataState, + internalState: stateContainer.internalState, + services: discoverServiceMock, + setDataView: stateContainer.actions.setDataView, + }); + }; beforeEach(() => { jest.clearAllMocks(); }); - it('should set the data view if the index has changed, but no refetch should be triggered', async () => { - await buildStateSubscribe({ - stateContainer, - savedSearch, - setState, - })({ index: dataViewComplexMock.id }); + it('should set the data view if the index has changed, and refetch should be triggered', async () => { + await getSubscribeFn()({ index: dataViewComplexMock.id }); expect(stateContainer.actions.setDataView).toHaveBeenCalledWith(dataViewComplexMock); expect(stateContainer.dataState.reset).toHaveBeenCalled(); - expect(stateContainer.dataState.refetch$.next).not.toHaveBeenCalled(); - expect(setState).toHaveBeenCalled(); + expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); }); it('should not call refetch$ if nothing changes', async () => { - await buildStateSubscribe({ - stateContainer, - savedSearch, - setState, - })(stateContainer.appState.getState()); + await getSubscribeFn()(stateContainer.appState.getState()); expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); - expect(setState).toHaveBeenCalled(); }); it('should call refetch$ if the chart is hidden', async () => { - await buildStateSubscribe({ - stateContainer, - savedSearch, - setState, - })({ hideChart: true }); + await getSubscribeFn()({ hideChart: true }); expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); - expect(setState).toHaveBeenCalled(); }); it('should call refetch$ if the chart interval has changed', async () => { - await buildStateSubscribe({ - stateContainer, - savedSearch, - setState, - })({ interval: 's' }); + await getSubscribeFn()({ interval: 's' }); expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); - expect(setState).toHaveBeenCalled(); }); it('should call refetch$ if breakdownField has changed', async () => { - await buildStateSubscribe({ - stateContainer, - savedSearch, - setState, - })({ breakdownField: '💣' }); + await getSubscribeFn()({ breakdownField: '💣' }); expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); - expect(setState).toHaveBeenCalled(); }); it('should call refetch$ if sort has changed', async () => { - await buildStateSubscribe({ - stateContainer, - savedSearch, - setState, - })({ sort: [['field', 'test']] }); + await getSubscribeFn()({ sort: [['field', 'test']] }); expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); - expect(setState).toHaveBeenCalled(); }); it('should not execute setState function if initialFetchStatus is UNINITIALIZED', async () => { - const stateSubscribeFn = await buildStateSubscribe({ - stateContainer, - savedSearch, - setState, - }); - stateContainer.dataState.initialFetchStatus = FetchStatus.UNINITIALIZED; + const stateSubscribeFn = getSubscribeFn(); + stateContainer.dataState.getInitialFetchStatus = jest.fn(() => FetchStatus.UNINITIALIZED); await stateSubscribeFn({ index: dataViewComplexMock.id }); expect(stateContainer.dataState.reset).toHaveBeenCalled(); - expect(setState).not.toHaveBeenCalled(); }); it('should not execute setState twice if the identical data view change is propagated twice', async () => { - const stateSubscribeFn = await buildStateSubscribe({ - stateContainer, - savedSearch, - setState, - }); - await stateSubscribeFn({ index: dataViewComplexMock.id }); + await getSubscribeFn()({ index: dataViewComplexMock.id }); - expect(setState).toBeCalledTimes(0); expect(stateContainer.dataState.reset).toBeCalledTimes(1); stateContainer.appState.getPrevious = jest.fn(() => ({ index: dataViewComplexMock.id })); - await stateSubscribeFn({ index: dataViewComplexMock.id }); - expect(setState).toBeCalledTimes(0); + await getSubscribeFn()({ index: dataViewComplexMock.id }); expect(stateContainer.dataState.reset).toBeCalledTimes(1); }); }); diff --git a/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts index ebe8e22935382..1799e5146c803 100644 --- a/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts +++ b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts @@ -5,39 +5,51 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { isEqual } from 'lodash'; -import { DiscoverStateContainer } from '../../services/discover_state'; -import { DiscoverAppState, isEqualState } from '../../services/discover_app_state_container'; +import type { DiscoverInternalStateContainer } from '../../services/discover_internal_state_container'; +import type { DiscoverServices } from '../../../../build_services'; +import type { DiscoverSavedSearchContainer } from '../../services/discover_saved_search_container'; +import type { DiscoverDataStateContainer } from '../../services/discover_data_state_container'; +import type { DiscoverStateContainer } from '../../services/discover_state'; +import { + DiscoverAppState, + DiscoverAppStateContainer, + isEqualState, +} from '../../services/discover_app_state_container'; import { addLog } from '../../../../utils/add_log'; import { FetchStatus } from '../../../types'; +import { loadAndResolveDataView } from '../../utils/resolve_data_view'; /** * Builds a subscribe function for the AppStateContainer, that is executed when the AppState changes in URL * or programmatically. It's main purpose is to detect which changes should trigger a refetch of the data. * @param stateContainer - * @param savedSearch - * @param setState */ export const buildStateSubscribe = ({ - stateContainer, - savedSearch, - setState, + appState, + dataState, + internalState, + savedSearchState, + services, + setDataView, }: { - stateContainer: DiscoverStateContainer; - savedSearch: SavedSearch; - setState: (state: DiscoverAppState) => void; + appState: DiscoverAppStateContainer; + dataState: DiscoverDataStateContainer; + internalState: DiscoverInternalStateContainer; + savedSearchState: DiscoverSavedSearchContainer; + services: DiscoverServices; + setDataView: DiscoverStateContainer['actions']['setDataView']; }) => async (nextState: DiscoverAppState) => { - const prevState = stateContainer.appState.getPrevious(); + const prevState = appState.getPrevious(); + const savedSearch = savedSearchState.getState(); if (isEqualState(prevState, nextState)) { - addLog('[appstate] subscribe update ignored due to no changes'); + addLog('[appstate] subscribe update ignored due to no changes', { prevState, nextState }); return; } addLog('[appstate] subscribe triggered', nextState); - const { hideChart, interval, breakdownField, sort, index } = - stateContainer.appState.getPrevious(); + const { hideChart, interval, breakdownField, sort, index } = appState.getPrevious(); // Cast to boolean to avoid false positives when comparing // undefined and false, which would trigger a refetch const chartDisplayChanged = Boolean(nextState.hideChart) !== Boolean(hideChart); @@ -45,26 +57,29 @@ export const buildStateSubscribe = const breakdownFieldChanged = nextState.breakdownField !== breakdownField; const docTableSortChanged = !isEqual(nextState.sort, sort); const dataViewChanged = !isEqual(nextState.index, index); + let savedSearchDataView; // NOTE: this is also called when navigating from discover app to context app if (nextState.index && dataViewChanged) { - const { dataView: nextDataView, fallback } = - await stateContainer.actions.loadAndResolveDataView(nextState.index, savedSearch); + const { dataView: nextDataView, fallback } = await loadAndResolveDataView( + { id: nextState.index, savedSearch }, + { internalStateContainer: internalState, services } + ); // If the requested data view is not found, don't try to load it, // and instead reset the app state to the fallback data view if (fallback) { - stateContainer.appState.update({ index: nextDataView.id }, true); + appState.update({ index: nextDataView.id }, true); return; } savedSearch.searchSource.setField('index', nextDataView); - stateContainer.dataState.reset(); - stateContainer.actions.setDataView(nextDataView); + dataState.reset(savedSearch); + setDataView(nextDataView); + savedSearchDataView = nextDataView; } - if ( - dataViewChanged && - stateContainer.dataState.initialFetchStatus === FetchStatus.UNINITIALIZED - ) { + savedSearchState.update({ nextDataView: savedSearchDataView, nextState }); + + if (dataViewChanged && dataState.getInitialFetchStatus() === FetchStatus.UNINITIALIZED) { // stop execution if given data view has changed, and it's not configured to initially start a search in Discover return; } @@ -73,11 +88,10 @@ export const buildStateSubscribe = chartDisplayChanged || chartIntervalChanged || breakdownFieldChanged || - docTableSortChanged + docTableSortChanged || + dataViewChanged ) { addLog('[appstate] subscribe triggers data fetching'); - stateContainer.dataState.refetch$.next(undefined); + dataState.fetch(); } - - setState(nextState); }; diff --git a/src/plugins/discover/public/application/main/hooks/utils/change_data_view.test.ts b/src/plugins/discover/public/application/main/hooks/utils/change_data_view.test.ts index 04afdac829f97..37a503716af0e 100644 --- a/src/plugins/discover/public/application/main/hooks/utils/change_data_view.test.ts +++ b/src/plugins/discover/public/application/main/hooks/utils/change_data_view.test.ts @@ -8,32 +8,29 @@ import { changeDataView } from './change_data_view'; import { savedSearchMock } from '../../../../__mocks__/saved_search'; -import { createBrowserHistory } from 'history'; -import { getDiscoverStateContainer } from '../../services/discover_state'; import { discoverServiceMock } from '../../../../__mocks__/services'; import type { DataView } from '@kbn/data-views-plugin/common'; import { dataViewComplexMock } from '../../../../__mocks__/data_view_complex'; +import { getDiscoverStateMock } from '../../../../__mocks__/discover_state.mock'; const setupTestParams = (dataView: DataView | undefined) => { const savedSearch = savedSearchMock; const services = discoverServiceMock; - const history = createBrowserHistory(); - const discoverState = getDiscoverStateContainer({ + + const discoverState = getDiscoverStateMock({ savedSearch, - services: discoverServiceMock, - history, }); discoverState.internalState.transitions.setDataView(savedSearch.searchSource.getField('index')!); services.dataViews.get = jest.fn(() => Promise.resolve(dataView as DataView)); discoverState.appState.update = jest.fn(); - return { services, discoverState, setUrlTracking: jest.fn() }; + return { services, appState: discoverState.appState, internalState: discoverState.internalState }; }; describe('changeDataView', () => { it('should set the right app state when a valid data view to switch to is given', async () => { const params = setupTestParams(dataViewComplexMock as DataView); await changeDataView('data-view-with-various-field-types', params); - expect(params.discoverState.appState.update).toHaveBeenCalledWith({ + expect(params.appState.update).toHaveBeenCalledWith({ columns: ['default_column'], index: 'data-view-with-various-field-types-id', sort: [['data', 'desc']], @@ -43,6 +40,6 @@ describe('changeDataView', () => { it('should not set the app state when an invalid data view to switch to is given', async () => { const params = setupTestParams(undefined); await changeDataView('data-view-with-various-field-types', params); - expect(params.discoverState.appState.update).not.toHaveBeenCalled(); + expect(params.appState.update).not.toHaveBeenCalled(); }); }); diff --git a/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts b/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts index c53e0ec9da617..0912758b74663 100644 --- a/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts +++ b/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts @@ -8,39 +8,36 @@ import { SortOrder } from '@kbn/saved-search-plugin/public'; import { DataView } from '@kbn/data-views-plugin/common'; +import { DiscoverInternalStateContainer } from '../../services/discover_internal_state_container'; +import { DiscoverAppStateContainer } from '../../services/discover_app_state_container'; import { addLog } from '../../../../utils/add_log'; import { DiscoverServices } from '../../../../build_services'; -import { DiscoverStateContainer } from '../../services/discover_state'; import { getDataViewAppState } from '../../utils/get_switch_data_view_app_state'; import { MODIFY_COLUMNS_ON_SWITCH, SORT_DEFAULT_ORDER_SETTING } from '../../../../../common'; /** * Function executed when switching data view in the UI - * @param id - * @param services - * @param discoverState - * @param setUrlTracking */ export async function changeDataView( - id: string, + id: string | DataView, { services, - discoverState, - setUrlTracking, + internalState, + appState, }: { services: DiscoverServices; - discoverState: DiscoverStateContainer; - setUrlTracking: (dataView: DataView) => void; + internalState: DiscoverInternalStateContainer; + appState: DiscoverAppStateContainer; } ) { addLog('[ui] changeDataView', { id }); const { dataViews, uiSettings } = services; - const dataView = discoverState.internalState.getState().dataView; - const state = discoverState.appState.getState(); + const dataView = internalState.getState().dataView; + const state = appState.getState(); let nextDataView: DataView | null = null; try { - nextDataView = await dataViews.get(id, false); + nextDataView = typeof id === 'string' ? await dataViews.get(id, false) : id; } catch (e) { // } @@ -56,7 +53,9 @@ export async function changeDataView( state.query ); - setUrlTracking(nextDataView); - discoverState.appState.update(nextAppState); + appState.update(nextAppState); + if (internalState.getState().expandedDoc) { + internalState.transitions.setExpandedDoc(undefined); + } } } diff --git a/src/plugins/discover/public/application/main/services/discover_app_state_container.ts b/src/plugins/discover/public/application/main/services/discover_app_state_container.ts index eb552ea023f9b..ba189bec26a1b 100644 --- a/src/plugins/discover/public/application/main/services/discover_app_state_container.ts +++ b/src/plugins/discover/public/application/main/services/discover_app_state_container.ts @@ -21,11 +21,10 @@ import { } from '@kbn/es-query'; import { SavedSearch, VIEW_MODE } from '@kbn/saved-search-plugin/public'; import { IKbnUrlStateStorage, ISyncStateRef, syncState } from '@kbn/kibana-utils-plugin/public'; -import { cloneDeep, isEqual } from 'lodash'; +import { isEqual } from 'lodash'; import { connectToQueryState, syncGlobalQueryStateWithUrl } from '@kbn/data-plugin/public'; import { DiscoverServices } from '../../../build_services'; import { addLog } from '../../../utils/add_log'; -import { getValidFilters } from '../../../utils/get_valid_filters'; import { cleanupUrlState } from '../utils/cleanup_url_state'; import { getStateDefaults } from '../utils/get_state_defaults'; import { handleSourceColumnState } from '../../../utils/state_helpers'; @@ -33,6 +32,10 @@ import { DiscoverGridSettings } from '../../../components/discover_grid/types'; export const APP_STATE_URL_KEY = '_a'; export interface DiscoverAppStateContainer extends ReduxLikeStateContainer { + /** + * Returns if the current URL is empty + */ + isEmptyURL: () => boolean; /** * Returns the previous state, used for diffing e.g. if fetching new data is necessary */ @@ -52,11 +55,6 @@ export interface DiscoverAppStateContainer extends ReduxLikeStateContainer void; - /** - * Resets the state by the given saved search - * @param savedSearch - */ - resetWithSavedSearch: (savedSearch: SavedSearch) => void; /** * Resets the current state to the initial state */ @@ -180,7 +178,7 @@ export const getDiscoverAppStateContainer = ({ }; const startAppStateUrlSync = () => { - addLog('[appState] startAppStateUrlSync'); + addLog('[appState] start syncing state with URL'); return syncState({ storageKey: APP_STATE_URL_KEY, stateContainer: enhancedAppContainer, @@ -189,24 +187,17 @@ export const getDiscoverAppStateContainer = ({ }; const initializeAndSync = (currentSavedSearch: SavedSearch) => { - addLog('[appState] initializeAndSync', currentSavedSearch); - const dataView = currentSavedSearch.searchSource.getField('index')!; - if (appStateContainer.getState().index !== dataView.id) { + addLog('[appState] initialize state and sync with URL', currentSavedSearch); + const { data } = services; + const dataView = currentSavedSearch.searchSource.getField('index'); + + if (appStateContainer.getState().index !== dataView?.id) { // used data view is different from the given by url/state which is invalid - setState(appStateContainer, { index: dataView.id }); + setState(appStateContainer, { index: dataView?.id }); } - // sync initial app filters from state to filterManager - const filters = appStateContainer.getState().filters || []; - if (filters) { - services.filterManager.setAppFilters(cloneDeep(filters)); - } - const query = appStateContainer.getState().query; - if (query) { - services.data.query.queryString.setQuery(query); - } - + // syncs `_a` portion of url with query services const stopSyncingQueryAppStateWithStateContainer = connectToQueryState( - services.data.query, + data.query, appStateContainer, { filters: FilterStateStore.APP_STATE, @@ -216,23 +207,13 @@ export const getDiscoverAppStateContainer = ({ // syncs `_g` portion of url with query services const { stop: stopSyncingGlobalStateWithUrl } = syncGlobalQueryStateWithUrl( - services.data.query, + data.query, stateStorage ); - // some filters may not be valid for this context, so update - // the filter manager with a modified list of valid filters - const currentFilters = services.filterManager.getFilters(); - const validFilters = getValidFilters(dataView, currentFilters); - if (!isEqual(currentFilters, validFilters)) { - services.filterManager.setFilters(validFilters); - } - const { start, stop } = startAppStateUrlSync(); - - replaceUrlState({}).then(() => { - start(); - }); + // current state need to be pushed to url + replaceUrlState({}).then(() => start()); return () => { stopSyncingQueryAppStateWithStateContainer(); @@ -241,12 +222,6 @@ export const getDiscoverAppStateContainer = ({ }; }; - const resetWithSavedSearch = (nextSavedSearch: SavedSearch) => { - addLog('[appState] reset to saved search', { nextSavedSearch }); - const nextAppState = getInitialState(stateStorage, nextSavedSearch, services); - appStateContainer.set(nextAppState); - }; - const update = (newPartial: DiscoverAppState, replace = false) => { addLog('[appState] update', { newPartial, replace }); if (replace) { @@ -257,14 +232,19 @@ export const getDiscoverAppStateContainer = ({ } }; + const isEmptyURL = () => { + const urlValue = stateStorage.get(APP_STATE_URL_KEY); + return urlValue === undefined || urlValue === null; + }; + const getPrevious = () => previousState; return { ...enhancedAppContainer, + isEmptyURL, getPrevious, hasChanged, initAndSync: initializeAndSync, - resetWithSavedSearch, resetInitialState, replaceUrlState, syncState: startAppStateUrlSync, @@ -281,21 +261,23 @@ export interface AppStateUrl extends Omit { export const GLOBAL_STATE_URL_KEY = '_g'; -function getInitialState( - stateStorage: IKbnUrlStateStorage, +export function getInitialState( + stateStorage: IKbnUrlStateStorage | undefined, savedSearch: SavedSearch, services: DiscoverServices ) { - const appStateFromUrl = cleanupUrlState(stateStorage.get(APP_STATE_URL_KEY) as AppStateUrl); + const stateStorageURL = stateStorage?.get(APP_STATE_URL_KEY) as AppStateUrl; const defaultAppState = getStateDefaults({ savedSearch, services, }); return handleSourceColumnState( - { - ...defaultAppState, - ...appStateFromUrl, - }, + stateStorageURL === null + ? defaultAppState + : { + ...defaultAppState, + ...cleanupUrlState(stateStorageURL), + }, services.uiSettings ); } diff --git a/src/plugins/discover/public/application/main/services/discover_data_state_container.test.ts b/src/plugins/discover/public/application/main/services/discover_data_state_container.test.ts index fcdce1b76a1a0..ccb3f4d39a877 100644 --- a/src/plugins/discover/public/application/main/services/discover_data_state_container.test.ts +++ b/src/plugins/discover/public/application/main/services/discover_data_state_container.test.ts @@ -9,12 +9,10 @@ import { Subject } from 'rxjs'; import { waitFor } from '@testing-library/react'; import { discoverServiceMock } from '../../../__mocks__/services'; import { savedSearchMockWithSQL } from '../../../__mocks__/saved_search'; -import { getDiscoverStateContainer } from './discover_state'; import { FetchStatus } from '../../types'; import { setUrlTracker } from '../../../kibana_services'; import { urlTrackerMock } from '../../../__mocks__/url_tracker.mock'; import { RecordRawType } from './discover_data_state_container'; -import { createBrowserHistory } from 'history'; import { getDiscoverStateMock } from '../../../__mocks__/discover_state.mock'; setUrlTracker(urlTrackerMock); @@ -70,21 +68,19 @@ describe('test getDataStateContainer', () => { await waitFor(() => { expect(dataState.data$.main$.value.fetchStatus).toBe(FetchStatus.COMPLETE); }); - dataState.reset(); + dataState.reset(stateContainer.savedSearchState.getState()); await waitFor(() => { expect(dataState.data$.main$.value.fetchStatus).toBe(FetchStatus.LOADING); }); - unsubscribe(); }); test('useSavedSearch returns plain record raw type', async () => { - const history = createBrowserHistory(); - const stateContainer = getDiscoverStateContainer({ + const stateContainer = getDiscoverStateMock({ savedSearch: savedSearchMockWithSQL, - services: discoverServiceMock, - history, }); + stateContainer.savedSearchState.load = jest.fn().mockResolvedValue(savedSearchMockWithSQL); + await stateContainer.actions.loadSavedSearch({ savedSearchId: savedSearchMockWithSQL.id }); expect(stateContainer.dataState.data$.main$.getValue().recordRawType).toBe(RecordRawType.PLAIN); }); diff --git a/src/plugins/discover/public/application/main/services/discover_data_state_container.ts b/src/plugins/discover/public/application/main/services/discover_data_state_container.ts index 7bac15b6a5808..07e1f089bcd13 100644 --- a/src/plugins/discover/public/application/main/services/discover_data_state_container.ts +++ b/src/plugins/discover/public/application/main/services/discover_data_state_container.ts @@ -12,7 +12,6 @@ import { RequestAdapter } from '@kbn/inspector-plugin/common'; import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { AggregateQuery, Query } from '@kbn/es-query'; import type { SearchResponse } from '@elastic/elasticsearch/lib/api/types'; -import { ReduxLikeStateContainer } from '@kbn/kibana-utils-plugin/common'; import { getRawRecordType } from '../utils/get_raw_record_type'; import { DiscoverAppState } from './discover_app_state_container'; import { DiscoverServices } from '../../../build_services'; @@ -108,17 +107,17 @@ export interface DiscoverDataStateContainer { /** * resetting all data observable to initial state */ - reset: () => void; + reset: (savedSearch: SavedSearch) => void; /** * Available Inspector Adaptor allowing to get details about recent requests to ES */ - inspectorAdapters: { requests: RequestAdapter }; + inspectorAdapters: { requests: RequestAdapter; lensRequests?: RequestAdapter }; /** - * Initial fetch status + * Return the initial fetch status * UNINITIALIZED: data is not fetched initially, without user triggering it * LOADING: data is fetched initially (when Discover is rendered, or data views are switched) */ - initialFetchStatus: FetchStatus; + getInitialFetchStatus: () => FetchStatus; } /** * Container responsible for fetching of data in Discover Main @@ -130,13 +129,11 @@ export function getDataStateContainer({ searchSessionManager, getAppState, getSavedSearch, - appStateContainer, }: { services: DiscoverServices; searchSessionManager: DiscoverSearchSessionManager; getAppState: () => DiscoverAppState; getSavedSearch: () => SavedSearch; - appStateContainer: ReduxLikeStateContainer; }): DiscoverDataStateContainer { const { data, uiSettings, toastNotifications } = services; const { timefilter } = data.query.timefilter; @@ -149,20 +146,20 @@ export function getDataStateContainer({ * to be processed correctly */ const refetch$ = new Subject(); - const shouldSearchOnPageLoad = - uiSettings.get(SEARCH_ON_PAGE_LOAD_SETTING) || - getSavedSearch().id !== undefined || - !timefilter.getRefreshInterval().pause || - searchSessionManager.hasSearchSessionIdInURL(); - const initialFetchStatus = shouldSearchOnPageLoad - ? FetchStatus.LOADING - : FetchStatus.UNINITIALIZED; + const getInitialFetchStatus = () => { + const shouldSearchOnPageLoad = + uiSettings.get(SEARCH_ON_PAGE_LOAD_SETTING) || + getSavedSearch().id !== undefined || + !timefilter.getRefreshInterval().pause || + searchSessionManager.hasSearchSessionIdInURL(); + return shouldSearchOnPageLoad ? FetchStatus.LOADING : FetchStatus.UNINITIALIZED; + }; /** * The observables the UI (aka React component) subscribes to get notified about * the changes in the data fetching process (high level: fetching started, data was received) */ - const initialState = { fetchStatus: initialFetchStatus, recordRawType }; + const initialState = { fetchStatus: getInitialFetchStatus(), recordRawType }; const dataSubjects: SavedSearchData = { main$: new BehaviorSubject(initialState), documents$: new BehaviorSubject(initialState), @@ -202,14 +199,13 @@ export function getDataStateContainer({ abortController = new AbortController(); const prevAutoRefreshDone = autoRefreshDone; - await fetchAll(dataSubjects, getSavedSearch().searchSource, reset, { + await fetchAll(dataSubjects, reset, { abortController, - data, - initialFetchStatus, + initialFetchStatus: getInitialFetchStatus(), inspectorAdapters, searchSessionId, services, - appStateContainer, + getAppState, savedSearch: getSavedSearch(), useNewFieldsApi: !uiSettings.get(SEARCH_FIELDS_FROM_SOURCE), }); @@ -239,7 +235,10 @@ export function getDataStateContainer({ return refetch$; }; - const reset = () => sendResetMsg(dataSubjects, initialFetchStatus); + const reset = (savedSearch: SavedSearch) => { + const recordType = getRawRecordType(savedSearch.searchSource.getField('query')); + sendResetMsg(dataSubjects, getInitialFetchStatus(), recordType); + }; return { fetch: fetchQuery, @@ -249,6 +248,6 @@ export function getDataStateContainer({ subscribe, reset, inspectorAdapters, - initialFetchStatus, + getInitialFetchStatus, }; } diff --git a/src/plugins/discover/public/application/main/services/discover_saved_search_container.test.ts b/src/plugins/discover/public/application/main/services/discover_saved_search_container.test.ts new file mode 100644 index 0000000000000..fea276a4e1c86 --- /dev/null +++ b/src/plugins/discover/public/application/main/services/discover_saved_search_container.test.ts @@ -0,0 +1,254 @@ +/* + * 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 { SavedObjectSaveOpts } from '@kbn/saved-objects-plugin/public'; + +const mockSaveSavedSearch = jest.fn().mockResolvedValue('123'); +jest.mock('@kbn/saved-search-plugin/public', () => { + const actualPlugin = jest.requireActual('@kbn/saved-search-plugin/public'); + return { + ...actualPlugin, + saveSavedSearch: (val: SavedSearch, opts?: SavedObjectSaveOpts) => + mockSaveSavedSearch(val, opts), + }; +}); +import { getSavedSearchContainer, isEqualSavedSearch } from './discover_saved_search_container'; +import type { SavedSearch } from '@kbn/saved-search-plugin/public'; +import { discoverServiceMock } from '../../../__mocks__/services'; +import { savedSearchMock, savedSearchMockWithTimeField } from '../../../__mocks__/saved_search'; +import { dataViewMock } from '../../../__mocks__/data_view'; +import { dataViewComplexMock } from '../../../__mocks__/data_view_complex'; + +describe('DiscoverSavedSearchContainer', () => { + const savedSearch = savedSearchMock; + const services = discoverServiceMock; + + describe('getTitle', () => { + it('returns undefined for new saved searches', () => { + const container = getSavedSearchContainer({ services }); + expect(container.getTitle()).toBe(undefined); + }); + + it('returns the title of a persisted saved searches', () => { + const container = getSavedSearchContainer({ services }); + container.set(savedSearch); + expect(container.getTitle()).toBe(savedSearch.title); + }); + }); + + describe('set', () => { + it('should update the current and initial state of the saved search', () => { + const container = getSavedSearchContainer({ services }); + const newSavedSearch: SavedSearch = { ...savedSearch, title: 'New title' }; + const result = container.set(newSavedSearch); + + expect(result).toBe(newSavedSearch); + expect(container.getState()).toBe(newSavedSearch); + const initialSavedSearch = container.getInitial$().getValue(); + const currentSavedSearch = container.getCurrent$().getValue(); + + expect(isEqualSavedSearch(initialSavedSearch, currentSavedSearch)).toBeTruthy(); + }); + + it('should reset hasChanged$ to false', () => { + const container = getSavedSearchContainer({ services }); + const newSavedSearch: SavedSearch = { ...savedSearch, title: 'New title' }; + + container.set(newSavedSearch); + expect(container.getHasChanged$().getValue()).toBe(false); + }); + }); + + describe('new', () => { + it('should create a new saved search', async () => { + const container = getSavedSearchContainer({ services }); + const result = await container.new(dataViewMock); + + expect(result.title).toBeUndefined(); + expect(result.id).toBeUndefined(); + const savedSearchState = container.getState(); + expect(savedSearchState.id).not.toEqual(savedSearch.id); + expect(savedSearchState.searchSource.getField('index')).toEqual( + savedSearch.searchSource.getField('index') + ); + }); + + it('should create a new saved search with provided DataView', async () => { + const container = getSavedSearchContainer({ services }); + const result = await container.new(dataViewMock); + expect(result.title).toBeUndefined(); + expect(result.id).toBeUndefined(); + expect(result.searchSource.getField('index')).toBe(dataViewMock); + expect(container.getHasChanged$().getValue()).toBe(false); + }); + }); + + describe('load', () => { + discoverServiceMock.data.search.searchSource.create = jest + .fn() + .mockReturnValue(savedSearchMock.searchSource); + discoverServiceMock.core.savedObjects.client.resolve = jest.fn().mockReturnValue({ + saved_object: { + attributes: { + kibanaSavedObjectMeta: { + searchSourceJSON: + '{"query":{"query":"","language":"kuery"},"filter":[],"indexRefName":"kibanaSavedObjectMeta.searchSourceJSON.index"}', + }, + title: 'The saved search that will save the world', + sort: [], + columns: ['test123'], + description: 'description', + hideChart: false, + }, + id: 'the-saved-search-id', + type: 'search', + references: [ + { + name: 'kibanaSavedObjectMeta.searchSourceJSON.index', + id: 'the-data-view-id', + type: 'index-pattern', + }, + ], + namespaces: ['default'], + }, + outcome: 'exactMatch', + }); + + it('loads a saved search', async () => { + const savedSearchContainer = getSavedSearchContainer({ + services: discoverServiceMock, + }); + await savedSearchContainer.load('the-saved-search-id'); + expect(savedSearchContainer.getInitial$().getValue().id).toEqual('the-saved-search-id'); + expect(savedSearchContainer.getCurrent$().getValue().id).toEqual('the-saved-search-id'); + expect(savedSearchContainer.getHasChanged$().getValue()).toEqual(false); + }); + }); + + describe('persist', () => { + const saveOptions = { confirmOverwrite: false }; + + it('calls saveSavedSearch with the given saved search and save options', async () => { + const savedSearchContainer = getSavedSearchContainer({ + services: discoverServiceMock, + }); + const savedSearchToPersist = { + ...savedSearchMockWithTimeField, + title: 'My updated saved search', + }; + + await savedSearchContainer.persist(savedSearchToPersist, saveOptions); + expect(mockSaveSavedSearch).toHaveBeenCalledWith(savedSearchToPersist, saveOptions); + }); + + it('sets the initial and current saved search to the persisted saved search', async () => { + const title = 'My updated saved search'; + const persistedSavedSearch = { + ...savedSearch, + title, + }; + const savedSearchContainer = getSavedSearchContainer({ + services: discoverServiceMock, + }); + + const result = await savedSearchContainer.persist(persistedSavedSearch, saveOptions); + expect(savedSearchContainer.getInitial$().getValue().title).toBe(title); + expect(savedSearchContainer.getCurrent$().getValue().title).toBe(title); + expect(result).toEqual({ id: '123' }); + }); + + it('emits false to the hasChanged$ BehaviorSubject', async () => { + const savedSearchContainer = getSavedSearchContainer({ + services: discoverServiceMock, + }); + const savedSearchToPersist = { + ...savedSearchMockWithTimeField, + title: 'My updated saved search', + }; + + await savedSearchContainer.persist(savedSearchToPersist, saveOptions); + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(false); + }); + + it('takes care of persisting timeRestore correctly ', async () => { + discoverServiceMock.timefilter.getTime = jest.fn(() => ({ from: 'now-15m', to: 'now' })); + discoverServiceMock.timefilter.getRefreshInterval = jest.fn(() => ({ + value: 0, + pause: true, + })); + const savedSearchContainer = getSavedSearchContainer({ + services: discoverServiceMock, + }); + const savedSearchToPersist = { + ...savedSearchMockWithTimeField, + title: 'My updated saved search', + timeRestore: true, + }; + await savedSearchContainer.persist(savedSearchToPersist, saveOptions); + expect(discoverServiceMock.timefilter.getTime).toHaveBeenCalled(); + expect(discoverServiceMock.timefilter.getRefreshInterval).toHaveBeenCalled(); + expect(savedSearchToPersist.timeRange).toEqual({ from: 'now-15m', to: 'now' }); + expect(savedSearchToPersist.refreshInterval).toEqual({ + value: 0, + pause: true, + }); + }); + + it('Error thrown on persistence layer bubbling up, no changes to the initial saved search ', async () => { + mockSaveSavedSearch.mockImplementation(() => { + throw new Error('oh-noes'); + }); + + const savedSearchContainer = getSavedSearchContainer({ + services: discoverServiceMock, + }); + savedSearchContainer.set(savedSearch); + savedSearchContainer.update({ nextState: { hideChart: true } }); + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(true); + try { + await savedSearchContainer.persist(savedSearch, saveOptions); + } catch (e) { + // intentional error + } + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(true); + expect(savedSearchContainer.getInitial$().getValue().title).not.toBe( + 'My updated saved search' + ); + }); + }); + + describe('update', () => { + it('updates a saved search by app state providing hideChart', async () => { + const savedSearchContainer = getSavedSearchContainer({ + services: discoverServiceMock, + }); + savedSearchContainer.set(savedSearch); + const updated = await savedSearchContainer.update({ nextState: { hideChart: true } }); + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(true); + savedSearchContainer.set(updated); + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(false); + await savedSearchContainer.update({ nextState: { hideChart: false } }); + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(true); + await savedSearchContainer.update({ nextState: { hideChart: true } }); + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(false); + }); + it('updates a saved search by data view', async () => { + const savedSearchContainer = getSavedSearchContainer({ + services: discoverServiceMock, + }); + const updated = await savedSearchContainer.update({ nextDataView: dataViewMock }); + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(true); + savedSearchContainer.set(updated); + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(false); + await savedSearchContainer.update({ nextDataView: dataViewComplexMock }); + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(true); + await savedSearchContainer.update({ nextDataView: dataViewMock }); + expect(savedSearchContainer.getHasChanged$().getValue()).toBe(false); + }); + }); +}); diff --git a/src/plugins/discover/public/application/main/services/discover_saved_search_container.ts b/src/plugins/discover/public/application/main/services/discover_saved_search_container.ts new file mode 100644 index 0000000000000..21bb8f626605c --- /dev/null +++ b/src/plugins/discover/public/application/main/services/discover_saved_search_container.ts @@ -0,0 +1,268 @@ +/* + * 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 { + getNewSavedSearch, + getSavedSearch, + SavedSearch, + saveSavedSearch, +} from '@kbn/saved-search-plugin/public'; +import { BehaviorSubject } from 'rxjs'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import { SavedObjectSaveOpts } from '@kbn/saved-objects-plugin/public'; +import { isEqual } from 'lodash'; +import { restoreStateFromSavedSearch } from '../../../services/saved_searches/restore_from_saved_search'; +import { updateSavedSearch } from '../utils/update_saved_search'; +import { addLog } from '../../../utils/add_log'; +import { handleSourceColumnState } from '../../../utils/state_helpers'; +import { DiscoverAppState } from './discover_app_state_container'; +import { DiscoverServices } from '../../../build_services'; +import { getStateDefaults } from '../utils/get_state_defaults'; + +export interface UpdateParams { + /** + * The next data view to be used + */ + nextDataView?: DataView | undefined; + /** + * The next AppState that should be used for updating the saved search + */ + nextState?: DiscoverAppState | undefined; + /** + * use filter and query services to update the saved search + */ + useFilterAndQueryServices?: boolean; +} + +/** + * Container for the saved search state, allowing to load, update and persist the saved search + * Can also be used to track changes to the saved search + * It centralizes functionality that was spread across the Discover main codebase + * There are 2 hooks to access the state of the saved search in React components: + * - useSavedSearch for the current state, that's updated on every relevant state change + * - useSavedSearchInitial for the persisted or initial state, just updated when the saved search is peristed or loaded + */ +export interface DiscoverSavedSearchContainer { + /** + * Get an BehaviorSubject which contains the current state of the current saved search + * All modifications are applied to this state + */ + getCurrent$: () => BehaviorSubject; + /** + * Get the id of the current saved search + */ + getId: () => string | undefined; + /** + * Get an BehaviorSubject which contains the initial state of the current saved search + * This is set when a saved search is loaded or a new saved search is initialized + */ + getInitial$: () => BehaviorSubject; + /** + * Get the title of the current saved search + */ + getTitle: () => string | undefined; + /** + * Get an BehaviorSubject containing the state if there have been changes to the initial state of the saved search + * Can be used to track if the saved search has been modified and displayed in the UI + */ + getHasChanged$: () => BehaviorSubject; + /** + * Get the current state of the saved search + */ + getState: () => SavedSearch; + /** + * Load a saved search by the given id + * Resets the initial and current state of the saved search + * @param id + * @param dataView + */ + load: (id: string, dataView?: DataView) => Promise; + /** + * Initialize a new saved search + * Resets the initial and current state of the saved search + * @param dataView + */ + new: (dataView?: DataView) => Promise; + /** + * Persist the given saved search + * Resets the initial and current state of the saved search + */ + persist: ( + savedSearch: SavedSearch, + saveOptions?: SavedObjectSaveOpts + ) => Promise<{ id: string | undefined } | undefined>; + /** + * Set the persisted & current state of the saved search + * Happens when a saved search is loaded or a new one is created + * @param savedSearch + */ + set: (savedSearch: SavedSearch) => SavedSearch; + /** + * Updates the current state of the saved search + * @param params + */ + update: (params: UpdateParams) => SavedSearch; +} + +export function getSavedSearchContainer({ + services, +}: { + services: DiscoverServices; +}): DiscoverSavedSearchContainer { + const initialSavedSearch = getNewSavedSearch(services.data); + const savedSearchInitial$ = new BehaviorSubject(initialSavedSearch); + const savedSearchCurrent$ = new BehaviorSubject(copySavedSearch(initialSavedSearch)); + const hasChanged$ = new BehaviorSubject(false); + const set = (savedSearch: SavedSearch) => { + addLog('[savedSearch] set', savedSearch); + hasChanged$.next(false); + savedSearchCurrent$.next(savedSearch); + savedSearchInitial$.next(copySavedSearch(savedSearch)); + return savedSearch; + }; + const getState = () => savedSearchCurrent$.getValue(); + const getInitial$ = () => savedSearchInitial$; + const getCurrent$ = () => savedSearchCurrent$; + const getHasChanged$ = () => hasChanged$; + const getTitle = () => savedSearchCurrent$.getValue().title; + const getId = () => savedSearchCurrent$.getValue().id; + + const newSavedSearch = async (nextDataView: DataView | undefined) => { + addLog('[savedSearch] new', { nextDataView }); + const dataView = nextDataView ?? getState().searchSource.getField('index'); + const nextSavedSearch = await getNewSavedSearch(services.data); + nextSavedSearch.searchSource.setField('index', dataView); + const newAppState = getDefaultAppState(nextSavedSearch, services); + const nextSavedSearchToSet = updateSavedSearch({ + savedSearch: { ...nextSavedSearch }, + dataView, + state: newAppState, + services, + }); + return set(nextSavedSearchToSet); + }; + + const persist = async (nextSavedSearch: SavedSearch, saveOptions?: SavedObjectSaveOpts) => { + addLog('[savedSearch] persist', { nextSavedSearch, saveOptions }); + updateSavedSearch({ savedSearch: nextSavedSearch, services }, true); + + const id = await saveSavedSearch( + nextSavedSearch, + saveOptions || {}, + services.core.savedObjects.client, + services.savedObjectsTagging + ); + + if (id) { + set(nextSavedSearch); + } + return { id }; + }; + const update = ({ nextDataView, nextState, useFilterAndQueryServices }: UpdateParams) => { + addLog('[savedSearch] update', { nextDataView, nextState }); + + const previousSavedSearch = getState(); + const dataView = nextDataView + ? nextDataView + : previousSavedSearch.searchSource.getField('index')!; + + const nextSavedSearch = updateSavedSearch( + { + savedSearch: { ...previousSavedSearch }, + dataView, + state: nextState || {}, + services, + }, + useFilterAndQueryServices + ); + + const hasChanged = !isEqualSavedSearch(savedSearchInitial$.getValue(), nextSavedSearch); + hasChanged$.next(hasChanged); + savedSearchCurrent$.next(nextSavedSearch); + + addLog('[savedSearch] update done', nextSavedSearch); + return nextSavedSearch; + }; + + const load = async (id: string, dataView: DataView | undefined): Promise => { + addLog('[savedSearch] load', { id, dataView }); + const loadedSavedSearch = await getSavedSearch(id, { + search: services.data.search, + savedObjectsClient: services.core.savedObjects.client, + spaces: services.spaces, + savedObjectsTagging: services.savedObjectsTagging, + }); + if (!loadedSavedSearch.searchSource.getField('index') && dataView) { + loadedSavedSearch.searchSource.setField('index', dataView); + } + restoreStateFromSavedSearch({ + savedSearch: loadedSavedSearch, + timefilter: services.timefilter, + }); + return set(loadedSavedSearch); + }; + + return { + getCurrent$, + getHasChanged$, + getId, + getInitial$, + getState, + getTitle, + load, + new: newSavedSearch, + persist, + set, + update, + }; +} + +/** + * Copies a saved search object, due to the stateful nature of searchSource it has to be copied with a dedicated function + * @param savedSearch + */ +export function copySavedSearch(savedSearch: SavedSearch): SavedSearch { + return { + ...savedSearch, + ...{ searchSource: savedSearch.searchSource.createCopy() }, + }; +} + +export function getDefaultAppState(savedSearch: SavedSearch, services: DiscoverServices) { + return handleSourceColumnState( + getStateDefaults({ + savedSearch, + services, + }), + services.uiSettings + ); +} + +export function isEqualSavedSearch(savedSearchPrev: SavedSearch, savedSearchNext: SavedSearch) { + const { searchSource: prevSearchSource, ...prevSavedSearch } = savedSearchPrev; + const { searchSource: nextSearchSource, ...nextSavedSearchWithoutSearchSource } = savedSearchNext; + + const keys = new Set([ + ...Object.keys(prevSavedSearch), + ...Object.keys(nextSavedSearchWithoutSearchSource), + ]); + const savedSearchDiff = [...keys].filter((key: string) => { + // @ts-expect-error + return !isEqual(prevSavedSearch[key], nextSavedSearchWithoutSearchSource[key]); + }); + + const searchSourceDiff = + !isEqual(prevSearchSource.getField('filter'), nextSearchSource.getField('filter')) || + !isEqual(prevSearchSource.getField('query'), nextSearchSource.getField('query')) || + !isEqual(prevSearchSource.getField('index'), nextSearchSource.getField('index')); + const hasChanged = Boolean(savedSearchDiff.length || searchSourceDiff); + if (hasChanged) { + addLog('[savedSearch] difference between initial and changed version', searchSourceDiff); + } + return !hasChanged; +} diff --git a/src/plugins/discover/public/application/main/services/discover_search_session.ts b/src/plugins/discover/public/application/main/services/discover_search_session.ts index 0cbaf74159a80..c6c64ed89c10a 100644 --- a/src/plugins/discover/public/application/main/services/discover_search_session.ts +++ b/src/plugins/discover/public/application/main/services/discover_search_session.ts @@ -67,7 +67,6 @@ export class DiscoverSearchSessionManager { this.deps.session.restore(searchSessionIdFromURL); } } - return searchSessionIdFromURL ?? this.deps.session.start(); } diff --git a/src/plugins/discover/public/application/main/services/discover_state.test.ts b/src/plugins/discover/public/application/main/services/discover_state.test.ts index c2efd78b24c8f..4b84e613f4664 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.test.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.test.ts @@ -14,32 +14,69 @@ import { import { createBrowserHistory, History } from 'history'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import type { SavedSearch, SortOrder } from '@kbn/saved-search-plugin/public'; -import { savedSearchMock, savedSearchMockWithTimeField } from '../../../__mocks__/saved_search'; +import { + savedSearchAdHoc, + savedSearchMock, + savedSearchMockWithTimeField, + savedSearchMockWithTimeFieldNew, +} from '../../../__mocks__/saved_search'; import { discoverServiceMock } from '../../../__mocks__/services'; import { dataViewMock } from '../../../__mocks__/data_view'; -import { dataViewComplexMock } from '../../../__mocks__/data_view_complex'; import { DiscoverAppStateContainer } from './discover_app_state_container'; +import { waitFor } from '@testing-library/react'; +import { FetchStatus } from '../../types'; +import { dataViewAdHoc, dataViewComplexMock } from '../../../__mocks__/data_view_complex'; +import { copySavedSearch } from './discover_saved_search_container'; -let history: History; -let state: DiscoverStateContainer; -const getCurrentUrl = () => history.createHref(history.location); const startSync = (appState: DiscoverAppStateContainer) => { const { start, stop } = appState.syncState(); start(); return stop; }; +async function getState(url: string, savedSearch?: SavedSearch) { + const nextHistory = createBrowserHistory(); + nextHistory.push(url); + const nextState = getDiscoverStateContainer({ + services: discoverServiceMock, + history: nextHistory, + }); + jest.spyOn(nextState.dataState, 'fetch'); + await nextState.actions.loadDataViewList(); + if (savedSearch) { + nextState.savedSearchState.load = jest.fn(() => { + nextState.savedSearchState.set(copySavedSearch(savedSearch)); + return Promise.resolve(savedSearch); + }); + } else { + nextState.savedSearchState.load = jest.fn(() => { + nextState.savedSearchState.set(copySavedSearch(savedSearchMockWithTimeFieldNew)); + return Promise.resolve(savedSearchMockWithTimeFieldNew); + }); + } + + const getCurrentUrl = () => nextHistory.createHref(nextHistory.location); + return { + history: nextHistory, + state: nextState, + getCurrentUrl, + }; +} + describe('Test discover state', () => { let stopSync = () => {}; + let history: History; + let state: DiscoverStateContainer; + const getCurrentUrl = () => history.createHref(history.location); beforeEach(async () => { history = createBrowserHistory(); history.push('/'); state = getDiscoverStateContainer({ - savedSearch: savedSearchMock, services: discoverServiceMock, history, }); + state.savedSearchState.set(savedSearchMock); await state.appState.update({}, true); stopSync = startSync(state.appState); }); @@ -88,65 +125,38 @@ describe('Test discover state', () => { test('pauseAutoRefreshInterval sets refreshInterval.pause to true', async () => { history.push('/#?_g=(refreshInterval:(pause:!f,value:5000))'); expect(getCurrentUrl()).toBe('/#?_g=(refreshInterval:(pause:!f,value:5000))'); - await state.actions.pauseAutoRefreshInterval(); + await state.actions.setDataView(dataViewMock); expect(getCurrentUrl()).toBe('/#?_g=(refreshInterval:(pause:!t,value:5000))'); }); }); describe('Test discover initial state sort handling', () => { test('Non-empty sort in URL should not be overwritten by saved search sort', async () => { - history = createBrowserHistory(); - history.push('/#?_a=(sort:!(!(order_date,desc)))'); + const savedSearch = { + ...savedSearchMockWithTimeField, + ...{ sort: [['bytes', 'desc']] }, + } as SavedSearch; - state = getDiscoverStateContainer({ - savedSearch: { ...savedSearchMock, ...{ sort: [['bytes', 'desc']] } }, - services: discoverServiceMock, - history, - }); - await state.appState.update({}, true); - const stopSync = startSync(state.appState); - expect(state.appState.getState().sort).toEqual([['order_date', 'desc']]); - stopSync(); + const { state } = await getState('/#?_a=(sort:!(!(timestamp,desc)))', savedSearch); + const unsubscribe = state.actions.initializeAndSync(); + expect(state.appState.getState().sort).toEqual([['timestamp', 'desc']]); + unsubscribe(); }); - test('Empty sort in URL should use saved search sort for state', async () => { - history = createBrowserHistory(); - history.push('/#?_a=(sort:!())'); + test('Empty URL should use saved search sort for state', async () => { const nextSavedSearch = { ...savedSearchMock, ...{ sort: [['bytes', 'desc']] as SortOrder[] } }; - state = getDiscoverStateContainer({ - savedSearch: nextSavedSearch, - services: discoverServiceMock, - history, - }); - await state.appState.update({}, true); - const stopSync = startSync(state.appState); + const { state } = await getState('/', nextSavedSearch); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + const unsubscribe = state.actions.initializeAndSync(); expect(state.appState.getState().sort).toEqual([['bytes', 'desc']]); - stopSync(); - }); - test('Empty sort in URL and saved search should sort by timestamp', async () => { - history = createBrowserHistory(); - history.push('/#?_a=(sort:!())'); - state = getDiscoverStateContainer({ - savedSearch: savedSearchMockWithTimeField, - services: discoverServiceMock, - history, - }); - await state.appState.update({}, true); - const stopSync = startSync(state.appState); - expect(state.appState.getState().sort).toEqual([['timestamp', 'desc']]); - stopSync(); + unsubscribe(); }); }); describe('Test discover state with legacy migration', () => { test('migration of legacy query ', async () => { - history = createBrowserHistory(); - history.push( - "/#?_a=(query:(query_string:(analyze_wildcard:!t,query:'type:nice%20name:%22yeah%22')))" + const { state } = await getState( + "/#?_a=(query:(query_string:(analyze_wildcard:!t,query:'type:nice%20name:%22yeah%22')))", + savedSearchMockWithTimeFieldNew ); - state = getDiscoverStateContainer({ - savedSearch: savedSearchMock, - services: discoverServiceMock, - history, - }); expect(state.appState.getState().query).toMatchInlineSnapshot(` Object { "language": "lucene", @@ -163,7 +173,7 @@ describe('Test discover state with legacy migration', () => { describe('createSearchSessionRestorationDataProvider', () => { let mockSavedSearch: SavedSearch = {} as unknown as SavedSearch; - history = createBrowserHistory(); + const history = createBrowserHistory(); const mockDataPlugin = dataPluginMock.createStartContract(); const searchSessionInfoProvider = createSearchSessionRestorationDataProvider({ data: mockDataPlugin, @@ -225,35 +235,454 @@ describe('createSearchSessionRestorationDataProvider', () => { }); }); }); +}); - describe('actions', () => { - beforeEach(async () => { - history = createBrowserHistory(); - state = getDiscoverStateContainer({ - services: discoverServiceMock, - history, - savedSearch: savedSearchMock, - }); +describe('actions', () => { + beforeEach(async () => { + discoverServiceMock.data.query.timefilter.timefilter.getTime = jest.fn(() => { + return { from: 'now-15d', to: 'now' }; + }); + discoverServiceMock.data.search.searchSource.create = jest + .fn() + .mockReturnValue(savedSearchMock.searchSource); + discoverServiceMock.core.savedObjects.client.resolve = jest.fn().mockReturnValue({ + saved_object: { + attributes: { + kibanaSavedObjectMeta: { + searchSourceJSON: + '{"query":{"query":"","language":"kuery"},"filter":[],"indexRefName":"kibanaSavedObjectMeta.searchSourceJSON.index"}', + }, + title: 'The saved search that will save the world', + sort: [], + columns: ['test123'], + description: 'description', + hideChart: false, + }, + id: 'the-saved-search-id', + type: 'search', + references: [ + { + name: 'kibanaSavedObjectMeta.searchSourceJSON.index', + id: 'the-data-view-id', + type: 'index-pattern', + }, + ], + namespaces: ['default'], + }, + outcome: 'exactMatch', }); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); - test('setDataView', async () => { - state.actions.setDataView(dataViewMock); - expect(state.internalState.getState().dataView).toBe(dataViewMock); + test('setDataView', async () => { + const { state } = await getState(''); + state.actions.setDataView(dataViewMock); + expect(state.internalState.getState().dataView).toBe(dataViewMock); + }); + + test('fetchData', async () => { + const { state } = await getState('/'); + const dataState = state.dataState; + await state.actions.loadDataViewList(); + expect(dataState.data$.main$.value.fetchStatus).toBe(FetchStatus.LOADING); + await state.actions.loadSavedSearch(); + const unsubscribe = state.actions.initializeAndSync(); + state.actions.fetchData(); + await waitFor(() => { + expect(dataState.data$.documents$.value.fetchStatus).toBe(FetchStatus.COMPLETE); }); + unsubscribe(); - test('appendAdHocDataViews', async () => { - state.actions.appendAdHocDataViews(dataViewMock); - expect(state.internalState.getState().adHocDataViews).toEqual([dataViewMock]); + expect(dataState.data$.totalHits$.value.result).toBe(0); + expect(dataState.data$.documents$.value.result).toEqual([]); + }); + test('loadDataViewList', async () => { + const { state } = await getState(''); + expect(state.internalState.getState().savedDataViews.length).toBe(3); + }); + test('loadSavedSearch with no id given an empty URL', async () => { + const { state, getCurrentUrl } = await getState(''); + await state.actions.loadDataViewList(); + const newSavedSearch = await state.actions.loadSavedSearch(); + expect(newSavedSearch?.id).toBeUndefined(); + const unsubscribe = state.actions.initializeAndSync(); + state.kbnUrlStateStorage.kbnUrlControls.flush(); + expect(getCurrentUrl()).toMatchInlineSnapshot( + `"/#?_g=(refreshInterval:(pause:!t,value:1000),time:(from:now-15d,to:now))&_a=(columns:!(default_column),index:the-data-view-id,interval:auto,sort:!())"` + ); + expect(state.savedSearchState.getHasChanged$().getValue()).toBe(false); + const { searchSource, ...savedSearch } = state.savedSearchState.getState(); + expect(savedSearch).toMatchInlineSnapshot(` + Object { + "columns": Array [ + "default_column", + ], + "refreshInterval": undefined, + "sort": Array [], + "timeRange": undefined, + "usesAdHocDataView": false, + } + `); + expect(searchSource.getField('index')?.id).toEqual('the-data-view-id'); + unsubscribe(); + }); + + test('loadNewSavedSearch given an empty URL using loadSavedSearch', async () => { + const { state, getCurrentUrl } = await getState('/'); + + const newSavedSearch = await state.actions.loadSavedSearch(); + expect(newSavedSearch?.id).toBeUndefined(); + const unsubscribe = state.actions.initializeAndSync(); + state.kbnUrlStateStorage.kbnUrlControls.flush(); + expect(getCurrentUrl()).toMatchInlineSnapshot( + `"/#?_g=(refreshInterval:(pause:!t,value:1000),time:(from:now-15d,to:now))&_a=(columns:!(default_column),index:the-data-view-id,interval:auto,sort:!())"` + ); + expect(state.savedSearchState.getHasChanged$().getValue()).toBe(false); + unsubscribe(); + }); + test('loadNewSavedSearch with URL changing interval state', async () => { + const { state, getCurrentUrl } = await getState( + '/#?_a=(interval:month,columns:!(bytes))&_g=()' + ); + const newSavedSearch = await state.actions.loadSavedSearch({ useAppState: true }); + expect(newSavedSearch?.id).toBeUndefined(); + const unsubscribe = state.actions.initializeAndSync(); + state.kbnUrlStateStorage.kbnUrlControls.flush(); + expect(getCurrentUrl()).toMatchInlineSnapshot( + `"/#?_a=(columns:!(bytes),index:the-data-view-id,interval:month,sort:!())&_g=()"` + ); + expect(state.savedSearchState.getHasChanged$().getValue()).toBe(true); + unsubscribe(); + }); + test('loadSavedSearch with no id, given URL changes state', async () => { + const { state, getCurrentUrl } = await getState( + '/#?_a=(interval:month,columns:!(bytes))&_g=()' + ); + const newSavedSearch = await state.actions.loadSavedSearch({ useAppState: true }); + expect(newSavedSearch?.id).toBeUndefined(); + const unsubscribe = state.actions.initializeAndSync(); + state.kbnUrlStateStorage.kbnUrlControls.flush(); + expect(getCurrentUrl()).toMatchInlineSnapshot( + `"/#?_a=(columns:!(bytes),index:the-data-view-id,interval:month,sort:!())&_g=()"` + ); + expect(state.savedSearchState.getHasChanged$().getValue()).toBe(true); + unsubscribe(); + }); + test('loadSavedSearch given an empty URL, no state changes', async () => { + const { state, getCurrentUrl } = await getState('/', savedSearchMock); + const newSavedSearch = await state.actions.loadSavedSearch({ + savedSearchId: 'the-saved-search-id', }); - test('removeAdHocDataViewById', async () => { - state.actions.appendAdHocDataViews(dataViewMock); - state.actions.removeAdHocDataViewById(dataViewMock.id!); - expect(state.internalState.getState().adHocDataViews).toEqual([]); + const unsubscribe = state.actions.initializeAndSync(); + state.kbnUrlStateStorage.kbnUrlControls.flush(); + expect(newSavedSearch?.id).toBe('the-saved-search-id'); + expect(getCurrentUrl()).toMatchInlineSnapshot( + `"/#?_g=(refreshInterval:(pause:!t,value:1000),time:(from:now-15d,to:now))&_a=(columns:!(default_column),index:the-data-view-id,interval:auto,sort:!())"` + ); + expect(state.savedSearchState.getHasChanged$().getValue()).toBe(false); + unsubscribe(); + }); + test('loadSavedSearch given a URL with different interval and columns modifying the state', async () => { + const url = '/#?_a=(interval:month,columns:!(message))&_g=()'; + const { state, getCurrentUrl } = await getState(url, savedSearchMock); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id, useAppState: true }); + const unsubscribe = state.actions.initializeAndSync(); + state.kbnUrlStateStorage.kbnUrlControls.flush(); + expect(getCurrentUrl()).toMatchInlineSnapshot( + `"/#?_a=(columns:!(message),index:the-data-view-id,interval:month,sort:!())&_g=()"` + ); + expect(state.savedSearchState.getHasChanged$().getValue()).toBe(true); + unsubscribe(); + }); + + test('loadSavedSearch ignoring hideChart in URL', async () => { + const url = '/#?_a=(hideChart:true,columns:!(message))&_g=()'; + const { state } = await getState(url, savedSearchMock); + await state.actions.loadSavedSearch(); + expect(state.savedSearchState.getState().hideChart).toBe(undefined); + expect(state.appState.getState().hideChart).toBe(undefined); + }); + + test('loadSavedSearch without id ignoring invalid index in URL, adding a warning toast', async () => { + const url = '/#?_a=(index:abc)&_g=()'; + const { state } = await getState(url, savedSearchMock); + await state.actions.loadSavedSearch({ useAppState: true }); + expect(state.savedSearchState.getState().searchSource.getField('index')?.id).toBe( + 'the-data-view-id' + ); + expect(discoverServiceMock.toastNotifications.addWarning).toHaveBeenCalledWith( + expect.objectContaining({ + 'data-test-subj': 'dscDataViewNotFoundShowDefaultWarning', + }) + ); + }); + + test('loadSavedSearch without id containing sql, adding no warning toast with an invalid index', async () => { + const url = "/#?_a=(index:abcde,query:(sql:'Select * from test'))&_g=()"; + const { state } = await getState(url, savedSearchMock); + await state.actions.loadSavedSearch({ useAppState: true }); + expect(discoverServiceMock.toastNotifications.addWarning).not.toHaveBeenCalled(); + }); + + test('loadSavedSearch with id ignoring invalid index in URL, adding a warning toast', async () => { + const url = '/#?_a=(index:abc)&_g=()'; + const { state } = await getState(url, savedSearchMock); + await state.actions.loadSavedSearch({ useAppState: true, savedSearchId: savedSearchMock.id }); + expect(state.savedSearchState.getState().searchSource.getField('index')?.id).toBe( + 'the-data-view-id' + ); + expect(discoverServiceMock.toastNotifications.addWarning).toHaveBeenCalledWith( + expect.objectContaining({ + 'data-test-subj': 'dscDataViewNotFoundShowSavedWarning', + }) + ); + }); + + test('loadSavedSearch data view handling', async () => { + const { state } = await getState('/', savedSearchMock); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + expect(state.savedSearchState.getState().searchSource.getField('index')?.id).toBe( + 'the-data-view-id' + ); + expect(state.savedSearchState.getHasChanged$().getValue()).toBe(false); + + state.savedSearchState.load = jest.fn().mockReturnValue(savedSearchMockWithTimeField); + // unsetting the previous index else this is considered as update to the persisted saved search + state.appState.set({ index: undefined }); + await state.actions.loadSavedSearch({ savedSearchId: 'the-saved-search-id-with-timefield' }); + expect(state.savedSearchState.getState().searchSource.getField('index')?.id).toBe( + 'index-pattern-with-timefield-id' + ); + expect(state.savedSearchState.getHasChanged$().getValue()).toBe(false); + + // switch back to the previous savedSearch, but not cleaning up appState index, so it's considered as update to the persisted saved search + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id, useAppState: true }); + expect(state.savedSearchState.getState().searchSource.getField('index')?.id).toBe( + 'index-pattern-with-timefield-id' + ); + expect(state.savedSearchState.getHasChanged$().getValue()).toBe(true); + }); + test('loadSavedSearch generating a new saved search, updated by ad-hoc data view', async () => { + const { state } = await getState('/'); + const dataViewSpecMock = { + id: 'mock-id', + title: 'mock-title', + timeFieldName: 'mock-time-field-name', + }; + const dataViewsCreateMock = discoverServiceMock.dataViews.create as jest.Mock; + dataViewsCreateMock.mockImplementation(() => ({ + ...dataViewMock, + ...dataViewSpecMock, + isPersisted: () => false, + })); + await state.actions.loadSavedSearch({ dataViewSpec: dataViewSpecMock }); + expect(state.savedSearchState.getInitial$().getValue().id).toEqual(undefined); + expect(state.savedSearchState.getCurrent$().getValue().id).toEqual(undefined); + expect( + state.savedSearchState.getInitial$().getValue().searchSource?.getField('index')?.id + ).toEqual(dataViewSpecMock.id); + expect( + state.savedSearchState.getCurrent$().getValue().searchSource?.getField('index')?.id + ).toEqual(dataViewSpecMock.id); + expect(state.savedSearchState.getHasChanged$().getValue()).toEqual(false); + expect(state.internalState.getState().adHocDataViews.length).toBe(1); + }); + + test('loadSavedSearch resetting query & filters of data service', async () => { + const { state } = await getState('/', savedSearchMock); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + expect(discoverServiceMock.data.query.queryString.clearQuery).toHaveBeenCalled(); + expect(discoverServiceMock.data.query.filterManager.setAppFilters).toHaveBeenCalledWith([]); + }); + + test('loadSavedSearch setting query & filters of data service if query and filters are persisted', async () => { + const savedSearchWithQueryAndFilters = copySavedSearch(savedSearchMock); + const query = { query: "foo: 'bar'", language: 'kql' }; + const filters = [{ meta: { index: 'the-data-view-id' }, query: { match_all: {} } }]; + savedSearchWithQueryAndFilters.searchSource.setField('query', query); + savedSearchWithQueryAndFilters.searchSource.setField('filter', filters); + const { state } = await getState('/', savedSearchWithQueryAndFilters); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + expect(discoverServiceMock.data.query.queryString.setQuery).toHaveBeenCalledWith(query); + expect(discoverServiceMock.data.query.filterManager.setAppFilters).toHaveBeenCalledWith( + filters + ); + }); + + test('loadSavedSearch with ad-hoc data view being added to internal state adHocDataViews', async () => { + const savedSearchAdHocCopy = copySavedSearch(savedSearchAdHoc); + const adHocDataViewId = savedSearchAdHoc.searchSource.getField('index')!.id; + const { state } = await getState('/', savedSearchAdHocCopy); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchAdHoc.id }); + expect(state.appState.getState().index).toBe(adHocDataViewId); + expect(state.internalState.getState().adHocDataViews[0].id).toBe(adHocDataViewId); + }); + + test('onChangeDataView', async () => { + const { state, getCurrentUrl } = await getState('/', savedSearchMock); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + expect(state.savedSearchState.getState().searchSource.getField('index')!.id).toBe( + dataViewMock.id + ); + const unsubscribe = state.actions.initializeAndSync(); + state.kbnUrlStateStorage.kbnUrlControls.flush(); + expect(getCurrentUrl()).toMatchInlineSnapshot( + `"/#?_g=(refreshInterval:(pause:!t,value:1000),time:(from:now-15d,to:now))&_a=(columns:!(default_column),index:the-data-view-id,interval:auto,sort:!())"` + ); + await state.actions.onChangeDataView(dataViewComplexMock.id!); + await waitFor(() => { + expect(state.internalState.getState().dataView?.id).toBe(dataViewComplexMock.id); + }); + expect(state.appState.get().index).toBe(dataViewComplexMock.id); + expect(state.savedSearchState.getState().searchSource.getField('index')!.id).toBe( + dataViewComplexMock.id + ); + unsubscribe(); + }); + test('onDataViewCreated - persisted data view', async () => { + const { state } = await getState('/', savedSearchMock); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + const unsubscribe = state.actions.initializeAndSync(); + await state.actions.onDataViewCreated(dataViewComplexMock); + await waitFor(() => { + expect(state.internalState.getState().dataView?.id).toBe(dataViewComplexMock.id); }); - test('replaceAdHocDataViewWithId', async () => { - state.actions.appendAdHocDataViews(dataViewMock); - state.actions.replaceAdHocDataViewWithId(dataViewMock.id!, dataViewComplexMock); - expect(state.internalState.getState().adHocDataViews).toEqual([dataViewComplexMock]); + expect(state.appState.get().index).toBe(dataViewComplexMock.id); + expect(state.savedSearchState.getState().searchSource.getField('index')!.id).toBe( + dataViewComplexMock.id + ); + unsubscribe(); + }); + test('onDataViewCreated - ad-hoc data view', async () => { + const { state } = await getState('/', savedSearchMock); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + const unsubscribe = state.actions.initializeAndSync(); + await state.actions.onDataViewCreated(dataViewAdHoc); + await waitFor(() => { + expect(state.internalState.getState().dataView?.id).toBe(dataViewAdHoc.id); + }); + expect(state.appState.get().index).toBe(dataViewAdHoc.id); + expect(state.savedSearchState.getState().searchSource.getField('index')!.id).toBe( + dataViewAdHoc.id + ); + unsubscribe(); + }); + test('onDataViewEdited - persisted data view', async () => { + const { state } = await getState('/', savedSearchMock); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + const selectedDataView = state.internalState.getState().dataView; + await waitFor(() => { + expect(selectedDataView).toBe(dataViewMock); + }); + const unsubscribe = state.actions.initializeAndSync(); + await state.actions.onDataViewEdited(dataViewMock); + + await waitFor(() => { + expect(state.internalState.getState().dataView).not.toBe(selectedDataView); + }); + unsubscribe(); + }); + test('onDataViewEdited - ad-hoc data view', async () => { + const { state } = await getState('/', savedSearchMock); + const unsubscribe = state.actions.initializeAndSync(); + await state.actions.onDataViewCreated(dataViewAdHoc); + const previousId = dataViewAdHoc.id; + await state.actions.onDataViewEdited(dataViewAdHoc); + await waitFor(() => { + expect(state.internalState.getState().dataView?.id).not.toBe(previousId); + }); + unsubscribe(); + }); + + test('onOpenSavedSearch - same target id', async () => { + const { state } = await getState('/', savedSearchMock); + const unsubscribe = state.actions.initializeAndSync(); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + await state.savedSearchState.update({ nextState: { hideChart: true } }); + expect(state.savedSearchState.getState().hideChart).toBe(true); + await state.actions.onOpenSavedSearch(savedSearchMock.id!); + expect(state.savedSearchState.getState().hideChart).toBe(undefined); + unsubscribe(); + }); + + test('onOpenSavedSearch - cleanup of previous filter', async () => { + const { state } = await getState( + "/#?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(customer_first_name),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,key:customer_first_name,negate:!f,params:(query:Mary),type:phrase),query:(match_phrase:(customer_first_name:Mary)))),hideChart:!f,index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,interval:auto,query:(language:kuery,query:''),sort:!())", + savedSearchMock + ); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id, useAppState: true }); + expect(state.appState.get().filters).toHaveLength(1); + await state.actions.loadSavedSearch({ useAppState: false }); + expect(state.appState.get().filters).toHaveLength(0); + }); + + test('onCreateDefaultAdHocDataView', async () => { + discoverServiceMock.dataViews.create = jest.fn().mockReturnValue({ + ...dataViewMock, + isPersisted: () => false, + id: 'ad-hoc-id', + title: 'test', + }); + const { state } = await getState('/', savedSearchMock); + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + const unsubscribe = state.actions.initializeAndSync(); + await state.actions.onCreateDefaultAdHocDataView('ad-hoc-test'); + expect(state.appState.getState().index).toBe('ad-hoc-id'); + expect(state.internalState.getState().adHocDataViews[0].id).toBe('ad-hoc-id'); + unsubscribe(); + }); + test('undoSavedSearchChanges - when changing data views', async () => { + const { state, getCurrentUrl } = await getState('/', savedSearchMock); + // Load a given persisted saved search + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + const unsubscribe = state.actions.initializeAndSync(); + state.kbnUrlStateStorage.kbnUrlControls.flush(); + const initialUrlState = + '/#?_g=(refreshInterval:(pause:!t,value:1000),time:(from:now-15d,to:now))&_a=(columns:!(default_column),index:the-data-view-id,interval:auto,sort:!())'; + expect(getCurrentUrl()).toBe(initialUrlState); + expect(state.internalState.getState().dataView?.id).toBe(dataViewMock.id!); + + // Change the data view, this should change the URL and trigger a fetch + await state.actions.onChangeDataView(dataViewComplexMock.id!); + state.kbnUrlStateStorage.kbnUrlControls.flush(); + expect(getCurrentUrl()).toMatchInlineSnapshot( + `"/#?_g=(refreshInterval:(pause:!t,value:1000),time:(from:now-15d,to:now))&_a=(columns:!(default_column),index:data-view-with-various-field-types-id,interval:auto,sort:!(!(data,desc)))"` + ); + await waitFor(() => { + expect(state.dataState.fetch).toHaveBeenCalledTimes(1); + }); + expect(state.internalState.getState().dataView?.id).toBe(dataViewComplexMock.id!); + + // Undo all changes to the saved search, this should trigger a fetch, again + await state.actions.undoSavedSearchChanges(); + state.kbnUrlStateStorage.kbnUrlControls.flush(); + expect(getCurrentUrl()).toBe(initialUrlState); + await waitFor(() => { + expect(state.dataState.fetch).toHaveBeenCalledTimes(2); + }); + expect(state.internalState.getState().dataView?.id).toBe(dataViewMock.id!); + + unsubscribe(); + }); + + test('undoSavedSearchChanges with timeRestore', async () => { + const { state } = await getState('/', { + ...savedSearchMock, + timeRestore: true, + refreshInterval: { pause: false, value: 1000 }, + timeRange: { from: 'now-15d', to: 'now-10d' }, }); + const setTime = jest.fn(); + const setRefreshInterval = jest.fn(); + discoverServiceMock.data.query.timefilter.timefilter.setTime = setTime; + discoverServiceMock.data.query.timefilter.timefilter.setRefreshInterval = setRefreshInterval; + await state.actions.loadSavedSearch({ savedSearchId: savedSearchMock.id }); + await state.actions.undoSavedSearchChanges(); + expect(setTime).toHaveBeenCalledTimes(1); + expect(setTime).toHaveBeenCalledWith({ from: 'now-15d', to: 'now-10d' }); + expect(setRefreshInterval).toHaveBeenCalledWith({ pause: false, value: 1000 }); }); }); diff --git a/src/plugins/discover/public/application/main/services/discover_state.ts b/src/plugins/discover/public/application/main/services/discover_state.ts index c283f09a48966..a8736bc82edde 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.ts @@ -16,13 +16,21 @@ import { } from '@kbn/kibana-utils-plugin/public'; import { DataPublicPluginStart, - FilterManager, QueryState, SearchSessionInfoProvider, } from '@kbn/data-plugin/public'; -import { DataView } from '@kbn/data-views-plugin/public'; -import { SavedSearch } from '@kbn/saved-search-plugin/public'; -import { loadDataView, resolveDataView } from '../utils/resolve_data_view'; +import { DataView, DataViewSpec, DataViewType } from '@kbn/data-views-plugin/public'; +import type { SavedSearch } from '@kbn/saved-search-plugin/public'; +import { v4 as uuidv4 } from 'uuid'; +import { merge } from 'rxjs'; +import { AggregateQuery, Query, TimeRange } from '@kbn/es-query'; +import { loadSavedSearch as loadSavedSearchFn } from './load_saved_search'; +import { restoreStateFromSavedSearch } from '../../../services/saved_searches/restore_from_saved_search'; +import { FetchStatus } from '../../types'; +import { changeDataView } from '../hooks/utils/change_data_view'; +import { buildStateSubscribe } from '../hooks/utils/build_state_subscribe'; +import { addLog } from '../../../utils/add_log'; +import { getUrlTracker } from '../../../kibana_services'; import { DiscoverDataStateContainer, getDataStateContainer } from './discover_data_state_container'; import { DiscoverSearchSessionManager } from './discover_search_session'; import { DISCOVER_APP_LOCATOR, DiscoverAppLocatorParams } from '../../../../common'; @@ -37,6 +45,12 @@ import { getInternalStateContainer, } from './discover_internal_state_container'; import { DiscoverServices } from '../../../build_services'; +import { + getDefaultAppState, + getSavedSearchContainer, + DiscoverSavedSearchContainer, +} from './discover_saved_search_container'; +import { updateFiltersReferences } from '../utils/update_filter_references'; interface DiscoverStateContainerParams { /** * Browser history @@ -45,89 +59,135 @@ interface DiscoverStateContainerParams { /** * The current savedSearch */ - savedSearch: SavedSearch; + savedSearch?: string | SavedSearch; /** * core ui settings service */ services: DiscoverServices; } -export interface DiscoverStateContainer { +export interface LoadParams { /** - * kbnUrlStateStorage + * the id of the saved search to load, if undefined, a new saved search will be created */ - kbnUrlStateStorage: IKbnUrlStateStorage; + savedSearchId?: string; + /** + * the data view to use, if undefined, the saved search's data view will be used + */ + dataView?: DataView; + /** + * the data view spec to use, if undefined, the saved search's data view will be used + */ + dataViewSpec?: DataViewSpec; + /** + * determines if AppState should be used to update the saved search + * URL is overwriting savedSearch params in this case + */ + useAppState?: boolean; +} + +export interface DiscoverStateContainer { /** * App state, the _a part of the URL */ appState: DiscoverAppStateContainer; /** - * Internal state that's used at several places in the UI + * Data fetching related state + **/ + dataState: DiscoverDataStateContainer; + /** + * Internal shared state that's used at several places in the UI */ internalState: DiscoverInternalStateContainer; + /** + * kbnUrlStateStorage - it keeps the state in sync with the URL + */ + kbnUrlStateStorage: IKbnUrlStateStorage; + /** + * State of saved search, the saved object of Discover + */ + savedSearchState: DiscoverSavedSearchContainer; /** * Service for handling search sessions */ searchSessionManager: DiscoverSearchSessionManager; /** - * Data fetching related state - **/ - dataState: DiscoverDataStateContainer; - /** - * functions executed by UI + * Complex functions to update multiple containers from UI */ actions: { /** - * Pause the auto refresh interval without pushing an entry to history + * Triggers fetching of new data from Elasticsearch + * If initial is true, when SEARCH_ON_PAGE_LOAD_SETTING is set to false and it's a new saved search no fetch is triggered + * @param initial */ - pauseAutoRefreshInterval: () => Promise; - /** - * Set the currently selected data view - */ - setDataView: (dataView: DataView) => void; + fetchData: (initial?: boolean) => void; /** - * Load the data view of the given id - * A fallback data view is returned, given there's no match - * This is usually the default data view - * @param dataViewId - * @param savedSearch + * Initializing state containers and start subscribing to changes triggering e.g. data fetching */ - loadAndResolveDataView: ( - dataViewId: string, - savedSearch: SavedSearch - ) => Promise<{ fallback: boolean; dataView: DataView }>; + initializeAndSync: () => () => void; /** * Load current list of data views, add them to internal state */ loadDataViewList: () => Promise; /** - * Set new adhoc data view list + * Load a saved search by id or create a new one that's not persisted yet + * @param LoadParams - optional parameters to load a saved search */ - setAdHocDataViews: (dataViews: DataView[]) => void; + loadSavedSearch: (param?: LoadParams) => Promise; /** - * Append a given ad-hoc data views to the list of ad-hoc data view + * Create and select a temporary/adhoc data view by a given index pattern + * Used by the Data View Picker + * @param pattern */ - appendAdHocDataViews: (dataViews: DataView | DataView[]) => void; + onCreateDefaultAdHocDataView: (pattern: string) => Promise; /** - * Remove the ad-hoc data view of the given id from the list of ad-hoc data view - * @param id + * Triggered when a new data view is created + * @param dataView + */ + onDataViewCreated: (dataView: DataView) => Promise; + /** + * Triggered when a new data view is edited + * @param dataView + */ + onDataViewEdited: (dataView: DataView) => Promise; + /** + * Triggered when a saved search is opened in the savedObject finder + * @param savedSearchId + */ + onOpenSavedSearch: (savedSearchId: string) => void; + /** + * Triggered when the unified search bar query is updated + * @param payload + * @param isUpdate + */ + onUpdateQuery: ( + payload: { dateRange: TimeRange; query?: Query | AggregateQuery }, + isUpdate?: boolean + ) => void; + /** + * Triggered when the user selects a different data view in the data view picker + * @param id - id of the data view */ - removeAdHocDataViewById: (id: string) => void; + onChangeDataView: (id: string) => Promise; /** - * Replace the data view of the given id with the given data view - * Used when the spec of a data view changed to prevent duplicates - * @param id + * Triggered when an ad-hoc data view is persisted to allow sharing links and CSV + * @param dataView + */ + persistAdHocDataView: (dataView: DataView) => Promise; + /** + * Set the currently selected data view * @param dataView */ - replaceAdHocDataViewWithId: (id: string, dataView: DataView) => void; + setDataView: (dataView: DataView) => void; + /** + * Undo changes made to the saved search, e.g. when the user triggers the "Reset search" button + */ + undoSavedSearchChanges: () => void; /** - * Initialize state with filters and query, start state syncing + * When saving a saved search with an ad hoc data view, a new id needs to be generated for the data view + * This is to prevent duplicate ids messing with our system */ - initializeAndSync: ( - dataView: DataView, - filterManager: FilterManager, - data: DataPublicPluginStart - ) => () => void; + updateAdHocDataViewId: () => void; }; } @@ -137,11 +197,13 @@ export interface DiscoverStateContainer { */ export function getDiscoverStateContainer({ history, - savedSearch, services, }: DiscoverStateContainerParams): DiscoverStateContainer { const storeInSessionStorage = services.uiSettings.get('state:storeInSessionStorage'); const toasts = services.core.notifications.toasts; + /** + * state storage for state in the URL + */ const stateStorage = createKbnUrlStateStorage({ useHash: storeInSessionStorage, history, @@ -156,78 +218,257 @@ export function getDiscoverStateContainer({ session: services.data.search.session, }); /** - * App State Container, synced with URL + * Saved Search State Container, the persisted saved object of Discover */ - const appStateContainer = getDiscoverAppStateContainer({ stateStorage, savedSearch, services }); + const savedSearchContainer = getSavedSearchContainer({ + services, + }); + /** + * App State Container, synced with the _a part URL + */ + const appStateContainer = getDiscoverAppStateContainer({ + stateStorage, + savedSearch: savedSearchContainer.getState(), + services, + }); + /** + * Internal State Container, state that's not persisted and not part of the URL + */ const internalStateContainer = getInternalStateContainer(); - const pauseAutoRefreshInterval = async () => { - const state = stateStorage.get(GLOBAL_STATE_URL_KEY); - if (state?.refreshInterval && !state.refreshInterval.pause) { - await stateStorage.set( - GLOBAL_STATE_URL_KEY, - { ...state, refreshInterval: { ...state?.refreshInterval, pause: true } }, - { replace: true } - ); - } - }; - const dataStateContainer = getDataStateContainer({ services, searchSessionManager, getAppState: appStateContainer.getState, - getSavedSearch: () => { - // Simulating the behavior of the removed hook to always create a clean searchSource child that - // we then use to add query, filters, etc., will be removed soon. - return { ...savedSearch, searchSource: savedSearch.searchSource.createChild() }; - }, - appStateContainer, + getSavedSearch: savedSearchContainer.getState, }); + + const pauseAutoRefreshInterval = async (dataView: DataView) => { + if (dataView && (!dataView.isTimeBased() || dataView.type === DataViewType.ROLLUP)) { + const state = stateStorage.get(GLOBAL_STATE_URL_KEY); + if (state?.refreshInterval && !state.refreshInterval.pause) { + await stateStorage.set( + GLOBAL_STATE_URL_KEY, + { ...state, refreshInterval: { ...state?.refreshInterval, pause: true } }, + { replace: true } + ); + } + } + }; + const setDataView = (dataView: DataView) => { internalStateContainer.transitions.setDataView(dataView); + pauseAutoRefreshInterval(dataView); + savedSearchContainer.getState().searchSource.setField('index', dataView); }; - const setAdHocDataViews = (dataViews: DataView[]) => - internalStateContainer.transitions.setAdHocDataViews(dataViews); - const appendAdHocDataViews = (dataViews: DataView | DataView[]) => - internalStateContainer.transitions.appendAdHocDataViews(dataViews); - const replaceAdHocDataViewWithId = (id: string, dataView: DataView) => - internalStateContainer.transitions.replaceAdHocDataViewWithId(id, dataView); - const removeAdHocDataViewById = (id: string) => - internalStateContainer.transitions.removeAdHocDataViewById(id); const loadDataViewList = async () => { const dataViewList = await services.dataViews.getIdsWithTitle(true); internalStateContainer.transitions.setSavedDataViews(dataViewList); }; - const loadAndResolveDataView = async (id: string, actualSavedSearch: SavedSearch) => { - const nextDataViewData = await loadDataView(services.dataViews, services.uiSettings, id); - const nextDataView = resolveDataView( - nextDataViewData, - actualSavedSearch.searchSource, - services.toastNotifications + /** + * When saving a saved search with an ad hoc data view, a new id needs to be generated for the data view + * This is to prevent duplicate ids messing with our system + */ + const updateAdHocDataViewId = async () => { + const prevDataView = internalStateContainer.getState().dataView; + if (!prevDataView || prevDataView.isPersisted()) return; + const newDataView = await services.dataViews.create({ ...prevDataView.toSpec(), id: uuidv4() }); + services.dataViews.clearInstanceCache(prevDataView.id); + + updateFiltersReferences(prevDataView, newDataView); + + internalStateContainer.transitions.replaceAdHocDataViewWithId(prevDataView.id!, newDataView); + await appStateContainer.replaceUrlState({ index: newDataView.id }); + const trackingEnabled = Boolean(newDataView.isPersisted() || savedSearchContainer.getId()); + getUrlTracker().setTrackingEnabled(trackingEnabled); + + return newDataView; + }; + + const onOpenSavedSearch = async (newSavedSearchId: string) => { + addLog('[discoverState] onOpenSavedSearch', newSavedSearchId); + const currentSavedSearch = savedSearchContainer.getState(); + if (currentSavedSearch.id && currentSavedSearch.id === newSavedSearchId) { + addLog('[discoverState] undo changes since saved search did not change'); + await undoSavedSearchChanges(); + } else { + addLog('[discoverState] onOpenSavedSearch open view URL'); + history.push(`/view/${encodeURIComponent(newSavedSearchId)}`); + } + }; + + const onDataViewCreated = async (nextDataView: DataView) => { + if (!nextDataView.isPersisted()) { + internalStateContainer.transitions.appendAdHocDataViews(nextDataView); + } else { + await loadDataViewList(); + } + if (nextDataView.id) { + await onChangeDataView(nextDataView); + } + }; + + const onDataViewEdited = async (editedDataView: DataView) => { + if (editedDataView.isPersisted()) { + // Clear the current data view from the cache and create a new instance + // of it, ensuring we have a new object reference to trigger a re-render + services.dataViews.clearInstanceCache(editedDataView.id); + setDataView(await services.dataViews.create(editedDataView.toSpec(), true)); + } else { + await updateAdHocDataViewId(); + } + loadDataViewList(); + fetchData(); + }; + + const persistAdHocDataView = async (adHocDataView: DataView) => { + const persistedDataView = await services.dataViews.createAndSave({ + ...adHocDataView.toSpec(), + id: uuidv4(), + }); + services.dataViews.clearInstanceCache(adHocDataView.id); + updateFiltersReferences(adHocDataView, persistedDataView); + internalStateContainer.transitions.removeAdHocDataViewById(adHocDataView.id!); + await appStateContainer.update({ index: persistedDataView.id }, true); + return persistedDataView; + }; + + const loadSavedSearch = async (params?: LoadParams): Promise => { + return loadSavedSearchFn(params ?? {}, { + appStateContainer, + dataStateContainer, + internalStateContainer, + savedSearchContainer, + services, + setDataView, + }); + }; + + /** + * state containers initializing and subscribing to changes triggering e.g. data fetching + */ + const initializeAndSync = () => { + // initialize app state container, syncing with _g and _a part of the URL + const appStateInitAndSyncUnsubscribe = appStateContainer.initAndSync( + savedSearchContainer.getState() ); - return { fallback: !nextDataViewData.stateValFound, dataView: nextDataView }; + // subscribing to state changes of appStateContainer, triggering data fetching + const appStateUnsubscribe = appStateContainer.subscribe( + buildStateSubscribe({ + appState: appStateContainer, + savedSearchState: savedSearchContainer, + dataState: dataStateContainer, + internalState: internalStateContainer, + services, + setDataView, + }) + ); + // start subscribing to dataStateContainer, triggering data fetching + const unsubscribeData = dataStateContainer.subscribe(); + + // updates saved search when query or filters change, triggers data fetching + const filterUnsubscribe = merge( + services.data.query.queryString.getUpdates$(), + services.filterManager.getFetches$() + ).subscribe(async () => { + await savedSearchContainer.update({ + nextDataView: internalStateContainer.getState().dataView, + nextState: appStateContainer.getState(), + useFilterAndQueryServices: true, + }); + fetchData(); + }); + + return () => { + unsubscribeData(); + appStateUnsubscribe(); + appStateInitAndSyncUnsubscribe(); + filterUnsubscribe.unsubscribe(); + }; + }; + + const onCreateDefaultAdHocDataView = async (pattern: string) => { + const newDataView = await services.dataViews.create({ + title: pattern, + }); + if (newDataView.fields.getByName('@timestamp')?.type === 'date') { + newDataView.timeFieldName = '@timestamp'; + } + internalStateContainer.transitions.appendAdHocDataViews(newDataView); + + await onChangeDataView(newDataView); + }; + /** + * Triggered when a user submits a query in the search bar + */ + const onUpdateQuery = ( + payload: { dateRange: TimeRange; query?: Query | AggregateQuery }, + isUpdate?: boolean + ) => { + if (isUpdate === false) { + // remove the search session if the given query is not just updated + searchSessionManager.removeSearchSessionIdFromURL({ replace: false }); + dataStateContainer.fetch(); + } + }; + + /** + * Function e.g. triggered when user changes data view in the sidebar + */ + const onChangeDataView = async (id: string | DataView) => { + await changeDataView(id, { + services, + internalState: internalStateContainer, + appState: appStateContainer, + }); + }; + /** + * Undo all changes to the current saved search + */ + const undoSavedSearchChanges = async () => { + addLog('undoSavedSearchChanges'); + const nextSavedSearch = savedSearchContainer.getInitial$().getValue(); + await savedSearchContainer.set(nextSavedSearch); + restoreStateFromSavedSearch({ + savedSearch: nextSavedSearch, + timefilter: services.timefilter, + }); + const newAppState = getDefaultAppState(nextSavedSearch, services); + await appStateContainer.replaceUrlState(newAppState); + return nextSavedSearch; + }; + const fetchData = (initial: boolean = false) => { + addLog('fetchData', { initial }); + if (!initial || dataStateContainer.getInitialFetchStatus() === FetchStatus.LOADING) { + dataStateContainer.fetch(); + } }; - const initializeAndSync = () => appStateContainer.initAndSync(savedSearch); return { kbnUrlStateStorage: stateStorage, appState: appStateContainer, internalState: internalStateContainer, dataState: dataStateContainer, + savedSearchState: savedSearchContainer, searchSessionManager, actions: { - pauseAutoRefreshInterval, - setDataView, - loadAndResolveDataView, - loadDataViewList, - setAdHocDataViews, - appendAdHocDataViews, - replaceAdHocDataViewWithId, - removeAdHocDataViewById, initializeAndSync, + fetchData, + loadDataViewList, + loadSavedSearch, + onChangeDataView, + onCreateDefaultAdHocDataView, + onDataViewCreated, + onDataViewEdited, + onOpenSavedSearch, + onUpdateQuery, + persistAdHocDataView, + setDataView, + undoSavedSearchChanges, + updateAdHocDataViewId, }, }; } diff --git a/src/plugins/discover/public/application/main/services/discover_state_provider.tsx b/src/plugins/discover/public/application/main/services/discover_state_provider.tsx index 8cfdc45207ec7..70044385a1338 100644 --- a/src/plugins/discover/public/application/main/services/discover_state_provider.tsx +++ b/src/plugins/discover/public/application/main/services/discover_state_provider.tsx @@ -6,19 +6,42 @@ * Side Public License, v 1. */ -import React from 'react'; +import React, { useContext } from 'react'; +import useObservable from 'react-use/lib/useObservable'; +import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { InternalStateProvider } from './discover_internal_state_container'; import { DiscoverAppStateProvider } from './discover_app_state_container'; import { DiscoverStateContainer } from './discover_state'; function createStateHelpers() { const context = React.createContext(null); + const useContainer = () => useContext(context); + const useSavedSearch = () => { + const container = useContainer(); + return useObservable( + container!.savedSearchState.getCurrent$(), + container!.savedSearchState.getCurrent$().getValue() + ); + }; + const useSavedSearchInitial = () => { + const container = useContainer(); + return useObservable( + container!.savedSearchState.getInitial$(), + container!.savedSearchState.getInitial$().getValue() + ); + }; return { Provider: context.Provider, + useSavedSearch, + useSavedSearchInitial, }; } -export const { Provider: DiscoverStateProvider } = createStateHelpers(); +export const { + Provider: DiscoverStateProvider, + useSavedSearchInitial, + useSavedSearch, +} = createStateHelpers(); export const DiscoverMainProvider = ({ value, diff --git a/src/plugins/discover/public/application/main/services/load_saved_search.ts b/src/plugins/discover/public/application/main/services/load_saved_search.ts new file mode 100644 index 0000000000000..5bae488754322 --- /dev/null +++ b/src/plugins/discover/public/application/main/services/load_saved_search.ts @@ -0,0 +1,165 @@ +/* + * 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 type { SavedSearch } from '@kbn/saved-search-plugin/public'; +import { cloneDeep, isEqual } from 'lodash'; +import { isTextBasedQuery } from '../utils/is_text_based_query'; +import { loadAndResolveDataView } from '../utils/resolve_data_view'; +import { DiscoverInternalStateContainer } from './discover_internal_state_container'; +import { DiscoverDataStateContainer } from './discover_data_state_container'; +import { cleanupUrlState } from '../utils/cleanup_url_state'; +import { getValidFilters } from '../../../utils/get_valid_filters'; +import { DiscoverStateContainer, LoadParams } from './discover_state'; +import { addLog } from '../../../utils/add_log'; +import { DiscoverSavedSearchContainer } from './discover_saved_search_container'; +import { + DiscoverAppState, + DiscoverAppStateContainer, + getInitialState, +} from './discover_app_state_container'; +import { DiscoverServices } from '../../../build_services'; + +interface LoadSavedSearchDeps { + appStateContainer: DiscoverAppStateContainer; + dataStateContainer: DiscoverDataStateContainer; + internalStateContainer: DiscoverInternalStateContainer; + savedSearchContainer: DiscoverSavedSearchContainer; + services: DiscoverServices; + setDataView: DiscoverStateContainer['actions']['setDataView']; +} + +/** + * Loading persisted saved searches or existing ones and updating services accordingly + * @param params + * @param deps + */ +export const loadSavedSearch = async ( + params: LoadParams, + deps: LoadSavedSearchDeps +): Promise => { + addLog('[discoverState] loadSavedSearch'); + const { savedSearchId, useAppState } = params ?? {}; + const { appStateContainer, internalStateContainer, savedSearchContainer, services } = deps; + const appState = useAppState ? appStateContainer.getState() : undefined; + + // Loading the saved search or creating a new one + let nextSavedSearch = savedSearchId + ? await savedSearchContainer.load(savedSearchId) + : await savedSearchContainer.new( + await getStateDataView(params, { services, appState, internalStateContainer }) + ); + + // Cleaning up the previous state + services.filterManager.setAppFilters([]); + services.data.query.queryString.clearQuery(); + if (!useAppState) { + appStateContainer.set({}); + } + + // Update saved search by a given app state (in URL) + if (appState) { + if (savedSearchId && appState.index) { + // This is for the case appState is overwriting the loaded saved search data view + const savedSearchDataViewId = nextSavedSearch.searchSource.getField('index')?.id; + const stateDataView = await getStateDataView(params, { + services, + appState, + internalStateContainer, + savedSearch: nextSavedSearch, + }); + const dataViewDifferentToAppState = stateDataView.id !== savedSearchDataViewId; + if (stateDataView && (dataViewDifferentToAppState || !savedSearchDataViewId)) { + nextSavedSearch.searchSource.setField('index', stateDataView); + } + } + nextSavedSearch = savedSearchContainer.update({ + nextDataView: nextSavedSearch.searchSource.getField('index'), + nextState: appState, + }); + } + + // Update app state container with the next state derived from the next saved search + const nextAppState = getInitialState(undefined, nextSavedSearch, services); + appStateContainer.set( + appState ? { ...nextAppState, ...cleanupUrlState({ ...appState }) } : nextAppState + ); + + // Update all other services and state containers by the next saved search + updateBySavedSearch(nextSavedSearch, deps); + return nextSavedSearch; +}; + +/** + * Update services and state containers based on the given saved search + * @param savedSearch + * @param deps + */ +function updateBySavedSearch(savedSearch: SavedSearch, deps: LoadSavedSearchDeps) { + const { dataStateContainer, internalStateContainer, services, setDataView } = deps; + const savedSearchDataView = savedSearch.searchSource.getField('index')!; + + setDataView(savedSearchDataView); + if (!savedSearchDataView.isPersisted()) { + internalStateContainer.transitions.appendAdHocDataViews(savedSearchDataView); + } + + // Finally notify dataStateContainer, data.query and filterManager about new derived state + dataStateContainer.reset(savedSearch); + // set data service filters + const filters = savedSearch.searchSource.getField('filter'); + if (Array.isArray(filters) && filters.length) { + services.data.query.filterManager.setAppFilters(cloneDeep(filters)); + } + // some filters may not be valid for this context, so update + // the filter manager with a modified list of valid filters + const currentFilters = services.filterManager.getFilters(); + const validFilters = getValidFilters(savedSearchDataView, currentFilters); + if (!isEqual(currentFilters, validFilters)) { + services.filterManager.setFilters(validFilters); + } + // set data service query + const query = savedSearch.searchSource.getField('query'); + if (query) { + services.data.query.queryString.setQuery(query); + } +} + +// Get the data view to actually use. There are several conditions to consider which data view is used +// 1. If a data view is passed in, use that +// 2. If an appState with index set is passed in, use the data view from that +// 3. If a saved search is passed in, use the data view from that +// And provide a fallback data view if 2. or 3. don't exist, were deleted or invalid +const getStateDataView = async ( + params: LoadParams, + { + savedSearch, + appState, + services, + internalStateContainer, + }: { + savedSearch?: SavedSearch; + appState?: DiscoverAppState; + services: DiscoverServices; + internalStateContainer: DiscoverInternalStateContainer; + } +) => { + const { dataView, dataViewSpec } = params ?? {}; + if (dataView) { + return dataView; + } + + const result = await loadAndResolveDataView( + { + id: appState?.index, + dataViewSpec, + savedSearch, + isTextBasedQuery: isTextBasedQuery(appState?.query), + }, + { services, internalStateContainer } + ); + return result.dataView; +}; diff --git a/src/plugins/discover/public/application/main/utils/fetch_all.test.ts b/src/plugins/discover/public/application/main/utils/fetch_all.test.ts index 25e45f9470502..3d64177571ee1 100644 --- a/src/plugins/discover/public/application/main/utils/fetch_all.test.ts +++ b/src/plugins/discover/public/application/main/utils/fetch_all.test.ts @@ -11,7 +11,6 @@ import { reduce } from 'rxjs/operators'; import { SearchSource } from '@kbn/data-plugin/public'; import { RequestAdapter } from '@kbn/inspector-plugin/common'; import { savedSearchMock } from '../../../__mocks__/saved_search'; -import { ReduxLikeStateContainer } from '@kbn/kibana-utils-plugin/common'; import { discoverServiceMock } from '../../../__mocks__/services'; import { fetchAll } from './fetch_all'; import { @@ -26,8 +25,6 @@ import { fetchDocuments } from './fetch_documents'; import { fetchSql } from './fetch_sql'; import { buildDataTableRecord } from '../../../utils/build_data_record'; import { dataViewMock } from '../../../__mocks__/data_view'; -import { DiscoverAppState } from '../services/discover_app_state_container'; - jest.mock('./fetch_documents', () => ({ fetchDocuments: jest.fn().mockResolvedValue([]), })); @@ -54,7 +51,7 @@ const waitForNextTick = () => new Promise((resolve) => setTimeout(resolve, 0)); describe('test fetchAll', () => { let subjects: SavedSearchData; - let deps: Parameters[3]; + let deps: Parameters[2]; let searchSource: SearchSource; beforeEach(() => { subjects = { @@ -65,22 +62,21 @@ describe('test fetchAll', () => { fetchStatus: FetchStatus.UNINITIALIZED, }), }; + searchSource = savedSearchMock.searchSource.createChild(); + deps = { - appStateContainer: { - getState: () => { - return { interval: 'auto' }; - }, - } as ReduxLikeStateContainer, abortController: new AbortController(), - data: discoverServiceMock.data, inspectorAdapters: { requests: new RequestAdapter() }, + getAppState: () => ({}), searchSessionId: '123', initialFetchStatus: FetchStatus.UNINITIALIZED, useNewFieldsApi: true, - savedSearch: savedSearchMock, + savedSearch: { + ...savedSearchMock, + searchSource, + }, services: discoverServiceMock, }; - searchSource = savedSearchMock.searchSource.createChild(); mockFetchDocuments.mockReset().mockResolvedValue({ records: [] }); mockFetchSQL.mockReset().mockResolvedValue({ records: [] }); @@ -91,7 +87,7 @@ describe('test fetchAll', () => { subjects.main$.subscribe((value) => stateArr.push(value.fetchStatus)); - fetchAll(subjects, searchSource, false, deps); + fetchAll(subjects, false, deps); await waitForNextTick(); expect(stateArr).toEqual([ @@ -109,7 +105,7 @@ describe('test fetchAll', () => { ]; const documents = hits.map((hit) => buildDataTableRecord(hit, dataViewMock)); mockFetchDocuments.mockResolvedValue({ records: documents }); - fetchAll(subjects, searchSource, false, deps); + fetchAll(subjects, false, deps); await waitForNextTick(); expect(await collect()).toEqual([ { fetchStatus: FetchStatus.UNINITIALIZED }, @@ -136,7 +132,7 @@ describe('test fetchAll', () => { fetchStatus: FetchStatus.LOADING, recordRawType: RecordRawType.DOCUMENT, }); - fetchAll(subjects, searchSource, false, deps); + fetchAll(subjects, false, deps); await waitForNextTick(); subjects.totalHits$.next({ fetchStatus: FetchStatus.COMPLETE, @@ -159,7 +155,7 @@ describe('test fetchAll', () => { fetchStatus: FetchStatus.LOADING, recordRawType: RecordRawType.DOCUMENT, }); - fetchAll(subjects, searchSource, false, deps); + fetchAll(subjects, false, deps); await waitForNextTick(); subjects.totalHits$.next({ fetchStatus: FetchStatus.COMPLETE, @@ -186,7 +182,7 @@ describe('test fetchAll', () => { fetchStatus: FetchStatus.LOADING, recordRawType: RecordRawType.DOCUMENT, }); - fetchAll(subjects, searchSource, false, deps); + fetchAll(subjects, false, deps); await waitForNextTick(); subjects.totalHits$.next({ fetchStatus: FetchStatus.ERROR, @@ -221,7 +217,7 @@ describe('test fetchAll', () => { fetchStatus: FetchStatus.LOADING, recordRawType: RecordRawType.DOCUMENT, }); - fetchAll(subjects, searchSource, false, deps); + fetchAll(subjects, false, deps); await waitForNextTick(); subjects.totalHits$.next({ fetchStatus: FetchStatus.COMPLETE, @@ -254,21 +250,16 @@ describe('test fetchAll', () => { }); const query = { sql: 'SELECT * from foo' }; deps = { - appStateContainer: { - getState: () => { - return { interval: 'auto', query }; - }, - } as unknown as ReduxLikeStateContainer, abortController: new AbortController(), - data: discoverServiceMock.data, inspectorAdapters: { requests: new RequestAdapter() }, searchSessionId: '123', initialFetchStatus: FetchStatus.UNINITIALIZED, useNewFieldsApi: true, savedSearch: savedSearchMock, services: discoverServiceMock, + getAppState: () => ({ query }), }; - fetchAll(subjects, searchSource, false, deps); + fetchAll(subjects, false, deps); await waitForNextTick(); expect(await collect()).toEqual([ diff --git a/src/plugins/discover/public/application/main/utils/fetch_all.ts b/src/plugins/discover/public/application/main/utils/fetch_all.ts index 6ca474eb2dd41..f69399ab1d2bf 100644 --- a/src/plugins/discover/public/application/main/utils/fetch_all.ts +++ b/src/plugins/discover/public/application/main/utils/fetch_all.ts @@ -5,12 +5,11 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { DataPublicPluginStart, ISearchSource } from '@kbn/data-plugin/public'; import { Adapters } from '@kbn/inspector-plugin/common'; -import { ReduxLikeStateContainer } from '@kbn/kibana-utils-plugin/common'; import type { SavedSearch, SortOrder } from '@kbn/saved-search-plugin/public'; import { BehaviorSubject, filter, firstValueFrom, map, merge, scan } from 'rxjs'; import { DiscoverAppState } from '../services/discover_app_state_container'; +import { updateVolatileSearchSource } from './update_search_source'; import { getRawRecordType } from './get_raw_record_type'; import { checkHitCount, @@ -20,7 +19,6 @@ import { sendLoadingMsg, sendResetMsg, } from '../hooks/use_saved_search_messages'; -import { updateSearchSource } from './update_search_source'; import { fetchDocuments } from './fetch_documents'; import { FetchStatus } from '../../types'; import { DataMsg, RecordRawType, SavedSearchData } from '../services/discover_data_state_container'; @@ -29,8 +27,7 @@ import { fetchSql } from './fetch_sql'; export interface FetchDeps { abortController: AbortController; - appStateContainer: ReduxLikeStateContainer; - data: DataPublicPluginStart; + getAppState: () => DiscoverAppState; initialFetchStatus: FetchStatus; inspectorAdapters: Adapters; savedSearch: SavedSearch; @@ -48,35 +45,28 @@ export interface FetchDeps { */ export function fetchAll( dataSubjects: SavedSearchData, - searchSource: ISearchSource, reset = false, fetchDeps: FetchDeps ): Promise { - const { - initialFetchStatus, - appStateContainer, - services, - useNewFieldsApi, - data, - inspectorAdapters, - } = fetchDeps; + const { initialFetchStatus, getAppState, services, inspectorAdapters, savedSearch } = fetchDeps; + const { data } = services; + const searchSource = savedSearch.searchSource.createChild(); try { const dataView = searchSource.getField('index')!; + const query = getAppState().query; + const recordRawType = getRawRecordType(query); if (reset) { - sendResetMsg(dataSubjects, initialFetchStatus); + sendResetMsg(dataSubjects, initialFetchStatus, recordRawType); } - const { sort, query } = appStateContainer.getState(); - const recordRawType = getRawRecordType(query); const useSql = recordRawType === RecordRawType.PLAIN; if (recordRawType === RecordRawType.DOCUMENT) { // Update the base searchSource, base for all child fetches - updateSearchSource(searchSource, false, { + updateVolatileSearchSource(searchSource, { dataView, services, - sort: sort as SortOrder[], - useNewFieldsApi, + sort: getAppState().sort as SortOrder[], }); } @@ -89,7 +79,7 @@ export function fetchAll( const response = useSql && query ? fetchSql(query, dataView, data, services.expressions, inspectorAdapters) - : fetchDocuments(searchSource.createCopy(), fetchDeps); + : fetchDocuments(searchSource, fetchDeps); // Handle results of the individual queries and forward the results to the corresponding dataSubjects response diff --git a/src/plugins/discover/public/application/main/utils/get_fetch_observable.ts b/src/plugins/discover/public/application/main/utils/get_fetch_observable.ts index 71490f05ac6ce..e19b17dad0489 100644 --- a/src/plugins/discover/public/application/main/utils/get_fetch_observable.ts +++ b/src/plugins/discover/public/application/main/utils/get_fetch_observable.ts @@ -35,10 +35,8 @@ export function getFetch$({ searchSource: ISearchSource; }) { const { timefilter } = data.query.timefilter; - const { filterManager } = data.query; return merge( refetch$, - filterManager.getFetches$(), timefilter.getFetch$(), timefilter.getAutoRefreshFetch$().pipe( tap((done) => { diff --git a/src/plugins/discover/public/application/main/utils/persist_saved_search.ts b/src/plugins/discover/public/application/main/utils/persist_saved_search.ts deleted file mode 100644 index ec26ad7d5880c..0000000000000 --- a/src/plugins/discover/public/application/main/utils/persist_saved_search.ts +++ /dev/null @@ -1,107 +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 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 { isOfAggregateQueryType } from '@kbn/es-query'; -import { DataView } from '@kbn/data-views-plugin/public'; -import { SavedObjectSaveOpts } from '@kbn/saved-objects-plugin/public'; -import { SavedSearch, SortOrder, saveSavedSearch } from '@kbn/saved-search-plugin/public'; -import { DiscoverAppState } from '../services/discover_app_state_container'; -import { updateSearchSource } from './update_search_source'; -import { DiscoverServices } from '../../../build_services'; -/** - * Helper function to update and persist the given savedSearch - */ -export async function persistSavedSearch( - savedSearch: SavedSearch, - { - dataView, - onError, - onSuccess, - services, - saveOptions, - state, - }: { - dataView: DataView; - onError: (error: Error, savedSearch: SavedSearch) => void; - onSuccess: (id: string) => void; - saveOptions: SavedObjectSaveOpts; - services: DiscoverServices; - state: DiscoverAppState; - } -) { - updateSearchSource(savedSearch.searchSource, true, { - dataView, - services, - sort: state.sort as SortOrder[], - useNewFieldsApi: false, - }); - - savedSearch.columns = state.columns || []; - savedSearch.sort = (state.sort as SortOrder[]) || []; - if (state.grid) { - savedSearch.grid = state.grid; - } - if (typeof state.hideChart !== 'undefined') { - savedSearch.hideChart = state.hideChart; - } - if (typeof state.rowHeight !== 'undefined') { - savedSearch.rowHeight = state.rowHeight; - } - - if (state.viewMode) { - savedSearch.viewMode = state.viewMode; - } - - if (typeof state.breakdownField !== 'undefined') { - savedSearch.breakdownField = state.breakdownField; - } else if (savedSearch.breakdownField) { - savedSearch.breakdownField = ''; - } - - if (state.hideAggregatedPreview) { - savedSearch.hideAggregatedPreview = state.hideAggregatedPreview; - } - - // add a flag here to identify text based language queries - // these should be filtered out from the visualize editor - const isTextBasedQuery = state.query && isOfAggregateQueryType(state.query); - if (savedSearch.isTextBasedQuery || isTextBasedQuery) { - savedSearch.isTextBasedQuery = isTextBasedQuery; - } - - savedSearch.usesAdHocDataView = !dataView.isPersisted(); - - const { from, to } = services.timefilter.getTime(); - const refreshInterval = services.timefilter.getRefreshInterval(); - savedSearch.timeRange = - savedSearch.timeRestore || savedSearch.timeRange - ? { - from, - to, - } - : undefined; - savedSearch.refreshInterval = - savedSearch.timeRestore || savedSearch.refreshInterval - ? { value: refreshInterval.value, pause: refreshInterval.pause } - : undefined; - - try { - const id = await saveSavedSearch( - savedSearch, - saveOptions, - services.core.savedObjects.client, - services.savedObjectsTagging - ); - if (id) { - onSuccess(id); - } - return { id }; - } catch (saveError) { - onError(saveError, savedSearch); - return { error: saveError }; - } -} diff --git a/src/plugins/discover/public/application/main/utils/resolve_data_view.test.ts b/src/plugins/discover/public/application/main/utils/resolve_data_view.test.ts index f3db91d5ce40b..10e1780d233b8 100644 --- a/src/plugins/discover/public/application/main/utils/resolve_data_view.test.ts +++ b/src/plugins/discover/public/application/main/utils/resolve_data_view.test.ts @@ -7,23 +7,30 @@ */ import { loadDataView } from './resolve_data_view'; -import { dataViewsMock } from '../../../__mocks__/data_views'; import { dataViewMock } from '../../../__mocks__/data_view'; -import { configMock } from '../../../__mocks__/config'; +import { discoverServiceMock as services } from '../../../__mocks__/services'; describe('Resolve data view tests', () => { test('returns valid data for an existing data view', async () => { - const dataViewId = 'the-data-view-id'; - const result = await loadDataView(dataViewsMock, configMock, dataViewId); + const id = 'the-data-view-id'; + const result = await loadDataView({ + id, + services, + dataViewList: [], + }); expect(result.loaded).toEqual(dataViewMock); + expect(result.stateVal).toEqual(id); expect(result.stateValFound).toEqual(true); - expect(result.stateVal).toEqual(dataViewId); }); test('returns fallback data for an invalid data view', async () => { - const dataViewId = 'invalid-id'; - const result = await loadDataView(dataViewsMock, configMock, dataViewId); + const id = 'invalid-id'; + const result = await loadDataView({ + id, + services, + dataViewList: [], + }); expect(result.loaded).toEqual(dataViewMock); expect(result.stateValFound).toBe(false); - expect(result.stateVal).toBe(dataViewId); + expect(result.stateVal).toBe(id); }); }); diff --git a/src/plugins/discover/public/application/main/utils/resolve_data_view.ts b/src/plugins/discover/public/application/main/utils/resolve_data_view.ts index 2584d9b7c8279..7a7884e6295ad 100644 --- a/src/plugins/discover/public/application/main/utils/resolve_data_view.ts +++ b/src/plugins/discover/public/application/main/utils/resolve_data_view.ts @@ -7,14 +7,11 @@ */ import { i18n } from '@kbn/i18n'; -import type { - DataView, - DataViewListItem, - DataViewsContract, - DataViewSpec, -} from '@kbn/data-views-plugin/public'; -import type { ISearchSource } from '@kbn/data-plugin/public'; -import type { IUiSettingsClient, ToastsStart } from '@kbn/core/public'; +import type { DataView, DataViewListItem, DataViewSpec } from '@kbn/data-views-plugin/public'; +import type { ToastsStart } from '@kbn/core/public'; +import { SavedSearch } from '@kbn/saved-search-plugin/public'; +import { DiscoverInternalStateContainer } from '../services/discover_internal_state_container'; +import { DiscoverServices } from '../../../build_services'; interface DataViewData { /** * List of existing data views @@ -37,13 +34,19 @@ interface DataViewData { /** * Function to load the given data view by id, providing a fallback if it doesn't exist */ -export async function loadDataView( - dataViews: DataViewsContract, - config: IUiSettingsClient, - id?: string, - dataViewSpec?: DataViewSpec -): Promise { - const dataViewList = await dataViews.getIdsWithTitle(); +export async function loadDataView({ + id, + dataViewSpec, + services, + dataViewList, +}: { + id?: string; + dataViewSpec?: DataViewSpec; + services: DiscoverServices; + dataViewList: DataViewListItem[]; +}): Promise { + const { dataViews } = services; + let fetchId: string | undefined = id; /** @@ -97,25 +100,26 @@ export async function loadDataView( // we can be certain that the data view exists due to an earlier hasData check loaded: fetchedDataView || defaultDataView!, stateVal: fetchId, - stateValFound: !!fetchId && !!fetchedDataView, + stateValFound: Boolean(fetchId) && Boolean(fetchedDataView), }; } /** - * Function used in the discover controller to message the user about the state of the current - * data view + * Check if the given data view is valid, provide a fallback if it doesn't exist + * And message the user in this case with toast notifications */ export function resolveDataView( ip: DataViewData, - searchSource: ISearchSource, + savedSearch: SavedSearch | undefined, toastNotifications: ToastsStart, isTextBasedQuery?: boolean ) { const { loaded: loadedDataView, stateVal, stateValFound } = ip; - const ownDataView = searchSource.getOwnField('index'); + const ownDataView = savedSearch?.searchSource.getField('index'); if (ownDataView && !stateVal) { + // the given saved search has its own data view, and no data view was specified in the URL return ownDataView; } @@ -128,6 +132,7 @@ export function resolveDataView( }); if (ownDataView) { + // the given data view in the URL was not found, but the saved search has its own data view toastNotifications.addWarning({ title: warningTitle, text: i18n.translate('discover.showingSavedDataViewWarningDescription', { @@ -159,3 +164,39 @@ export function resolveDataView( return loadedDataView; } + +export const loadAndResolveDataView = async ( + { + id, + dataViewSpec, + savedSearch, + isTextBasedQuery, + }: { + id?: string; + dataViewSpec?: DataViewSpec; + savedSearch?: SavedSearch; + isTextBasedQuery?: boolean; + }, + { + internalStateContainer, + services, + }: { internalStateContainer: DiscoverInternalStateContainer; services: DiscoverServices } +) => { + const { adHocDataViews, savedDataViews } = internalStateContainer.getState(); + const adHocDataView = adHocDataViews.find((dataView) => dataView.id === id); + if (adHocDataView) return { fallback: false, dataView: adHocDataView }; + + const nextDataViewData = await loadDataView({ + services, + id, + dataViewSpec, + dataViewList: savedDataViews, + }); + const nextDataView = resolveDataView( + nextDataViewData, + savedSearch, + services.toastNotifications, + isTextBasedQuery + ); + return { fallback: !nextDataViewData.stateValFound, dataView: nextDataView }; +}; diff --git a/src/plugins/discover/public/application/main/utils/update_saved_search.ts b/src/plugins/discover/public/application/main/utils/update_saved_search.ts new file mode 100644 index 0000000000000..733bf5ed2a0b8 --- /dev/null +++ b/src/plugins/discover/public/application/main/utils/update_saved_search.ts @@ -0,0 +1,101 @@ +/* + * 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 { SavedSearch, SortOrder } from '@kbn/saved-search-plugin/public'; +import { DataView } from '@kbn/data-views-plugin/common'; +import { cloneDeep } from 'lodash'; +import { isTextBasedQuery } from './is_text_based_query'; +import { DiscoverAppState } from '../services/discover_app_state_container'; +import { DiscoverServices } from '../../../build_services'; + +/** + * Updates the saved search with a given data view & Appstate + * Is executed on every change of those, for making sure the saved search is + * up to date before fetching data and persisting or sharing + * @param savedSearch + * @param dataView + * @param state + * @param services + * @param useFilterAndQueryServices - when true data services are being used for updating filter + query + */ +export function updateSavedSearch( + { + savedSearch, + dataView, + state, + services, + }: { + savedSearch: SavedSearch; + dataView?: DataView; + state?: DiscoverAppState; + services: DiscoverServices; + }, + useFilterAndQueryServices: boolean = false +) { + if (dataView) { + savedSearch.searchSource.setField('index', dataView); + savedSearch.usesAdHocDataView = !dataView.isPersisted(); + } + if (useFilterAndQueryServices) { + savedSearch.searchSource + .setField('query', services.data.query.queryString.getQuery()) + .setField('filter', services.data.query.filterManager.getFilters()); + } else if (state) { + savedSearch.searchSource + .setField('query', state.query ?? undefined) + .setField('filter', state.filters ? cloneDeep(state.filters) : []); + } + if (state) { + savedSearch.columns = state.columns || []; + savedSearch.sort = (state.sort as SortOrder[]) || []; + if (state.grid) { + savedSearch.grid = state.grid; + } + if (typeof state.hideChart !== 'undefined') { + savedSearch.hideChart = state.hideChart; + } + if (typeof state.rowHeight !== 'undefined') { + savedSearch.rowHeight = state.rowHeight; + } + + if (state.viewMode) { + savedSearch.viewMode = state.viewMode; + } + + if (typeof state.breakdownField !== 'undefined') { + savedSearch.breakdownField = state.breakdownField; + } else if (savedSearch.breakdownField) { + savedSearch.breakdownField = ''; + } + + if (state.hideAggregatedPreview) { + savedSearch.hideAggregatedPreview = state.hideAggregatedPreview; + } + + // add a flag here to identify text based language queries + // these should be filtered out from the visualize editor + const isTextBasedQueryResult = isTextBasedQuery(state.query); + if (savedSearch.isTextBasedQuery || isTextBasedQueryResult) { + savedSearch.isTextBasedQuery = isTextBasedQueryResult; + } + } + + const { from, to } = services.timefilter.getTime(); + const refreshInterval = services.timefilter.getRefreshInterval(); + savedSearch.timeRange = + savedSearch.timeRestore || savedSearch.timeRange + ? { + from, + to, + } + : undefined; + savedSearch.refreshInterval = + savedSearch.timeRestore || savedSearch.refreshInterval + ? { value: refreshInterval.value, pause: refreshInterval.pause } + : undefined; + return savedSearch; +} diff --git a/src/plugins/discover/public/application/main/utils/update_search_source.test.ts b/src/plugins/discover/public/application/main/utils/update_search_source.test.ts index 5ab1dd962652f..cc09732161890 100644 --- a/src/plugins/discover/public/application/main/utils/update_search_source.test.ts +++ b/src/plugins/discover/public/application/main/utils/update_search_source.test.ts @@ -6,55 +6,51 @@ * Side Public License, v 1. */ -import { updateSearchSource } from './update_search_source'; +import { updateVolatileSearchSource } from './update_search_source'; import { createSearchSourceMock } from '@kbn/data-plugin/common/search/search_source/mocks'; import { dataViewMock } from '../../../__mocks__/data_view'; import type { SortOrder } from '@kbn/saved-search-plugin/public'; import { discoverServiceMock } from '../../../__mocks__/services'; +import { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; -describe('updateSearchSource', () => { +const getUiSettingsMock = (value: boolean) => { + return { + get: jest.fn(() => value), + } as unknown as IUiSettingsClient; +}; + +describe('updateVolatileSearchSource', () => { test('updates a given search source', async () => { - const persistentSearchSourceMock = createSearchSourceMock({}); - const volatileSearchSourceMock = createSearchSourceMock({}); - volatileSearchSourceMock.setParent(persistentSearchSourceMock); - updateSearchSource(volatileSearchSourceMock, false, { + const searchSource = createSearchSourceMock({}); + discoverServiceMock.uiSettings = getUiSettingsMock(true); + updateVolatileSearchSource(searchSource, { dataView: dataViewMock, services: discoverServiceMock, sort: [] as SortOrder[], - useNewFieldsApi: false, }); - expect(persistentSearchSourceMock.getField('index')).toEqual(dataViewMock); - expect(volatileSearchSourceMock.getField('fields')).toBe(undefined); + expect(searchSource.getField('fields')).toBe(undefined); }); test('updates a given search source with the usage of the new fields api', async () => { - const persistentSearchSourceMock = createSearchSourceMock({}); - const volatileSearchSourceMock = createSearchSourceMock({}); - volatileSearchSourceMock.setParent(persistentSearchSourceMock); - updateSearchSource(volatileSearchSourceMock, false, { + const searchSource = createSearchSourceMock({}); + discoverServiceMock.uiSettings = getUiSettingsMock(false); + updateVolatileSearchSource(searchSource, { dataView: dataViewMock, services: discoverServiceMock, sort: [] as SortOrder[], - useNewFieldsApi: true, }); - expect(persistentSearchSourceMock.getField('index')).toEqual(dataViewMock); - expect(volatileSearchSourceMock.getField('fields')).toEqual([ - { field: '*', include_unmapped: 'true' }, - ]); - expect(volatileSearchSourceMock.getField('fieldsFromSource')).toBe(undefined); + expect(searchSource.getField('fields')).toEqual([{ field: '*', include_unmapped: 'true' }]); + expect(searchSource.getField('fieldsFromSource')).toBe(undefined); }); test('updates a given search source when showUnmappedFields option is set to true', async () => { - const persistentSearchSourceMock = createSearchSourceMock({}); const volatileSearchSourceMock = createSearchSourceMock({}); - volatileSearchSourceMock.setParent(persistentSearchSourceMock); - updateSearchSource(volatileSearchSourceMock, false, { + discoverServiceMock.uiSettings = getUiSettingsMock(false); + updateVolatileSearchSource(volatileSearchSourceMock, { dataView: dataViewMock, services: discoverServiceMock, sort: [] as SortOrder[], - useNewFieldsApi: true, }); - expect(persistentSearchSourceMock.getField('index')).toEqual(dataViewMock); expect(volatileSearchSourceMock.getField('fields')).toEqual([ { field: '*', include_unmapped: 'true' }, ]); @@ -62,16 +58,13 @@ describe('updateSearchSource', () => { }); test('does not explicitly request fieldsFromSource when not using fields API', async () => { - const persistentSearchSourceMock = createSearchSourceMock({}); const volatileSearchSourceMock = createSearchSourceMock({}); - volatileSearchSourceMock.setParent(persistentSearchSourceMock); - updateSearchSource(volatileSearchSourceMock, false, { + discoverServiceMock.uiSettings = getUiSettingsMock(true); + updateVolatileSearchSource(volatileSearchSourceMock, { dataView: dataViewMock, services: discoverServiceMock, sort: [] as SortOrder[], - useNewFieldsApi: false, }); - expect(persistentSearchSourceMock.getField('index')).toEqual(dataViewMock); expect(volatileSearchSourceMock.getField('fields')).toEqual(undefined); expect(volatileSearchSourceMock.getField('fieldsFromSource')).toBe(undefined); }); diff --git a/src/plugins/discover/public/application/main/utils/update_search_source.ts b/src/plugins/discover/public/application/main/utils/update_search_source.ts index 4966a66cf9687..4152b57a34a0f 100644 --- a/src/plugins/discover/public/application/main/utils/update_search_source.ts +++ b/src/plugins/discover/public/application/main/utils/update_search_source.ts @@ -9,58 +9,47 @@ import { ISearchSource } from '@kbn/data-plugin/public'; import { DataViewType, DataView } from '@kbn/data-views-plugin/public'; import type { SortOrder } from '@kbn/saved-search-plugin/public'; -import { SORT_DEFAULT_ORDER_SETTING } from '../../../../common'; +import { SEARCH_FIELDS_FROM_SOURCE, SORT_DEFAULT_ORDER_SETTING } from '../../../../common'; import { DiscoverServices } from '../../../build_services'; import { getSortForSearchSource } from '../../../utils/sorting'; /** * Helper function to update the given searchSource before fetching/sharing/persisting */ -export function updateSearchSource( +export function updateVolatileSearchSource( searchSource: ISearchSource, - persist = true, { dataView, services, sort, - useNewFieldsApi, }: { dataView: DataView; services: DiscoverServices; - sort: SortOrder[]; - useNewFieldsApi: boolean; + sort?: SortOrder[]; } ) { const { uiSettings, data } = services; - const parentSearchSource = persist ? searchSource : searchSource.getParent()!; - - parentSearchSource - .setField('index', dataView) - .setField('query', data.query.queryString.getQuery() || null) - .setField('filter', data.query.filterManager.getFilters()); - - if (!persist) { - const usedSort = getSortForSearchSource( - sort, - dataView, - uiSettings.get(SORT_DEFAULT_ORDER_SETTING) - ); - searchSource.setField('trackTotalHits', true).setField('sort', usedSort); - - if (dataView.type !== DataViewType.ROLLUP) { - // Set the date range filter fields from timeFilter using the absolute format. Search sessions requires that it be converted from a relative range - searchSource.setField('filter', data.query.timefilter.timefilter.createFilter(dataView)); - } + const usedSort = getSortForSearchSource( + sort, + dataView, + uiSettings.get(SORT_DEFAULT_ORDER_SETTING) + ); + const useNewFieldsApi = !uiSettings.get(SEARCH_FIELDS_FROM_SOURCE); + searchSource.setField('trackTotalHits', true).setField('sort', usedSort); + + if (dataView.type !== DataViewType.ROLLUP) { + // Set the date range filter fields from timeFilter using the absolute format. Search sessions requires that it be converted from a relative range + searchSource.setField('filter', data.query.timefilter.timefilter.createFilter(dataView)); + } - if (useNewFieldsApi) { - searchSource.removeField('fieldsFromSource'); - const fields: Record = { field: '*' }; + if (useNewFieldsApi) { + searchSource.removeField('fieldsFromSource'); + const fields: Record = { field: '*' }; - fields.include_unmapped = 'true'; + fields.include_unmapped = 'true'; - searchSource.setField('fields', [fields]); - } else { - searchSource.removeField('fields'); - } + searchSource.setField('fields', [fields]); + } else { + searchSource.removeField('fields'); } } diff --git a/src/plugins/discover/public/hooks/use_confirm_persistence_prompt.ts b/src/plugins/discover/public/hooks/use_confirm_persistence_prompt.ts index d5ea19c4316b3..17aeb5bbeea37 100644 --- a/src/plugins/discover/public/hooks/use_confirm_persistence_prompt.ts +++ b/src/plugins/discover/public/hooks/use_confirm_persistence_prompt.ts @@ -7,15 +7,12 @@ */ import { useCallback } from 'react'; -import { v4 as uuidv4 } from 'uuid'; import { i18n } from '@kbn/i18n'; import type { DataView } from '@kbn/data-views-plugin/public'; import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { useDiscoverServices } from './use_discover_services'; import { showConfirmPanel } from './show_confirm_panel'; -import { persistSavedSearch } from '../application/main/utils/persist_saved_search'; import { DiscoverStateContainer } from '../application/main/services/discover_state'; -import { updateFiltersReferences } from '../application/main/utils/update_filter_references'; export const useConfirmPersistencePrompt = (stateContainer: DiscoverStateContainer) => { const services = useDiscoverServices(); @@ -23,16 +20,7 @@ export const useConfirmPersistencePrompt = (stateContainer: DiscoverStateContain const persistDataView: (adHocDataView: DataView) => Promise = useCallback( async (adHocDataView) => { try { - const persistedDataView = await services.dataViews.createAndSave({ - ...adHocDataView.toSpec(), - id: uuidv4(), - }); - services.dataViews.clearInstanceCache(adHocDataView.id); - - updateFiltersReferences(adHocDataView, persistedDataView); - - stateContainer.actions.removeAdHocDataViewById(adHocDataView.id!); - await stateContainer.appState.update({ index: persistedDataView.id }, true); + const persistedDataView = await stateContainer.actions.persistAdHocDataView(adHocDataView); const message = i18n.translate('discover.dataViewPersist.message', { defaultMessage: "Saved '{dataViewName}'", @@ -50,7 +38,7 @@ export const useConfirmPersistencePrompt = (stateContainer: DiscoverStateContain throw new Error(error); } }, - [services.dataViews, services.toastNotifications, stateContainer] + [services.toastNotifications, stateContainer] ); const openConfirmSavePrompt: (dataView: DataView) => Promise = useCallback( @@ -99,17 +87,15 @@ export const useConfirmPersistencePrompt = (stateContainer: DiscoverStateContain ); const updateSavedSearch = useCallback( - ({ savedSearch, dataView, state }) => { - return persistSavedSearch(savedSearch, { - dataView, - onSuccess: () => onUpdateSuccess(savedSearch), - onError: (error) => onUpdateError(error, savedSearch), - state, - saveOptions: {}, - services, - }); + async ({ savedSearch }) => { + try { + await stateContainer.savedSearchState.persist(savedSearch); + onUpdateSuccess(savedSearch); + } catch (e) { + onUpdateError(e, savedSearch); + } }, - [onUpdateError, onUpdateSuccess, services] + [onUpdateError, onUpdateSuccess, stateContainer.savedSearchState] ); return { openConfirmSavePrompt, updateSavedSearch }; diff --git a/src/plugins/discover/public/utils/add_log.ts b/src/plugins/discover/public/utils/add_log.ts index fd2de53ab4e61..7b14f7f69b452 100644 --- a/src/plugins/discover/public/utils/add_log.ts +++ b/src/plugins/discover/public/utils/add_log.ts @@ -14,8 +14,15 @@ export const addLog = (message: string, payload?: unknown) => { // @ts-expect-error - if (window?.ELASTIC_DISCOVER_LOGGER) { - // eslint-disable-next-line no-console - console.log(`[Discover] ${message}`, payload); + const logger = window?.ELASTIC_DISCOVER_LOGGER; + + if (logger) { + if (logger === 'debug') { + // eslint-disable-next-line no-console + console.log(`[Discover] ${message}`, payload); + } else { + // eslint-disable-next-line no-console + console.log(`[Discover] ${message}`); + } } }; diff --git a/src/plugins/discover/public/utils/breadcrumbs.ts b/src/plugins/discover/public/utils/breadcrumbs.ts index ca968b43fdb2a..bf482587efe30 100644 --- a/src/plugins/discover/public/utils/breadcrumbs.ts +++ b/src/plugins/discover/public/utils/breadcrumbs.ts @@ -8,7 +8,6 @@ import { ChromeStart } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; -import { SavedSearch } from '@kbn/saved-search-plugin/public'; export function getRootBreadcrumbs(breadcrumb?: string) { return [ @@ -34,18 +33,18 @@ export function getSavedSearchBreadcrumbs(id: string) { * Helper function to set the Discover's breadcrumb * if there's an active savedSearch, its title is appended */ -export function setBreadcrumbsTitle(savedSearch: SavedSearch, chrome: ChromeStart) { +export function setBreadcrumbsTitle(title: string | undefined, chrome: ChromeStart) { const discoverBreadcrumbsTitle = i18n.translate('discover.discoverBreadcrumbTitle', { defaultMessage: 'Discover', }); - if (savedSearch.id && savedSearch.title) { + if (title) { chrome.setBreadcrumbs([ { text: discoverBreadcrumbsTitle, href: '#/', }, - { text: savedSearch.title }, + { text: title }, ]); } else { chrome.setBreadcrumbs([ diff --git a/src/plugins/discover/tsconfig.json b/src/plugins/discover/tsconfig.json index 1f9beedd297ac..ffc0e2f316b48 100644 --- a/src/plugins/discover/tsconfig.json +++ b/src/plugins/discover/tsconfig.json @@ -48,7 +48,6 @@ "@kbn/ui-theme", "@kbn/react-field", "@kbn/monaco", - "@kbn/core-notifications-browser", "@kbn/config-schema", "@kbn/storybook", "@kbn/shared-ux-router", diff --git a/src/plugins/saved_search/public/index.ts b/src/plugins/saved_search/public/index.ts index 506e90825209a..4857b0fd153cf 100644 --- a/src/plugins/saved_search/public/index.ts +++ b/src/plugins/saved_search/public/index.ts @@ -15,6 +15,7 @@ export { getSavedSearchUrlConflictMessage, throwErrorOnSavedSearchUrlConflict, saveSavedSearch, + getNewSavedSearch, } from './services/saved_searches'; export { VIEW_MODE } from '../common'; diff --git a/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.ts b/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.ts index 0cae15e729209..d90bbed57e2f5 100644 --- a/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.ts +++ b/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.ts @@ -24,14 +24,6 @@ interface GetSavedSearchDependencies { savedObjectsTagging?: SavedObjectsTaggingApi; } -const getEmptySavedSearch = ({ - search, -}: { - search: DataPublicPluginStart['search']; -}): SavedSearch => ({ - searchSource: search.searchSource.createEmpty(), -}); - const findSavedSearch = async ( savedSearchId: string, { search, savedObjectsClient, spaces, savedObjectsTagging }: GetSavedSearchDependencies @@ -82,11 +74,29 @@ const findSavedSearch = async ( }; /** @public **/ + +/** + * Returns a new saved search + * Used when e.g. Discover is opened without a saved search id + * @param search + */ +export const getNewSavedSearch = ({ + search, +}: { + search: DataPublicPluginStart['search']; +}): SavedSearch => ({ + searchSource: search.searchSource.createEmpty(), +}); +/** + * Returns a persisted or a new saved search + * @param savedSearchId - when undefined a new saved search is returned + * @param dependencies + */ export const getSavedSearch = async ( savedSearchId: string | undefined, dependencies: GetSavedSearchDependencies ) => { return savedSearchId ? findSavedSearch(savedSearchId, dependencies) - : getEmptySavedSearch(dependencies); + : getNewSavedSearch(dependencies); }; diff --git a/src/plugins/saved_search/public/services/saved_searches/index.ts b/src/plugins/saved_search/public/services/saved_searches/index.ts index 3aa4120e19e78..53f486e79bb15 100644 --- a/src/plugins/saved_search/public/services/saved_searches/index.ts +++ b/src/plugins/saved_search/public/services/saved_searches/index.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export { getSavedSearch } from './get_saved_searches'; +export { getSavedSearch, getNewSavedSearch } from './get_saved_searches'; export { getSavedSearchUrl, getSavedSearchFullPathUrl, diff --git a/x-pack/test/functional/apps/discover/saved_searches.ts b/x-pack/test/functional/apps/discover/saved_searches.ts index f043c1985e702..76b380274f207 100644 --- a/x-pack/test/functional/apps/discover/saved_searches.ts +++ b/x-pack/test/functional/apps/discover/saved_searches.ts @@ -18,6 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const dashboardCustomizePanel = getService('dashboardCustomizePanel'); const queryBar = getService('queryBar'); const filterBar = getService('filterBar'); + const testSubjects = getService('testSubjects'); const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json'; const defaultSettings = { defaultIndex: 'logstash-*', @@ -77,6 +78,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.clickNewSearchButton(); + expect(await testSubjects.getVisibleText('discover-dataView-switch-link')).to.be('ecommerce'); + expect(await filterBar.hasFilter('category', `Men's Shoes`)).to.be(false); expect(await queryBar.getQueryString()).to.eql(''); @@ -89,6 +92,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await filterBar.hasFilter('category', `Men's Shoes`)).to.be(false); expect(await queryBar.getQueryString()).to.eql(''); + + await PageObjects.discover.clickNewSearchButton(); + expect(await testSubjects.getVisibleText('discover-dataView-switch-link')).to.be('ecommerce'); }); }); } From 675dd421f4e3396e29a82874c6be9c11270ad322 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 8 May 2023 00:57:08 -0400 Subject: [PATCH 002/102] [api-docs] 2023-05-08 Daily api_docs build (#156952) Generated by https://buildkite.com/elastic/kibana-api-docs-daily/builds/331 --- 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/asset_manager.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_data_migration.mdx | 2 +- api_docs/cloud_defend.mdx | 2 +- api_docs/cloud_experiments.mdx | 2 +- api_docs/cloud_security_posture.mdx | 2 +- api_docs/console.mdx | 2 +- api_docs/content_management.mdx | 2 +- api_docs/controls.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 | 2 +- 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/ecs_data_quality_dashboard.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/exploratory_view.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/files_management.mdx | 2 +- api_docs/fleet.mdx | 2 +- api_docs/global_search.mdx | 2 +- api_docs/guided_onboarding.mdx | 2 +- api_docs/home.mdx | 2 +- api_docs/image_embeddable.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_alerting_state_types.mdx | 2 +- api_docs/kbn_alerts.mdx | 2 +- api_docs/kbn_alerts_as_data_utils.mdx | 2 +- api_docs/kbn_alerts_ui_shared.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_analytics_shippers_gainsight.mdx | 2 +- api_docs/kbn_apm_config_loader.mdx | 2 +- api_docs/kbn_apm_synthtrace.mdx | 2 +- api_docs/kbn_apm_synthtrace_client.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_cell_actions.mdx | 2 +- api_docs/kbn_chart_expressions_common.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_code_editor.mdx | 2 +- api_docs/kbn_code_editor_mocks.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_content_editor.mdx | 2 +- .../kbn_content_management_table_list.mdx | 2 +- api_docs/kbn_content_management_utils.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_apps_server_internal.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_custom_branding_browser.mdx | 2 +- ..._core_custom_branding_browser_internal.mdx | 2 +- ...kbn_core_custom_branding_browser_mocks.mdx | 2 +- api_docs/kbn_core_custom_branding_common.mdx | 2 +- api_docs/kbn_core_custom_branding_server.mdx | 2 +- ...n_core_custom_branding_server_internal.mdx | 2 +- .../kbn_core_custom_branding_server_mocks.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.devdocs.json | 12 ++--- 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 +- ...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_lifecycle_server.mdx | 2 +- api_docs/kbn_core_lifecycle_server_mocks.mdx | 2 +- api_docs/kbn_core_logging_browser_mocks.mdx | 2 +- api_docs/kbn_core_logging_common_internal.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_plugins_server.mdx | 2 +- api_docs/kbn_core_plugins_server_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 +- api_docs/kbn_core_root_server_internal.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 +- api_docs/kbn_core_test_helpers_kbn_server.mdx | 2 +- ...n_core_test_helpers_so_type_serializer.mdx | 2 +- api_docs/kbn_core_test_helpers_test_utils.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_core_user_settings_server.mdx | 2 +- ...kbn_core_user_settings_server_internal.mdx | 2 +- .../kbn_core_user_settings_server_mocks.mdx | 2 +- api_docs/kbn_crypto.mdx | 2 +- api_docs/kbn_crypto_browser.mdx | 2 +- api_docs/kbn_cypress_config.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_dom_drag_drop.mdx | 2 +- api_docs/kbn_ebt_tools.mdx | 2 +- api_docs/kbn_ecs.mdx | 2 +- api_docs/kbn_ecs_data_quality_dashboard.mdx | 2 +- api_docs/kbn_es.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_expandable_flyout.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_generate_csv.mdx | 2 +- api_docs/kbn_generate_csv_types.mdx | 2 +- api_docs/kbn_guided_onboarding.mdx | 2 +- api_docs/kbn_handlebars.mdx | 2 +- api_docs/kbn_hapi_mocks.mdx | 2 +- api_docs/kbn_health_gateway_server.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_i18n_react.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_json_ast.mdx | 2 +- api_docs/kbn_kibana_manifest_schema.mdx | 2 +- .../kbn_language_documentation_popover.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_anomaly_utils.mdx | 2 +- api_docs/kbn_ml_date_picker.mdx | 2 +- api_docs/kbn_ml_error_utils.mdx | 2 +- api_docs/kbn_ml_is_defined.mdx | 2 +- api_docs/kbn_ml_is_populated_object.mdx | 2 +- api_docs/kbn_ml_local_storage.mdx | 2 +- api_docs/kbn_ml_nested_property.mdx | 2 +- api_docs/kbn_ml_number_utils.mdx | 2 +- api_docs/kbn_ml_query_utils.mdx | 2 +- api_docs/kbn_ml_random_sampler_utils.mdx | 2 +- api_docs/kbn_ml_route_utils.mdx | 2 +- api_docs/kbn_ml_string_hash.mdx | 2 +- api_docs/kbn_ml_trained_models_utils.mdx | 2 +- api_docs/kbn_ml_url_state.mdx | 2 +- api_docs/kbn_monaco.mdx | 2 +- api_docs/kbn_object_versioning.mdx | 2 +- api_docs/kbn_observability_alert_details.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_random_sampling.mdx | 2 +- api_docs/kbn_react_field.mdx | 2 +- api_docs/kbn_repo_file_maps.mdx | 2 +- api_docs/kbn_repo_linter.mdx | 2 +- api_docs/kbn_repo_path.mdx | 2 +- api_docs/kbn_repo_source_classifier.mdx | 2 +- api_docs/kbn_reporting_common.mdx | 2 +- api_docs/kbn_rison.mdx | 2 +- api_docs/kbn_rule_data_utils.mdx | 2 +- api_docs/kbn_saved_objects_settings.mdx | 2 +- api_docs/kbn_security_solution_side_nav.mdx | 2 +- ...kbn_security_solution_storybook_config.mdx | 2 +- .../kbn_securitysolution_autocomplete.mdx | 2 +- api_docs/kbn_securitysolution_data_table.mdx | 2 +- api_docs/kbn_securitysolution_ecs.mdx | 2 +- api_docs/kbn_securitysolution_es_utils.mdx | 2 +- ...ritysolution_exception_list_components.mdx | 2 +- api_docs/kbn_securitysolution_grouping.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_serverless_project_switcher.mdx | 2 +- api_docs/kbn_serverless_storybook_config.mdx | 2 +- api_docs/kbn_shared_svg.mdx | 2 +- api_docs/kbn_shared_ux_avatar_solution.mdx | 2 +- ...ared_ux_avatar_user_profile_components.mdx | 2 +- .../kbn_shared_ux_button_exit_full_screen.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 +- api_docs/kbn_shared_ux_chrome_navigation.mdx | 2 +- api_docs/kbn_shared_ux_file_context.mdx | 2 +- api_docs/kbn_shared_ux_file_image.mdx | 2 +- api_docs/kbn_shared_ux_file_image_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_picker.mdx | 2 +- api_docs/kbn_shared_ux_file_types.mdx | 2 +- api_docs/kbn_shared_ux_file_upload.mdx | 2 +- api_docs/kbn_shared_ux_file_util.mdx | 2 +- api_docs/kbn_shared_ux_link_redirect_app.mdx | 2 +- .../kbn_shared_ux_link_redirect_app_mocks.mdx | 2 +- api_docs/kbn_shared_ux_markdown.mdx | 2 +- api_docs/kbn_shared_ux_markdown_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_prompt_not_found.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_slo_schema.mdx | 2 +- api_docs/kbn_some_dev_log.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_ts_projects.mdx | 2 +- api_docs/kbn_typed_react_router_config.mdx | 2 +- api_docs/kbn_ui_actions_browser.mdx | 2 +- api_docs/kbn_ui_shared_deps_src.mdx | 2 +- api_docs/kbn_ui_theme.mdx | 2 +- api_docs/kbn_url_state.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.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/notifications.mdx | 2 +- api_docs/observability.mdx | 2 +- api_docs/observability_onboarding.mdx | 2 +- api_docs/observability_shared.mdx | 2 +- api_docs/osquery.mdx | 2 +- api_docs/plugin_directory.mdx | 8 +-- 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.devdocs.json | 11 +++-- api_docs/security_solution.mdx | 2 +- api_docs/serverless.devdocs.json | 49 ++++++++++++++++++- api_docs/serverless.mdx | 4 +- api_docs/serverless_observability.mdx | 2 +- api_docs/serverless_search.mdx | 2 +- api_docs/serverless_security.mdx | 4 +- 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.mdx | 2 +- api_docs/ui_actions.mdx | 2 +- api_docs/ui_actions_enhanced.mdx | 2 +- api_docs/unified_field_list.mdx | 2 +- api_docs/unified_histogram.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/visualization_ui_components.mdx | 2 +- api_docs/visualizations.mdx | 2 +- 518 files changed, 581 insertions(+), 531 deletions(-) diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index ff9cb9862e0b6..67118869b22fd 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: 2023-05-07 +date: 2023-05-08 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 4e4ed223b6388..d2df3c33f33d8 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: 2023-05-07 +date: 2023-05-08 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 272fd61537d4c..e4d8cceb0fc5f 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: 2023-05-07 +date: 2023-05-08 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 e054a213dc44a..3f7b1aa0aafc5 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: 2023-05-07 +date: 2023-05-08 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 faccc12da0f5a..2ad72d54cc477 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/asset_manager.mdx b/api_docs/asset_manager.mdx index 35bc93cb3d5a3..ad6cc6ca1781e 100644 --- a/api_docs/asset_manager.mdx +++ b/api_docs/asset_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetManager title: "assetManager" image: https://source.unsplash.com/400x175/?github description: API docs for the assetManager plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager'] --- import assetManagerObj from './asset_manager.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 1b7079a6f82eb..1dec30a15ab43 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: 2023-05-07 +date: 2023-05-08 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 82947be5b71ba..92d7910e021a4 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: 2023-05-07 +date: 2023-05-08 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 7bf979eedf05e..66f7558acde09 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: 2023-05-07 +date: 2023-05-08 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 a112bc0380e37..08f5869483128 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: 2023-05-07 +date: 2023-05-08 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 b96c6c745f4ce..3501673f5eec4 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: 2023-05-07 +date: 2023-05-08 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 713ccfd0576bc..2db306ed4a778 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: 2023-05-07 +date: 2023-05-08 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 566d0de5e64f7..4c128bac9d5f9 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat'] --- import cloudChatObj from './cloud_chat.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index d24b67ed41ba5..3c3b1943f65ac 100644 --- a/api_docs/cloud_data_migration.mdx +++ b/api_docs/cloud_data_migration.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration title: "cloudDataMigration" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDataMigration plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index 35cb8b5d71bf2..6d50d20de33ce 100644 --- a/api_docs/cloud_defend.mdx +++ b/api_docs/cloud_defend.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend title: "cloudDefend" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDefend plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index 6a3624c70c1a9..7f69ce8b2588a 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: 2023-05-07 +date: 2023-05-08 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 bd6a6e3997787..093b6de6ef1ee 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: 2023-05-07 +date: 2023-05-08 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 ebbb9b17e3c67..d413f6c6b038b 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index 55106ff8bb61e..bcd4523f32e2a 100644 --- a/api_docs/content_management.mdx +++ b/api_docs/content_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/contentManagement title: "contentManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the contentManagement plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 7dc060d1661c7..70c4313f09c75 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 748787f8ed854..84e90c76098da 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: 2023-05-07 +date: 2023-05-08 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 1caad88d5eca6..cc46995861b5a 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: 2023-05-07 +date: 2023-05-08 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 6345177cd7557..0c324975a51fc 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: 2023-05-07 +date: 2023-05-08 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 bffa0a33c5c35..d9bb47ae5a568 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: 2023-05-07 +date: 2023-05-08 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 8ad88c68c2caf..085f544b99a72 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: 2023-05-07 +date: 2023-05-08 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 76c453f505942..917b04f4c63c4 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: 2023-05-07 +date: 2023-05-08 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 328367e2856ff..277999b9061aa 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: 2023-05-07 +date: 2023-05-08 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 5c25100ba1d3e..0855ae0874ea7 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: 2023-05-07 +date: 2023-05-08 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 a766d403d2b13..4d89f57ef1cb7 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: 2023-05-07 +date: 2023-05-08 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 fc82818e98749..b5edf6bba68f9 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: 2023-05-07 +date: 2023-05-08 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 3976e1fe6a086..d72b4193920cf 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: 2023-05-07 +date: 2023-05-08 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 19196ab7341bd..d2e1692c6e71b 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 77bb37fab3036..cc9a85efe66f1 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 0e5faaecb066e..13098ab85450c 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 668b2fff5ef0e..47b9fd4260589 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: 2023-05-07 +date: 2023-05-08 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 9966ab7e66ecd..9956f553d7ecf 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: 2023-05-07 +date: 2023-05-08 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 5316cfa5b7372..cc4da8f1543bb 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 7be0a4219c1c1..e9180bd69f021 100644 --- a/api_docs/ecs_data_quality_dashboard.mdx +++ b/api_docs/ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ecsDataQualityDashboard title: "ecsDataQualityDashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the ecsDataQualityDashboard plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 99ecbddcf4b34..80f71c6bb9df2 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: 2023-05-07 +date: 2023-05-08 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 37665856e639d..c02fc99085d83 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: 2023-05-07 +date: 2023-05-08 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 81e2429f651b4..335b92d1c0bc8 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: 2023-05-07 +date: 2023-05-08 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 a68a3b12d473a..2626b0b7677fd 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: 2023-05-07 +date: 2023-05-08 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 9d363382a4d04..65042bc8a5ec9 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: 2023-05-07 +date: 2023-05-08 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 f730b498c27a1..c25cd476fc5df 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: 2023-05-07 +date: 2023-05-08 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 566d130b6dba5..a7d7923a9ab23 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index e9d01181d2a57..acc6a03e2f0e7 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 9bc378e624689..2b4531e7f63ec 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: 2023-05-07 +date: 2023-05-08 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 9bb5f9e82b19e..eabaff970293e 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: 2023-05-07 +date: 2023-05-08 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 883d1d3d8fbd2..0927c1f95445e 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: 2023-05-07 +date: 2023-05-08 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 f296351583f65..c2c392922ab21 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: 2023-05-07 +date: 2023-05-08 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 ac86b8cc8d6e9..d5205515ac740 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: 2023-05-07 +date: 2023-05-08 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 5c2a5e38d0bb7..f58c5beb99335 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: 2023-05-07 +date: 2023-05-08 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 cf7e54df282a6..27cd924553389 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: 2023-05-07 +date: 2023-05-08 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 7ce5c90979728..4faf1d294ab39 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: 2023-05-07 +date: 2023-05-08 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 3233c76e257ad..01fe30797f7e9 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: 2023-05-07 +date: 2023-05-08 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 f8303b3ce91f6..0bb7d416bd8be 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: 2023-05-07 +date: 2023-05-08 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 8b1d6b6bb9e57..38d0ea0b11876 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: 2023-05-07 +date: 2023-05-08 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 939c7c8e0d9a5..8a65f19183a2f 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: 2023-05-07 +date: 2023-05-08 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 419263c08a916..caee522456fc3 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: 2023-05-07 +date: 2023-05-08 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 6220bba7336aa..30aa2df65ec79 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: 2023-05-07 +date: 2023-05-08 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 a557954a666e0..1001af3656df2 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: 2023-05-07 +date: 2023-05-08 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 16a0f0d4c8439..98a1cf4aafc4f 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: 2023-05-07 +date: 2023-05-08 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 3a72270d60918..b52f294a42518 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: 2023-05-07 +date: 2023-05-08 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 457430bc3c375..fe902689c4696 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index 73da0fbdedc6e..98a82bafd126e 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 4af17ce6008be..1d1460a5cef7b 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: 2023-05-07 +date: 2023-05-08 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 bb0ff4849f94f..657927df2b83b 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index d23f847732869..331e918af2614 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: 2023-05-07 +date: 2023-05-08 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 3d690c0e68e9f..211e9e2c6a07b 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index 057fd0184c363..11dd9719cb350 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index b94d95d3c264c..ddf4a31a95360 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: 2023-05-07 +date: 2023-05-08 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 ce19286d93df0..b25e2a30b48ed 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: 2023-05-07 +date: 2023-05-08 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 c3385575e09c0..08e236d01bdd9 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: 2023-05-07 +date: 2023-05-08 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 4a4ec21a4a69c..052f3d1c6df2d 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: 2023-05-07 +date: 2023-05-08 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 6a4940c68b1ef..920b264df2f78 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: 2023-05-07 +date: 2023-05-08 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 1f8c24f63334d..5f68a33f0cc82 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: 2023-05-07 +date: 2023-05-08 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 65eba196dc939..977a61ba91acf 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: 2023-05-07 +date: 2023-05-08 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 4722aba40cd4a..56836ea98435f 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index 886e61c547f5d..e9dfabe05f60d 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 71a26ed1c49c2..ede67e96ec2c1 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] --- import kbnAlertsObj from './kbn_alerts.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 514d6a12f704e..ad2ba4ad7c127 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index cd11e37f365e5..4b7dbea78ab76 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index fecf59e7f7e14..2af1d27751534 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: 2023-05-07 +date: 2023-05-08 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 ebd2f88739a4f..3144b1be4c083 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: 2023-05-07 +date: 2023-05-08 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 f922d28b9d05e..d52c1625e8946 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: 2023-05-07 +date: 2023-05-08 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 45cdbb83b51dc..e0eefa557ee5a 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: 2023-05-07 +date: 2023-05-08 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 81cc70f57ef3e..54abcf2f8dbeb 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: 2023-05-07 +date: 2023-05-08 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 d465b152f0d0b..4d759a95fefdd 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_gainsight.mdx b/api_docs/kbn_analytics_shippers_gainsight.mdx index ae94029f87eba..131f62f3a925e 100644 --- a/api_docs/kbn_analytics_shippers_gainsight.mdx +++ b/api_docs/kbn_analytics_shippers_gainsight.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-gainsight title: "@kbn/analytics-shippers-gainsight" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-gainsight plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-gainsight'] --- import kbnAnalyticsShippersGainsightObj from './kbn_analytics_shippers_gainsight.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index caacce801f4c9..e7223ccaecbc0 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: 2023-05-07 +date: 2023-05-08 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 e92754fcc428a..289cd900b4cfe 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index 342c52fbe8a3f..d9215f3f8949c 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index ec9ba2eaef8ae..ec86b99d9a56a 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: 2023-05-07 +date: 2023-05-08 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 26fc64d57574f..5975d4659d0d0 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: 2023-05-07 +date: 2023-05-08 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 70e48c585cd7e..b34eb97ecbee0 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index b0f8ca31ca11b..289fbaae53c07 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index a2b4ad25ab1cf..25ac885511b97 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 665af27436352..6dd377acc7580 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: 2023-05-07 +date: 2023-05-08 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 89475e206ef3a..d557df4c4c4c6 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: 2023-05-07 +date: 2023-05-08 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 3e7f161f1da56..950a6d972d822 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: 2023-05-07 +date: 2023-05-08 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 e1f6b97397de8..619b739151d71 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: 2023-05-07 +date: 2023-05-08 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 461c090552af1..2479cad78afa9 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 193562592747d..65cadd70b81c4 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_code_editor_mocks.mdx b/api_docs/kbn_code_editor_mocks.mdx index ac48ccda6db3c..d4289b8312fdb 100644 --- a/api_docs/kbn_code_editor_mocks.mdx +++ b/api_docs/kbn_code_editor_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor-mocks title: "@kbn/code-editor-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor-mocks plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mocks'] --- import kbnCodeEditorMocksObj from './kbn_code_editor_mocks.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 6995378642c28..3349cc155155e 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: 2023-05-07 +date: 2023-05-08 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 841169ceabe84..aee61c626d480 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: 2023-05-07 +date: 2023-05-08 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 0ca126ac25b33..df49b4d8744fd 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: 2023-05-07 +date: 2023-05-08 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 a77e87f1f5d86..0a33d62c86749 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index f1dd3300ecd25..5a41c4eeb6660 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list.mdx index 9cc26826d4bf8..5f40c3b41395a 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: 2023-05-07 +date: 2023-05-08 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_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index a66688a7ed512..100159316f841 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 787eb30aec32c..9fa0bc90bceaa 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: 2023-05-07 +date: 2023-05-08 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 244d683929b0b..d4bd20bef5a59 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: 2023-05-07 +date: 2023-05-08 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 d07c4c88c98d7..7aeeca7955612 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: 2023-05-07 +date: 2023-05-08 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 c633da34cd280..392897df30c32 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: 2023-05-07 +date: 2023-05-08 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 ee95e67f91e31..f93be9af01e62 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: 2023-05-07 +date: 2023-05-08 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 b1e1d4d8a83ae..03aaaaaddcdeb 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: 2023-05-07 +date: 2023-05-08 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 8229ec1ea935e..6f85db10bfcb1 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: 2023-05-07 +date: 2023-05-08 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 f6e3a88bc07fe..428416d2a3247 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: 2023-05-07 +date: 2023-05-08 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 ad750d73d9dd5..b3fbb51928c6c 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: 2023-05-07 +date: 2023-05-08 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 7e03d9e7d10d1..6d94e84aa0f91 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: 2023-05-07 +date: 2023-05-08 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 0da3f9afa0c19..9c6ce4b430418 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: 2023-05-07 +date: 2023-05-08 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 cf4a7b9b97122..60f5f46ea3dfe 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: 2023-05-07 +date: 2023-05-08 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_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 47de39fd7671f..11ff523bdf113 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 623995659526b..9e90692d34643 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: 2023-05-07 +date: 2023-05-08 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 024b4ee8753ae..0430c23b7a97c 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: 2023-05-07 +date: 2023-05-08 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 4aa3516722fbc..0fc01be31a8c9 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: 2023-05-07 +date: 2023-05-08 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 95a8c52d50e35..107c89b61fb12 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: 2023-05-07 +date: 2023-05-08 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 f77c849a0fce7..0878c173d02d5 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: 2023-05-07 +date: 2023-05-08 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 b6ee77050ccf6..5cf855a2af70b 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: 2023-05-07 +date: 2023-05-08 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 e9c999d298e34..70fc609730e7a 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: 2023-05-07 +date: 2023-05-08 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 9284359e3c7e6..7a4fe2dc02ac8 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: 2023-05-07 +date: 2023-05-08 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 9861c65c6943f..8a918d9da532c 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: 2023-05-07 +date: 2023-05-08 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 103a84c552026..6297d1528df00 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: 2023-05-07 +date: 2023-05-08 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 9d23674ff02ce..eb17b1eb63432 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: 2023-05-07 +date: 2023-05-08 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_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index 0d95d3d3bcc0d..afa2d0c580a36 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index effc620649f29..4ae933dc6a357 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index 588f63c62943c..aca41ec81af0b 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index b66aed80ea14a..1014afd00dcbe 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index 9538c254588d1..cb1c4be09c0f8 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index a61545c03e92c..ae66006425b39 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index 70030c5a3edb0..696e2493c4786 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 7b259d6ade3a6..986ead412011e 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: 2023-05-07 +date: 2023-05-08 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 06c4f089642b4..f3641ec6cb770 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: 2023-05-07 +date: 2023-05-08 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 98417f3aaafd9..25554416e1a3b 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: 2023-05-07 +date: 2023-05-08 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 e04af7487641f..3c77be0d8410c 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: 2023-05-07 +date: 2023-05-08 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 bb1499cc7c126..87bd3856fb7cf 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: 2023-05-07 +date: 2023-05-08 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 c65ca4a2c5218..a51a826f5cebc 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: 2023-05-07 +date: 2023-05-08 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 a0ba525c9623a..ce8542bc4c31d 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: 2023-05-07 +date: 2023-05-08 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 13fd6780d62b2..4a2c4a08c2218 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: 2023-05-07 +date: 2023-05-08 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 976836b66096c..d5478cc77b0f8 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: 2023-05-07 +date: 2023-05-08 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 ea9ee9c1d2799..460766378de0b 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: 2023-05-07 +date: 2023-05-08 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 a268c716d6f9f..dae58659412f8 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: 2023-05-07 +date: 2023-05-08 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 4fb15d2a4bdf0..df17dac5a26b8 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: 2023-05-07 +date: 2023-05-08 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 61b192756d9a2..acefc0805f872 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: 2023-05-07 +date: 2023-05-08 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 be6bc3bd852ac..440042e3f8f6b 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: 2023-05-07 +date: 2023-05-08 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 51a90d5e2e5c4..54078783fde60 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: 2023-05-07 +date: 2023-05-08 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 e06c9592d7aa5..19dc15e6d148b 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: 2023-05-07 +date: 2023-05-08 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 9bde6165db5a2..c8e0a0c753f4e 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: 2023-05-07 +date: 2023-05-08 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 6996cf3620e56..e34a34f43f89e 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: 2023-05-07 +date: 2023-05-08 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 f503f4302e3c4..f7efa2b77c38c 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: 2023-05-07 +date: 2023-05-08 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 7989d390a5b16..966fc8995d429 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: 2023-05-07 +date: 2023-05-08 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 f043a247b440b..5840511349ada 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: 2023-05-07 +date: 2023-05-08 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 0c03418d9662e..472b47c09c1a5 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: 2023-05-07 +date: 2023-05-08 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 162f9246796a2..cf71416216110 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: 2023-05-07 +date: 2023-05-08 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 3fdd7e33294e1..2ce02a86ac4e7 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: 2023-05-07 +date: 2023-05-08 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 3a0b5dbc64e33..b8212b1ec0182 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: 2023-05-07 +date: 2023-05-08 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 7eb1d47b46b2f..7e67620997a6a 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: 2023-05-07 +date: 2023-05-08 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 d6da56af8f5fc..69f696f1629c9 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: 2023-05-07 +date: 2023-05-08 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 af8bf1dc2b484..91716e625a767 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: 2023-05-07 +date: 2023-05-08 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 4c740a79bc939..7603c8ed982ba 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: 2023-05-07 +date: 2023-05-08 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 74733305d0432..56d011c4b01ba 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: 2023-05-07 +date: 2023-05-08 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 d35813f5d97cd..94f7d0366e959 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: 2023-05-07 +date: 2023-05-08 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 f919439911028..7043415e975aa 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: 2023-05-07 +date: 2023-05-08 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 5fef5f7ad8aed..c316ee845b8a7 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: 2023-05-07 +date: 2023-05-08 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 a583a130bcc0b..14b5a16140da3 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: 2023-05-07 +date: 2023-05-08 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 7d697ba73552e..28fcf9300fe68 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: 2023-05-07 +date: 2023-05-08 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 31e3bf8502ee4..1520d7acdde79 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: 2023-05-07 +date: 2023-05-08 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 2247c8cfbab80..38a2dd621078e 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: 2023-05-07 +date: 2023-05-08 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 30a15b0a999d4..f01bf3770ea09 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: 2023-05-07 +date: 2023-05-08 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.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index 16eafe8893add..c2cb299143bbe 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -120,7 +120,7 @@ "section": "def-common.AddVersionOpts", "text": "AddVersionOpts" }, - "" + "" ], "path": "packages/core/http/core-http-server/src/versioning/types.ts", "deprecated": false, @@ -7117,7 +7117,7 @@ "\nAdd a new version of this route" ], "signature": [ - "

(options: ", + "

(options: ", { "pluginId": "@kbn/core-http-server", "scope": "common", @@ -7125,7 +7125,7 @@ "section": "def-common.AddVersionOpts", "text": "AddVersionOpts" }, - ", handler: (context: Ctx, request: ", + ", handler: (context: Ctx, request: ", { "pluginId": "@kbn/core-http-server", "scope": "common", @@ -7157,7 +7157,7 @@ "section": "def-common.IKibanaResponse", "text": "IKibanaResponse" }, - ">) => ", + ">) => ", { "pluginId": "@kbn/core-http-server", "scope": "common", @@ -7186,7 +7186,7 @@ "section": "def-common.AddVersionOpts", "text": "AddVersionOpts" }, - "" + "" ], "path": "packages/core/http/core-http-server/src/versioning/types.ts", "deprecated": false, @@ -7235,7 +7235,7 @@ "section": "def-common.IKibanaResponse", "text": "IKibanaResponse" }, - ">" + ">" ], "path": "packages/core/http/core-http-server/src/versioning/types.ts", "deprecated": false, diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 7ec42a38ea494..d028f90389a34 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: 2023-05-07 +date: 2023-05-08 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 c68737cc28790..127e08f361649 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: 2023-05-07 +date: 2023-05-08 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 d9a230e837a95..13b664a56be55 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: 2023-05-07 +date: 2023-05-08 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 1be660ce32de9..f872c85bde10d 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: 2023-05-07 +date: 2023-05-08 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 00c3289e4f60d..18d44fb00377a 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: 2023-05-07 +date: 2023-05-08 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 31d81f497fd22..13850bcf3dc01 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: 2023-05-07 +date: 2023-05-08 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 56a8659b0ee7c..e09cee0c332fe 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: 2023-05-07 +date: 2023-05-08 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 fda30ce94563e..82595510e2392 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: 2023-05-07 +date: 2023-05-08 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_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index b10212ddfb043..92126c51fc2ac 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: 2023-05-07 +date: 2023-05-08 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 3a3ef4f49d777..a93573d646a16 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: 2023-05-07 +date: 2023-05-08 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 a40a3b79c2fa8..2b0e59d16f627 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: 2023-05-07 +date: 2023-05-08 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 9e7c44f6effa2..61f94ef8e02be 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: 2023-05-07 +date: 2023-05-08 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 b9186b56a64ff..853c894ffa3ec 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: 2023-05-07 +date: 2023-05-08 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_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index 299f14c4dae4a..0a3056265421b 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index d7cb70056ac5a..f45304911da4e 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index 110992fa1d131..bad04f5709f2d 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index 9ad934ce2eee9..3068727056960 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index b68f86930cd8e..1b19050de0ba6 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: 2023-05-07 +date: 2023-05-08 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 fe02d245a27f1..63c90331f6c87 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: 2023-05-07 +date: 2023-05-08 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 7874890989973..a27c66c49669f 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: 2023-05-07 +date: 2023-05-08 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 b1ebd877b4ea7..72c3745d7129e 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: 2023-05-07 +date: 2023-05-08 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 b328003311a09..dc09f37760aaa 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: 2023-05-07 +date: 2023-05-08 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 6861657f18442..2f3dd1b0a9f73 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: 2023-05-07 +date: 2023-05-08 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 37c40c874f1d6..91aaa0f4819d9 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: 2023-05-07 +date: 2023-05-08 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 f4d975ab1f83b..4fa182d2a35fe 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: 2023-05-07 +date: 2023-05-08 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 d12a59a1c82f6..0135493bcfbbe 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: 2023-05-07 +date: 2023-05-08 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 3ed95bb1ace98..97f712876f636 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: 2023-05-07 +date: 2023-05-08 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 d593243bfb0e4..87b21d3ce0a9a 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: 2023-05-07 +date: 2023-05-08 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 5d96693eb6783..4e69752ee679c 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: 2023-05-07 +date: 2023-05-08 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 e245a285c4e6a..13c5daf6ace51 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: 2023-05-07 +date: 2023-05-08 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 0f65117561d6a..73c2ef739b34e 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: 2023-05-07 +date: 2023-05-08 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 e9bfe64829978..e7ac8015404c7 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: 2023-05-07 +date: 2023-05-08 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 0c8add0443090..ad4e99edd7283 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: 2023-05-07 +date: 2023-05-08 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 63a6209d2a3e8..a95bdb9db823e 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: 2023-05-07 +date: 2023-05-08 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 6c22c6a00f163..85211ac8f2348 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: 2023-05-07 +date: 2023-05-08 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 07659135ddb76..087806d411332 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: 2023-05-07 +date: 2023-05-08 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 ee4990c22604a..8e5c603d924af 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: 2023-05-07 +date: 2023-05-08 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_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index fb6416837af54..3ffdbac882224 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index da2188b6668c3..40cfefb47d57f 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index ea4a3712a4504..b4980c7bd30c5 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: 2023-05-07 +date: 2023-05-08 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 c765bb7f09369..4d5909363a3c9 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: 2023-05-07 +date: 2023-05-08 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 d778d31c2e1df..3ef8cfd695b6b 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: 2023-05-07 +date: 2023-05-08 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 69aa91290e723..8a6048e98dfa6 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: 2023-05-07 +date: 2023-05-08 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 294bf9e106daa..e9ffbe2095454 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: 2023-05-07 +date: 2023-05-08 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_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 3ac9fe5165f6c..de01680f817f3 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.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 4e1c4a23cad0f..1901b29a48fd9 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: 2023-05-07 +date: 2023-05-08 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 f7324ccc134a4..0419c111cca01 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: 2023-05-07 +date: 2023-05-08 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 c0bdfb1d8d036..4d6f1e2661f61 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: 2023-05-07 +date: 2023-05-08 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 1b25d8d8c29c6..17ba76762215d 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: 2023-05-07 +date: 2023-05-08 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 a35cd0b91b03b..09b2b0ef2042b 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: 2023-05-07 +date: 2023-05-08 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 c91c293d3b23c..25f15d7e715f5 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: 2023-05-07 +date: 2023-05-08 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 1298630578312..05bd5e5a9fcd2 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: 2023-05-07 +date: 2023-05-08 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 8338fe06d8139..05b929cbb2d9e 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: 2023-05-07 +date: 2023-05-08 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 9ca8b0f20d6eb..f3ee1140c33c2 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: 2023-05-07 +date: 2023-05-08 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 8da07e8d6b7ab..80b377097029c 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: 2023-05-07 +date: 2023-05-08 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 c57c5374bacf1..6ab64d7ff1667 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: 2023-05-07 +date: 2023-05-08 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 197ad5773a5f5..be2e4e61d6110 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: 2023-05-07 +date: 2023-05-08 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 10809e6109f30..9a889b4d169bb 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: 2023-05-07 +date: 2023-05-08 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 f31cb2a5ca823..e2bb5b642d2df 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: 2023-05-07 +date: 2023-05-08 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 5e73d47ea1849..3983fd871869b 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: 2023-05-07 +date: 2023-05-08 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 a7309a81c6bde..c9f593eb4a544 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: 2023-05-07 +date: 2023-05-08 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 cf77c6be7f50a..19e76b64effe4 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: 2023-05-07 +date: 2023-05-08 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 59a97b3f35eae..6de3f7b8e929c 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: 2023-05-07 +date: 2023-05-08 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 8b25666564751..2e5266730ff6b 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: 2023-05-07 +date: 2023-05-08 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 ffb6a9d0e2830..53f8ee10a1392 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: 2023-05-07 +date: 2023-05-08 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 514aa3f559e21..9d703ddba118f 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: 2023-05-07 +date: 2023-05-08 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 f905733b8d570..201a353c1b1ea 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: 2023-05-07 +date: 2023-05-08 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 f11345670fa1f..40879c08292c9 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: 2023-05-07 +date: 2023-05-08 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 256e664e63c69..2e134415688d4 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: 2023-05-07 +date: 2023-05-08 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 0a3b27f105ef5..90d1a77ae4540 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: 2023-05-07 +date: 2023-05-08 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_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index 4d4e86d70b00a..006776e89c6cd 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.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 084d8a8b39462..50b5be0070a6d 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: 2023-05-07 +date: 2023-05-08 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_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 95be43a1a86fc..24f7e31fb7285 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 8f68fee8605bd..85f937f1ac5c6 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: 2023-05-07 +date: 2023-05-08 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 2d33459708171..058c80d77fe55 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: 2023-05-07 +date: 2023-05-08 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 212fd67090572..b78c3cd52a803 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: 2023-05-07 +date: 2023-05-08 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 1147a70885a8d..882732754d84b 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: 2023-05-07 +date: 2023-05-08 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 c3e0235c9e9d7..3d819713f4240 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: 2023-05-07 +date: 2023-05-08 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 89df3b4f7a6ec..3f1eff6101774 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: 2023-05-07 +date: 2023-05-08 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 2a427deea54b4..18b7488ea230f 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: 2023-05-07 +date: 2023-05-08 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 d7f7fa1d52b74..9f11f161b454c 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: 2023-05-07 +date: 2023-05-08 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 fb4875f26b7d0..f214923068d98 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: 2023-05-07 +date: 2023-05-08 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 553d31f2313e1..bf09280f7c391 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: 2023-05-07 +date: 2023-05-08 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 203b2ac851b84..f87348a7402c8 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: 2023-05-07 +date: 2023-05-08 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 3a178c6cab7ad..84eed217f1833 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: 2023-05-07 +date: 2023-05-08 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 d7fe7054296a3..f4b3e66e5471e 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: 2023-05-07 +date: 2023-05-08 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_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 662b32e004020..738bc1f216e20 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_internal.mdx b/api_docs/kbn_core_user_settings_server_internal.mdx index 9ccebf40fa667..da2028de1a2f9 100644 --- a/api_docs/kbn_core_user_settings_server_internal.mdx +++ b/api_docs/kbn_core_user_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-internal title: "@kbn/core-user-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-internal plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-internal'] --- import kbnCoreUserSettingsServerInternalObj from './kbn_core_user_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index b0a3f1fb019a6..9278631b5f661 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index be243a5596594..28f6b319ad3dd 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: 2023-05-07 +date: 2023-05-08 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 1aff54e76f76f..940b6f76bcdfa 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 2f899ff4f9c19..7ac07058f86e0 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 497331d0aab2f..8d3a2cd6acfc9 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: 2023-05-07 +date: 2023-05-08 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 1dccb62784a75..45481b43c2c95 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: 2023-05-07 +date: 2023-05-08 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 776dc89f92df2..10d18b6fa7772 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: 2023-05-07 +date: 2023-05-08 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 3cb5539590b8e..7beede920bef8 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: 2023-05-07 +date: 2023-05-08 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 d3988896996e9..ff275992057a3 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: 2023-05-07 +date: 2023-05-08 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 6b837a19de62d..21a661bf5ab5f 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: 2023-05-07 +date: 2023-05-08 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 c79db6b937fb8..dc194d79d1596 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index 89764ee0c4f3a..d3ab17a25321d 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index a973b7dc53020..a40c8552d0fbc 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs.mdx b/api_docs/kbn_ecs.mdx index f09497f175c42..df7be264080b6 100644 --- a/api_docs/kbn_ecs.mdx +++ b/api_docs/kbn_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs title: "@kbn/ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs'] --- import kbnEcsObj from './kbn_ecs.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index 410df0a1abdb7..acf12844fa43d 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 906f0737539e0..9dfe39dc4817a 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 28ec66e54de58..f456ac88ed2a4 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: 2023-05-07 +date: 2023-05-08 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 24dc9889dc84a..b52b1e617e454 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: 2023-05-07 +date: 2023-05-08 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 0aa269ade0b0b..b22a54f00659c 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: 2023-05-07 +date: 2023-05-08 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 e2a39519029db..1628f4ab457f6 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: 2023-05-07 +date: 2023-05-08 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 e92ac0a17686d..825279546e2fe 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index 3e572a3779092..fdda2b3f6ebe5 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 9384211751121..a974251b4dad8 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: 2023-05-07 +date: 2023-05-08 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 119d12e8c2519..73e86b7c67629 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: 2023-05-07 +date: 2023-05-08 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 c8c33f36010f0..63f124509c300 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: 2023-05-07 +date: 2023-05-08 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 fa01a4af009d7..37ee26c0f3b3f 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index f17bc597f7bfd..387a413908c52 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_generate_csv_types.mdx b/api_docs/kbn_generate_csv_types.mdx index 554a518043c00..b5bb5cd651076 100644 --- a/api_docs/kbn_generate_csv_types.mdx +++ b/api_docs/kbn_generate_csv_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv-types title: "@kbn/generate-csv-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv-types plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv-types'] --- import kbnGenerateCsvTypesObj from './kbn_generate_csv_types.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index cc788d3dce7a3..78feb6802044e 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index b92550dcff2d3..0327f271ee86e 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: 2023-05-07 +date: 2023-05-08 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 8fba93c99ad10..d3fa5f05e45be 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index 34a5399beb6fb..aaf03cfd7f034 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index 1247ec88d81b1..cb479d05332eb 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: 2023-05-07 +date: 2023-05-08 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 90cf68fc34102..aee3906e9c3b5 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: 2023-05-07 +date: 2023-05-08 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 b9b54ff5d891e..6d818b543013b 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index 4d0f35fa2fed4..9d9625babad32 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index c5236a60823d4..26d677cb5a949 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: 2023-05-07 +date: 2023-05-08 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 f6fec72ca6c5c..0470e40ad7f5c 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: 2023-05-07 +date: 2023-05-08 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 4563e91976c0f..ce0adaa037349 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: 2023-05-07 +date: 2023-05-08 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 0f569c7e4b781..c6ab325fe11ab 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: 2023-05-07 +date: 2023-05-08 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 ed185325f7d70..847c76856afea 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index 3dea9198460e9..22d3d3b2d2be2 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 8e92869659352..21ac7e8ef6b01 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index 1dff4192540fb..675a4ff7505f4 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index ee841659574df..3c258a7029b7d 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: 2023-05-07 +date: 2023-05-08 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 bb672082d14a2..5242d16b480ba 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: 2023-05-07 +date: 2023-05-08 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 148b99fab3dc5..6de983ffe2787 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: 2023-05-07 +date: 2023-05-08 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 352b8ac112670..f49a95fcb1136 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: 2023-05-07 +date: 2023-05-08 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 b428552cafca0..54bd1594c113c 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: 2023-05-07 +date: 2023-05-08 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_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index 0eb9c7ede7aba..9a68c91936c51 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index 067156f34c86f..e2fa5d854272d 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index ae639211eb025..bc14af7525a6e 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index fc9901dc7f7f6..cc370d3e2d4b8 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 75333a0955b97..20fef981c6335 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: 2023-05-07 +date: 2023-05-08 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_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index b95add310c5bf..10b58be3c138f 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index 59fb9f92eb568..0f332857c08e3 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index a9d14a18479b8..ddc753c464dcb 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 552a18290b02b..42b0bd39a175a 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index 7ec331e1232db..29aab39564a57 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index 8124c253e12a6..9e9e1322b3b28 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index b83570ce66202..dda169bd3c222 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 7182e411a7b03..9856f0f2dbbd5 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index 3a0483363a1a4..ccea04d96aaae 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index b01530b7f94fd..1c6c42cde9fb6 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index db71c463ee32f..b3b714d835e44 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index 1608a792749e9..0e31177efcc3d 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 2200af2570574..1cca819b57186 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: 2023-05-07 +date: 2023-05-08 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 b85fa82f0a0ab..d83228c92dd7d 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: 2023-05-07 +date: 2023-05-08 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 4e3b8bab95c5d..d2b9c6be3b53d 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: 2023-05-07 +date: 2023-05-08 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 5a73fcb2ba960..90b0933eec6df 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: 2023-05-07 +date: 2023-05-08 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 0999880b9357e..6b5a330aec4ff 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: 2023-05-07 +date: 2023-05-08 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 ad93ce65a276a..9a659ac1ec0bf 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index c55e5ebca1801..7f65dcab24031 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 481b790d0cf2f..90362222dde04 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index ef801b2eabc61..2c037c3c510c4 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index c9276070053e4..febadc37eeb41 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index c4a7a8f796055..9b26e6d0e23a5 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 6cf8023612c09..0554ca54d6fc3 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index f3a7e01a167c5..c96b8626c67ad 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 8f0e4e2ae0d95..c8cfc2b7730f4 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index f7ecc8c840253..7565f10827d76 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index d259084238454..6cd4a72a43cc6 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index c9bf331a35ac8..84afa878dcaaa 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index 9e7966a1f327b..6fd1a860434f5 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 2062780d73052..9080331f2487d 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index 6ef0af2e73766..16f0f69e67ce7 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index 29e7e20b3550e..96d6e4b4a9816 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index f79dff45dae33..a8dccf7999ee4 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: 2023-05-07 +date: 2023-05-08 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 e0d3347dcf55a..bed0332ebc9a8 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: 2023-05-07 +date: 2023-05-08 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_grouping.mdx b/api_docs/kbn_securitysolution_grouping.mdx index fa9a1ddf758fa..06217243260e3 100644 --- a/api_docs/kbn_securitysolution_grouping.mdx +++ b/api_docs/kbn_securitysolution_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-grouping title: "@kbn/securitysolution-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-grouping plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-grouping'] --- import kbnSecuritysolutionGroupingObj from './kbn_securitysolution_grouping.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 0ce43c34f1a7e..28f3b71d236f5 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: 2023-05-07 +date: 2023-05-08 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 bfdc8bfe47ba4..bb1f08706707b 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: 2023-05-07 +date: 2023-05-08 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 f62f221439ab0..3e6a311a00f49 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: 2023-05-07 +date: 2023-05-08 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 d280b1957b676..dc7d45dc27073 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: 2023-05-07 +date: 2023-05-08 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 7ffbb2251ca9f..d509b11e5574c 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: 2023-05-07 +date: 2023-05-08 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 4aa88d803255f..610dd5d225d1e 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: 2023-05-07 +date: 2023-05-08 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 a10d6b57145a2..1652819e6987b 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: 2023-05-07 +date: 2023-05-08 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 22f756477855b..38f0f7409e7ce 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: 2023-05-07 +date: 2023-05-08 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 741e42609c39a..b2f2315b21f88 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: 2023-05-07 +date: 2023-05-08 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 fe86e9b091892..be62c5892a38b 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: 2023-05-07 +date: 2023-05-08 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 35f792cae9506..efa095b053d10 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: 2023-05-07 +date: 2023-05-08 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 37a550c5b5af4..c70d52cdb89fa 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: 2023-05-07 +date: 2023-05-08 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 8f484a655efc6..19d9a9b3baa3c 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: 2023-05-07 +date: 2023-05-08 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 ebffa49138453..a092a4dbe3ddd 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index 1a42ef80fb0de..dbdcc98ebe050 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index 5eacd9b0a82f6..38f5b9be7b2b5 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index b17255137db88..baab8d2da063e 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: 2023-05-07 +date: 2023-05-08 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_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index a57196c14281b..ff24cb060a21d 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.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 9ebebf364f044..c73e6855e2f14 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: 2023-05-07 +date: 2023-05-08 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.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 17fbc06b566f6..9ce8b9a0ba4da 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.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 1e7944531d452..a8bf9bab293e6 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: 2023-05-07 +date: 2023-05-08 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 be7b573c54aa3..423372462b4c2 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: 2023-05-07 +date: 2023-05-08 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 d2919745be9f7..2022a9fd65264 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: 2023-05-07 +date: 2023-05-08 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 1787030b03df3..59990ae13ea5e 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: 2023-05-07 +date: 2023-05-08 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_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index cbe4aee50e5ca..0ba5f5b15e15a 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index b1e4ea5ca2a3a..5f805dbf12fc5 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index e02b1bb8104b2..3d99c911b80ac 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index ad00bb6e0b1df..3bab89888e561 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index c190183731438..01ba73d7d3ce3 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index ffe2cf025a939..6d7a369acc1af 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index cb5e706f945c7..eb7bad00d265f 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index 38a9d2338a910..c95c80180c360 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index aed2c1e0da3a9..64428d6391a97 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index 27daa3a2abf4c..a1b8c195bde10 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.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 41c2676d8ebd1..c3e0081b8e803 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: 2023-05-07 +date: 2023-05-08 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_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index f8a0af95f5375..aa622d4dd90d7 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index 397a59329cad9..b104e4426f664 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_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 4b9cf766a08bc..696eab3a759a7 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: 2023-05-07 +date: 2023-05-08 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 a7664b580acf7..00e111458b597 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: 2023-05-07 +date: 2023-05-08 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 5fc059b5f9467..4c59b4cb306ca 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: 2023-05-07 +date: 2023-05-08 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 bdad9f26332f6..3834de54f82a8 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: 2023-05-07 +date: 2023-05-08 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 c55ec200f8899..b165f6a8a47f8 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: 2023-05-07 +date: 2023-05-08 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 07283d1e905c7..388314aefd2ef 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: 2023-05-07 +date: 2023-05-08 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 158cf83a64522..1266f7cbc3ab4 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: 2023-05-07 +date: 2023-05-08 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 7caa9f0f25452..a2606f60404de 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: 2023-05-07 +date: 2023-05-08 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 b0b96167cc56a..0d4f5c8259680 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: 2023-05-07 +date: 2023-05-08 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 e28bd8ca19215..3f46d971cc619 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: 2023-05-07 +date: 2023-05-08 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 bf66c63104ac6..82e20aea0ae27 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: 2023-05-07 +date: 2023-05-08 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 2d48b7572fdea..d31bf497d457e 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: 2023-05-07 +date: 2023-05-08 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 09e193317d30f..9f68bf5f6b061 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: 2023-05-07 +date: 2023-05-08 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_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index ce8c14e6705b7..d139725980d5f 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index 0456bee00aaab..05ad1054a286d 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: 2023-05-07 +date: 2023-05-08 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 75272de56ac5c..5449f43864de1 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: 2023-05-07 +date: 2023-05-08 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 51598af60ac3a..bf5a7372e6c25 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: 2023-05-07 +date: 2023-05-08 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 c8fc37898dfbc..ffe98dc196ed5 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: 2023-05-07 +date: 2023-05-08 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 4eb4e745a3473..19b5b2668355c 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index a70c4b5d7a732..0606a19e2f866 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 208d50cea463b..b1c452803c8c8 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 24df7c62c8a4e..8e4538d4ce070 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: 2023-05-07 +date: 2023-05-08 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 3de8cc0bba77e..a7b2838b4db17 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: 2023-05-07 +date: 2023-05-08 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 e27d9997a006a..2c62c77bc8a32 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: 2023-05-07 +date: 2023-05-08 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 fca7b89d94a55..617616e580a5d 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: 2023-05-07 +date: 2023-05-08 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 0657acf4decd9..e1286eede926f 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: 2023-05-07 +date: 2023-05-08 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 97f4123c42f06..713244500746c 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: 2023-05-07 +date: 2023-05-08 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 b428e002d4f38..86a827142731d 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: 2023-05-07 +date: 2023-05-08 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 c4c5804f522f4..3daa0d41b8b87 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index c5b676a23772a..732ef67b675ad 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 58603f8af5378..6728d95ce8627 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: 2023-05-07 +date: 2023-05-08 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_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 0edf57214b073..f07f6d3b1a1d5 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index ec038514694bb..588e84bf40101 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 7698de3b4ba0a..f8323e7cc6c81 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_url_state.mdx b/api_docs/kbn_url_state.mdx index 354800e963fcb..192c87114267c 100644 --- a/api_docs/kbn_url_state.mdx +++ b/api_docs/kbn_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-url-state title: "@kbn/url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/url-state plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/url-state'] --- import kbnUrlStateObj from './kbn_url_state.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 3277c7a2d8c7f..3f259a0079d76 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: 2023-05-07 +date: 2023-05-08 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 0dc688a52b6ed..4c3d831cf389b 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: 2023-05-07 +date: 2023-05-08 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 403975945e245..8967534511fbd 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: 2023-05-07 +date: 2023-05-08 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 7959b1633e241..f46515c85f752 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: 2023-05-07 +date: 2023-05-08 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 8eb18e2e299b2..a549beb3fdf13 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: 2023-05-07 +date: 2023-05-08 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 4102a137156e0..ab6417bc87366 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: 2023-05-07 +date: 2023-05-08 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 f543e15cf3f24..34d42e357d2ef 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: 2023-05-07 +date: 2023-05-08 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 2fee45c9f0ed3..73c779564bba7 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: 2023-05-07 +date: 2023-05-08 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 dee9e5f4de9b2..21ba4fb22af02 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: 2023-05-07 +date: 2023-05-08 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 f04723857001a..71e8b9c32ce5f 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: 2023-05-07 +date: 2023-05-08 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 162130d0c2787..04ca8b2acdceb 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: 2023-05-07 +date: 2023-05-08 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 48beb3e0ec3d5..20c04bcb5dc02 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: 2023-05-07 +date: 2023-05-08 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 e5add4390cb8a..a405d5cf71fe2 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: 2023-05-07 +date: 2023-05-08 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 d17a40ef0185e..f4af3f22a66d8 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: 2023-05-07 +date: 2023-05-08 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 73a4d33761a19..769e250dc2fc6 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 6dbd22c5ead40..200214a2b6820 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: 2023-05-07 +date: 2023-05-08 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 0734ff0a7aee3..6ccdf56a2d183 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: 2023-05-07 +date: 2023-05-08 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 6490b01e16082..b7bd0ace305a5 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: 2023-05-07 +date: 2023-05-08 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 c8a78a87ee562..f0142dbc1d417 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: 2023-05-07 +date: 2023-05-08 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 d8c801613b1b3..f74cf04b2f9e3 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: 2023-05-07 +date: 2023-05-08 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 fcafeb21935a6..2642dc1591421 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: 2023-05-07 +date: 2023-05-08 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 dfbd1b4c0f06c..4a3973a7eb881 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 28e124b9496c2..9e5f1ffda8297 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 9a0afd29a1538..5ea4b892d754c 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index f7420d96e2eb1..d02e4264d904e 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index e056f6d5fb147..c5b572a141324 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 78f731aaf6081..289bdaba891e0 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: 2023-05-07 +date: 2023-05-08 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 1d3866e098ecd..5e2afad2fc97e 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,7 +21,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 69703 | 523 | 60070 | 1351 | +| 69705 | 523 | 60072 | 1351 | ## Plugin Directory @@ -152,10 +152,10 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | searchprofiler | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 283 | 0 | 94 | 1 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 123 | 0 | 82 | 27 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | The core Serverless plugin, providing APIs to Serverless Project plugins. | 7 | 0 | 6 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | The core Serverless plugin, providing APIs to Serverless Project plugins. | 9 | 0 | 8 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Serverless customizations for observability. | 6 | 0 | 6 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Serverless customizations for search. | 6 | 0 | 6 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Serverless customizations for security. | 6 | 0 | 6 | 0 | +| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | Serverless customizations for security. | 6 | 0 | 6 | 0 | | | [@elastic/sec-cloudnative-integrations](https://github.com/orgs/elastic/teams/sec-cloudnative-integrations) | - | 7 | 0 | 7 | 1 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Adds URL Service and sharing capabilities to Kibana | 118 | 0 | 59 | 10 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 22 | 1 | 22 | 1 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 5bd5cdf99a18f..98cf4df866fdc 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: 2023-05-07 +date: 2023-05-08 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 5400666cf2d09..fb599948f14e0 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: 2023-05-07 +date: 2023-05-08 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 74eb6f7c5e187..7db18666f79cf 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: 2023-05-07 +date: 2023-05-08 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 d35eb4f571a19..9cfdd6baedbc0 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: 2023-05-07 +date: 2023-05-08 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 4f5b74363a1a2..2685a9275713c 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: 2023-05-07 +date: 2023-05-08 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 a060a345ca3f9..ee7374c4c3faf 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: 2023-05-07 +date: 2023-05-08 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 d62e5b91a9791..f3bf528287784 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: 2023-05-07 +date: 2023-05-08 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 a824cb2897ef5..9c3047d4e9258 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: 2023-05-07 +date: 2023-05-08 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 43e4bfb17667c..2adb728690ada 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: 2023-05-07 +date: 2023-05-08 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 09b10100f5617..71f97e68af24a 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: 2023-05-07 +date: 2023-05-08 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 d01d9f0eb4b4a..f2facd1079ccb 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: 2023-05-07 +date: 2023-05-08 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 5830b1026b7d3..8a470c1a11c2b 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: 2023-05-07 +date: 2023-05-08 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 ba7080b89dce1..eaae2c71bb171 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: 2023-05-07 +date: 2023-05-08 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 e6e3a00b640cc..0c6d2fa37669b 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: 2023-05-07 +date: 2023-05-08 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 dbacb96586e58..79606cf6cb282 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: 2023-05-07 +date: 2023-05-08 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 75e4699d5df9f..f0078501ae3de 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index 05f9a8ddb8eb8..009207179303b 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -1362,12 +1362,13 @@ "children": [ { "parentPluginId": "securitySolution", - "id": "def-public.PluginStart.navLinks$", - "type": "Object", + "id": "def-public.PluginStart.getNavLinks$", + "type": "Function", "tags": [], - "label": "navLinks$", + "label": "getNavLinks$", "description": [], "signature": [ + "() => ", "Observable", "<", "NavigationLink", @@ -1375,7 +1376,9 @@ ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [], + "returnComment": [] }, { "parentPluginId": "securitySolution", diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 7cc755117ee7e..6836644e44d06 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/serverless.devdocs.json b/api_docs/serverless.devdocs.json index 4f9ed4e252309..71e1b254cf003 100644 --- a/api_docs/serverless.devdocs.json +++ b/api_docs/serverless.devdocs.json @@ -31,7 +31,54 @@ "path": "x-pack/plugins/serverless/public/types.ts", "deprecated": false, "trackAdoption": false, - "children": [], + "children": [ + { + "parentPluginId": "serverless", + "id": "def-public.ServerlessPluginStart.setSideNavComponent", + "type": "Function", + "tags": [], + "label": "setSideNavComponent", + "description": [], + "signature": [ + "(navigation: ", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.SideNavComponent", + "text": "SideNavComponent" + }, + ") => void" + ], + "path": "x-pack/plugins/serverless/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "serverless", + "id": "def-public.ServerlessPluginStart.setSideNavComponent.$1", + "type": "CompoundType", + "tags": [], + "label": "navigation", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.SideNavComponent", + "text": "SideNavComponent" + } + ], + "path": "x-pack/plugins/serverless/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], "lifecycle": "start", "initialIsOpen": true } diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index e868dcb82a90a..7c6b220a95afb 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 7 | 0 | 6 | 0 | +| 9 | 0 | 8 | 0 | ## Client diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index e55b85257299e..ee777a00b738e 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 5144b043ff1a6..95a73b2b669d6 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/serverless_security.mdx b/api_docs/serverless_security.mdx index 349d31ac5a986..27f6e74eceeaa 100644 --- a/api_docs/serverless_security.mdx +++ b/api_docs/serverless_security.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/serverlessSecurity title: "serverlessSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSecurity plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSecurity'] --- import serverlessSecurityObj from './serverless_security.devdocs.json'; Serverless customizations for security. -Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. +Contact [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 35c9c5789c275..5e5f59a8e04a8 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: 2023-05-07 +date: 2023-05-08 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 4bee86c772ac4..8cfa06ade103f 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: 2023-05-07 +date: 2023-05-08 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 dec2a3946aaa9..bc4b1f2fa4bca 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: 2023-05-07 +date: 2023-05-08 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 473fc9965d9a7..1342650764938 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: 2023-05-07 +date: 2023-05-08 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 96f5f8da2afbf..21bb24c03beb6 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: 2023-05-07 +date: 2023-05-08 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 4db7aa7a26d13..fc5955baa6b75 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: 2023-05-07 +date: 2023-05-08 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 4de5cd8e8fa7c..d025481610687 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: 2023-05-07 +date: 2023-05-08 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 f82cac45813a4..f0bd7751a69e5 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: 2023-05-07 +date: 2023-05-08 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 303c5edf25e08..7f7e9eb815661 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: 2023-05-07 +date: 2023-05-08 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 baa4ec6e0a84e..9c8408d247fe9 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: 2023-05-07 +date: 2023-05-08 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 faf6dea904470..76e90e05018b3 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: 2023-05-07 +date: 2023-05-08 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 f508dd1a9c6fd..cb195bd0e51bd 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: 2023-05-07 +date: 2023-05-08 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 ba2bec6fefd46..0bd1db1ac664e 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: 2023-05-07 +date: 2023-05-08 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 f60b4f7db99fb..46ed7e362f6a0 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 5d22b2ca98a3e..e174db91dce44 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 3705aaf4c78f1..74d4046be451e 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: 2023-05-07 +date: 2023-05-08 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 cb256c9fb9abf..022f468eeb134 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: 2023-05-07 +date: 2023-05-08 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 bd09491ce8755..c543948436c82 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList'] --- import unifiedFieldListObj from './unified_field_list.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index d64af8a1e3641..e43946ecb63f6 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 8a398d89880d2..d9553bb785d87 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: 2023-05-07 +date: 2023-05-08 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 a9b577186dbf9..abacd769fb461 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: 2023-05-07 +date: 2023-05-08 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 311cd642e0475..44947a22f35e7 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: 2023-05-07 +date: 2023-05-08 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 c0018a43dadf3..e775eab96dd31 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: 2023-05-07 +date: 2023-05-08 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 f3e6f127592fe..3b0c274789ff5 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: 2023-05-07 +date: 2023-05-08 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 dc18fa47f0339..4f45e6c33d243 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: 2023-05-07 +date: 2023-05-08 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 51bac28729ef4..4a151bb858eea 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: 2023-05-07 +date: 2023-05-08 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 0685a74ec84b2..91655e068b69e 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: 2023-05-07 +date: 2023-05-08 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 dc7a72f84d7f4..b38f8e8f78f9a 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: 2023-05-07 +date: 2023-05-08 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 1233c0e07fed6..d3108cfed9b1a 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: 2023-05-07 +date: 2023-05-08 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 0a53735c4c70a..e33dcc6e017ce 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: 2023-05-07 +date: 2023-05-08 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 5fd8c74d9931d..ad0d58217b471 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: 2023-05-07 +date: 2023-05-08 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 8d791d58f3384..ba7c80b4c76bd 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: 2023-05-07 +date: 2023-05-08 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 5defc6f0ad22a..c959f786ce729 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: 2023-05-07 +date: 2023-05-08 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 944ff20076bef..e5f3de27a4459 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualization_ui_components.mdx b/api_docs/visualization_ui_components.mdx index 04ac4ccd8bfbe..81c8a2cdd6685 100644 --- a/api_docs/visualization_ui_components.mdx +++ b/api_docs/visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizationUiComponents title: "visualizationUiComponents" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizationUiComponents plugin -date: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizationUiComponents'] --- import visualizationUiComponentsObj from './visualization_ui_components.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 93ac8a01fb12e..9cdf76da675fe 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: 2023-05-07 +date: 2023-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; From b540825f50a657ce0682aa148842d4ace1863e2a Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Mon, 8 May 2023 08:34:31 +0300 Subject: [PATCH 003/102] Stabilize formatters tests (#156835) ## Summary Closes https://github.com/elastic/kibana/issues/156153 A small refactoring of the formatters tests to stabilize and unskip them Build 200 times https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2227#_ --- test/functional/services/field_editor.ts | 9 ++++++ .../apps/lens/group2/field_formatters.ts | 29 +++++++------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/test/functional/services/field_editor.ts b/test/functional/services/field_editor.ts index 7bc6b1b0dfbcd..065acf3de23e8 100644 --- a/test/functional/services/field_editor.ts +++ b/test/functional/services/field_editor.ts @@ -32,6 +32,15 @@ export class FieldEditorService extends FtrService { public async disableValue() { await this.testSubjects.setEuiSwitch('valueRow > toggle', 'uncheck'); } + public async clearScript() { + const editor = await ( + await this.testSubjects.find('valueRow') + ).findByClassName('react-monaco-editor-container'); + const textarea = await editor.findByClassName('monaco-mouse-cursor-text'); + await textarea.click(); + const input = await this.find.activeElement(); + await input.clearValueWithKeyboard(); + } public async typeScript(script: string) { const editor = await ( await this.testSubjects.find('valueRow') diff --git a/x-pack/test/functional/apps/lens/group2/field_formatters.ts b/x-pack/test/functional/apps/lens/group2/field_formatters.ts index 503efef042feb..543958beb6062 100644 --- a/x-pack/test/functional/apps/lens/group2/field_formatters.ts +++ b/x-pack/test/functional/apps/lens/group2/field_formatters.ts @@ -21,8 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const fieldEditor = getService('fieldEditor'); - // flaky test: https://github.com/elastic/kibana/issues/156153 - describe.skip('lens fields formatters tests', () => { + describe('lens fields formatters tests', () => { before(async () => { await PageObjects.visualize.navigateToNewVisualization(); await PageObjects.visualize.clickVisType('lens'); @@ -30,7 +29,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.switchToVisualization('lnsDatatable'); }); - afterEach(async () => { + after(async () => { await PageObjects.lens.clickField('runtimefield'); await PageObjects.lens.removeField('runtimefield'); await fieldEditor.confirmDelete(); @@ -61,10 +60,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should display static lookup formatter correctly', async () => { await retry.try(async () => { - await PageObjects.lens.clickAddField(); - await fieldEditor.setName('runtimefield'); - await fieldEditor.enableValue(); - await fieldEditor.typeScript("emit(doc['geo.dest'].value)"); + await PageObjects.lens.clickField('runtimefield'); + await PageObjects.lens.editField('runtimefield'); await fieldEditor.setFormat(FIELD_FORMAT_IDS.STATIC_LOOKUP); await fieldEditor.setStaticLookupFormat('CN', 'China'); await fieldEditor.save(); @@ -77,10 +74,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should display color formatter correctly', async () => { await retry.try(async () => { - await PageObjects.lens.clickAddField(); - await fieldEditor.setName('runtimefield'); - await fieldEditor.enableValue(); - await fieldEditor.typeScript("emit(doc['geo.dest'].value)"); + await PageObjects.lens.clickField('runtimefield'); + await PageObjects.lens.editField('runtimefield'); await fieldEditor.setFormat(FIELD_FORMAT_IDS.COLOR); await fieldEditor.setColorFormat('CN', '#ffffff', '#ff0000'); await fieldEditor.save(); @@ -95,10 +90,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should display string formatter correctly', async () => { await retry.try(async () => { - await PageObjects.lens.clickAddField(); - await fieldEditor.setName('runtimefield'); - await fieldEditor.enableValue(); - await fieldEditor.typeScript("emit(doc['geo.dest'].value)"); + await PageObjects.lens.clickField('runtimefield'); + await PageObjects.lens.editField('runtimefield'); await fieldEditor.setFormat(FIELD_FORMAT_IDS.STRING); await fieldEditor.setStringFormat('lower'); await fieldEditor.save(); @@ -111,9 +104,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should display truncate string formatter correctly', async () => { await retry.try(async () => { - await PageObjects.lens.clickAddField(); - await fieldEditor.setName('runtimefield'); - await fieldEditor.enableValue(); + await PageObjects.lens.clickField('runtimefield'); + await PageObjects.lens.editField('runtimefield'); + await fieldEditor.clearScript(); await fieldEditor.typeScript("emit(doc['links.raw'].value)"); await fieldEditor.setFormat(FIELD_FORMAT_IDS.TRUNCATE); await fieldEditor.setTruncateFormatLength('3'); From 0a0d82216f46e905bdbf96ba9f790d0ba95adee7 Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Mon, 8 May 2023 03:48:09 -0400 Subject: [PATCH 004/102] [SOR] validation schema: use previous version (#156665) ## Summary Fix https://github.com/elastic/kibana/issues/156423 We were only using the schema for validation if its version was an *exact* match with the current stack version, meaning that any previous schema was ignored (and even introducing a minor was causing the schema to be ignored). This PR addresses it, by always using the closest previous schema available. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../src/lib/repository.ts | 33 ++-- .../src/validation/schema.ts | 51 ++--- .../src/validation/validator.test.ts | 177 +++++++++++++----- .../src/validation/validator.ts | 38 +++- 4 files changed, 211 insertions(+), 88 deletions(-) diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.ts index 0bde80ea0f32f..3a0ff953dbff5 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.ts @@ -208,6 +208,7 @@ export class SavedObjectsRepository implements ISavedObjectsRepository { private _mappings: IndexMapping; private _registry: ISavedObjectTypeRegistry; private _allowedTypes: string[]; + private typeValidatorMap: Record = {}; private readonly client: RepositoryEsClient; private readonly _encryptionExtension?: ISavedObjectsEncryptionExtension; private readonly _securityExtension?: ISavedObjectsSecurityExtension; @@ -403,7 +404,7 @@ export class SavedObjectsRepository implements ISavedObjectsRepository { * migration to fail, but it's the best we can do without devising a way to run validations * inside the migration algorithm itself. */ - this.validateObjectAttributes(type, migrated as SavedObjectSanitizedDoc); + this.validateObjectForCreate(type, migrated as SavedObjectSanitizedDoc); const raw = this._serializer.savedObjectToRaw(migrated as SavedObjectSanitizedDoc); @@ -629,7 +630,7 @@ export class SavedObjectsRepository implements ISavedObjectsRepository { * inside the migration algorithm itself. */ try { - this.validateObjectAttributes(object.type, migrated); + this.validateObjectForCreate(object.type, migrated); } catch (error) { return { tag: 'Left', @@ -2757,25 +2758,31 @@ export class SavedObjectsRepository implements ISavedObjectsRepository { } /** Validate a migrated doc against the registered saved object type's schema. */ - private validateObjectAttributes(type: string, doc: SavedObjectSanitizedDoc) { - const savedObjectType = this._registry.getType(type); - if (!savedObjectType?.schemas) { + private validateObjectForCreate(type: string, doc: SavedObjectSanitizedDoc) { + if (!this._registry.getType(type)) { return; } - - const validator = new SavedObjectsTypeValidator({ - logger: this._logger.get('type-validator'), - type, - validationMap: savedObjectType.schemas, - }); - + const validator = this.getTypeValidator(type); try { - validator.validate(this._migrator.kibanaVersion, doc); + validator.validate(doc, this._migrator.kibanaVersion); } catch (error) { throw SavedObjectsErrorHelpers.createBadRequestError(error.message); } } + private getTypeValidator(type: string): SavedObjectsTypeValidator { + if (!this.typeValidatorMap[type]) { + const savedObjectType = this._registry.getType(type); + this.typeValidatorMap[type] = new SavedObjectsTypeValidator({ + logger: this._logger.get('type-validator'), + type, + validationMap: savedObjectType!.schemas ?? {}, + defaultVersion: this._migrator.kibanaVersion, + }); + } + return this.typeValidatorMap[type]!; + } + /** This is used when objects are created. */ private validateOriginId(type: string, objectOrOptions: { originId?: string }) { if ( diff --git a/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/schema.ts b/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/schema.ts index 009bf2d89cf46..6c9a61c5003db 100644 --- a/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/schema.ts +++ b/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/schema.ts @@ -19,33 +19,40 @@ type SavedObjectSanitizedDocSchema = { [K in keyof Required]: Type; }; +const baseSchema = schema.object({ + id: schema.string(), + type: schema.string(), + references: schema.arrayOf( + schema.object({ + name: schema.string(), + type: schema.string(), + id: schema.string(), + }), + { defaultValue: [] } + ), + namespace: schema.maybe(schema.string()), + namespaces: schema.maybe(schema.arrayOf(schema.string())), + migrationVersion: schema.maybe(schema.recordOf(schema.string(), schema.string())), + coreMigrationVersion: schema.maybe(schema.string()), + typeMigrationVersion: schema.maybe(schema.string()), + updated_at: schema.maybe(schema.string()), + created_at: schema.maybe(schema.string()), + version: schema.maybe(schema.string()), + originId: schema.maybe(schema.string()), + managed: schema.maybe(schema.boolean()), + attributes: schema.maybe(schema.any()), +}); + /** * Takes a {@link SavedObjectsValidationSpec} and returns a full schema representing * a {@link SavedObjectSanitizedDoc}, with the spec applied to the object's `attributes`. * * @internal */ -export const createSavedObjectSanitizedDocSchema = (attributesSchema: SavedObjectsValidationSpec) => - schema.object({ +export const createSavedObjectSanitizedDocSchema = ( + attributesSchema: SavedObjectsValidationSpec +) => { + return baseSchema.extends({ attributes: attributesSchema, - id: schema.string(), - type: schema.string(), - references: schema.arrayOf( - schema.object({ - name: schema.string(), - type: schema.string(), - id: schema.string(), - }), - { defaultValue: [] } - ), - namespace: schema.maybe(schema.string()), - namespaces: schema.maybe(schema.arrayOf(schema.string())), - migrationVersion: schema.maybe(schema.recordOf(schema.string(), schema.string())), - coreMigrationVersion: schema.maybe(schema.string()), - typeMigrationVersion: schema.maybe(schema.string()), - updated_at: schema.maybe(schema.string()), - created_at: schema.maybe(schema.string()), - version: schema.maybe(schema.string()), - originId: schema.maybe(schema.string()), - managed: schema.maybe(schema.boolean()), }); +}; diff --git a/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/validator.test.ts b/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/validator.test.ts index 96bc93be54c1a..e552aee1c8976 100644 --- a/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/validator.test.ts +++ b/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/validator.test.ts @@ -10,79 +10,162 @@ import { schema } from '@kbn/config-schema'; import { loggerMock, type MockedLogger } from '@kbn/logging-mocks'; import type { SavedObjectSanitizedDoc, + SavedObjectsValidationSpec, SavedObjectsValidationMap, } from '@kbn/core-saved-objects-server'; import { SavedObjectsTypeValidator } from './validator'; +const defaultVersion = '3.3.0'; +const type = 'my-type'; + describe('Saved Objects type validator', () => { let validator: SavedObjectsTypeValidator; let logger: MockedLogger; + let validationMap: SavedObjectsValidationMap; - const type = 'my-type'; - const validationMap: SavedObjectsValidationMap = { - '1.0.0': schema.object({ - foo: schema.string(), - }), - }; - - const createMockObject = (attributes: Record): SavedObjectSanitizedDoc => ({ - attributes, + const createMockObject = (parts: Partial): SavedObjectSanitizedDoc => ({ + type, id: 'test-id', references: [], - type, + attributes: {}, + ...parts, }); beforeEach(() => { logger = loggerMock.create(); - validator = new SavedObjectsTypeValidator({ logger, type, validationMap }); }); afterEach(() => { - jest.clearAllMocks(); + jest.resetAllMocks(); }); - it('should do nothing if no matching validation could be found', () => { - const data = createMockObject({ foo: false }); - expect(validator.validate('3.0.0', data)).toBeUndefined(); - expect(logger.debug).not.toHaveBeenCalled(); - }); + describe('validation behavior', () => { + beforeEach(() => { + validationMap = { + '1.0.0': schema.object({ + foo: schema.string(), + }), + }; + validator = new SavedObjectsTypeValidator({ logger, type, validationMap, defaultVersion }); + }); - it('should log when a validation fails', () => { - const data = createMockObject({ foo: false }); - expect(() => validator.validate('1.0.0', data)).toThrowError(); - expect(logger.warn).toHaveBeenCalledTimes(1); - }); + it('should log when a validation fails', () => { + const data = createMockObject({ attributes: { foo: false } }); + expect(() => validator.validate(data, '1.0.0')).toThrowError(); + expect(logger.warn).toHaveBeenCalledTimes(1); + }); - it('should work when given valid values', () => { - const data = createMockObject({ foo: 'hi' }); - expect(() => validator.validate('1.0.0', data)).not.toThrowError(); - }); + it('should work when given valid values', () => { + const data = createMockObject({ attributes: { foo: 'hi' } }); + expect(() => validator.validate(data, '1.0.0')).not.toThrowError(); + }); - it('should throw an error when given invalid values', () => { - const data = createMockObject({ foo: false }); - expect(() => validator.validate('1.0.0', data)).toThrowErrorMatchingInlineSnapshot( - `"[attributes.foo]: expected value of type [string] but got [boolean]"` - ); - }); + it('should throw an error when given invalid values', () => { + const data = createMockObject({ attributes: { foo: false } }); + expect(() => validator.validate(data, '1.0.0')).toThrowErrorMatchingInlineSnapshot( + `"[attributes.foo]: expected value of type [string] but got [boolean]"` + ); + }); - it('should throw an error if fields other than attributes are malformed', () => { - const data = createMockObject({ foo: 'hi' }); - // @ts-expect-error Intentionally malformed object - data.updated_at = false; - expect(() => validator.validate('1.0.0', data)).toThrowErrorMatchingInlineSnapshot( - `"[updated_at]: expected value of type [string] but got [boolean]"` - ); + it('should throw an error if fields other than attributes are malformed', () => { + const data = createMockObject({ attributes: { foo: 'hi' } }); + // @ts-expect-error Intentionally malformed object + data.updated_at = false; + expect(() => validator.validate(data, '1.0.0')).toThrowErrorMatchingInlineSnapshot( + `"[updated_at]: expected value of type [string] but got [boolean]"` + ); + }); + + it('works when the validation map is a function', () => { + const fnValidationMap: () => SavedObjectsValidationMap = () => validationMap; + validator = new SavedObjectsTypeValidator({ + logger, + type, + validationMap: fnValidationMap, + defaultVersion, + }); + + const data = createMockObject({ attributes: { foo: 'hi' } }); + expect(() => validator.validate(data, '1.0.0')).not.toThrowError(); + }); }); - it('works when the validation map is a function', () => { - const fnValidationMap: () => SavedObjectsValidationMap = () => validationMap; - validator = new SavedObjectsTypeValidator({ - logger, - type, - validationMap: fnValidationMap, + describe('schema selection', () => { + beforeEach(() => { + validationMap = { + '2.0.0': createStubSpec(), + '2.7.0': createStubSpec(), + '3.0.0': createStubSpec(), + '3.5.0': createStubSpec(), + '4.0.0': createStubSpec(), + '4.3.0': createStubSpec(), + }; + validator = new SavedObjectsTypeValidator({ logger, type, validationMap, defaultVersion }); }); - const data = createMockObject({ foo: 'hi' }); - expect(() => validator.validate('1.0.0', data)).not.toThrowError(); + const createStubSpec = (): jest.Mocked => { + const stub = schema.object({}, { unknowns: 'allow', defaultValue: {} }); + jest.spyOn(stub as any, 'getSchema'); + return stub as jest.Mocked; + }; + + const getCalledVersion = () => { + for (const [version, validation] of Object.entries(validationMap)) { + if (((validation as any).getSchema as jest.MockedFn).mock.calls.length > 0) { + return version; + } + } + return undefined; + }; + + it('should use the correct schema when specifying the version', () => { + let data = createMockObject({ typeMigrationVersion: '2.2.0' }); + validator.validate(data, '3.2.0'); + expect(getCalledVersion()).toEqual('3.0.0'); + + jest.clearAllMocks(); + + data = createMockObject({ typeMigrationVersion: '3.5.0' }); + validator.validate(data, '4.5.0'); + expect(getCalledVersion()).toEqual('4.3.0'); + }); + + it('should use the correct schema for documents with typeMigrationVersion', () => { + let data = createMockObject({ typeMigrationVersion: '3.2.0' }); + validator.validate(data); + expect(getCalledVersion()).toEqual('3.0.0'); + + jest.clearAllMocks(); + + data = createMockObject({ typeMigrationVersion: '3.5.0' }); + validator.validate(data); + expect(getCalledVersion()).toEqual('3.5.0'); + }); + + it('should use the correct schema for documents with migrationVersion', () => { + let data = createMockObject({ + migrationVersion: { + [type]: '4.6.0', + }, + }); + validator.validate(data); + expect(getCalledVersion()).toEqual('4.3.0'); + + jest.clearAllMocks(); + + data = createMockObject({ + migrationVersion: { + [type]: '4.0.0', + }, + }); + validator.validate(data); + expect(getCalledVersion()).toEqual('4.0.0'); + }); + + it('should use the correct schema for documents without a version specified', () => { + const data = createMockObject({}); + validator.validate(data); + expect(getCalledVersion()).toEqual('3.0.0'); + }); }); }); diff --git a/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/validator.ts b/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/validator.ts index 13cff1621512a..e028c16f9bd2f 100644 --- a/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/validator.ts +++ b/packages/core/saved-objects/core-saved-objects-base-server-internal/src/validation/validator.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import Semver from 'semver'; import type { Logger } from '@kbn/logging'; import type { SavedObjectsValidationMap, @@ -22,36 +23,61 @@ import { createSavedObjectSanitizedDocSchema } from './schema'; export class SavedObjectsTypeValidator { private readonly log: Logger; private readonly type: string; + private readonly defaultVersion: string; private readonly validationMap: SavedObjectsValidationMap; + private readonly orderedVersions: string[]; constructor({ logger, type, validationMap, + defaultVersion, }: { logger: Logger; type: string; validationMap: SavedObjectsValidationMap | (() => SavedObjectsValidationMap); + defaultVersion: string; }) { this.log = logger; this.type = type; + this.defaultVersion = defaultVersion; this.validationMap = typeof validationMap === 'function' ? validationMap() : validationMap; + this.orderedVersions = Object.keys(this.validationMap).sort(Semver.compare); } - public validate(objectVersion: string, data: SavedObjectSanitizedDoc): void { - const validationRule = this.validationMap[objectVersion]; - if (!validationRule) { - return; // no matching validation rule could be found; proceed without validating + public validate(document: SavedObjectSanitizedDoc, version?: string): void { + const docVersion = + version ?? + document.typeMigrationVersion ?? + document.migrationVersion?.[document.type] ?? + this.defaultVersion; + const schemaVersion = previousVersionWithSchema(this.orderedVersions, docVersion); + if (!schemaVersion || !this.validationMap[schemaVersion]) { + return; } + const validationRule = this.validationMap[schemaVersion]; try { const validationSchema = createSavedObjectSanitizedDocSchema(validationRule); - validationSchema.validate(data); + validationSchema.validate(document); } catch (e) { this.log.warn( - `Error validating object of type [${this.type}] against version [${objectVersion}]` + `Error validating object of type [${this.type}] against version [${docVersion}]` ); throw e; } } } + +const previousVersionWithSchema = ( + orderedVersions: string[], + targetVersion: string +): string | undefined => { + for (let i = orderedVersions.length - 1; i >= 0; i--) { + const currentVersion = orderedVersions[i]; + if (Semver.lte(currentVersion, targetVersion)) { + return currentVersion; + } + } + return undefined; +}; From acce3cbbe4f086310b55fc1393ebce7e8265f59c Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 8 May 2023 09:49:23 +0200 Subject: [PATCH 005/102] Upgrade chromedriver to 113.0.0 (#156950) ## Summary Closes #156821 Updating chromedriver dependency to match the latest Chrome release --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 391b8d31127ed..c95abd2ddd4a6 100644 --- a/package.json +++ b/package.json @@ -1342,7 +1342,7 @@ "backport": "^8.9.7", "callsites": "^3.1.0", "chance": "1.0.18", - "chromedriver": "^112.0.0", + "chromedriver": "^113.0.0", "clean-webpack-plugin": "^3.0.0", "compression-webpack-plugin": "^4.0.0", "copy-webpack-plugin": "^6.0.2", diff --git a/yarn.lock b/yarn.lock index 287ebf23462f9..61a791b3054de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11980,10 +11980,10 @@ chrome-trace-event@^1.0.2: dependencies: tslib "^1.9.0" -chromedriver@^112.0.0: - version "112.0.0" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-112.0.0.tgz#34c86f6cfc8f5e208100088dbb9563439243f8b2" - integrity sha512-fEw1tI05dmK1KK8MGh99LAppP7zCOPEXUxxbYX5wpIBCCmKasyrwZhk/qsdnxJYKd/h0TfiHvGEj7ReDQXW1AA== +chromedriver@^113.0.0: + version "113.0.0" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-113.0.0.tgz#d4855f156ee51cea4282e04aadd29fa154e44dbb" + integrity sha512-UnQlt2kPicYXVNHPzy9HfcWvEbKJjjKAEaatdcnP/lCIRwuSoZFVLH0HVDAGdbraXp3dNVhfE2Qx7gw8TnHnPw== dependencies: "@testim/chrome-version" "^1.1.3" axios "^1.2.1" From baa94a3475fb2232555f1d406b58540ebe400be8 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Mon, 8 May 2023 11:37:54 +0200 Subject: [PATCH 006/102] [TSDB][UnifiedFieldList] Show counter min/max values in field popover (#155499) Addresses https://github.com/elastic/kibana/issues/155510 ## Summary This PR shows min and max values of time series counter field in the field popover. Before: Screenshot 2023-04-21 at 13 26 37 After: Screenshot 2023-04-21 at 13 22 50 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --- .../unified_field_list/common/types/index.ts | 7 +- .../unified_field_list/common/types/stats.ts | 13 +- .../common/utils/field_stats_utils.test.ts | 516 +++++++++++++++++- .../common/utils/field_stats_utils.ts | 54 +- .../field_stats/field_number_summary.test.tsx | 64 +++ .../field_stats/field_number_summary.tsx | 106 ++++ .../field_stats/field_stats.test.tsx | 74 +++ .../components/field_stats/field_stats.tsx | 42 +- .../unified_field_list/public/index.ts | 7 +- 9 files changed, 855 insertions(+), 28 deletions(-) create mode 100644 src/plugins/unified_field_list/public/components/field_stats/field_number_summary.test.tsx create mode 100755 src/plugins/unified_field_list/public/components/field_stats/field_number_summary.tsx diff --git a/src/plugins/unified_field_list/common/types/index.ts b/src/plugins/unified_field_list/common/types/index.ts index 78dbc548406c0..63714567d6e8d 100755 --- a/src/plugins/unified_field_list/common/types/index.ts +++ b/src/plugins/unified_field_list/common/types/index.ts @@ -6,9 +6,4 @@ * Side Public License, v 1. */ -export type { - FieldStatsResponse, - NumberStatsResult, - TopValuesResult, - BucketedAggregation, -} from './stats'; +export type { FieldStatsResponse, BucketedAggregation, NumberSummary } from './stats'; diff --git a/src/plugins/unified_field_list/common/types/stats.ts b/src/plugins/unified_field_list/common/types/stats.ts index 71d75db1aaaa3..56853e0965135 100644 --- a/src/plugins/unified_field_list/common/types/stats.ts +++ b/src/plugins/unified_field_list/common/types/stats.ts @@ -13,15 +13,9 @@ export interface BucketedAggregation { }>; } -export interface NumberStatsResult { - count: number; - histogram: BucketedAggregation; - topValues: BucketedAggregation; -} - -export interface TopValuesResult { - count: number; - topValues: BucketedAggregation; +export interface NumberSummary { + minValue: number | null; + maxValue: number | null; } export interface FieldStatsResponse { @@ -35,4 +29,5 @@ export interface FieldStatsResponse { // Histogram and values are based on distinct values, not based on documents histogram?: BucketedAggregation; topValues?: BucketedAggregation; + numberSummary?: NumberSummary; } diff --git a/src/plugins/unified_field_list/common/utils/field_stats_utils.test.ts b/src/plugins/unified_field_list/common/utils/field_stats_utils.test.ts index 1135f028f1702..9f868b4c6b60a 100644 --- a/src/plugins/unified_field_list/common/utils/field_stats_utils.test.ts +++ b/src/plugins/unified_field_list/common/utils/field_stats_utils.test.ts @@ -6,7 +6,65 @@ * Side Public License, v 1. */ -import { buildSearchParams } from './field_stats_utils'; +import { createStubDataView } from '@kbn/data-views-plugin/common/data_view.stub'; +import { buildSearchParams, fetchAndCalculateFieldStats } from './field_stats_utils'; + +const dataView = createStubDataView({ + spec: { + id: 'test', + title: 'test', + fields: { + bytes: { + name: 'bytes', + type: 'number', + esTypes: ['long'], + aggregatable: true, + searchable: true, + count: 10, + readFromDocValues: true, + scripted: false, + isMapped: true, + }, + bytes_counter: { + timeSeriesMetric: 'counter', + name: 'bytes_counter', + type: 'number', + esTypes: ['long'], + aggregatable: true, + searchable: true, + count: 10, + readFromDocValues: true, + scripted: false, + isMapped: true, + }, + 'extension.keyword': { + name: 'extension.keyword', + type: 'string', + esTypes: ['keyword'], + aggregatable: true, + searchable: true, + count: 0, + readFromDocValues: true, + scripted: false, + subType: { + multi: { + parent: 'extension', + }, + }, + isMapped: true, + }, + _id: { + name: '_id', + type: 'string', + esTypes: ['_id'], + aggregatable: false, + searchable: true, + readFromDocValues: true, + isMapped: true, + }, + }, + }, +}); describe('fieldStatsUtils', function () { describe('buildSearchParams()', () => { @@ -150,4 +208,460 @@ describe('fieldStatsUtils', function () { ).toMatchSnapshot(); }); }); + + describe('fetchAndCalculateFieldStats()', () => { + it('should provide data to render a number summary for some number fields (time series metric counter)', async () => { + const searchMock = jest.fn(async () => ({ + took: 1, + timed_out: false, + _shards: { + total: 1, + successful: 1, + skipped: 0, + failed: 0, + }, + hits: { + total: 6460, + max_score: null, + hits: [], + }, + aggregations: { + sample: { + doc_count: 5000, + min_max_summary: { + doc_count: 5000, + min: { + value: 29674, + }, + max: { + value: 36821994, + }, + }, + }, + }, + })); + + const result = await fetchAndCalculateFieldStats({ + searchHandler: searchMock, + dataView, + field: dataView.getFieldByName('bytes_counter')!, + fromDate: '2022-12-05T23:00:00.000Z', + toDate: '2023-01-05T09:33:05.359Z', + }); + + expect(result).toMatchInlineSnapshot(` + Object { + "numberSummary": Object { + "maxValue": 36821994, + "minValue": 29674, + }, + "sampledDocuments": 5000, + "sampledValues": 5000, + "totalDocuments": 6460, + } + `); + + expect(searchMock).toHaveBeenCalledWith({ + aggs: { + sample: { + sampler: { shard_size: 5000 }, + aggs: { + min_max_summary: { + filter: { exists: { field: 'bytes_counter' } }, + aggs: { + min: { min: { field: 'bytes_counter' } }, + max: { max: { field: 'bytes_counter' } }, + }, + }, + }, + }, + }, + }); + }); + + it('should provide data for rendering top values and value distribution for a number field', async () => { + const searchMock = jest.fn(async ({ aggs }) => + aggs?.sample?.aggs?.histo + ? { + took: 1, + timed_out: false, + _shards: { + total: 10, + successful: 10, + skipped: 0, + failed: 0, + }, + hits: { + total: 2, + max_score: null, + hits: [], + }, + aggregations: { + sample: { + doc_count: 2, + histo: { + buckets: [ + { + key: 1620, + doc_count: 1, + }, + { + key: 1944, + doc_count: 0, + }, + { + key: 2268, + doc_count: 0, + }, + { + key: 2592, + doc_count: 0, + }, + { + key: 2916, + doc_count: 0, + }, + { + key: 3240, + doc_count: 0, + }, + { + key: 3564, + doc_count: 0, + }, + { + key: 3888, + doc_count: 0, + }, + { + key: 4212, + doc_count: 0, + }, + { + key: 4536, + doc_count: 0, + }, + { + key: 4860, + doc_count: 1, + }, + ], + }, + }, + }, + } + : { + took: 2, + timed_out: false, + _shards: { + total: 10, + successful: 10, + skipped: 0, + failed: 0, + }, + hits: { + total: 2, + max_score: null, + hits: [], + }, + aggregations: { + sample: { + doc_count: 2, + top_values: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 1880, + doc_count: 1, + }, + { + key: 5115, + doc_count: 1, + }, + ], + }, + min_value: { + value: 1880, + }, + sample_count: { + value: 2, + }, + max_value: { + value: 5115, + }, + }, + }, + } + ); + + const result = await fetchAndCalculateFieldStats({ + searchHandler: searchMock, + dataView, + field: dataView.getFieldByName('bytes')!, + fromDate: '2022-12-05T23:00:00.000Z', + toDate: '2023-01-05T09:33:05.359Z', + }); + + expect(result).toMatchInlineSnapshot(` + Object { + "histogram": Object { + "buckets": Array [ + Object { + "count": 1, + "key": 1620, + }, + Object { + "count": 0, + "key": 1944, + }, + Object { + "count": 0, + "key": 2268, + }, + Object { + "count": 0, + "key": 2592, + }, + Object { + "count": 0, + "key": 2916, + }, + Object { + "count": 0, + "key": 3240, + }, + Object { + "count": 0, + "key": 3564, + }, + Object { + "count": 0, + "key": 3888, + }, + Object { + "count": 0, + "key": 4212, + }, + Object { + "count": 0, + "key": 4536, + }, + Object { + "count": 1, + "key": 4860, + }, + ], + }, + "sampledDocuments": 2, + "sampledValues": 2, + "topValues": Object { + "buckets": Array [ + Object { + "count": 1, + "key": 1880, + }, + Object { + "count": 1, + "key": 5115, + }, + ], + }, + "totalDocuments": 2, + } + `); + + expect(searchMock).toHaveBeenNthCalledWith(1, { + aggs: { + sample: { + sampler: { shard_size: 5000 }, + aggs: { + min_value: { min: { field: 'bytes' } }, + max_value: { max: { field: 'bytes' } }, + sample_count: { value_count: { field: 'bytes' } }, + top_values: { terms: { field: 'bytes', size: 10 } }, + }, + }, + }, + }); + + expect(searchMock).toHaveBeenNthCalledWith(2, { + aggs: { + sample: { + sampler: { shard_size: 5000 }, + aggs: { histo: { histogram: { field: 'bytes', interval: 324 } } }, + }, + }, + }); + }); + + it('should provide data for string top values', async () => { + const searchMock = jest.fn(async () => ({ + took: 3, + timed_out: false, + _shards: { + total: 10, + successful: 10, + skipped: 0, + failed: 0, + }, + hits: { + total: 75026, + max_score: null, + hits: [], + }, + aggregations: { + sample: { + doc_count: 50000, + top_values: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'jpg', + doc_count: 32039, + }, + { + key: 'css', + doc_count: 8155, + }, + { + key: 'png', + doc_count: 4823, + }, + { + key: 'gif', + doc_count: 3317, + }, + { + key: 'php', + doc_count: 1666, + }, + ], + }, + sample_count: { + value: 50000, + }, + }, + }, + })); + + const result = await fetchAndCalculateFieldStats({ + searchHandler: searchMock, + dataView, + field: dataView.getFieldByName('extension.keyword')!, + fromDate: '2022-12-05T23:00:00.000Z', + toDate: '2023-01-05T09:33:05.359Z', + }); + + expect(result).toMatchInlineSnapshot(` + Object { + "sampledDocuments": 50000, + "sampledValues": 50000, + "topValues": Object { + "buckets": Array [ + Object { + "count": 32039, + "key": "jpg", + }, + Object { + "count": 8155, + "key": "css", + }, + Object { + "count": 4823, + "key": "png", + }, + Object { + "count": 3317, + "key": "gif", + }, + Object { + "count": 1666, + "key": "php", + }, + ], + }, + "totalDocuments": 75026, + } + `); + + expect(searchMock).toHaveBeenCalledWith({ + aggs: { + sample: { + sampler: { shard_size: 5000 }, + aggs: { + sample_count: { value_count: { field: 'extension.keyword' } }, + top_values: { terms: { field: 'extension.keyword', size: 10, shard_size: 25 } }, + }, + }, + }, + }); + }); + + it('should provide examples for a non-aggregatable field', async () => { + const searchMock = jest.fn(async () => ({ + took: 2, + timed_out: false, + _shards: { + total: 10, + successful: 10, + skipped: 0, + failed: 0, + }, + hits: { + total: 2, + max_score: 0, + hits: [ + { + _index: 'logstash-0', + _id: 'py8MyIcBz-pNi9QsLMYl', + _score: 0, + fields: { + _id: ['py8MyIcBz-pNi9QsLMYl'], + }, + }, + { + _index: 'logstash-0', + _id: '_S8MyIcBz-pNi9QsIoj5', + _score: 0, + fields: { + _id: ['_S8MyIcBz-pNi9QsIoj5'], + }, + }, + ], + }, + })); + + const result = await fetchAndCalculateFieldStats({ + searchHandler: searchMock, + dataView, + field: dataView.getFieldByName('_id')!, + fromDate: '2022-12-05T23:00:00.000Z', + toDate: '2023-01-05T09:33:05.359Z', + }); + + expect(result).toMatchInlineSnapshot(` + Object { + "sampledDocuments": 2, + "sampledValues": 2, + "topValues": Object { + "buckets": Array [ + Object { + "count": 1, + "key": "_S8MyIcBz-pNi9QsIoj5", + }, + Object { + "count": 1, + "key": "py8MyIcBz-pNi9QsLMYl", + }, + ], + }, + "totalDocuments": 2, + } + `); + + expect(searchMock).toHaveBeenCalledWith({ size: 100, fields: [{ field: '_id' }] }); + }); + }); }); diff --git a/src/plugins/unified_field_list/common/utils/field_stats_utils.ts b/src/plugins/unified_field_list/common/utils/field_stats_utils.ts index aae9dcaa03692..e9cd750cd034d 100644 --- a/src/plugins/unified_field_list/common/utils/field_stats_utils.ts +++ b/src/plugins/unified_field_list/common/utils/field_stats_utils.ts @@ -127,6 +127,10 @@ export async function fetchAndCalculateFieldStats({ return await getNumberHistogram(searchHandler, field, false); } + if (canProvideNumberSummaryForField(field)) { + return await getNumberSummary(searchHandler, field); + } + if (field.type === 'number') { return await getNumberHistogram(searchHandler, field); } @@ -145,8 +149,7 @@ function canProvideAggregatedStatsForField(field: DataViewField): boolean { field.type === 'geo_point' || field.type === 'geo_shape' || field.type === 'murmur3' || - field.type === 'attachment' || - field.timeSeriesMetric === 'counter' + field.type === 'attachment' ); } @@ -156,6 +159,53 @@ export function canProvideStatsForField(field: DataViewField): boolean { ); } +export function canProvideNumberSummaryForField(field: DataViewField): boolean { + return field.timeSeriesMetric === 'counter'; +} + +export async function getNumberSummary( + aggSearchWithBody: SearchHandler, + field: DataViewField +): Promise> { + // similar to `getNumericFieldsStatsRequest` from Data Visualizer + const searchWithAggs = { + sample: { + sampler: { shard_size: SHARD_SIZE }, + aggs: { + min_max_summary: { + filter: { exists: { field: field.name } }, + aggs: { + min: { + min: { field: field.name }, + }, + max: { + max: { field: field.name }, + }, + }, + }, + }, + }, + }; + + const summaryResult = (await aggSearchWithBody({ + aggs: searchWithAggs, + })) as ESSearchResponse; + + const minValue = summaryResult.aggregations!.sample.min_max_summary.min.value; + const maxValue = summaryResult.aggregations!.sample.min_max_summary.max.value; + const sampledDocuments = summaryResult.aggregations!.sample.doc_count; + + return { + totalDocuments: getHitsTotal(summaryResult), + sampledDocuments, + sampledValues: sampledDocuments, + numberSummary: { + minValue, + maxValue, + }, + }; +} + export async function getNumberHistogram( aggSearchWithBody: SearchHandler, field: DataViewField, diff --git a/src/plugins/unified_field_list/public/components/field_stats/field_number_summary.test.tsx b/src/plugins/unified_field_list/public/components/field_stats/field_number_summary.test.tsx new file mode 100644 index 0000000000000..97a85e2a3394c --- /dev/null +++ b/src/plugins/unified_field_list/public/components/field_stats/field_number_summary.test.tsx @@ -0,0 +1,64 @@ +/* + * 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 { createStubDataView } from '@kbn/data-views-plugin/common/data_views/data_view.stub'; +import { mountWithIntl } from '@kbn/test-jest-helpers'; +import { FieldNumberSummary } from './field_number_summary'; + +const dataView = createStubDataView({ + spec: { + id: 'test', + title: 'test', + fields: { + bytes_counter: { + timeSeriesMetric: 'counter', + name: 'bytes_counter', + type: 'number', + esTypes: ['long'], + aggregatable: true, + searchable: true, + count: 10, + readFromDocValues: true, + scripted: false, + isMapped: true, + }, + }, + }, +}); + +describe('UnifiedFieldList ', () => { + it('should render min and max correctly', async () => { + const wrapper = mountWithIntl( + + ); + + expect(wrapper.text()).toBe('min45max12345'); + }); + + it('should not fail if data is invalid', async () => { + const wrapper = mountWithIntl( + + ); + + expect(wrapper.isEmptyRender()).toBe(true); + }); +}); diff --git a/src/plugins/unified_field_list/public/components/field_stats/field_number_summary.tsx b/src/plugins/unified_field_list/public/components/field_stats/field_number_summary.tsx new file mode 100755 index 0000000000000..8ccea18eecdba --- /dev/null +++ b/src/plugins/unified_field_list/public/components/field_stats/field_number_summary.tsx @@ -0,0 +1,106 @@ +/* + * 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, { ReactNode } from 'react'; +import { + EuiBasicTable, + HorizontalAlignment, + LEFT_ALIGNMENT, + RIGHT_ALIGNMENT, + euiScreenReaderOnly, +} from '@elastic/eui'; +import { DataView, DataViewField } from '@kbn/data-plugin/common'; +import { i18n } from '@kbn/i18n'; +import { css } from '@emotion/react'; +import type { NumberSummary } from '../../../common/types'; + +interface SummaryTableItem { + key: string; + label: ReactNode; + value: string; +} + +export interface FieldNumberSummaryProps { + dataView: DataView; + field: DataViewField; + numberSummary?: NumberSummary; + 'data-test-subj': string; +} + +export const FieldNumberSummary: React.FC = ({ + dataView, + field, + numberSummary, + 'data-test-subj': dataTestSubject, +}) => { + if (!numberSummary || !isNumberSummaryValid(numberSummary)) { + return null; + } + + const formatter = dataView.getFormatterForField(field); + + const summaryTableItems: SummaryTableItem[] = [ + { + key: 'min', + label: i18n.translate('unifiedFieldList.fieldStats.numberSummary.minLabel', { + defaultMessage: 'min', + }), + value: formatter.convert(numberSummary.minValue, 'text'), + }, + { + key: 'max', + label: i18n.translate('unifiedFieldList.fieldStats.numberSummary.maxLabel', { + defaultMessage: 'max', + }), + value: formatter.convert(numberSummary.maxValue, 'text'), + }, + ]; + const summaryTableColumns = [ + { + field: 'label', + name: '', + align: LEFT_ALIGNMENT as HorizontalAlignment, + }, + { + field: 'value', + name: '', + render: (v: string) => {v}, + align: RIGHT_ALIGNMENT as HorizontalAlignment, + }, + ]; + + const summaryTableTitle = i18n.translate( + 'unifiedFieldList.fieldStats.numberSummary.summaryTableTitle', + { + defaultMessage: 'Summary', + } + ); + + return ( + + compressed + items={summaryTableItems} + columns={summaryTableColumns} + tableCaption={summaryTableTitle} + data-test-subj={`${dataTestSubject}-numberSummary`} + responsive={false} + css={css` + & .euiTableHeaderCell { + ${euiScreenReaderOnly()} + } + & .euiTableRowCell { + border-top: none; + } + `} + /> + ); +}; + +export function isNumberSummaryValid(numberSummary?: NumberSummary): boolean { + return typeof numberSummary?.minValue === 'number' && typeof numberSummary?.maxValue === 'number'; +} diff --git a/src/plugins/unified_field_list/public/components/field_stats/field_stats.test.tsx b/src/plugins/unified_field_list/public/components/field_stats/field_stats.test.tsx index dc0fefabb0d98..40a0d52e6cd13 100644 --- a/src/plugins/unified_field_list/public/components/field_stats/field_stats.test.tsx +++ b/src/plugins/unified_field_list/public/components/field_stats/field_stats.test.tsx @@ -99,6 +99,18 @@ describe('UnifiedFieldList ', () => { aggregatable: true, searchable: true, }, + { + name: 'bytes_counter', + timeSeriesMetric: 'counter', + type: 'number', + esTypes: ['long'], + aggregatable: true, + searchable: true, + count: 10, + readFromDocValues: true, + scripted: false, + isMapped: true, + }, ], getFormatterForField: jest.fn(() => ({ convert: jest.fn((s: unknown) => JSON.stringify(s)), @@ -754,4 +766,66 @@ describe('UnifiedFieldList ', () => { expect(wrapper.find(EuiProgress)).toHaveLength(2); expect(wrapper.find(EuiProgress).first().props()).toHaveProperty('color', 'accent'); }); + + it('should render a number summary for some fields (time series metric counter)', async () => { + let resolveFunction: (arg: unknown) => void; + + (loadFieldStats as jest.Mock).mockImplementation(() => { + return new Promise((resolve) => { + resolveFunction = resolve; + }); + }); + + const field = dataView.fields.find((f) => f.name === 'bytes_counter')!; + + const wrapper = await mountComponent( + + ); + + expect(loadFieldStats).toHaveBeenCalledWith({ + abortController: new AbortController(), + services: { data: mockedServices.data }, + dataView, + fromDate: 'now-1h', + toDate: 'now', + dslQuery: { + bool: { + must: [], + filter: [], + should: [], + must_not: [], + }, + }, + field, + }); + + expect(wrapper.find(EuiLoadingSpinner)).toHaveLength(1); + + await act(async () => { + resolveFunction!({ + numberSummary: { + maxValue: 36821994, + minValue: 29674, + }, + sampledDocuments: 5000, + sampledValues: 5000, + totalDocuments: 6460, + }); + }); + + await wrapper.update(); + + expect(wrapper.find(EuiLoadingSpinner)).toHaveLength(0); + + expect(loadFieldStats).toHaveBeenCalledTimes(1); + + expect(wrapper.text()).toBe('Summarymin29674max36821994Calculated from 5000 sample records.'); + }); }); diff --git a/src/plugins/unified_field_list/public/components/field_stats/field_stats.tsx b/src/plugins/unified_field_list/public/components/field_stats/field_stats.tsx index 028ceddc080c9..7589db074f016 100755 --- a/src/plugins/unified_field_list/public/components/field_stats/field_stats.tsx +++ b/src/plugins/unified_field_list/public/components/field_stats/field_stats.tsx @@ -36,8 +36,11 @@ import { i18n } from '@kbn/i18n'; import { buildEsQuery, Query, Filter, AggregateQuery } from '@kbn/es-query'; import { showExamplesForField } from '../../../common/utils/field_examples_calculator'; import { OverrideFieldTopValueBarCallback } from './field_top_values_bucket'; -import type { BucketedAggregation } from '../../../common/types'; -import { canProvideStatsForField } from '../../../common/utils/field_stats_utils'; +import type { BucketedAggregation, NumberSummary } from '../../../common/types'; +import { + canProvideStatsForField, + canProvideNumberSummaryForField, +} from '../../../common/utils/field_stats_utils'; import { loadFieldStats } from '../../services/field_stats'; import type { AddFieldFilterHandler } from '../../types'; import { @@ -47,6 +50,7 @@ import { getDefaultColor, } from './field_top_values'; import { FieldSummaryMessage } from './field_summary_message'; +import { FieldNumberSummary, isNumberSummaryValid } from './field_number_summary'; import { ErrorBoundary } from '../error_boundary'; export interface FieldStatsState { @@ -56,6 +60,7 @@ export interface FieldStatsState { sampledValues?: number; histogram?: BucketedAggregation; topValues?: BucketedAggregation; + numberSummary?: NumberSummary; } export interface FieldStatsServices { @@ -202,6 +207,7 @@ const FieldStatsComponent: React.FC = ({ sampledValues: results.sampledValues, histogram: results.histogram, topValues: results.topValues, + numberSummary: results.numberSummary, })); } catch (e) { setState((s) => ({ ...s, isLoading: false })); @@ -236,8 +242,15 @@ const FieldStatsComponent: React.FC = ({ : chartTheme; }, [chartTheme, color]); - const { isLoading, histogram, topValues, sampledValues, sampledDocuments, totalDocuments } = - state; + const { + isLoading, + histogram, + topValues, + numberSummary, + sampledValues, + sampledDocuments, + totalDocuments, + } = state; let histogramDefault = !!state.histogram; const fromDateParsed = DateMath.parse(fromDate); @@ -346,6 +359,27 @@ const FieldStatsComponent: React.FC = ({ : messageNoAnalysis; } + if (canProvideNumberSummaryForField(field) && isNumberSummaryValid(numberSummary)) { + title = ( + +

+ {i18n.translate('unifiedFieldList.fieldStats.numberSummary.summaryTableTitle', { + defaultMessage: 'Summary', + })} +
+ + ); + + return combineWithTitleAndFooter( + + ); + } + if ( (!histogram || histogram.buckets.length === 0) && (!topValues || topValues.buckets.length === 0) diff --git a/src/plugins/unified_field_list/public/index.ts b/src/plugins/unified_field_list/public/index.ts index be3591a80cd15..28ef9dd38c9da 100755 --- a/src/plugins/unified_field_list/public/index.ts +++ b/src/plugins/unified_field_list/public/index.ts @@ -7,12 +7,7 @@ */ import { UnifiedFieldListPlugin } from './plugin'; -export type { - FieldStatsResponse, - BucketedAggregation, - NumberStatsResult, - TopValuesResult, -} from '../common/types'; +export type { FieldStatsResponse, BucketedAggregation, NumberSummary } from '../common/types'; export { FieldList, type FieldListProps } from './components/field_list'; export { FieldListGrouped, type FieldListGroupedProps } from './components/field_list_grouped'; export { FieldListFilters, type FieldListFiltersProps } from './components/field_list_filters'; From e36327c243680ad5695a86fbb038062e1bf34816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efe=20G=C3=BCrkan=20YALAMAN?= Date: Mon, 8 May 2023 11:51:57 +0200 Subject: [PATCH 007/102] Fix Enterprise Search guide links (#156965) ## Summary Fixes Enterprise Search guided onboarding links which broke due to UI changes recently. https://user-images.githubusercontent.com/1410658/236779703-010884f0-7708-43e0-8f77-e3e0be456452.mov --- .../guided_onboarding/search_guide_config.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/enterprise_search/common/guided_onboarding/search_guide_config.ts b/x-pack/plugins/enterprise_search/common/guided_onboarding/search_guide_config.ts index eca1871bc81da..630f23fb1ce48 100644 --- a/x-pack/plugins/enterprise_search/common/guided_onboarding/search_guide_config.ts +++ b/x-pack/plugins/enterprise_search/common/guided_onboarding/search_guide_config.ts @@ -8,16 +8,14 @@ import type { GuideConfig, StepConfig } from '@kbn/guided-onboarding'; import { i18n } from '@kbn/i18n'; -import { INGESTION_METHOD_IDS } from '../constants'; - export const appSearchGuideId = 'appSearch'; export const websiteSearchGuideId = 'websiteSearch'; export const databaseSearchGuideId = 'databaseSearch'; -const apiMethods = { - [appSearchGuideId]: INGESTION_METHOD_IDS.API, - [databaseSearchGuideId]: INGESTION_METHOD_IDS.CONNECTOR, - [websiteSearchGuideId]: INGESTION_METHOD_IDS.CRAWLER, +const apiRoutes = { + [appSearchGuideId]: 'api', + [databaseSearchGuideId]: 'select_connector', + [websiteSearchGuideId]: 'crawler', }; export type EnterpriseSearchGuideIds = @@ -25,7 +23,7 @@ export type EnterpriseSearchGuideIds = | typeof websiteSearchGuideId | typeof databaseSearchGuideId; -const getAddDataStep: (method?: INGESTION_METHOD_IDS) => StepConfig = (method) => { +const getAddDataStep: (method?: EnterpriseSearchGuideIds) => StepConfig = (method) => { return { id: 'add_data', title: i18n.translate('xpack.enterpriseSearch.guideConfig.addDataStep.title', { @@ -37,7 +35,7 @@ const getAddDataStep: (method?: INGESTION_METHOD_IDS) => StepConfig = (method) = }), location: { appID: 'enterpriseSearchContent', - path: `/search_indices/new_index?${method ? 'method=' + method : ''}`, + path: `/search_indices/new_index/${method ? apiRoutes[method] : ''}`, }, }; }; @@ -86,7 +84,7 @@ const getGuideConfig: (telemetryId: EnterpriseSearchGuideIds) => GuideConfig = ( defaultMessage: `We'll help you build a search experience with your data using Elastic's web crawler, connectors, and APIs.`, }), guideName: 'Enterprise Search', - steps: [getAddDataStep(apiMethods[telemetryId]), getSearchExperienceStep()], + steps: [getAddDataStep(telemetryId), getSearchExperienceStep()], }; }; From 6df32fd23baf18661473f3fe4f74c06c7fd09648 Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Mon, 8 May 2023 11:58:13 +0200 Subject: [PATCH 008/102] fix content scroll when project side nav enabled (#156840) ## Summary I think this does this trick: https://user-images.githubusercontent.com/7784120/236454659-4922084f-7637-462f-b654-d46d9550b68b.mov --- .../core-chrome-browser-internal/src/ui/project/navigation.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/navigation.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/navigation.tsx index 445a80cca586d..649318a26d15e 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/navigation.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/navigation.tsx @@ -54,6 +54,7 @@ export const ProjectNavigation: React.FC = ({ children }) => { isDocked={true} size={isOpen ? SIZE_OPEN : SIZE_CLOSED} hideCloseButton={false} + ownFocus={false} button={ Date: Mon, 8 May 2023 11:32:53 +0100 Subject: [PATCH 009/102] [QA] Fixup flaky test (#156373) ## Summary Resolves https://github.com/elastic/kibana/issues/136856 - Add async keyword where it should have been. - Split archive into kbn and es archives... instigated by Pierre's comment: https://github.com/elastic/kibana/issues/136856#issuecomment-1253609280 - Note: Had to use both archive types as one archive is "hidden", and cannot be accessed via the kbn client. - Unload via Pierre's "new" clean method. - Add shell fn to print out server's currently loaded so's, with user and pass hardcoded for local dev. --- scripts/archive_migration_functions.sh | 29 ++++++++++++++----- .../hidden_saved_objects/data.json | 21 +------------- .../saved_objects_hidden_type/delete.ts | 23 ++++++++++----- .../saved_objects_hidden_type/export.ts | 24 +++++++++------ .../saved_objects_hidden_type/find.ts | 23 ++++++++++----- .../resolve_import_errors.ts | 23 ++++++++++----- .../saved_objects_management/bulk_get.ts | 23 ++++++++++----- .../saved_objects_management/find.ts | 23 ++++++++++----- .../saved_objects_management/scroll_count.ts | 23 ++++++++++----- .../hidden_saved_objects.json | 11 +++++++ 10 files changed, 138 insertions(+), 85 deletions(-) create mode 100644 x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects.json diff --git a/scripts/archive_migration_functions.sh b/scripts/archive_migration_functions.sh index 36c7f61abdba1..ae51d0cb41b31 100755 --- a/scripts/archive_migration_functions.sh +++ b/scripts/archive_migration_functions.sh @@ -19,12 +19,11 @@ standard_list="url,index-pattern,query,graph-workspace,tag,visualization,canvas-element,canvas-workpad,dashboard,search,lens,map,cases,uptime-dynamic-settings,osquery-saved-query,osquery-pack,infrastructure-ui-source,metrics-explorer-view,inventory-view,infrastructure-monitoring-log-view,apm-indices" -orig_archive="x-pack/test/functional/es_archives/security_solution/timelines/7.15.0_space" -new_archive="x-pack/test/functional/fixtures/kbn_archiver/security_solution/timelines/7.15.0_space" +orig_archive="test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects" +new_archive="x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects" +testFiles=("test/plugin_functional/test_suites/saved_objects_management/scroll_count.ts") -testFiles=("x-pack/test/api_integration/apis/security_solution/timeline_migrations.ts") - -test_config="x-pack/test/api_integration/config.ts" +test_config="test/plugin_functional/config.ts" list_stragglers() { @@ -387,13 +386,27 @@ load_kbn() { local space=${1:-default} local archive=${2:-${new_archive}} + set -x + node scripts/kbn_archiver.js --config "$test_config" load "$archive" --space "$space" + set +x +} + +load_kbn_list() { + local space=${1:-default} + local archive=${2:-${new_archive}} + local newArchives=("${:-${archive}}") + for x in "${newArchives[@]}"; do - set -x - node scripts/kbn_archiver.js --config "$test_config" load "$x" --space "$space" - set +x + load_kbn default "${x}" done } +print_so_types() { + set -x + node scripts/saved_objs_info.js --esUrl http://elastic:changeme@localhost:9220 + set +x +} + load_created_kbn_archive() { set -x node scripts/kbn_archiver.js --config "$test_config" load "$new_archive" diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/data.json b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/data.json index 4996c050adbf0..cc38a9affdda5 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/data.json +++ b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects/data.json @@ -1,22 +1,3 @@ -{ - "type": "doc", - "value": { - "id": "test-hidden-importable-exportable:ff3733a0-9fty-11e7-ahb3-3dcb94193fab", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "references": [ - ], - "test-hidden-importable-exportable": { - "title": "Hidden Saved object type that is importable/exportable." - }, - "type": "test-hidden-importable-exportable", - "updated_at": "2021-02-11T18:51:23.794Z" - }, - "type": "_doc" - } -} - { "type": "doc", "value": { @@ -34,4 +15,4 @@ }, "type": "_doc" } -} \ No newline at end of file +} diff --git a/test/plugin_functional/test_suites/saved_objects_hidden_type/delete.ts b/test/plugin_functional/test_suites/saved_objects_hidden_type/delete.ts index 04fcc29efe612..f05edc6164d7b 100644 --- a/test/plugin_functional/test_suites/saved_objects_hidden_type/delete.ts +++ b/test/plugin_functional/test_suites/saved_objects_hidden_type/delete.ts @@ -12,18 +12,25 @@ import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('delete', () => { - before(() => - esArchiver.load( + before(async () => { + await esArchiver.load( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); - after(() => - esArchiver.unload( + ); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects' + ); + }); + after(async () => { + await esArchiver.unload( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); + ); + await kibanaServer.savedObjects.clean({ + types: ['test-hidden-importable-exportable'], + }); + }); it('should return generic 404 when trying to delete a doc with importableAndExportable types', async () => await supertest diff --git a/test/plugin_functional/test_suites/saved_objects_hidden_type/export.ts b/test/plugin_functional/test_suites/saved_objects_hidden_type/export.ts index 9d1f370dc73e7..3baa15daa0cf8 100644 --- a/test/plugin_functional/test_suites/saved_objects_hidden_type/export.ts +++ b/test/plugin_functional/test_suites/saved_objects_hidden_type/export.ts @@ -16,19 +16,25 @@ function ndjsonToObject(input: string): string[] { export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('export', () => { - before(() => - esArchiver.load( + before(async () => { + await esArchiver.load( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); - after(() => - esArchiver.unload( + ); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects' + ); + }); + after(async () => { + await esArchiver.unload( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); - + ); + await kibanaServer.savedObjects.clean({ + types: ['test-hidden-importable-exportable'], + }); + }); it('exports objects with importableAndExportable types', async () => await supertest .post('/api/saved_objects/_export') diff --git a/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts b/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts index c73edfc106668..084d823deb401 100644 --- a/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts +++ b/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts @@ -12,18 +12,25 @@ import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('find', () => { - before(() => - esArchiver.load( + before(async () => { + await esArchiver.load( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); - after(() => - esArchiver.unload( + ); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects' + ); + }); + after(async () => { + await esArchiver.unload( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); + ); + await kibanaServer.savedObjects.clean({ + types: ['test-hidden-importable-exportable'], + }); + }); it('returns empty response for importableAndExportable types', async () => await supertest diff --git a/test/plugin_functional/test_suites/saved_objects_hidden_type/resolve_import_errors.ts b/test/plugin_functional/test_suites/saved_objects_hidden_type/resolve_import_errors.ts index 26688ddd20046..82e67f4022132 100644 --- a/test/plugin_functional/test_suites/saved_objects_hidden_type/resolve_import_errors.ts +++ b/test/plugin_functional/test_suites/saved_objects_hidden_type/resolve_import_errors.ts @@ -12,18 +12,25 @@ import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('export', () => { - before(() => - esArchiver.load( + before(async () => { + await esArchiver.load( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); - after(() => - esArchiver.unload( + ); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects' + ); + }); + after(async () => { + await esArchiver.unload( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); + ); + await kibanaServer.savedObjects.clean({ + types: ['test-hidden-importable-exportable'], + }); + }); it('resolves objects with importableAndExportable types', async () => { const fileBuffer = Buffer.from( diff --git a/test/plugin_functional/test_suites/saved_objects_management/bulk_get.ts b/test/plugin_functional/test_suites/saved_objects_management/bulk_get.ts index b792df4244e60..ba690a8f11a9b 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/bulk_get.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/bulk_get.ts @@ -13,19 +13,26 @@ import type { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('_bulk_get', () => { describe('saved objects with hidden type', () => { - before(() => - esArchiver.load( + before(async () => { + await esArchiver.load( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); - after(() => - esArchiver.unload( + ); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects' + ); + }); + after(async () => { + await esArchiver.unload( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); + ); + await kibanaServer.savedObjects.clean({ + types: ['test-hidden-importable-exportable'], + }); + }); const URL = '/api/kibana/management/saved_objects/_bulk_get'; const hiddenTypeExportableImportable = { type: 'test-hidden-importable-exportable', diff --git a/test/plugin_functional/test_suites/saved_objects_management/find.ts b/test/plugin_functional/test_suites/saved_objects_management/find.ts index 6492f7439079b..aabed1ce26e7d 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/find.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/find.ts @@ -12,19 +12,26 @@ import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('find', () => { describe('saved objects with hidden type', () => { - before(() => - esArchiver.load( + before(async () => { + await esArchiver.load( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); - after(() => - esArchiver.unload( + ); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects' + ); + }); + after(async () => { + await esArchiver.unload( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); + ); + await kibanaServer.savedObjects.clean({ + types: ['test-hidden-importable-exportable'], + }); + }); it('returns saved objects with importableAndExportable types', async () => await supertest .get('/api/kibana/management/saved_objects/_find?type=test-hidden-importable-exportable') diff --git a/test/plugin_functional/test_suites/saved_objects_management/scroll_count.ts b/test/plugin_functional/test_suites/saved_objects_management/scroll_count.ts index 0041344733f0d..af2ad06b48c0d 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/scroll_count.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/scroll_count.ts @@ -12,20 +12,27 @@ import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const apiUrl = '/api/kibana/management/saved_objects/scroll/counts'; describe('scroll_count', () => { describe('saved objects with hidden type', () => { - before(() => - esArchiver.load( + before(async () => { + await esArchiver.load( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); - after(() => - esArchiver.unload( + ); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects' + ); + }); + after(async () => { + await esArchiver.unload( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) - ); + ); + await kibanaServer.savedObjects.clean({ + types: ['test-hidden-importable-exportable'], + }); + }); it('only counts hidden types that are importableAndExportable', async () => { const res = await supertest diff --git a/x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects.json b/x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects.json new file mode 100644 index 0000000000000..2755e145b2566 --- /dev/null +++ b/x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_saved_objects.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "title": "Hidden Saved object type that is importable/exportable." + }, + "coreMigrationVersion": "7.14.0", + "id": "ff3733a0-9fty-11e7-ahb3-3dcb94193fab", + "references": [], + "type": "test-hidden-importable-exportable", + "updated_at": "2021-02-11T18:51:23.794Z", + "version": "WzIsMV0=" +} From d10c48b983404025c6b0009c899ccc59c655bc6d Mon Sep 17 00:00:00 2001 From: Bena Kansara <69037875+benakansara@users.noreply.github.com> Date: Mon, 8 May 2023 13:12:08 +0200 Subject: [PATCH 010/102] Hide preview charts in APM rules (#156966) Hides preview charts in the following APM rules until https://github.com/elastic/kibana/pull/156625 (WIP) gets merged. - APM Latency threshold - APM Failed transaction rate - APM Error count threshold --- .../alerting/rule_types/error_count_rule_type/index.tsx | 6 ++++-- .../rule_types/transaction_duration_rule_type/index.tsx | 6 ++++-- .../rule_types/transaction_error_rate_rule_type/index.tsx | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.tsx b/x-pack/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.tsx index b754e8fc76673..d01f1f0a45dea 100644 --- a/x-pack/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.tsx +++ b/x-pack/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.tsx @@ -162,14 +162,16 @@ export function ErrorCountRuleType(props: Props) { />, ]; - const chartPreview = ( + // hide preview chart until https://github.com/elastic/kibana/pull/156625 gets merged + const showChartPreview = false; + const chartPreview = showChartPreview ? ( - ); + ) : null; const groupAlertsBy = ( <> diff --git a/x-pack/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.tsx b/x-pack/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.tsx index 3e1108bc7685e..9d51adfeebc05 100644 --- a/x-pack/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.tsx +++ b/x-pack/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.tsx @@ -147,14 +147,16 @@ export function TransactionDurationRuleType(props: Props) { // The threshold from the form is in ms. Convert to µs. const thresholdMs = params.threshold * 1000; - const chartPreview = ( + // hide preview chart until https://github.com/elastic/kibana/pull/156625 gets merged + const showChartPreview = false; + const chartPreview = showChartPreview ? ( - ); + ) : null; const onGroupByChange = useCallback( (group: string[] | null) => { diff --git a/x-pack/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.tsx b/x-pack/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.tsx index e115043353b1f..e7d45114c1f8f 100644 --- a/x-pack/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.tsx +++ b/x-pack/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.tsx @@ -171,14 +171,16 @@ export function TransactionErrorRateRuleType(props: Props) { />, ]; - const chartPreview = ( + // hide preview chart until https://github.com/elastic/kibana/pull/156625 gets merged + const showChartPreview = false; + const chartPreview = showChartPreview ? ( asPercent(d, 1)} threshold={thresholdAsPercent} uiSettings={services.uiSettings} /> - ); + ) : null; const groupAlertsBy = ( <> From 47b0e14cc6eb739977c0e17ce2b0f7d100321abe Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Mon, 8 May 2023 13:14:40 +0200 Subject: [PATCH 011/102] [Discover] Hide "Store time with search" toggle in modal for data views without a time field (#156836) Closes https://github.com/elastic/kibana/issues/156663 ## Summary In "Save search" modal "Store time with saved search" toggle will appear only for time-based data views. --- .../top_nav/on_save_search.test.tsx | 33 ++++++++++++++++++- .../components/top_nav/on_save_search.tsx | 12 +++++-- .../main/services/discover_state.test.ts | 2 +- .../restore_from_saved_search.test.ts | 31 +++++++++++++---- .../restore_from_saved_search.ts | 6 ++++ 5 files changed, 73 insertions(+), 11 deletions(-) diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx index 3945a21024a34..5c4df5f492249 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx @@ -8,6 +8,9 @@ import * as savedObjectsPlugin from '@kbn/saved-objects-plugin/public'; jest.mock('@kbn/saved-objects-plugin/public'); +import type { DataView } from '@kbn/data-views-plugin/common'; +import { dataViewMock } from '../../../../__mocks__/data_view'; +import { dataViewWithTimefieldMock } from '../../../../__mocks__/data_view_with_timefield'; import { onSaveSearch } from './on_save_search'; import { savedSearchMock } from '../../../../__mocks__/saved_search'; import { getDiscoverStateContainer } from '../../services/discover_state'; @@ -16,7 +19,7 @@ import { discoverServiceMock } from '../../../../__mocks__/services'; import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { createBrowserHistory } from 'history'; -function getStateContainer() { +function getStateContainer({ dataView }: { dataView?: DataView } = {}) { const savedSearch = savedSearchMock; const history = createBrowserHistory(); const stateContainer = getDiscoverStateContainer({ @@ -27,6 +30,9 @@ function getStateContainer() { stateContainer.appState.getState = jest.fn(() => ({ rowsPerPage: 250, })); + if (dataView) { + stateContainer.internalState.transitions.setDataView(dataView); + } return stateContainer; } @@ -42,6 +48,31 @@ describe('onSaveSearch', () => { expect(savedObjectsPlugin.showSaveModal).toHaveBeenCalled(); }); + it('should consider whether a data view is time based', async () => { + let saveModal: ReactElement | undefined; + jest.spyOn(savedObjectsPlugin, 'showSaveModal').mockImplementation((modal) => { + saveModal = modal; + }); + + await onSaveSearch({ + navigateTo: jest.fn(), + savedSearch: savedSearchMock, + services: discoverServiceMock, + state: getStateContainer({ dataView: dataViewMock }), + }); + + expect(saveModal?.props.isTimeBased).toBe(false); + + await onSaveSearch({ + navigateTo: jest.fn(), + savedSearch: savedSearchMock, + services: discoverServiceMock, + state: getStateContainer({ dataView: dataViewWithTimefieldMock }), + }); + + expect(saveModal?.props.isTimeBased).toBe(true); + }); + it('should pass tags to the save modal', async () => { let saveModal: ReactElement | undefined; jest.spyOn(savedObjectsPlugin, 'showSaveModal').mockImplementationOnce((modal) => { diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx index 838575184f7d8..7addf5edef9f9 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx @@ -93,6 +93,7 @@ export async function onSaveSearch({ onSaveCb?: () => void; }) { const { uiSettings, savedObjectsTagging } = services; + const dataView = state.internalState.getState().dataView; const onSave = async ({ newTitle, newCopyOnSave, @@ -161,6 +162,7 @@ export async function onSaveSearch({ const saveModal = ( void; onClose: () => void; }> = ({ + isTimeBased, services, title, description, @@ -194,7 +198,9 @@ const SaveSearchObjectModal: React.FC<{ onClose, }) => { const { savedObjectsTagging } = services; - const [timeRestore, setTimeRestore] = useState(savedTimeRestore || false); + const [timeRestore, setTimeRestore] = useState( + (isTimeBased && savedTimeRestore) || false + ); const [currentTags, setCurrentTags] = useState(tags); const onModalSave = (params: OnSaveProps) => { @@ -214,7 +220,7 @@ const SaveSearchObjectModal: React.FC<{ /> ) : undefined; - const timeSwitch = ( + const timeSwitch = isTimeBased ? ( - ); + ) : null; const options = tagSelector ? ( <> diff --git a/src/plugins/discover/public/application/main/services/discover_state.test.ts b/src/plugins/discover/public/application/main/services/discover_state.test.ts index 4b84e613f4664..ec0db6bdc290d 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.test.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.test.ts @@ -670,7 +670,7 @@ describe('actions', () => { test('undoSavedSearchChanges with timeRestore', async () => { const { state } = await getState('/', { - ...savedSearchMock, + ...savedSearchMockWithTimeField, timeRestore: true, refreshInterval: { pause: false, value: 1000 }, timeRange: { from: 'now-15d', to: 'now-10d' }, diff --git a/src/plugins/discover/public/services/saved_searches/restore_from_saved_search.test.ts b/src/plugins/discover/public/services/saved_searches/restore_from_saved_search.test.ts index 355f80b78b2ac..45c9645706583 100644 --- a/src/plugins/discover/public/services/saved_searches/restore_from_saved_search.test.ts +++ b/src/plugins/discover/public/services/saved_searches/restore_from_saved_search.test.ts @@ -8,7 +8,7 @@ import type { TimefilterContract } from '@kbn/data-plugin/public'; import type { TimeRange, RefreshInterval } from '@kbn/data-plugin/common'; -import type { SavedSearch } from '@kbn/saved-search-plugin/public'; +import { savedSearchMock, savedSearchMockWithTimeField } from '../../__mocks__/saved_search'; import { restoreStateFromSavedSearch } from './restore_from_saved_search'; describe('discover restore state from saved search', () => { @@ -31,7 +31,7 @@ describe('discover restore state from saved search', () => { test('should not update timefilter if attributes are not set', async () => { restoreStateFromSavedSearch({ - savedSearch: {} as SavedSearch, + savedSearch: savedSearchMockWithTimeField, timefilter: timefilterMock, }); @@ -42,10 +42,11 @@ describe('discover restore state from saved search', () => { test('should not update timefilter if timeRestore is disabled', async () => { restoreStateFromSavedSearch({ savedSearch: { + ...savedSearchMockWithTimeField, timeRestore: false, timeRange, refreshInterval, - } as SavedSearch, + }, timefilter: timefilterMock, }); @@ -56,10 +57,11 @@ describe('discover restore state from saved search', () => { test('should update timefilter if timeRestore is enabled', async () => { restoreStateFromSavedSearch({ savedSearch: { + ...savedSearchMockWithTimeField, timeRestore: true, timeRange, refreshInterval, - } as SavedSearch, + }, timefilter: timefilterMock, }); @@ -67,11 +69,27 @@ describe('discover restore state from saved search', () => { expect(timefilterMock.setRefreshInterval).toHaveBeenCalledWith(refreshInterval); }); + test('should not update if data view is not time based', async () => { + restoreStateFromSavedSearch({ + savedSearch: { + ...savedSearchMock, + timeRestore: true, + timeRange, + refreshInterval, + }, + timefilter: timefilterMock, + }); + + expect(timefilterMock.setTime).not.toHaveBeenCalled(); + expect(timefilterMock.setRefreshInterval).not.toHaveBeenCalled(); + }); + test('should not update timefilter if attributes are missing', async () => { restoreStateFromSavedSearch({ savedSearch: { + ...savedSearchMockWithTimeField, timeRestore: true, - } as SavedSearch, + }, timefilter: timefilterMock, }); @@ -82,6 +100,7 @@ describe('discover restore state from saved search', () => { test('should not update timefilter if attributes are invalid', async () => { restoreStateFromSavedSearch({ savedSearch: { + ...savedSearchMockWithTimeField, timeRestore: true, timeRange: { from: 'test', @@ -91,7 +110,7 @@ describe('discover restore state from saved search', () => { pause: false, value: -500, }, - } as SavedSearch, + }, timefilter: timefilterMock, }); diff --git a/src/plugins/discover/public/services/saved_searches/restore_from_saved_search.ts b/src/plugins/discover/public/services/saved_searches/restore_from_saved_search.ts index 550c36408977b..c36c99cf5866d 100644 --- a/src/plugins/discover/public/services/saved_searches/restore_from_saved_search.ts +++ b/src/plugins/discover/public/services/saved_searches/restore_from_saved_search.ts @@ -21,6 +21,12 @@ export const restoreStateFromSavedSearch = ({ return; } + const isTimeBased = savedSearch.searchSource.getField('index')?.isTimeBased(); + + if (!isTimeBased) { + return; + } + if (savedSearch.timeRestore && savedSearch.timeRange && isTimeRangeValid(savedSearch.timeRange)) { timefilter.setTime(savedSearch.timeRange); } From 9f69d2dafd2ad7d53525f2f55967b7128644516a Mon Sep 17 00:00:00 2001 From: Ievgen Sorokopud Date: Mon, 8 May 2023 14:01:18 +0200 Subject: [PATCH 012/102] [Security Solution] Actions with conditional logic cannot be added through bulk actions (#156866) (#156905) ## Summary Original ticket: https://github.com/elastic/kibana/issues/156866 These changes fix the issue with the conditional actions in bulk editing. We did not add action filter attributes to the bulk editing scheme. More details here https://github.com/elastic/kibana/issues/156866#issuecomment-1536469202 --- .../api/rules/bulk_actions/request_schema.ts | 6 ++- .../transform_actions.test.ts | 40 +++++++++++++++++++ .../detection_engine/transform_actions.ts | 30 ++++++++++++++ .../bulk_actions/forms/rule_actions_form.tsx | 3 +- .../action_to_rules_client_operation.ts | 9 ++++- 5 files changed, 83 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/security_solution/common/detection_engine/rule_management/api/rules/bulk_actions/request_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/rule_management/api/rules/bulk_actions/request_schema.ts index e0a392885bad9..118c886e94042 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/rule_management/api/rules/bulk_actions/request_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/rule_management/api/rules/bulk_actions/request_schema.ts @@ -9,6 +9,7 @@ import * as t from 'io-ts'; import { NonEmptyArray, TimeDuration } from '@kbn/securitysolution-io-ts-types'; import { + RuleActionAlertsFilter, RuleActionFrequency, RuleActionGroup, RuleActionId, @@ -95,8 +96,8 @@ const BulkActionEditPayloadTimeline = t.type({ * per rulesClient.bulkEdit rules actions operation contract (x-pack/plugins/alerting/server/rules_client/rules_client.ts) * normalized rule action object is expected (NormalizedAlertAction) as value for the edit operation */ -type NormalizedRuleAction = t.TypeOf; -const NormalizedRuleAction = t.exact( +export type NormalizedRuleAction = t.TypeOf; +export const NormalizedRuleAction = t.exact( t.intersection([ t.type({ group: RuleActionGroup, @@ -104,6 +105,7 @@ const NormalizedRuleAction = t.exact( params: RuleActionParams, }), t.partial({ frequency: RuleActionFrequency }), + t.partial({ alerts_filter: RuleActionAlertsFilter }), ]) ); diff --git a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts index 309dccbf5804a..df8a56e999a06 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts @@ -8,11 +8,15 @@ import { transformRuleToAlertAction, transformAlertToRuleAction, + transformNormalizedRuleToAlertAction, + transformAlertToNormalizedRuleAction, transformRuleToAlertResponseAction, transformAlertToRuleResponseAction, } from './transform_actions'; import type { ResponseAction, RuleResponseAction } from './rule_response_actions/schemas'; import { RESPONSE_ACTION_TYPES } from './rule_response_actions/schemas'; +import type { NormalizedRuleAction } from './rule_management/api/rules/bulk_actions/request_schema'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; describe('transform_actions', () => { test('it should transform RuleAlertAction[] to RuleAction[]', () => { @@ -48,6 +52,42 @@ describe('transform_actions', () => { uuid: '111', }); }); + test('it should transform NormalizedRuleAction[] to NormalizedAlertAction[]', () => { + const ruleAction: NormalizedRuleAction = { + id: 'id', + group: 'group', + params: {}, + frequency: { summary: true, throttle: null, notifyWhen: 'onActiveAlert' }, + alerts_filter: { query: { kql: '*', filters: [] } }, + }; + const alertAction = transformNormalizedRuleToAlertAction(ruleAction); + expect(alertAction).toEqual({ + id: ruleAction.id, + group: ruleAction.group, + params: ruleAction.params, + frequency: ruleAction.frequency, + alertsFilter: ruleAction.alerts_filter, + }); + }); + test('it should transform RuleAction[] to NormalizedRuleAction[]', () => { + const alertAction: RuleAction = { + id: 'id', + group: 'group', + actionTypeId: 'actionTypeId', + params: {}, + uuid: '111', + frequency: { summary: true, throttle: null, notifyWhen: 'onActiveAlert' }, + alertsFilter: { query: { kql: '*', filters: [] } }, + }; + const ruleAction = transformAlertToNormalizedRuleAction(alertAction); + expect(ruleAction).toEqual({ + id: alertAction.id, + group: alertAction.group, + params: alertAction.params, + frequency: alertAction.frequency, + alerts_filter: alertAction.alertsFilter, + }); + }); test('it should transform ResponseAction[] to RuleResponseAction[]', () => { const ruleAction: ResponseAction = { action_type_id: RESPONSE_ACTION_TYPES.OSQUERY, diff --git a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts index 3808837dc0df2..b17b4d5276c19 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts @@ -6,6 +6,8 @@ */ import type { RuleAction } from '@kbn/alerting-plugin/common'; +import type { NormalizedAlertAction } from '@kbn/alerting-plugin/server/rules_client'; +import type { NormalizedRuleAction } from './rule_management/api/rules/bulk_actions/request_schema'; import type { ResponseAction, RuleResponseAction } from './rule_response_actions/schemas'; import { RESPONSE_ACTION_TYPES } from './rule_response_actions/schemas'; import type { RuleAlertAction } from './types'; @@ -46,6 +48,34 @@ export const transformAlertToRuleAction = ({ ...(frequency && { frequency }), }); +export const transformNormalizedRuleToAlertAction = ({ + group, + id, + params, + frequency, + alerts_filter: alertsFilter, +}: NormalizedRuleAction): NormalizedAlertAction => ({ + group, + id, + params, + ...(alertsFilter && { alertsFilter }), + ...(frequency && { frequency }), +}); + +export const transformAlertToNormalizedRuleAction = ({ + group, + id, + params, + frequency, + alertsFilter, +}: RuleAction): NormalizedRuleAction => ({ + group, + id, + params, + ...(alertsFilter && { alerts_filter: alertsFilter }), + ...(frequency && { frequency }), +}); + export const transformRuleToAlertResponseAction = ({ action_type_id: actionTypeId, params, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/rule_actions_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/rule_actions_form.tsx index 903ff44dfba3f..358549d9dd55a 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/rule_actions_form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/rule_actions_form.tsx @@ -13,6 +13,7 @@ import type { ActionTypeRegistryContract, } from '@kbn/triggers-actions-ui-plugin/public'; +import { transformAlertToNormalizedRuleAction } from '../../../../../../../common/detection_engine/transform_actions'; import type { FormSchema } from '../../../../../../shared_imports'; import { useForm, @@ -104,7 +105,7 @@ const RuleActionsFormComponent = ({ rulesCount, onClose, onConfirm }: RuleAction onConfirm({ type: editAction, value: { - actions: actions.map(({ actionTypeId, ...action }) => action), + actions: actions.map(transformAlertToNormalizedRuleAction), }, }); }, [form, onConfirm]); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts index 29d285432dfdc..b463567838a38 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts @@ -6,6 +6,7 @@ */ import type { BulkEditOperation } from '@kbn/alerting-plugin/server'; +import { transformNormalizedRuleToAlertAction } from '../../../../../../common/detection_engine/transform_actions'; import type { BulkActionEditForRuleAttributes } from '../../../../../../common/detection_engine/rule_management/api/rules/bulk_actions/request_schema'; import { BulkActionEditType } from '../../../../../../common/detection_engine/rule_management/api/rules/bulk_actions/request_schema'; @@ -55,7 +56,9 @@ export const bulkEditActionToRulesClientOperation = ( { field: 'actions', operation: 'add', - value: transformToActionFrequency(action.value.actions, action.value.throttle), + value: transformToActionFrequency(action.value.actions, action.value.throttle).map( + transformNormalizedRuleToAlertAction + ), }, ]; @@ -64,7 +67,9 @@ export const bulkEditActionToRulesClientOperation = ( { field: 'actions', operation: 'set', - value: transformToActionFrequency(action.value.actions, action.value.throttle), + value: transformToActionFrequency(action.value.actions, action.value.throttle).map( + transformNormalizedRuleToAlertAction + ), }, ]; From 2b0c44fd6241a9d9a23c9c728f3c29be5e395838 Mon Sep 17 00:00:00 2001 From: Tomasz Ciecierski Date: Mon, 8 May 2023 14:17:32 +0200 Subject: [PATCH 013/102] [Defend Workflows] Fix osquery tests 8.9 (#156850) --- .../cypress/e2e/all/add_integration.cy.ts | 1 - .../plugins/osquery/cypress/e2e/all/alerts.cy.ts | 10 +++++----- .../osquery/cypress/e2e/all/metrics.cy.ts | 6 +++--- .../osquery/cypress/screens/integrations.ts | 3 +++ x-pack/plugins/osquery/cypress/support/e2e.ts | 6 ++++++ .../osquery/cypress/tasks/integrations.ts | 9 +++++++++ .../plugins/osquery/cypress/tasks/inventory.ts | 15 +++++++++++++++ .../plugins/osquery/cypress/tasks/live_query.ts | 16 +++++++++------- x-pack/test/osquery_cypress/artifact_manager.ts | 2 +- 9 files changed, 51 insertions(+), 17 deletions(-) create mode 100644 x-pack/plugins/osquery/cypress/tasks/inventory.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts index 552c3ae1e8c90..ebfb02d3b7e23 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts @@ -81,7 +81,6 @@ describe('ALL - Add Integration', () => { it('should add the old integration and be able to upgrade it', () => { cy.visit(createOldOsqueryPath(oldVersion)); addCustomIntegration(integrationName, policyName); - cy.contains(integrationName); policyContainsIntegration(integrationName, policyName); cy.contains(`version: ${oldVersion}`); cy.getBySel('euiFlyoutCloseButton').click(); diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts index f5ca1f517730f..c685bc8434b44 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts @@ -37,6 +37,7 @@ import { } from '../../tasks/live_query'; import { preparePack } from '../../tasks/packs'; import { + closeDateTabIfVisible, closeModalIfVisible, closeToastIfVisible, generateRandomStringName, @@ -128,8 +129,8 @@ describe('Alert Event Details', () => { cy.visit('/app/security/rules'); cy.contains(ruleName).click(); cy.getBySel('editRuleSettingsLink').click(); - cy.getBySel('globalLoadingIndicator').should('exist'); cy.getBySel('globalLoadingIndicator').should('not.exist'); + closeDateTabIfVisible(); cy.getBySel('edit-rule-actions-tab').click(); cy.contains('Response actions are run on each rule execution'); cy.getBySel(OSQUERY_RESPONSE_ACTION_ADD_BUTTON).click(); @@ -168,7 +169,6 @@ describe('Alert Event Details', () => { closeToastIfVisible(); cy.getBySel('editRuleSettingsLink').click(); - cy.getBySel('globalLoadingIndicator').should('exist'); cy.getBySel('globalLoadingIndicator').should('not.exist'); cy.getBySel('edit-rule-actions-tab').click(); cy.getBySel(RESPONSE_ACTIONS_ITEM_0).within(() => { @@ -214,7 +214,6 @@ describe('Alert Event Details', () => { closeToastIfVisible(); cy.getBySel('editRuleSettingsLink').click(); - cy.getBySel('globalLoadingIndicator').should('exist'); cy.getBySel('globalLoadingIndicator').should('not.exist'); cy.getBySel('edit-rule-actions-tab').click(); cy.getBySel(RESPONSE_ACTIONS_ITEM_0).within(() => { @@ -280,7 +279,6 @@ describe('Alert Event Details', () => { cy.visit('/app/security/rules'); cy.contains(ruleName).click(); cy.getBySel('editRuleSettingsLink').click(); - cy.getBySel('globalLoadingIndicator').should('exist'); cy.getBySel('globalLoadingIndicator').should('not.exist'); cy.getBySel('edit-rule-actions-tab').click(); @@ -338,7 +336,9 @@ describe('Alert Event Details', () => { cy.getBySel(RESULTS_TABLE_BUTTON).should('not.exist'); }); cy.contains('Cancel').click(); - cy.contains(TIMELINE_NAME).click(); + cy.getBySel('flyoutBottomBar').within(() => { + cy.contains(TIMELINE_NAME).click(); + }); cy.getBySel('draggableWrapperKeyboardHandler').contains('action_id: "'); // timeline unsaved changes modal cy.visit('/app/osquery'); diff --git a/x-pack/plugins/osquery/cypress/e2e/all/metrics.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/metrics.cy.ts index 251bb5f0dce9d..841466a1c3e4d 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/metrics.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/metrics.cy.ts @@ -9,6 +9,7 @@ import { navigateTo } from '../../tasks/navigation'; import { ROLE, login } from '../../tasks/login'; import { checkResults, inputQuery, submitQuery } from '../../tasks/live_query'; import { loadSavedQuery, cleanupSavedQuery } from '../../tasks/api_fixtures'; +import { triggerLoadData } from '../../tasks/inventory'; describe('ALL - Inventory', () => { let savedQueryName: string; @@ -34,7 +35,7 @@ describe('ALL - Inventory', () => { cy.getBySel('toggleNavButton').click(); cy.contains('Infrastructure').click(); - cy.getBySel('nodeContainer').first().click(); + triggerLoadData(); cy.contains('Osquery').click(); inputQuery('select * from uptime;'); @@ -46,8 +47,7 @@ describe('ALL - Inventory', () => { cy.getBySel('toggleNavButton').click(); cy.getBySel('collapsibleNavAppLink').contains('Infrastructure').click(); - cy.wait(500); - cy.getBySel('nodeContainer').first().click(); + triggerLoadData(); cy.contains('Osquery').click(); cy.getBySel('comboBoxInput').first().click(); diff --git a/x-pack/plugins/osquery/cypress/screens/integrations.ts b/x-pack/plugins/osquery/cypress/screens/integrations.ts index 6b44bdba441d0..97a6b382543cd 100644 --- a/x-pack/plugins/osquery/cypress/screens/integrations.ts +++ b/x-pack/plugins/osquery/cypress/screens/integrations.ts @@ -29,3 +29,6 @@ export const SAVE_PACKAGE_CONFIRM = '[data-test-subj=confirmModalConfirmButton]' export const getAdvancedButton = () => cy.react('EuiAccordionClass', { props: { buttonContent: 'Advanced' } }).last(); + +export const DATE_PICKER_ABSOLUTE_TAB = 'superDatePickerAbsoluteTab'; +export const DATE_PICKER_ABSOLUTE_TAB_SEL = `[data-test-subj=${DATE_PICKER_ABSOLUTE_TAB}]`; diff --git a/x-pack/plugins/osquery/cypress/support/e2e.ts b/x-pack/plugins/osquery/cypress/support/e2e.ts index 7f8be263e6e4b..975c0a7d65efc 100644 --- a/x-pack/plugins/osquery/cypress/support/e2e.ts +++ b/x-pack/plugins/osquery/cypress/support/e2e.ts @@ -36,6 +36,7 @@ declare global { getBySelContains( ...args: Parameters ): Chainable>; + clickOutside(): Chainable>; } } } @@ -49,6 +50,11 @@ Cypress.Commands.add('getBySelContains', (selector, ...args) => cy.get(`[data-test-subj^="${selector}"]`, ...args) ); +Cypress.Commands.add( + 'clickOutside', + () => cy.get('body').click(0, 0) // 0,0 here are the x and y coordinates +); + // Alternatively you can use CommonJS syntax: // require('./commands') Cypress.on('uncaught:exception', () => false); diff --git a/x-pack/plugins/osquery/cypress/tasks/integrations.ts b/x-pack/plugins/osquery/cypress/tasks/integrations.ts index bb576421ccd3f..8ea6c0b734758 100644 --- a/x-pack/plugins/osquery/cypress/tasks/integrations.ts +++ b/x-pack/plugins/osquery/cypress/tasks/integrations.ts @@ -12,6 +12,7 @@ import { CONFIRM_MODAL_BTN_SEL, CREATE_PACKAGE_POLICY_SAVE_BTN, DATA_COLLECTION_SETUP_STEP, + DATE_PICKER_ABSOLUTE_TAB_SEL, TOAST_CLOSE_BTN, TOAST_CLOSE_BTN_SEL, } from '../screens/integrations'; @@ -93,6 +94,14 @@ export function closeModalIfVisible() { }); } +export function closeDateTabIfVisible() { + cy.get('body').then(($body) => { + if ($body.find(DATE_PICKER_ABSOLUTE_TAB_SEL).length) { + cy.getBySel(DATE_PICKER_ABSOLUTE_TAB_SEL).clickOutside(); + } + }); +} + export function closeToastIfVisible() { cy.get('body').then(($body) => { const button = $body.find(TOAST_CLOSE_BTN_SEL); diff --git a/x-pack/plugins/osquery/cypress/tasks/inventory.ts b/x-pack/plugins/osquery/cypress/tasks/inventory.ts new file mode 100644 index 0000000000000..933efd91d79ce --- /dev/null +++ b/x-pack/plugins/osquery/cypress/tasks/inventory.ts @@ -0,0 +1,15 @@ +/* + * 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 triggerLoadData = () => { + cy.getBySel('infraWaffleTimeControlsAutoRefreshButton').should('exist'); + cy.wait(1000); + cy.getBySel('infraWaffleTimeControlsAutoRefreshButton').click(); + cy.getBySel('nodeContainer').first().should('exist'); + cy.getBySel('infraWaffleTimeControlsStopRefreshingButton').click(); + cy.getBySel('nodeContainer').first().click(); +}; diff --git a/x-pack/plugins/osquery/cypress/tasks/live_query.ts b/x-pack/plugins/osquery/cypress/tasks/live_query.ts index 51213ee57f8c3..70afb41bb82d6 100644 --- a/x-pack/plugins/osquery/cypress/tasks/live_query.ts +++ b/x-pack/plugins/osquery/cypress/tasks/live_query.ts @@ -11,12 +11,14 @@ export const DEFAULT_QUERY = 'select * from processes;'; export const BIG_QUERY = 'select * from processes, users limit 110;'; export const selectAllAgents = () => { - cy.react('AgentsTable').find('input').should('not.be.disabled'); - cy.react('AgentsTable EuiComboBox', { - props: { placeholder: 'Select agents or groups to query' }, - }).click(); - cy.react('EuiFilterSelectItem').contains('All agents').should('exist'); - cy.react('AgentsTable EuiComboBox').type('{downArrow}{enter}{esc}'); + cy.getBySel('agentSelection').find('input').should('not.be.disabled'); + cy.getBySel('agentSelection').within(() => { + cy.getBySel('comboBoxInput').click(); + }); + cy.contains('All agents').should('exist'); + cy.getBySel('agentSelection').within(() => { + cy.getBySel('comboBoxInput').type('{downArrow}{enter}{esc}'); + }); cy.contains('2 agents selected.'); }; @@ -150,7 +152,7 @@ export const checkActionItemsInResults = ({ export const takeOsqueryActionWithParams = () => { cy.getBySel('take-action-dropdown-btn').click(); cy.getBySel('osquery-action-item').click(); - cy.contains('1 agent selected.'); + selectAllAgents(); inputQuery("SELECT * FROM os_version where name='{{host.os.name}}';", { parseSpecialCharSequences: false, }); diff --git a/x-pack/test/osquery_cypress/artifact_manager.ts b/x-pack/test/osquery_cypress/artifact_manager.ts index 2a520c22203c0..d07fec832722f 100644 --- a/x-pack/test/osquery_cypress/artifact_manager.ts +++ b/x-pack/test/osquery_cypress/artifact_manager.ts @@ -6,5 +6,5 @@ */ export async function getLatestVersion(): Promise { - return '8.8.0-SNAPSHOT'; + return '8.9.0-SNAPSHOT'; } From 6ad8c42d58a30e8188776bf56479124e7941f569 Mon Sep 17 00:00:00 2001 From: Coen Warmer Date: Mon, 8 May 2023 14:28:00 +0200 Subject: [PATCH 014/102] Attempt to make Cases FTR tests less fragile (#156972) --- .../apps/observability/pages/alerts/add_to_case.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case.ts b/x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case.ts index e43305267ffb0..5a1086bf1725e 100644 --- a/x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case.ts +++ b/x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case.ts @@ -41,7 +41,10 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { }); it('renders case options in the overflow menu', async () => { - await observability.alerts.common.openActionsMenuForRow(0); + await retry.try(async () => { + await observability.alerts.common.openActionsMenuForRow(0); + }); + await retry.try(async () => { await observability.alerts.addToCase.getAddToExistingCaseSelectorOrFail(); await observability.alerts.addToCase.getAddToNewCaseSelectorOrFail(); @@ -60,7 +63,9 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { }); it('opens a modal when Add to existing case is clicked', async () => { - await observability.alerts.common.openActionsMenuForRow(0); + await retry.try(async () => { + await observability.alerts.common.openActionsMenuForRow(0); + }); await retry.try(async () => { await observability.alerts.addToCase.addToExistingCaseButtonClick(); @@ -85,7 +90,9 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { }); it('does not render case options in the overflow menu', async () => { - await observability.alerts.common.openActionsMenuForRow(0); + await retry.try(async () => { + await observability.alerts.common.openActionsMenuForRow(0); + }); await retry.try(async () => { await observability.alerts.addToCase.missingAddToExistingCaseSelectorOrFail(); await observability.alerts.addToCase.missingAddToNewCaseSelectorOrFail(); From 1b40216e781b4bcd4d1bf5180aa505c266b29082 Mon Sep 17 00:00:00 2001 From: Michael Olorunnisola Date: Mon, 8 May 2023 08:29:20 -0400 Subject: [PATCH 015/102] [Security Solution][Investigations] - fix opening flyout, and clear filters (#156702) ## Summary This PR fixes the following issue https://github.com/elastic/kibana/issues/156590 where a users configuration for their alert page filters can prevent them from seeing the alert in the table. In this PR we clear the filters to only show the required status filter, with no selection, to rely primarily on the kql query filter for the alert id. Demo: https://user-images.githubusercontent.com/17211684/236332095-ac5583ec-6b5f-4ee2-9c23-9391b54263ba.mov It also fixes a bug where the flyout when opened wasn't unmounted when navigating away from a page and back to it as seen here: The bug: https://user-images.githubusercontent.com/17211684/236333550-b41925f9-a06c-4aa9-931b-beecf4c9ae9b.mov With the fix: https://user-images.githubusercontent.com/17211684/236334123-a0e3169e-2ec8-4754-92d2-65f2f369fa4f.mov ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../e2e/detection_alerts/alerts_details.cy.ts | 79 ++++++++++++++++++- .../cypress/helpers/common.ts | 14 ++++ .../security_solution/cypress/tsconfig.json | 3 +- .../alerts/alert_details_redirect.test.tsx | 6 +- .../pages/alerts/alert_details_redirect.tsx | 14 +++- .../timelines/components/side_panel/index.tsx | 19 ++++- 6 files changed, 125 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alerts_details.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alerts_details.cy.ts index e6c0d4c1bc637..ffc2aa727153b 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alerts_details.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alerts_details.cy.ts @@ -5,6 +5,7 @@ * 2.0. */ +import type { DataTableModel } from '@kbn/securitysolution-data-table'; import { ALERT_FLYOUT, CELL_TEXT, @@ -24,6 +25,8 @@ import { login, visit, visitWithoutDateRange } from '../../tasks/login'; import { getUnmappedRule } from '../../objects/rule'; import { ALERTS_URL } from '../../urls/navigation'; import { tablePageSelector } from '../../screens/table_pagination'; +import { getLocalstorageEntryAsObject } from '../../helpers/common'; +import { goToRuleDetails } from '../../tasks/alerts_detection_rules'; describe('Alert details flyout', () => { describe('With unmapped fields', { testIsolation: false }, () => { @@ -124,11 +127,81 @@ describe('Alert details flyout', () => { }); it('should have the `kibana.alert.url` field set', () => { - const alertUrl = - 'http://localhost:5601/app/security/alerts/redirect/eabbdefc23da981f2b74ab58b82622a97bb9878caa11bc914e2adfacc94780f1?index=.alerts-security.alerts-default×tamp=2023-04-27T11:03:57.906Z'; openTable(); filterBy('kibana.alert.url'); - cy.get('[data-test-subj="formatted-field-kibana.alert.url"]').should('have.text', alertUrl); + cy.get('[data-test-subj="formatted-field-kibana.alert.url"]').should( + 'have.text', + 'http://localhost:5601/app/security/alerts/redirect/eabbdefc23da981f2b74ab58b82622a97bb9878caa11bc914e2adfacc94780f1?index=.alerts-security.alerts-default×tamp=2023-04-27T11:03:57.906Z' + ); + }); + }); + + describe('Localstorage management', { testIsolation: false }, () => { + before(() => { + cleanKibana(); + esArchiverLoad('query_alert'); + login(); + visit(ALERTS_URL); + waitForAlertsToPopulate(); + }); + + beforeEach(() => { + expandFirstAlert(); + }); + + const alertTableKey = 'alerts-page'; + const getFlyoutConfig = (dataTable: { [alertTableKey]: DataTableModel }) => + dataTable?.[alertTableKey]?.expandedDetail?.query; + + /** + * Localstorage is updated after a delay here x-pack/plugins/security_solution/public/common/store/data_table/epic_local_storage.ts + * We create this config to re-check localStorage 3 times, every 500ms to avoid any potential flakyness from that delay + */ + const storageCheckRetryConfig = { + timeout: 1500, + interval: 500, + }; + + it('should store the flyout state in localstorage', () => { + cy.get(OVERVIEW_RULE).should('be.visible'); + const localStorageCheck = () => + cy.getAllLocalStorage().then((storage) => { + const securityDataTable = getLocalstorageEntryAsObject(storage, 'securityDataTable'); + return getFlyoutConfig(securityDataTable)?.panelView === 'eventDetail'; + }); + + cy.waitUntil(localStorageCheck, storageCheckRetryConfig); + }); + + it('should remove the flyout details from local storage when closed', () => { + cy.get(OVERVIEW_RULE).should('be.visible'); + closeAlertFlyout(); + const localStorageCheck = () => + cy.getAllLocalStorage().then((storage) => { + const securityDataTable = getLocalstorageEntryAsObject(storage, 'securityDataTable'); + return getFlyoutConfig(securityDataTable)?.panelView === undefined; + }); + + cy.waitUntil(localStorageCheck, storageCheckRetryConfig); + }); + + it('should remove the flyout state from localstorage when navigating away without closing the flyout', () => { + cy.get(OVERVIEW_RULE).should('be.visible'); + goToRuleDetails(); + const localStorageCheck = () => + cy.getAllLocalStorage().then((storage) => { + const securityDataTable = getLocalstorageEntryAsObject(storage, 'securityDataTable'); + return getFlyoutConfig(securityDataTable)?.panelView === undefined; + }); + + cy.waitUntil(localStorageCheck, storageCheckRetryConfig); + }); + + it('should not reopen the flyout when navigating away from the alerts page and returning to it', () => { + cy.get(OVERVIEW_RULE).should('be.visible'); + goToRuleDetails(); + visit(ALERTS_URL); + cy.get(OVERVIEW_RULE).should('not.exist'); }); }); }); diff --git a/x-pack/plugins/security_solution/cypress/helpers/common.ts b/x-pack/plugins/security_solution/cypress/helpers/common.ts index e965684f1ab0e..82a8c711d7cc9 100644 --- a/x-pack/plugins/security_solution/cypress/helpers/common.ts +++ b/x-pack/plugins/security_solution/cypress/helpers/common.ts @@ -24,3 +24,17 @@ export const getDataTestSubjectSelectorStartWith = (dataTestSubjectValue: string * @param className the value passed to class property of the DOM element */ export const getClassSelector = (className: string) => `.${className}`; + +export const getLocalstorageEntryAsObject = (storage: Cypress.StorageByOrigin, field: string) => { + // baseUrl value from x-pack/plugins/security_solution/cypress/cypress.config.ts + const envLocalstorage = storage?.['http://localhost:5620']; + let result; + if (envLocalstorage && envLocalstorage[field]) { + try { + result = JSON.parse(envLocalstorage[field] as string); + } catch { + result = undefined; + } + } + return result; +}; diff --git a/x-pack/plugins/security_solution/cypress/tsconfig.json b/x-pack/plugins/security_solution/cypress/tsconfig.json index 8f818e8663a94..e04bff0591371 100644 --- a/x-pack/plugins/security_solution/cypress/tsconfig.json +++ b/x-pack/plugins/security_solution/cypress/tsconfig.json @@ -30,6 +30,7 @@ "@kbn/rison", "@kbn/datemath", "@kbn/guided-onboarding-plugin", - "@kbn/alerting-plugin" + "@kbn/alerting-plugin", + "@kbn/securitysolution-data-table" ] } diff --git a/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.test.tsx index 60ed09ab4d002..379ea0f37929f 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.test.tsx @@ -67,7 +67,7 @@ describe('AlertDetailsRedirect', () => { expect(historyMock.replace).toHaveBeenCalledWith({ hash: '', pathname: ALERTS_PATH, - search: `?query=(language:kuery,query:'_id: ${testAlertId}')&timerange=(global:(linkTo:!(timeline,socTrends),timerange:(from:'${testTimestamp}',kind:absolute,to:'2023-04-20T12:05:00.000Z')),timeline:(linkTo:!(global,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',fromStr:now/d,kind:relative,to:'2020-07-08T08:20:18.966Z',toStr:now/d)))&eventFlyout=(panelView:eventDetail,params:(eventId:${testAlertId},indexName:${testIndex}))`, + search: `?query=(language:kuery,query:'_id: ${testAlertId}')&timerange=(global:(linkTo:!(timeline,socTrends),timerange:(from:'${testTimestamp}',kind:absolute,to:'2023-04-20T12:05:00.000Z')),timeline:(linkTo:!(global,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',fromStr:now/d,kind:relative,to:'2020-07-08T08:20:18.966Z',toStr:now/d)))&pageFilters=!((exclude:!f,existsSelected:!f,fieldName:kibana.alert.workflow_status,selectedOptions:!(),title:Status))&eventFlyout=(panelView:eventDetail,params:(eventId:${testAlertId},indexName:${testIndex}))`, state: undefined, }); }); @@ -96,7 +96,7 @@ describe('AlertDetailsRedirect', () => { expect(historyMock.replace).toHaveBeenCalledWith({ hash: '', pathname: ALERTS_PATH, - search: `?query=(language:kuery,query:'_id: ${testAlertId}')&timerange=(global:(linkTo:!(timeline,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',kind:absolute,to:'2020-07-08T08:25:18.966Z')),timeline:(linkTo:!(global,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',fromStr:now/d,kind:relative,to:'2020-07-08T08:20:18.966Z',toStr:now/d)))&eventFlyout=(panelView:eventDetail,params:(eventId:${testAlertId},indexName:${testIndex}))`, + search: `?query=(language:kuery,query:'_id: ${testAlertId}')&timerange=(global:(linkTo:!(timeline,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',kind:absolute,to:'2020-07-08T08:25:18.966Z')),timeline:(linkTo:!(global,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',fromStr:now/d,kind:relative,to:'2020-07-08T08:20:18.966Z',toStr:now/d)))&pageFilters=!((exclude:!f,existsSelected:!f,fieldName:kibana.alert.workflow_status,selectedOptions:!(),title:Status))&eventFlyout=(panelView:eventDetail,params:(eventId:${testAlertId},indexName:${testIndex}))`, state: undefined, }); }); @@ -124,7 +124,7 @@ describe('AlertDetailsRedirect', () => { expect(historyMock.replace).toHaveBeenCalledWith({ hash: '', pathname: ALERTS_PATH, - search: `?query=(language:kuery,query:'_id: ${testAlertId}')&timerange=(global:(linkTo:!(timeline,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',kind:absolute,to:'2020-07-08T08:25:18.966Z')),timeline:(linkTo:!(global,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',fromStr:now/d,kind:relative,to:'2020-07-08T08:20:18.966Z',toStr:now/d)))&eventFlyout=(panelView:eventDetail,params:(eventId:${testAlertId},indexName:.internal${DEFAULT_ALERTS_INDEX}-default))`, + search: `?query=(language:kuery,query:'_id: ${testAlertId}')&timerange=(global:(linkTo:!(timeline,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',kind:absolute,to:'2020-07-08T08:25:18.966Z')),timeline:(linkTo:!(global,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',fromStr:now/d,kind:relative,to:'2020-07-08T08:20:18.966Z',toStr:now/d)))&pageFilters=!((exclude:!f,existsSelected:!f,fieldName:kibana.alert.workflow_status,selectedOptions:!(),title:Status))&eventFlyout=(panelView:eventDetail,params:(eventId:${testAlertId},indexName:.internal${DEFAULT_ALERTS_INDEX}-default))`, state: undefined, }); }); diff --git a/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.tsx b/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.tsx index ec8bf7c1526e3..d2942acd0ca7b 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.tsx @@ -11,9 +11,12 @@ import { Redirect, useLocation, useParams } from 'react-router-dom'; import moment from 'moment'; import { encode } from '@kbn/rison'; +import { ALERT_WORKFLOW_STATUS } from '@kbn/rule-data-utils'; +import type { FilterItemObj } from '../../../common/components/filter_group/types'; import { ALERTS_PATH, DEFAULT_ALERTS_INDEX } from '../../../../common/constants'; import { URL_PARAM_KEY } from '../../../common/hooks/use_url_state'; import { inputsSelectors } from '../../../common/store'; +import { formatPageFilterSearchParam } from '../../../../common/utils/format_page_filter_search_param'; export const AlertDetailsRedirect = () => { const { alertId } = useParams<{ alertId: string }>(); @@ -61,7 +64,16 @@ export const AlertDetailsRedirect = () => { const kqlAppQuery = encode({ language: 'kuery', query: `_id: ${alertId}` }); - const url = `${ALERTS_PATH}?${URL_PARAM_KEY.appQuery}=${kqlAppQuery}&${URL_PARAM_KEY.timerange}=${timerange}&${URL_PARAM_KEY.eventFlyout}=${flyoutString}`; + const statusPageFilter: FilterItemObj = { + fieldName: ALERT_WORKFLOW_STATUS, + title: 'Status', + selectedOptions: [], + existsSelected: false, + }; + + const pageFiltersQuery = encode(formatPageFilterSearchParam([statusPageFilter])); + + const url = `${ALERTS_PATH}?${URL_PARAM_KEY.appQuery}=${kqlAppQuery}&${URL_PARAM_KEY.timerange}=${timerange}&${URL_PARAM_KEY.pageFilter}=${pageFiltersQuery}&${URL_PARAM_KEY.eventFlyout}=${flyoutString}`; return ; }; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx index 19aa3fe2874ec..c92c49cda23d6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx @@ -5,14 +5,14 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; +import React, { useCallback, useEffect, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import type { EuiFlyoutProps } from '@elastic/eui'; import { EuiFlyout } from '@elastic/eui'; import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { EntityType } from '@kbn/timelines-plugin/common'; -import { dataTableSelectors } from '@kbn/securitysolution-data-table'; +import { dataTableActions, dataTableSelectors } from '@kbn/securitysolution-data-table'; import { getScopedActions, isInTableScope, isTimelineScope } from '../../../helpers'; import { timelineSelectors } from '../../store/timeline'; import { timelineDefaults } from '../../store/timeline/defaults'; @@ -66,6 +66,21 @@ export const DetailsPanel = React.memo( (state) => ((getScope && getScope(state, scopeId)) ?? timelineDefaults)?.expandedDetail ); + useEffect(() => { + /** + * Removes the flyout from redux when it is unmounted as it's also stored in localStorage + * This only works when navigating within the app, if navigating via the url bar, + * the localStorage state will be maintained + * */ + return () => { + dispatch( + dataTableActions.toggleDetailPanel({ + id: scopeId, + }) + ); + }; + }, [dispatch, scopeId]); + // To be used primarily in the flyout scenario where we don't want to maintain the tabType const defaultOnPanelClose = useCallback(() => { const scopedActions = getScopedActions(scopeId); From b0abcfc2027962bcb8f98506e7afbb6588a099bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 May 2023 08:37:17 -0400 Subject: [PATCH 016/102] Update dependency elastic-apm-node to ^3.45.0 (main) (#156892) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [elastic-apm-node](https://togithub.com/elastic/apm-agent-nodejs) | [`^3.44.1` -> `^3.45.0`](https://renovatebot.com/diffs/npm/elastic-apm-node/3.44.1/3.45.0) | [![age](https://badges.renovateapi.com/packages/npm/elastic-apm-node/3.45.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/elastic-apm-node/3.45.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/elastic-apm-node/3.45.0/compatibility-slim/3.44.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/elastic-apm-node/3.45.0/confidence-slim/3.44.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
elastic/apm-agent-nodejs ### [`v3.45.0`](https://togithub.com/elastic/apm-agent-nodejs/releases/tag/v3.45.0) [Compare Source](https://togithub.com/elastic/apm-agent-nodejs/compare/v3.44.1...v3.45.0) For more information, please see the [changelog](https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes-3.x.html#release-notes-3.45.0). ##### Elastic APM Node.js agent layer ARNs |Region|ARN| |------|---| |af-south-1|arn:aws:lambda:af-south-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |ap-east-1|arn:aws:lambda:ap-east-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |ap-northeast-1|arn:aws:lambda:ap-northeast-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |ap-northeast-2|arn:aws:lambda:ap-northeast-2:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |ap-northeast-3|arn:aws:lambda:ap-northeast-3:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |ap-south-1|arn:aws:lambda:ap-south-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |ap-southeast-1|arn:aws:lambda:ap-southeast-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |ap-southeast-2|arn:aws:lambda:ap-southeast-2:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |ap-southeast-3|arn:aws:lambda:ap-southeast-3:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |ca-central-1|arn:aws:lambda:ca-central-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |eu-central-1|arn:aws:lambda:eu-central-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |eu-north-1|arn:aws:lambda:eu-north-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |eu-south-1|arn:aws:lambda:eu-south-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |eu-west-1|arn:aws:lambda:eu-west-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |eu-west-2|arn:aws:lambda:eu-west-2:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |eu-west-3|arn:aws:lambda:eu-west-3:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |me-south-1|arn:aws:lambda:me-south-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |sa-east-1|arn:aws:lambda:sa-east-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |us-east-1|arn:aws:lambda:us-east-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |us-east-2|arn:aws:lambda:us-east-2:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |us-west-1|arn:aws:lambda:us-west-1:267093732750:layer:elastic-apm-node-ver-3-45-0:1| |us-west-2|arn:aws:lambda:us-west-2:267093732750:layer:elastic-apm-node-ver-3-45-0:1|
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/elastic/kibana). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c95abd2ddd4a6..ce62a3dfe3b58 100644 --- a/package.json +++ b/package.json @@ -788,7 +788,7 @@ "deepmerge": "^4.2.2", "del": "^6.1.0", "elastic-apm-http-client": "^11.0.1", - "elastic-apm-node": "^3.44.1", + "elastic-apm-node": "^3.45.0", "email-addresses": "^5.0.0", "execa": "^4.0.2", "expiry-js": "0.1.7", diff --git a/yarn.lock b/yarn.lock index 61a791b3054de..ba14036692580 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14359,10 +14359,10 @@ elastic-apm-node@^3.38.0: traverse "^0.6.6" unicode-byte-truncate "^1.0.0" -elastic-apm-node@^3.44.1: - version "3.44.1" - resolved "https://registry.yarnpkg.com/elastic-apm-node/-/elastic-apm-node-3.44.1.tgz#8a6e88fa9f3401455dddb87f9d5559f6d894964d" - integrity sha512-hSf+S6GtQ+Ff5ueyQ1n2BAgAdiDOZ+XmHKFurzpB5/rvRFz6JbXLq+pcI11HMlK3ImiMVG9LQxHWMN6gqkqzYQ== +elastic-apm-node@^3.45.0: + version "3.45.0" + resolved "https://registry.yarnpkg.com/elastic-apm-node/-/elastic-apm-node-3.45.0.tgz#d4d0a6481d3c9a099e06aa5399cf3e241422c36f" + integrity sha512-AfCMvfAHy5VhOzqM7GXXao3dEGhEok1+XNNvjlOEAGic1Y3biKY4ZQYI+QktYShC2E7b/TaLo8L/Twu16Ah2hA== dependencies: "@elastic/ecs-pino-format" "^1.2.0" "@opentelemetry/api" "^1.4.1" @@ -14372,7 +14372,6 @@ elastic-apm-node@^3.44.1: basic-auth "^2.0.1" cookie "^0.5.0" core-util-is "^1.0.2" - debug "^4.1.1" elastic-apm-http-client "11.3.1" end-of-stream "^1.4.4" error-callsites "^2.0.4" @@ -14390,7 +14389,7 @@ elastic-apm-node@^3.44.1: original-url "^1.2.3" pino "^6.11.2" relative-microtime "^2.0.0" - resolve "^1.22.1" + require-in-the-middle "^7.0.1" semver "^6.3.0" set-cookie-serde "^1.0.0" shallow-clone-shim "^2.0.0" @@ -25163,6 +25162,15 @@ require-in-the-middle@^6.0.0: module-details-from-path "^1.0.3" resolve "^1.22.1" +require-in-the-middle@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/require-in-the-middle/-/require-in-the-middle-7.1.0.tgz#8ab4089383e7b7879ed134d8e9d1887bd48195ec" + integrity sha512-6f86Mh0vWCxqKKatRPwgY6VzYmcVay3WUTIpJ1ILBCNh+dTWabMR1swKGKz3XcEZ5mgjndzRu7fQ+44G2H9Gew== + dependencies: + debug "^4.1.1" + module-details-from-path "^1.0.3" + resolve "^1.22.1" + require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" From ab2f967ba5720daffa8d404802effe688804d41c Mon Sep 17 00:00:00 2001 From: Davis McPhee Date: Mon, 8 May 2023 10:03:08 -0300 Subject: [PATCH 017/102] [Data Views] Support "namespaces" param in create data view API (#155815) ## Summary This work was originally done by @jughosta in #150712, I just added a couple of integration tests and opened another PR for it. Fixes #140426. #### Original PR summary: This PR adds support for `namespaces` param in create data view API as per docs https://www.elastic.co/guide/en/kibana/current/data-views-api-create.html#data-views-api-properties Screenshot 2023-02-09 at 15 04 55 Previous functionality is still in place: * setting "default" space if "namespaces" param is not provided Screenshot 2023-02-09 at 15 06 55 * setting the specified in URL space ID if "namespaces" param is not provided Screenshot 2023-02-09 at 15 06 34 ### Checklist - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] ~Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))~ - [ ] ~Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~ - [ ] ~This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))~ - [ ] ~This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)~ ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Julia Rechkunova --- .../common/data_views/data_views.ts | 1 + src/plugins/data_views/common/types.ts | 2 +- .../rest_api_routes/create_data_view.ts | 6 +- .../data_views_crud/create_data_view/main.ts | 56 ++++++++++++++++++- .../data_views/integration/integration.ts | 2 +- 5 files changed, 63 insertions(+), 4 deletions(-) diff --git a/src/plugins/data_views/common/data_views/data_views.ts b/src/plugins/data_views/common/data_views/data_views.ts index 864c4ec2df3b3..df1a115b83923 100644 --- a/src/plugins/data_views/common/data_views/data_views.ts +++ b/src/plugins/data_views/common/data_views/data_views.ts @@ -1011,6 +1011,7 @@ export class DataViewsService { body, { id: dataView.id, + initialNamespaces: dataView.namespaces.length > 0 ? dataView.namespaces : undefined, } )) as SavedObject; diff --git a/src/plugins/data_views/common/types.ts b/src/plugins/data_views/common/types.ts index 4e2d308692afe..d44f8fd34df47 100644 --- a/src/plugins/data_views/common/types.ts +++ b/src/plugins/data_views/common/types.ts @@ -296,7 +296,7 @@ export interface SavedObjectsClientCommon { create: ( type: string, attributes: DataViewAttributes, - options: SavedObjectsCreateOptions + options: SavedObjectsCreateOptions & { initialNamespaces?: string[] } ) => Promise; /** * Delete a saved object by id diff --git a/src/plugins/data_views/server/rest_api_routes/create_data_view.ts b/src/plugins/data_views/server/rest_api_routes/create_data_view.ts index 00897c364e085..58bc36ed1c869 100644 --- a/src/plugins/data_views/server/rest_api_routes/create_data_view.ts +++ b/src/plugins/data_views/server/rest_api_routes/create_data_view.ts @@ -70,6 +70,7 @@ const dataViewSpecSchema = schema.object({ allowNoIndex: schema.maybe(schema.boolean()), runtimeFieldMap: schema.maybe(schema.recordOf(schema.string(), runtimeFieldSchema)), name: schema.maybe(schema.string()), + namespaces: schema.maybe(schema.arrayOf(schema.string())), }); const registerCreateDataViewRouteFactory = @@ -124,7 +125,10 @@ const registerCreateDataViewRouteFactory = 'content-type': 'application/json', }, body: { - [serviceKey]: dataView.toSpec(), + [serviceKey]: { + ...dataView.toSpec(), + namespaces: dataView.namespaces, + }, }, }); }) diff --git a/test/api_integration/apis/data_views/data_views_crud/create_data_view/main.ts b/test/api_integration/apis/data_views/data_views_crud/create_data_view/main.ts index 6b6a84e539da3..f93ebea4bbe3f 100644 --- a/test/api_integration/apis/data_views/data_views_crud/create_data_view/main.ts +++ b/test/api_integration/apis/data_views/data_views_crud/create_data_view/main.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; -import { configArray } from '../../constants'; +import { configArray, dataViewConfig } from '../../constants'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); @@ -290,5 +290,59 @@ export default function ({ getService }: FtrProviderContext) { }); }); }); + + describe('spaces', () => { + const kibanaServer = getService('kibanaServer'); + const fooNamespace = 'foo-namespace'; + + before(async () => { + await kibanaServer.spaces.create({ + id: fooNamespace, + name: fooNamespace, + }); + }); + + after(async () => { + await kibanaServer.spaces.delete(fooNamespace); + }); + + it('can specify optional namespaces array when creating a data view', async () => { + const title = `foo-${Date.now()}-${Math.random()}*`; + const namespaces = ['default', fooNamespace]; + const createResponse = await supertest.post(dataViewConfig.path).send({ + [dataViewConfig.serviceKey]: { + title, + namespaces, + }, + }); + + expect(createResponse.status).to.be(200); + expect(createResponse.body[dataViewConfig.serviceKey].namespaces).to.eql(namespaces); + + const getResponse = await supertest.get(dataViewConfig.basePath); + const dataView = getResponse.body.data_view.find((dv: any) => dv.title === title); + + expect(dataView.namespaces).to.eql(namespaces); + }); + + it('sets namespaces to the current space if namespaces array is not specified', async () => { + const title = `foo-${Date.now()}-${Math.random()}*`; + const createResponse = await supertest + .post(`/s/${fooNamespace}${dataViewConfig.path}`) + .send({ + [dataViewConfig.serviceKey]: { + title, + }, + }); + + expect(createResponse.status).to.be(200); + expect(createResponse.body[dataViewConfig.serviceKey].namespaces).to.eql([fooNamespace]); + + const getResponse = await supertest.get(`/s/${fooNamespace}${dataViewConfig.basePath}`); + const dataView = getResponse.body.data_view.find((dv: any) => dv.title === title); + + expect(dataView.namespaces).to.eql([fooNamespace]); + }); + }); }); } diff --git a/test/api_integration/apis/data_views/integration/integration.ts b/test/api_integration/apis/data_views/integration/integration.ts index 22f0755373323..5c6faa292d928 100644 --- a/test/api_integration/apis/data_views/integration/integration.ts +++ b/test/api_integration/apis/data_views/integration/integration.ts @@ -111,7 +111,7 @@ export default function ({ getService }: FtrProviderContext) { expect(response6.status).to.be(200); const recreatedIndexPattern = response6.body.index_pattern; - expect(_.omit(recreatedIndexPattern, 'version')).to.eql( + expect(_.omit(recreatedIndexPattern, 'version', 'namespaces')).to.eql( _.omit(resultIndexPattern, 'version') ); }); From 3b789e31cd0f388f4dfdeb834ecdfdbbcca2a79f Mon Sep 17 00:00:00 2001 From: Paul Tavares <56442535+paul-tavares@users.noreply.github.com> Date: Mon, 8 May 2023 09:13:20 -0400 Subject: [PATCH 018/102] [Security Solution][Endpoint] Fix hover color for `processes` response action output data rows (#156734) ## Summary - Fixes the color used to highlight a row from the output of the `processes` response action so that selected content (via mouse) is still legible when the kibana dark theme is used. Fixes: #154594 --- .../command_render_components/get_processes_action.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx index 81ded3d02094e..fee7a2b73e815 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx @@ -20,7 +20,7 @@ import type { ActionRequestComponentProps } from '../types'; // @ts-expect-error TS2769 const StyledEuiBasicTable = styled(EuiBasicTable)` table { - background-color: ${({ theme: { eui } }) => eui.euiPageBackgroundColor}; + background-color: transparent; } .euiTableHeaderCell { border-bottom: ${(props) => props.theme.eui.euiBorderThin}; @@ -30,7 +30,7 @@ const StyledEuiBasicTable = styled(EuiBasicTable)` } .euiTableRow { &:hover { - background-color: white !important; + background-color: ${({ theme: { eui } }) => eui.euiColorEmptyShade} !important; } .euiTableRowCell { border-top: none !important; From 7f6e04749a37a4cc7cebec2fd75be452ad26c871 Mon Sep 17 00:00:00 2001 From: Paul Tavares <56442535+paul-tavares@users.noreply.github.com> Date: Mon, 8 May 2023 09:14:11 -0400 Subject: [PATCH 019/102] [Security Solution][Hosts] Update the host search strategy API response and remove redundant endpoint data (#156709) ## Summary - Removes several pieces of data from the Host Details search strategy response that is now available via the `hostInfo` property of the data returned. This PR is a follow up from https://github.com/elastic/kibana/pull/154961#discussion_r1169209175 --- .../security_solution/hosts/common/index.ts | 9 +--- .../explore/hosts/pages/details/index.tsx | 6 ++- .../endpoint_overview/index.test.tsx | 22 ++++---- .../host_overview/endpoint_overview/index.tsx | 50 +++++++++---------- .../factory/hosts/details/helpers.ts | 6 --- 5 files changed, 39 insertions(+), 54 deletions(-) diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts index 2e433b8cfd45f..5bd4238ff0fd7 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts @@ -7,7 +7,7 @@ import type { CloudEcs, HostEcs, OsEcs } from '@kbn/securitysolution-ecs'; import type { Hit, Hits, Maybe, SearchHit, StringOrNumber, TotalValue } from '../../../common'; -import type { EndpointPendingActions, HostInfo, HostStatus } from '../../../../endpoint/types'; +import type { EndpointPendingActions, HostInfo } from '../../../../endpoint/types'; import type { CommonFields } from '../..'; export enum HostPolicyResponseActionStatus { @@ -23,15 +23,8 @@ export enum HostsFields { } export interface EndpointFields { - endpointPolicy?: Maybe; - sensorVersion?: Maybe; - policyStatus?: Maybe; - /** if the host is currently isolated */ - isolation?: Maybe; /** A count of pending endpoint actions against the host */ pendingActions?: Maybe; - elasticAgentStatus?: Maybe; - fleetAgentId?: Maybe; id?: Maybe; /** The complete Endpoint Host Details information (which also includes some of the fields above */ hostInfo?: HostInfo; diff --git a/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx index c70e7df10bd81..8fcfa03624f8a 100644 --- a/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx @@ -190,8 +190,10 @@ const HostDetailsComponent: React.FC = ({ detailName, hostDeta } title={detailName} rightSideItems={[ - hostOverview.endpoint?.fleetAgentId && ( - + hostOverview.endpoint?.hostInfo?.metadata.elastic.agent.id && ( + ), ]} /> diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.test.tsx index cc24f8b0dbeba..db7a23432b749 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.test.tsx @@ -14,9 +14,8 @@ import { TestProviders } from '../../../../common/mock'; import { EndpointOverview } from '.'; import type { EndpointFields } from '../../../../../common/search_strategy/security_solution/hosts'; -import { HostPolicyResponseActionStatus } from '../../../../../common/search_strategy/security_solution/hosts'; -import { HostStatus } from '../../../../../common/endpoint/types'; import { EndpointMetadataGenerator } from '../../../../../common/endpoint/data_generators/endpoint_metadata_generator'; +import { set } from 'lodash'; jest.mock('../../../../common/lib/kibana'); @@ -39,11 +38,6 @@ describe('EndpointOverview Component', () => { beforeEach(() => { endpointData = { - endpointPolicy: 'demo', - policyStatus: HostPolicyResponseActionStatus.success, - sensorVersion: '7.9.0-SNAPSHOT', - isolation: false, - elasticAgentStatus: HostStatus.HEALTHY, pendingActions: {}, hostInfo: new EndpointMetadataGenerator('seed').generateHostInfo({ metadata: { @@ -59,9 +53,13 @@ describe('EndpointOverview Component', () => { test('it renders with endpoint data', () => { render(); - expect(findData.at(0).text()).toEqual(endpointData.endpointPolicy); - expect(findData.at(1).text()).toEqual(endpointData.policyStatus); - expect(findData.at(2).text()).toContain(endpointData.sensorVersion); // contain because drag adds a space + expect(findData.at(0).text()).toEqual( + endpointData?.hostInfo?.metadata.Endpoint.policy.applied.name + ); + expect(findData.at(1).text()).toEqual( + endpointData?.hostInfo?.metadata.Endpoint.policy.applied.status + ); + expect(findData.at(2).text()).toContain(endpointData?.hostInfo?.metadata.agent.version); // contain because drag adds a space expect(findData.at(3).text()).toEqual('HealthyIsolated'); }); @@ -74,7 +72,7 @@ describe('EndpointOverview Component', () => { }); test('it shows isolation status', () => { - endpointData.isolation = true; + set(endpointData.hostInfo ?? {}, 'metadata.Endpoint.state.isolation', true); render(); expect(findData.at(3).text()).toEqual('HealthyIsolated'); }); @@ -84,7 +82,7 @@ describe('EndpointOverview Component', () => { ['isolate', 'Isolating'], ['unisolate', 'Releasing'], ])('it shows pending %s status', (action, expectedLabel) => { - endpointData.isolation = true; + set(endpointData.hostInfo ?? {}, 'metadata.Endpoint.state.isolation', true); endpointData.pendingActions![action] = 1; render(); expect(findData.at(3).text()).toEqual(`Healthy${expectedLabel}`); diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.tsx index f62fa5627ebdf..185f6358d3ad3 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.tsx @@ -34,42 +34,41 @@ export const EndpointOverview = React.memo(({ contextID, data }) => { ), [contextID] ); - const descriptionLists: Readonly = useMemo( - () => [ + const descriptionLists: Readonly = useMemo(() => { + const appliedPolicy = data?.hostInfo?.metadata.Endpoint.policy.applied; + + return [ [ { title: i18n.ENDPOINT_POLICY, - description: - data != null && data.endpointPolicy != null ? data.endpointPolicy : getEmptyTagValue(), + description: appliedPolicy?.name ?? getEmptyTagValue(), }, ], [ { title: i18n.POLICY_STATUS, - description: - data != null && data.policyStatus != null ? ( - - {data.policyStatus} - - ) : ( - getEmptyTagValue() - ), + description: appliedPolicy?.status ? ( + + {appliedPolicy?.status} + + ) : ( + getEmptyTagValue() + ), }, ], [ { title: i18n.SENSORVERSION, - description: - data != null && data.sensorVersion != null - ? getDefaultRenderer('sensorVersion', data, 'agent.version') - : getEmptyTagValue(), + description: data?.hostInfo?.metadata.agent.version + ? getDefaultRenderer('hostInfo.metadata.agent.version', data, 'agent.version') + : getEmptyTagValue(), }, ], [ @@ -86,9 +85,8 @@ export const EndpointOverview = React.memo(({ contextID, data }) => { ), }, ], - ], - [data, getDefaultRenderer] - ); + ]; + }, [data, getDefaultRenderer]); return ( <> diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts index 66f36a9052bb5..f7c8b9cb52be9 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts @@ -202,12 +202,6 @@ export const getHostEndpoint = async ( return { hostInfo: endpointData, - endpointPolicy: endpointData.metadata.Endpoint.policy.applied.name, - policyStatus: endpointData.metadata.Endpoint.policy.applied.status, - sensorVersion: endpointData.metadata.agent.version, - elasticAgentStatus: endpointData.host_status, - isolation: endpointData.metadata.Endpoint.state?.isolation ?? false, - fleetAgentId: endpointData.metadata.elastic.agent.id, pendingActions, }; } catch (err) { From 0ee2a169539443ebac1371e3e9df045472451f72 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Mon, 8 May 2023 16:01:26 +0200 Subject: [PATCH 020/102] [Synthetics] Handle errors in global params UI (#156722) --- .../global_params/add_param_flyout.tsx | 68 +++++++++--------- .../settings/global_params/delete_param.tsx | 8 +-- .../settings/global_params/params_list.tsx | 15 ++-- .../settings/hooks/use_params_list.ts | 29 ++++---- .../synthetics/state/global_params/actions.ts | 26 +++++++ .../synthetics/state/global_params/api.ts | 37 ++++++++++ .../synthetics/state/global_params/effects.ts | 71 +++++++++++++++++++ .../synthetics/state/global_params/index.ts | 71 +++++++++++++++++++ .../state/global_params/selectors.ts | 10 +++ .../apps/synthetics/state/root_effect.ts | 4 ++ .../apps/synthetics/state/root_reducer.ts | 3 + .../synthetics/state/utils/fetch_effect.ts | 38 +++++----- .../__mocks__/synthetics_store.mock.ts | 4 ++ 13 files changed, 303 insertions(+), 81 deletions(-) create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/actions.ts create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/api.ts create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/effects.ts create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/index.ts create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/selectors.ts diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_flyout.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_flyout.tsx index 64f19ad901003..2f0cc699da097 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_flyout.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_flyout.tsx @@ -20,26 +20,27 @@ import { } from '@elastic/eui'; import { FormProvider } from 'react-hook-form'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { useFetcher } from '@kbn/observability-plugin/public'; import { i18n } from '@kbn/i18n'; -import { useDispatch } from 'react-redux'; -import { apiService } from '../../../../../utils/api_service'; +import { useDispatch, useSelector } from 'react-redux'; +import { + addNewGlobalParamAction, + editGlobalParamAction, + getGlobalParamAction, + selectGlobalParamState, +} from '../../../state/global_params'; import { ClientPluginsStart } from '../../../../../plugin'; import { ListParamItem } from './params_list'; import { SyntheticsParamSO } from '../../../../../../common/runtime_types'; import { useFormWrapped } from '../../../../../hooks/use_form_wrapped'; import { AddParamForm } from './add_param_form'; -import { SYNTHETICS_API_URLS } from '../../../../../../common/constants'; import { syncGlobalParamsAction } from '../../../state/settings'; export const AddParamFlyout = ({ items, isEditingItem, setIsEditingItem, - setRefreshList, }: { items: ListParamItem[]; - setRefreshList: React.Dispatch>; isEditingItem: ListParamItem | null; setIsEditingItem: React.Dispatch>; }) => { @@ -67,45 +68,42 @@ export const AddParamFlyout = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [setIsEditingItem]); - const [paramData, setParamData] = useState(null); - const { application } = useKibana().services; - const { loading, data } = useFetcher(async () => { - if (!paramData) { - return; - } - const { namespaces, ...paramRequest } = paramData; - const shareAcrossSpaces = namespaces?.includes(ALL_SPACES_ID); - if (isEditingItem) { - return apiService.put(SYNTHETICS_API_URLS.PARAMS, { - id, - ...paramRequest, - share_across_spaces: shareAcrossSpaces, - }); - } - return apiService.post(SYNTHETICS_API_URLS.PARAMS, { - ...paramRequest, - share_across_spaces: shareAcrossSpaces, - }); - }, [paramData]); - const canSave = (application?.capabilities.uptime.save ?? false) as boolean; + const dispatch = useDispatch(); + + const { isSaving, savedData } = useSelector(selectGlobalParamState); + const onSubmit = (formData: SyntheticsParamSO) => { - setParamData(formData); - }; + const { namespaces, ...paramRequest } = formData; + const shareAcrossSpaces = namespaces?.includes(ALL_SPACES_ID); - const dispatch = useDispatch(); + if (isEditingItem && id) { + dispatch( + editGlobalParamAction.get({ + id, + paramRequest: { ...paramRequest, share_across_spaces: shareAcrossSpaces }, + }) + ); + } else { + dispatch( + addNewGlobalParamAction.get({ + ...paramRequest, + share_across_spaces: shareAcrossSpaces, + }) + ); + } + }; useEffect(() => { - if (data && !loading) { + if (savedData && !isSaving) { closeFlyout(); - setRefreshList(Date.now()); - setParamData(null); + dispatch(getGlobalParamAction.get()); dispatch(syncGlobalParamsAction.get()); } - }, [data, loading, closeFlyout, setRefreshList, dispatch]); + }, [savedData, isSaving, closeFlyout, dispatch]); useEffect(() => { if (isEditingItem) { @@ -150,7 +148,7 @@ export const AddParamFlyout = ({ data-test-subj="syntheticsAddParamFlyoutButton" onClick={handleSubmit(onSubmit)} fill - isLoading={loading} + isLoading={isSaving} > {SAVE_TABLE} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx index 41a63a00dc598..9faa32b971156 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx @@ -12,6 +12,7 @@ import { toMountPoint, useKibana } from '@kbn/kibana-react-plugin/public'; import { i18n } from '@kbn/i18n'; import { useDispatch } from 'react-redux'; +import { getGlobalParamAction } from '../../../state/global_params'; import { syncGlobalParamsAction } from '../../../state/settings'; import { kibanaService } from '../../../../../utils/kibana_service'; import { syntheticsParamType } from '../../../../../../common/types/saved_objects'; @@ -19,11 +20,9 @@ import { NO_LABEL, YES_LABEL } from '../../monitors_page/management/monitor_list import { ListParamItem } from './params_list'; export const DeleteParam = ({ - setRefreshList, items, setIsDeleteModalVisible, }: { - setRefreshList: React.Dispatch>; items: ListParamItem[]; setIsDeleteModalVisible: React.Dispatch>; }) => { @@ -89,9 +88,10 @@ export const DeleteParam = ({ if (status === FETCH_STATUS.SUCCESS || status === FETCH_STATUS.FAILURE) { setIsDeleting(false); setIsDeleteModalVisible(false); - setRefreshList(Date.now()); + dispatch(getGlobalParamAction.get()); + dispatch(syncGlobalParamsAction.get()); } - }, [setIsDeleting, isDeleting, status, setIsDeleteModalVisible, name, setRefreshList, dispatch]); + }, [setIsDeleting, isDeleting, status, setIsDeleteModalVisible, name, dispatch]); return ( { - const [refreshList, setRefreshList] = useState(Date.now()); - const [pageIndex, setPageIndex] = useState(0); const [pageSize, setPageSize] = useState(10); - const { items, loading } = useParamsList(refreshList); + const { items, isLoading } = useParamsList(); const [isEditingItem, setIsEditingItem] = useState(null); @@ -182,7 +180,6 @@ export const ParamsList = () => { , ]; @@ -235,7 +232,7 @@ export const ParamsList = () => { itemId="id" - loading={loading} + loading={isLoading} tableCaption={PARAMS_TABLE} items={filteredItems} columns={columns} @@ -285,14 +282,10 @@ export const ParamsList = () => { }, ], }} - message={loading ? LOADING_TEXT : undefined} + message={isLoading ? LOADING_TEXT : undefined} /> {isDeleteModalVisible && deleteParam && ( - + )} ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/hooks/use_params_list.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/hooks/use_params_list.ts index ad95851ea68c0..4f86ca5eb8d80 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/hooks/use_params_list.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/hooks/use_params_list.ts @@ -5,29 +5,28 @@ * 2.0. */ -import { useFetcher } from '@kbn/observability-plugin/public'; -import { SavedObject } from '@kbn/core-saved-objects-common'; -import { useMemo } from 'react'; -import { SyntheticsParamSO } from '../../../../../../common/runtime_types'; -import { apiService } from '../../../../../utils/api_service'; -import { SYNTHETICS_API_URLS } from '../../../../../../common/constants'; +import { useMemo, useEffect } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { getGlobalParamAction, selectGlobalParamState } from '../../../state/global_params'; -export const useParamsList = (lastRefresh: number) => { - const { data, loading } = useFetcher< - Promise<{ data: Array> }> - >(() => { - return apiService.get(SYNTHETICS_API_URLS.PARAMS); - }, [lastRefresh]); +export const useParamsList = () => { + const { isLoading, listOfParams } = useSelector(selectGlobalParamState); + + const dispatch = useDispatch(); + + useEffect(() => { + dispatch(getGlobalParamAction.get()); + }, [dispatch]); return useMemo(() => { return { items: - data?.data.map((item) => ({ + listOfParams?.map((item) => ({ id: item.id, ...item.attributes, namespaces: item.namespaces, })) ?? [], - loading, + isLoading, }; - }, [data, loading]); + }, [listOfParams, isLoading]); }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/actions.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/actions.ts new file mode 100644 index 0000000000000..14b5040282f52 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/actions.ts @@ -0,0 +1,26 @@ +/* + * 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 { SavedObject } from '@kbn/core-saved-objects-common'; +import { SyntheticsParamRequest, SyntheticsParamSO } from '../../../../../common/runtime_types'; +import { createAsyncAction } from '../utils/actions'; + +export const getGlobalParamAction = createAsyncAction>>( + 'GET GLOBAL PARAMS' +); + +export const addNewGlobalParamAction = createAsyncAction( + 'ADD NEW GLOBAL PARAM' +); + +export const editGlobalParamAction = createAsyncAction< + { + id: string; + paramRequest: SyntheticsParamRequest; + }, + SyntheticsParamSO +>('EDIT GLOBAL PARAM'); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/api.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/api.ts new file mode 100644 index 0000000000000..757a87b16674c --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/api.ts @@ -0,0 +1,37 @@ +/* + * 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 { SavedObject } from '@kbn/core-saved-objects-common'; +import { SYNTHETICS_API_URLS } from '../../../../../common/constants'; +import { SyntheticsParamRequest, SyntheticsParamSO } from '../../../../../common/runtime_types'; +import { apiService } from '../../../../utils/api_service/api_service'; + +export const getGlobalParams = async (): Promise>> => { + const result = (await apiService.get(SYNTHETICS_API_URLS.PARAMS)) as { + data: Array>; + }; + return result.data; +}; + +export const addGlobalParam = async ( + paramRequest: SyntheticsParamRequest +): Promise => { + return apiService.post(SYNTHETICS_API_URLS.PARAMS, paramRequest); +}; + +export const editGlobalParam = async ({ + paramRequest, + id, +}: { + id: string; + paramRequest: SyntheticsParamRequest; +}): Promise => { + return apiService.put(SYNTHETICS_API_URLS.PARAMS, { + id, + ...paramRequest, + }); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/effects.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/effects.ts new file mode 100644 index 0000000000000..d5249fcfc4519 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/effects.ts @@ -0,0 +1,71 @@ +/* + * 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 { takeLeading } from 'redux-saga/effects'; +import { i18n } from '@kbn/i18n'; +import { fetchEffectFactory } from '../utils/fetch_effect'; +import { addGlobalParam, editGlobalParam, getGlobalParams } from './api'; +import { addNewGlobalParamAction, editGlobalParamAction, getGlobalParamAction } from './actions'; + +export function* getGlobalParamEffect() { + yield takeLeading( + getGlobalParamAction.get, + fetchEffectFactory( + getGlobalParams, + getGlobalParamAction.success, + getGlobalParamAction.fail, + undefined, + getFailMessage + ) + ); +} + +const getFailMessage = i18n.translate('xpack.synthetics.settings.getParams.failed', { + defaultMessage: 'Failed to get global parameters.', +}); + +export function* addGlobalParamEffect() { + yield takeLeading( + addNewGlobalParamAction.get, + fetchEffectFactory( + addGlobalParam, + addNewGlobalParamAction.success, + addNewGlobalParamAction.fail, + successMessage, + failureMessage + ) + ); +} + +const successMessage = i18n.translate('xpack.synthetics.settings.addParams.success', { + defaultMessage: 'Successfully added global parameter.', +}); + +const failureMessage = i18n.translate('xpack.synthetics.settings.addParams.fail', { + defaultMessage: 'Failed to add global parameter.', +}); + +export function* editGlobalParamEffect() { + yield takeLeading( + editGlobalParamAction.get, + fetchEffectFactory( + editGlobalParam, + editGlobalParamAction.success, + editGlobalParamAction.fail, + editSuccessMessage, + editFailureMessage + ) + ); +} + +const editSuccessMessage = i18n.translate('xpack.synthetics.settings.editParams.success', { + defaultMessage: 'Successfully edited global parameter.', +}); + +const editFailureMessage = i18n.translate('xpack.synthetics.settings.editParams.fail', { + defaultMessage: 'Failed to edit global parameter.', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/index.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/index.ts new file mode 100644 index 0000000000000..2bea20a8bd00b --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/index.ts @@ -0,0 +1,71 @@ +/* + * 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 { createReducer } from '@reduxjs/toolkit'; +import { SavedObject } from '@kbn/core-saved-objects-common'; +import { SyntheticsParamSO } from '../../../../../common/runtime_types'; +import { IHttpSerializedFetchError } from '..'; +import { addNewGlobalParamAction, editGlobalParamAction, getGlobalParamAction } from './actions'; + +export interface GlobalParamsState { + isLoading?: boolean; + listOfParams?: Array>; + addError: IHttpSerializedFetchError | null; + editError: IHttpSerializedFetchError | null; + isSaving?: boolean; + savedData?: SyntheticsParamSO; +} + +const initialState: GlobalParamsState = { + isLoading: false, + addError: null, + isSaving: false, + editError: null, + listOfParams: [], +}; + +export const globalParamsReducer = createReducer(initialState, (builder) => { + builder + .addCase(getGlobalParamAction.get, (state) => { + state.isLoading = true; + }) + .addCase(getGlobalParamAction.success, (state, action) => { + state.isLoading = false; + state.listOfParams = action.payload; + }) + .addCase(getGlobalParamAction.fail, (state, action) => { + state.isLoading = false; + }) + .addCase(addNewGlobalParamAction.get, (state) => { + state.isSaving = true; + state.savedData = undefined; + }) + .addCase(addNewGlobalParamAction.success, (state, action) => { + state.isSaving = false; + state.savedData = action.payload; + }) + .addCase(addNewGlobalParamAction.fail, (state, action) => { + state.isSaving = false; + state.addError = action.payload; + }) + .addCase(editGlobalParamAction.get, (state) => { + state.isSaving = true; + state.savedData = undefined; + }) + .addCase(editGlobalParamAction.success, (state, action) => { + state.isSaving = false; + state.savedData = action.payload; + }) + .addCase(editGlobalParamAction.fail, (state, action) => { + state.isSaving = false; + state.editError = action.payload; + }); +}); + +export * from './actions'; +export * from './effects'; +export * from './selectors'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/selectors.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/selectors.ts new file mode 100644 index 0000000000000..8402b8cd43968 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/selectors.ts @@ -0,0 +1,10 @@ +/* + * 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 { AppState } from '..'; + +export const selectGlobalParamState = (state: AppState) => state.globalParams; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/root_effect.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/root_effect.ts index 371e054476c79..98bac242a12a4 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/root_effect.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/root_effect.ts @@ -6,6 +6,7 @@ */ import { all, fork } from 'redux-saga/effects'; +import { addGlobalParamEffect, editGlobalParamEffect, getGlobalParamEffect } from './global_params'; import { fetchManualTestRunsEffect } from './manual_test_runs/effects'; import { enableDefaultAlertingEffect, updateDefaultAlertingEffect } from './alert_rules/effects'; import { executeEsQueryEffect } from './elasticsearch'; @@ -53,5 +54,8 @@ export const rootEffect = function* root(): Generator { fork(executeEsQueryEffect), fork(fetchJourneyStepsEffect), fork(fetchManualTestRunsEffect), + fork(addGlobalParamEffect), + fork(editGlobalParamEffect), + fork(getGlobalParamEffect), ]); }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/root_reducer.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/root_reducer.ts index a3b95e4e504ca..58b1857f89f01 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/root_reducer.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/root_reducer.ts @@ -7,6 +7,7 @@ import { combineReducers } from '@reduxjs/toolkit'; +import { globalParamsReducer, GlobalParamsState } from './global_params'; import { overviewStatusReducer, OverviewStatusStateReducer } from './overview_status'; import { browserJourneyReducer } from './browser_journey'; import { defaultAlertingReducer, DefaultAlertingState } from './alert_rules'; @@ -36,6 +37,7 @@ export interface SyntheticsAppState { elasticsearch: QueriesState; monitorList: MonitorListState; overview: MonitorOverviewState; + globalParams: GlobalParamsState; networkEvents: NetworkEventsState; agentPolicies: AgentPoliciesState; manualTestRuns: ManualTestRunsState; @@ -54,6 +56,7 @@ export const rootReducer = combineReducers({ pingStatus: pingStatusReducer, monitorList: monitorListReducer, overview: monitorOverviewReducer, + globalParams: globalParamsReducer, networkEvents: networkEventsReducer, elasticsearch: elasticsearchReducer, agentPolicies: agentPoliciesReducer, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/utils/fetch_effect.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/utils/fetch_effect.ts index 6be47849dfeb9..7da6ea8c749ab 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/utils/fetch_effect.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/utils/fetch_effect.ts @@ -61,21 +61,33 @@ export function fetchEffectFactory( onSuccess?: ((response: R) => void) | string, onFailure?: ((error: Error) => void) | string ) { + const showErrorToast = (error: Error, action: PayloadAction) => { + const serializedError = serializeHttpFetchError(error as IHttpFetchError, action.payload); + + if (typeof onFailure === 'function') { + onFailure?.(error); + } else if (typeof onFailure === 'string') { + kibanaService.core.notifications.toasts.addError( + { ...error, message: serializedError.body?.message ?? error.message }, + { + title: onFailure, + } + ); + } + }; + return function* (action: PayloadAction): Generator { try { const response = yield call(fetch, action.payload); if (response instanceof Error) { + const error = response as Error; // eslint-disable-next-line no-console - console.error(response); + console.error(error); - yield put(fail(serializeHttpFetchError(response as IHttpFetchError, action.payload))); - if (typeof onFailure === 'function') { - onFailure?.(response); - } else if (typeof onFailure === 'string') { - kibanaService.core.notifications.toasts.addError(response, { - title: onFailure, - }); - } + const serializedError = serializeHttpFetchError(error as IHttpFetchError, action.payload); + + yield put(fail(serializedError)); + showErrorToast(error, action); } else { yield put(success(response as R)); const successMessage = (action.payload as unknown as ActionMessages)?.success; @@ -108,13 +120,7 @@ export function fetchEffectFactory( } yield put(fail(serializeHttpFetchError(error, action.payload))); - if (typeof onFailure === 'function') { - onFailure?.(error); - } else if (typeof onFailure === 'string') { - kibanaService.core.notifications.toasts.addError(error, { - title: onFailure, - }); - } + showErrorToast(error, action); } }; } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/synthetics_store.mock.ts b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/synthetics_store.mock.ts index 06ed54738fbda..123e74749f336 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/synthetics_store.mock.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/synthetics_store.mock.ts @@ -141,6 +141,10 @@ export const mockState: SyntheticsAppState = { status: null, error: null, }, + globalParams: { + addError: null, + editError: null, + }, }; function getBrowserJourneyMockSlice() { From 9b356f994be58de43f101bde0f051d783c34f449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efe=20G=C3=BCrkan=20YALAMAN?= Date: Mon, 8 May 2023 16:15:15 +0200 Subject: [PATCH 021/102] Fix build a connector document link (#156967) ## Summary Fixes the docLink for "build-connector". This was going to a 404 due to a small typo. --- packages/kbn-doc-links/src/get_doc_links.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index 9184fab1f0657..6ca707eec2998 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -126,7 +126,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { apiKeys: `${KIBANA_DOCS}api-keys.html`, behavioralAnalytics: `${ENTERPRISE_SEARCH_DOCS}analytics-overview.html`, behavioralAnalyticsEvents: `${ENTERPRISE_SEARCH_DOCS}analytics-events.html`, - buildConnector: `{$ENTERPRISE_SEARCH_DOCS}build-connector.html`, + buildConnector: `${ENTERPRISE_SEARCH_DOCS}build-connector.html`, bulkApi: `${ELASTICSEARCH_DOCS}docs-bulk.html`, configuration: `${ENTERPRISE_SEARCH_DOCS}configuration.html`, connectors: `${ENTERPRISE_SEARCH_DOCS}connectors.html`, From a92782cb18a33822616d0f95a32bd1b2c5bf7bbb Mon Sep 17 00:00:00 2001 From: Rickyanto Ang Date: Mon, 8 May 2023 07:15:44 -0700 Subject: [PATCH 022/102] [Cloud Security][Bug Fix] Fix for sorting issue on Posture score column on Group by resources findings table (#156938) ## Summary This PR is for fixing the issue we have with sorting on posture score column on Group by resources findings table where clicking on the column doesn't do anything ## Before https://user-images.githubusercontent.com/8703149/236698942-04799955-1d2d-4bb8-931c-0ef1589b92f3.mov ## After https://user-images.githubusercontent.com/8703149/236698949-381d4264-54f9-4639-b541-2fb6fec2dbfa.mov --- .../findings_by_resource_container.tsx | 7 ++++--- .../use_findings_by_resource.ts | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings_by_resource/findings_by_resource_container.tsx b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings_by_resource/findings_by_resource_container.tsx index 43f075fe68de6..219f7e88f26e3 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings_by_resource/findings_by_resource_container.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings_by_resource/findings_by_resource_container.tsx @@ -10,6 +10,7 @@ import { Route } from '@kbn/shared-ux-router'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; +import { CspFinding } from '../../../../common/schemas/csp_finding'; import type { Evaluation } from '../../../../common/types'; import { FindingsSearchBar } from '../layout/findings_search_bar'; import * as TEST_SUBJECTS from '../test_subjects'; @@ -36,7 +37,7 @@ const getDefaultQuery = ({ query, filters, pageIndex: 0, - sortDirection: 'asc', + sort: { field: 'compliance_score' as keyof CspFinding, direction: 'asc' }, }); export const FindingsByResourceContainer = ({ dataView }: FindingsBaseProps) => ( @@ -73,7 +74,7 @@ const LatestFindingsByResource = ({ dataView }: FindingsBaseProps) => { * Page ES query result */ const findingsGroupByResource = useFindingsByResource({ - sortDirection: urlQuery.sortDirection, + sortDirection: urlQuery.sort.direction, query, enabled: !queryError, }); @@ -149,7 +150,7 @@ const LatestFindingsByResource = ({ dataView }: FindingsBaseProps) => { })} setTableOptions={setTableOptions} sorting={{ - sort: { field: 'compliance_score', direction: urlQuery.sortDirection }, + sort: { field: 'compliance_score', direction: urlQuery.sort.direction }, }} onAddFilter={(field, value, negate) => setUrlQuery({ diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings_by_resource/use_findings_by_resource.ts b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings_by_resource/use_findings_by_resource.ts index 8589d40f5e069..d0253966bc87c 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings_by_resource/use_findings_by_resource.ts +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings_by_resource/use_findings_by_resource.ts @@ -18,6 +18,7 @@ import { SearchRequest, SearchResponse, } from '@elastic/elasticsearch/lib/api/types'; +import { CspFinding } from '../../../../common/schemas/csp_finding'; import { getBelongsToRuntimeMapping } from '../../../../common/runtime_mappings/get_belongs_to_runtime_mapping'; import { MAX_FINDINGS_TO_LOAD } from '../../../common/constants'; import { useKibana } from '../../../common/hooks/use_kibana'; @@ -36,7 +37,7 @@ const MAX_BUCKETS = 60 * 1000; export interface FindingsByResourceQuery { pageIndex: Pagination['pageIndex']; - sortDirection: Sort['direction']; + sort: Sort; } type FindingsAggRequest = IKibanaSearchRequest; From aaa77f462396c323dc47fb68888899cdb20d5cd6 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Mon, 8 May 2023 07:20:15 -0700 Subject: [PATCH 023/102] [DOCS] Automate observability case file screenshot (#156775) --- .../observability_cases/list_view.ts | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/list_view.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/list_view.ts index 68393d6c9d6c1..c04e4b9fee48d 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/list_view.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/list_view.ts @@ -7,12 +7,18 @@ import { CommentType } from '@kbn/cases-plugin/common/api'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { createAndUploadFile } from '../../../../cases_api_integration/common/lib/api'; +import { OBSERVABILITY_FILE_KIND } from '../../../../cases_api_integration/common/lib/constants'; -export default function ({ getService }: FtrProviderContext) { +export default function ({ getPageObject, getService }: FtrProviderContext) { + const common = getPageObject('common'); const cases = getService('cases'); const commonScreenshots = getService('commonScreenshots'); - const screenshotDirectories = ['response_ops_docs', 'observability_cases']; + const supertest = getService('supertest'); + const testSubjects = getService('testSubjects'); + let caseIdMonitoring: string; + let caseOwnerMonitoring: string; describe('list view', function () { before(async () => { @@ -39,17 +45,35 @@ export default function ({ getService }: FtrProviderContext) { }); await cases.api.setStatus(caseIdLogs, caseVersionLogs, 'closed'); - const { id: caseIdMonitoring } = await cases.api.createCase({ + const caseMonitoring = await cases.api.createCase({ title: 'Monitor uptime', tags: ['swimlane'], description: 'Test.', owner: 'observability', }); + caseIdMonitoring = caseMonitoring.id; + caseOwnerMonitoring = caseMonitoring.owner; + const { version: caseVersionMonitoring } = await cases.api.createAttachment({ caseId: caseIdMonitoring, params: { comment: 'test comment', type: CommentType.user, owner: 'observability' }, }); + await cases.api.setStatus(caseIdMonitoring, caseVersionMonitoring, 'in-progress'); + + await createAndUploadFile({ + supertest, + createFileParams: { + name: 'testfile', + kind: OBSERVABILITY_FILE_KIND, + mimeType: 'image/png', + meta: { + caseIds: [caseIdMonitoring], + owner: [caseOwnerMonitoring], + }, + }, + data: 'abc', + }); }); after(async () => { @@ -58,7 +82,19 @@ export default function ({ getService }: FtrProviderContext) { it('cases list screenshot', async () => { await cases.navigation.navigateToApp('observability/cases', 'cases-all-title'); - await commonScreenshots.takeScreenshot('cases', screenshotDirectories, 1400, 1024); + await commonScreenshots.takeScreenshot('cases', screenshotDirectories, 1700, 1024); + }); + + it('case detail screenshot', async () => { + await common.navigateToUrlWithBrowserHistory('observability', `/cases/${caseIdMonitoring}`); + const filesTab = await testSubjects.find('case-view-tab-title-files'); + await filesTab.click(); + await commonScreenshots.takeScreenshot( + 'observabiity-case-files', + screenshotDirectories, + 1400, + 1024 + ); }); }); } From de48b5d9aca1e41bcd33534844a49bb4efb7754d Mon Sep 17 00:00:00 2001 From: Cristina Amico Date: Mon, 8 May 2023 16:39:24 +0200 Subject: [PATCH 024/102] [Fleet] Add integration test for epm install on multiple spaces (#156864) Closes https://github.com/elastic/kibana/issues/150686 ## Summary Add integration test to cover integration installation in multiple spaces Steps followed: - Install System integration - Create new space - Uninstall System integration - Install again in the new space - Verify that integration is added successfully, assets are created and tagged with Managed and System tags --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../apis/data_streams/list.ts | 2 +- .../fleet_api_integration/apis/epm/index.js | 1 + .../install_integration_in_multiple_spaces.ts | 121 ++++++++++++++++++ .../epm/install_remove_kbn_assets_in_space.ts | 24 +--- 4 files changed, 128 insertions(+), 20 deletions(-) create mode 100644 x-pack/test/fleet_api_integration/apis/epm/install_integration_in_multiple_spaces.ts 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 2fef1c5979a94..905d492e29341 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 @@ -138,7 +138,7 @@ export default function (providerContext: FtrProviderContext) { expect(body).to.eql({ data_streams: [] }); }); - it('TESTME should return correct basic data stream information', async function () { + it('should return correct basic data stream information', async function () { await seedDataStreams(); // we can't compare the array directly as the order is unpredictable const expectedStreamsByDataset = keyBy( diff --git a/x-pack/test/fleet_api_integration/apis/epm/index.js b/x-pack/test/fleet_api_integration/apis/epm/index.js index 0087df79d9959..784720ec879c1 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/index.js +++ b/x-pack/test/fleet_api_integration/apis/epm/index.js @@ -38,5 +38,6 @@ export default function loadTests({ loadTestFile, getService }) { loadTestFile(require.resolve('./final_pipeline')); loadTestFile(require.resolve('./custom_ingest_pipeline')); loadTestFile(require.resolve('./verification_key_id')); + loadTestFile(require.resolve('./install_integration_in_multiple_spaces.ts')); }); } diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_integration_in_multiple_spaces.ts b/x-pack/test/fleet_api_integration/apis/epm/install_integration_in_multiple_spaces.ts new file mode 100644 index 0000000000000..1202f73e35cf9 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/epm/install_integration_in_multiple_spaces.ts @@ -0,0 +1,121 @@ +/* + * 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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { skipIfNoDockerRegistry } from '../../helpers'; +import { setupFleetAndAgents } from '../agents/services'; + +const testSpaceId = 'fleet_test_space'; + +export default function (providerContext: FtrProviderContext) { + const { getService } = providerContext; + const kibanaServer = getService('kibanaServer'); + const supertest = getService('supertest'); + const dockerServers = getService('dockerServers'); + const server = dockerServers.get('registry'); + const pkgName = 'system'; + const pkgVersion = '1.27.0'; + + const installPackage = async (name: string, version: string) => { + await supertest + .post(`/api/fleet/epm/packages/${name}/${version}`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }); + }; + + const uninstallPackage = async (pkg: string, version: string) => { + await supertest + .delete(`/api/fleet/epm/packages/${pkg}/${version}`) + .set('kbn-xsrf', 'xxxx') + .expect(200); + }; + + const installPackageInSpace = async (pkg: string, version: string, spaceId: string) => { + await supertest + .post(`/s/${spaceId}/api/fleet/epm/packages/${pkg}/${version}`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }) + .expect(200); + }; + + const createSpace = async (spaceId: string) => { + await supertest.post(`/api/spaces/space`).set('kbn-xsrf', 'xxxx').send({ + name: spaceId, + id: spaceId, + initials: 's', + color: '#D6BF57', + disabledFeatures: [], + imageUrl: '', + }); + }; + + const deleteSpace = async (spaceId: string) => { + await supertest.delete(`/api/spaces/space/${spaceId}`).set('kbn-xsrf', 'xxxx').send(); + }; + + const getTag = async (id: string, space?: string) => + kibanaServer.savedObjects + .get({ + type: 'tag', + id, + ...(space && { space }), + }) + .catch(() => {}); + + describe('When installing system integration in multiple spaces', async () => { + skipIfNoDockerRegistry(providerContext); + setupFleetAndAgents(providerContext); + + before(async () => { + if (!server.enabled) return; + await installPackage(pkgName, pkgVersion); + + await createSpace(testSpaceId); + await uninstallPackage(pkgName, pkgVersion); + await installPackageInSpace(pkgName, pkgVersion, testSpaceId); + }); + + after(async () => { + await deleteSpace(testSpaceId); + }); + + it('should install kibana assets', async function () { + // These are installed from Fleet along with every package + const resIndexPatternLogs = await kibanaServer.savedObjects.get({ + type: 'index-pattern', + id: 'logs-*', + }); + expect(resIndexPatternLogs.id).equal('logs-*'); + const resIndexPatternMetrics = await kibanaServer.savedObjects.get({ + type: 'index-pattern', + id: 'metrics-*', + }); + expect(resIndexPatternMetrics.id).equal('metrics-*'); + }); + + it('should correctly set installed_kibana_space_id on the SO', async function () { + const resEPMPackages = await kibanaServer.savedObjects.get({ + type: 'epm-packages', + id: pkgName, + }); + expect(resEPMPackages.attributes.installed_kibana_space_id).to.eql('fleet_test_space'); + }); + + it('should create managed tag saved objects', async () => { + const defaultTag = await getTag('fleet-managed-default'); + expect(defaultTag).not.equal(undefined); + + const spaceTag = await getTag('fleet-managed-fleet_test_space', testSpaceId); + expect(spaceTag).not.equal(undefined); + }); + + it('should create package tag saved objects', async () => { + const spaceTag = await getTag(`fleet-pkg-${pkgName}-fleet_test_space`, testSpaceId); + expect(spaceTag).not.equal(undefined); + }); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_remove_kbn_assets_in_space.ts b/x-pack/test/fleet_api_integration/apis/epm/install_remove_kbn_assets_in_space.ts index 08740ea5335b2..9c3fc737ac034 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/install_remove_kbn_assets_in_space.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/install_remove_kbn_assets_in_space.ts @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { Client } from '@elastic/elasticsearch'; import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; @@ -18,7 +17,6 @@ export default function (providerContext: FtrProviderContext) { const supertest = getService('supertest'); const dockerServers = getService('dockerServers'); const server = dockerServers.get('registry'); - const es: Client = getService('es'); const pkgName = 'only_dashboard'; const pkgVersion = '0.1.0'; @@ -69,10 +67,8 @@ export default function (providerContext: FtrProviderContext) { }); expectAssetsInstalled({ - pkgVersion, - pkgName, - es, kibanaServer, + space: testSpaceId, }); }); @@ -123,17 +119,7 @@ export default function (providerContext: FtrProviderContext) { }); } -const expectAssetsInstalled = ({ - pkgVersion, - pkgName, - es, - kibanaServer, -}: { - pkgVersion: string; - pkgName: string; - es: Client; - kibanaServer: any; -}) => { +const expectAssetsInstalled = ({ kibanaServer, space }: { kibanaServer: any; space: string }) => { it('should have installed the kibana assets', async function () { // These are installed from Fleet along with every package const resIndexPatternLogs = await kibanaServer.savedObjects.get({ @@ -151,20 +137,20 @@ const expectAssetsInstalled = ({ const resDashboard = await kibanaServer.savedObjects.get({ type: 'dashboard', id: 'test_dashboard', - space: testSpaceId, + space, }); expect(resDashboard.id).equal('test_dashboard'); const resVis = await kibanaServer.savedObjects.get({ type: 'visualization', id: 'test_visualization', - space: testSpaceId, + space, }); expect(resVis.id).equal('test_visualization'); const resSearch = await kibanaServer.savedObjects.get({ type: 'search', id: 'test_search', - space: testSpaceId, + space, }); expect(resSearch.id).equal('test_search'); }); From 649333128c7af7b2e64e9f511608a687846a2594 Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Mon, 8 May 2023 17:40:51 +0300 Subject: [PATCH 025/102] [Cases] Remove `fields` param from the bulk get cases internal API (#156366) ## Summary This PR removes the `fields` parameter from the bulk get cases internal API. It also returns a subset of the cases attributes. Fixes: https://github.com/elastic/kibana/issues/156364 ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- x-pack/plugins/cases/common/api/cases/case.ts | 37 ++++----- x-pack/plugins/cases/common/index.ts | 7 +- x-pack/plugins/cases/public/api/decoders.ts | 14 +--- x-pack/plugins/cases/public/api/index.test.ts | 30 +++++--- x-pack/plugins/cases/public/api/index.ts | 24 +++--- .../cases/public/client/api/index.test.ts | 35 +++++---- x-pack/plugins/cases/public/types.ts | 10 +-- .../server/client/cases/bulk_get.test.ts | 46 ------------ .../cases/server/client/cases/bulk_get.ts | 71 ++++++------------ .../cases/server/client/cases/client.ts | 9 +-- .../routes/api/internal/bulk_get_cases.ts | 4 +- .../sections/alerts_table/cases/cell.tsx | 2 +- .../sections/alerts_table/cases/index.mock.ts | 2 +- .../sections/alerts_table/hooks/api.test.ts | 10 +-- .../sections/alerts_table/hooks/api.ts | 4 +- .../hooks/use_bulk_get_cases.test.tsx | 2 - .../alerts_table/hooks/use_bulk_get_cases.tsx | 4 +- .../tests/common/internal/bulk_get_cases.ts | 75 ++++++------------- 18 files changed, 129 insertions(+), 257 deletions(-) diff --git a/x-pack/plugins/cases/common/api/cases/case.ts b/x-pack/plugins/cases/common/api/cases/case.ts index fb77d5f4a95d2..c01b866c532fa 100644 --- a/x-pack/plugins/cases/common/api/cases/case.ts +++ b/x-pack/plugins/cases/common/api/cases/case.ts @@ -329,17 +329,24 @@ export const AllTagsFindRequestRt = rt.partial({ export const AllReportersFindRequestRt = AllTagsFindRequestRt; -export const CasesBulkGetRequestRt = rt.intersection([ - rt.type({ - ids: rt.array(rt.string), - }), - rt.partial({ - fields: rt.union([rt.undefined, rt.array(rt.string), rt.string]), - }), -]); +export const CasesBulkGetRequestRt = rt.type({ + ids: rt.array(rt.string), +}); + +export const CasesBulkGetResponseFieldsRt = rt.type({ + id: rt.string, + description: rt.string, + title: rt.string, + owner: rt.string, + version: rt.string, + totalComments: rt.number, + status: CaseStatusRt, + created_at: rt.string, + created_by: UserRt, +}); export const CasesBulkGetResponseRt = rt.type({ - cases: CasesRt, + cases: rt.array(CasesBulkGetResponseFieldsRt), errors: rt.array( rt.type({ error: rt.string, @@ -375,15 +382,3 @@ export type CasesByAlertId = rt.TypeOf; export type CasesBulkGetRequest = rt.TypeOf; export type CasesBulkGetResponse = rt.TypeOf; -export type CasesBulkGetRequestCertainFields = Omit< - CasesBulkGetRequest, - 'fields' -> & { - fields?: Field[]; -}; -export type CasesBulkGetResponseCertainFields = Omit< - CasesBulkGetResponse, - 'cases' -> & { - cases: Array>; -}; diff --git a/x-pack/plugins/cases/common/index.ts b/x-pack/plugins/cases/common/index.ts index 1c31fcfdabf1c..f63a015ceb17d 100644 --- a/x-pack/plugins/cases/common/index.ts +++ b/x-pack/plugins/cases/common/index.ts @@ -37,12 +37,7 @@ export { ExternalReferenceStorageType, } from './api'; -export type { - Case, - Cases, - CasesBulkGetRequestCertainFields, - CasesBulkGetResponseCertainFields, -} from './api'; +export type { Case, Cases, CasesBulkGetRequest, CasesBulkGetResponse } from './api'; export type { CaseUI, diff --git a/x-pack/plugins/cases/public/api/decoders.ts b/x-pack/plugins/cases/public/api/decoders.ts index 121595ccb0414..4b2072ca00b34 100644 --- a/x-pack/plugins/cases/public/api/decoders.ts +++ b/x-pack/plugins/cases/public/api/decoders.ts @@ -15,14 +15,12 @@ import type { CasesFindResponse, CasesStatusResponse, CasesMetricsResponse, - CasesBulkGetResponseCertainFields, - Case, + CasesBulkGetResponse, } from '../../common/api'; import { + CasesBulkGetResponseRt, CasesFindResponseRt, CasesStatusResponseRt, - CasesRt, - getTypeForCertainFieldsFromArray, CasesMetricsResponseRt, } from '../../common/api'; @@ -41,12 +39,8 @@ export const decodeCasesMetricsResponse = (metrics?: CasesMetricsResponse) => fold(throwErrors(createToasterPlainError), identity) ); -export const decodeCasesBulkGetResponse = ( - res: CasesBulkGetResponseCertainFields, - fields?: string[] -) => { - const typeToDecode = getTypeForCertainFieldsFromArray(CasesRt, fields); - pipe(typeToDecode.decode(res.cases), fold(throwErrors(createToasterPlainError), identity)); +export const decodeCasesBulkGetResponse = (res: CasesBulkGetResponse) => { + pipe(CasesBulkGetResponseRt.decode(res), fold(throwErrors(createToasterPlainError), identity)); return res; }; diff --git a/x-pack/plugins/cases/public/api/index.test.ts b/x-pack/plugins/cases/public/api/index.test.ts index c64a204183bed..3f89199326bd4 100644 --- a/x-pack/plugins/cases/public/api/index.test.ts +++ b/x-pack/plugins/cases/public/api/index.test.ts @@ -50,27 +50,33 @@ describe('api', () => { describe('bulkGetCases', () => { const http = httpServiceMock.createStartContract({ basePath: '' }); - http.post.mockResolvedValue({ cases: [{ title: 'test' }], errors: [] }); + const snakeCase = casesSnake[0]; + const theCase = { + id: snakeCase.id, + description: snakeCase.description, + owner: snakeCase.owner, + title: snakeCase.title, + version: snakeCase.version, + status: snakeCase.status, + created_at: snakeCase.created_at, + created_by: snakeCase.created_by, + totalComments: snakeCase.totalComment, + }; - it('should return the correct cases with a subset of fields', async () => { - expect(await bulkGetCases({ http, params: { ids: ['test'], fields: ['title'] } })).toEqual({ - cases: [{ title: 'test' }], - errors: [], - }); - }); + http.post.mockResolvedValue({ cases: [theCase], errors: [] }); - it('should return the correct cases with all fields', async () => { - http.post.mockResolvedValueOnce({ cases: casesSnake, errors: [] }); + it('should return the correct cases ', async () => { + http.post.mockResolvedValueOnce({ cases: [theCase], errors: [] }); expect(await bulkGetCases({ http, params: { ids: ['test'] } })).toEqual({ - cases: casesSnake, + cases: [theCase], errors: [], }); }); it('should have been called with the correct path', async () => { - await bulkGetCases({ http, params: { ids: ['test'], fields: ['title'] } }); + await bulkGetCases({ http, params: { ids: ['test'] } }); expect(http.post).toHaveBeenCalledWith('/internal/cases/_bulk_get', { - body: '{"ids":["test"],"fields":["title"]}', + body: '{"ids":["test"]}', }); }); }); diff --git a/x-pack/plugins/cases/public/api/index.ts b/x-pack/plugins/cases/public/api/index.ts index c52974ebbdfd5..547e673d2f472 100644 --- a/x-pack/plugins/cases/public/api/index.ts +++ b/x-pack/plugins/cases/public/api/index.ts @@ -14,9 +14,8 @@ import { INTERNAL_BULK_GET_CASES_URL, } from '../../common/constants'; import type { - Case, - CasesBulkGetRequestCertainFields, - CasesBulkGetResponseCertainFields, + CasesBulkGetRequest, + CasesBulkGetResponse, CasesFindRequest, CasesFindResponse, CasesMetricsRequest, @@ -68,20 +67,15 @@ export const getCasesMetrics = async ({ return convertToCamelCase(decodeCasesMetricsResponse(res)); }; -export const bulkGetCases = async ({ +export const bulkGetCases = async ({ http, signal, params, -}: HTTPService & { params: CasesBulkGetRequestCertainFields }): Promise< - CasesBulkGetResponseCertainFields -> => { - const res = await http.post>( - INTERNAL_BULK_GET_CASES_URL, - { - body: JSON.stringify({ ...params }), - signal, - } - ); +}: HTTPService & { params: CasesBulkGetRequest }): Promise => { + const res = await http.post(INTERNAL_BULK_GET_CASES_URL, { + body: JSON.stringify({ ...params }), + signal, + }); - return decodeCasesBulkGetResponse(res, params.fields); + return decodeCasesBulkGetResponse(res); }; diff --git a/x-pack/plugins/cases/public/client/api/index.test.ts b/x-pack/plugins/cases/public/client/api/index.test.ts index f53de5eb20f18..b2e31e9d2c6ce 100644 --- a/x-pack/plugins/cases/public/client/api/index.test.ts +++ b/x-pack/plugins/cases/public/client/api/index.test.ts @@ -84,27 +84,34 @@ describe('createClientAPI', () => { describe('bulkGet', () => { const http = httpServiceMock.createStartContract({ basePath: '' }); const api = createClientAPI({ http }); - http.post.mockResolvedValue({ cases: [{ title: 'test' }], errors: [] }); - it('should return the correct cases with a subset of fields', async () => { - expect(await api.cases.bulkGet({ ids: ['test'], fields: ['title'] })).toEqual({ - cases: [{ title: 'test' }], - errors: [], - }); - }); - - it('should return the correct cases with all fields', async () => { - http.post.mockResolvedValueOnce({ cases: casesSnake, errors: [] }); - expect(await api.cases.bulkGet({ ids: ['test'], fields: ['title'] })).toEqual({ - cases: casesSnake, + const snakeCase = casesSnake[0]; + const theCase = { + id: snakeCase.id, + description: snakeCase.description, + owner: snakeCase.owner, + title: snakeCase.title, + version: snakeCase.version, + status: snakeCase.status, + created_at: snakeCase.created_at, + created_by: snakeCase.created_by, + totalComments: snakeCase.totalComment, + }; + + http.post.mockResolvedValue({ cases: [theCase], errors: [] }); + + it('should return the correct cases', async () => { + http.post.mockResolvedValueOnce({ cases: [theCase], errors: [] }); + expect(await api.cases.bulkGet({ ids: ['test'] })).toEqual({ + cases: [theCase], errors: [], }); }); it('should have been called with the correct path', async () => { - await api.cases.bulkGet({ ids: ['test'], fields: ['title'] }); + await api.cases.bulkGet({ ids: ['test'] }); expect(http.post).toHaveBeenCalledWith('/internal/cases/_bulk_get', { - body: '{"ids":["test"],"fields":["title"]}', + body: '{"ids":["test"]}', }); }); }); diff --git a/x-pack/plugins/cases/public/types.ts b/x-pack/plugins/cases/public/types.ts index 8f65d19c5cea6..f8fd9270d7cba 100644 --- a/x-pack/plugins/cases/public/types.ts +++ b/x-pack/plugins/cases/public/types.ts @@ -25,9 +25,8 @@ import type { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import type { FilesSetup, FilesStart } from '@kbn/files-plugin/public'; import type { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; import type { - Case, - CasesBulkGetRequestCertainFields, - CasesBulkGetResponseCertainFields, + CasesBulkGetRequest, + CasesBulkGetResponse, CasesByAlertId, CasesByAlertIDRequest, CasesFindRequest, @@ -106,10 +105,7 @@ export interface CasesUiStart { find: (query: CasesFindRequest, signal?: AbortSignal) => Promise; getCasesStatus: (query: CasesStatusRequest, signal?: AbortSignal) => Promise; getCasesMetrics: (query: CasesMetricsRequest, signal?: AbortSignal) => Promise; - bulkGet: ( - params: CasesBulkGetRequestCertainFields, - signal?: AbortSignal - ) => Promise>; + bulkGet: (params: CasesBulkGetRequest, signal?: AbortSignal) => Promise; }; }; ui: { diff --git a/x-pack/plugins/cases/server/client/cases/bulk_get.test.ts b/x-pack/plugins/cases/server/client/cases/bulk_get.test.ts index fd68bd7e8d36d..b20101adbd6ba 100644 --- a/x-pack/plugins/cases/server/client/cases/bulk_get.test.ts +++ b/x-pack/plugins/cases/server/client/cases/bulk_get.test.ts @@ -5,9 +5,6 @@ * 2.0. */ -import type { Case } from '../../../common/api'; -import { getTypeProps, CaseRt } from '../../../common/api'; -import { mockCases } from '../../mocks'; import { createCasesClientMockArgs } from '../mocks'; import { bulkGet } from './bulk_get'; @@ -27,47 +24,4 @@ describe('bulkGet', () => { ); }); }); - - describe('throwErrorIfFieldsAreInvalid', () => { - const caseSO = mockCases[0]; - const clientArgs = createCasesClientMockArgs(); - clientArgs.services.caseService.getCases.mockResolvedValue({ saved_objects: [caseSO] }); - clientArgs.services.attachmentService.getter.getCaseCommentStats.mockResolvedValue(new Map()); - - clientArgs.authorization.getAndEnsureAuthorizedEntities.mockResolvedValue({ - authorized: [caseSO], - unauthorized: [], - }); - - const typeProps = getTypeProps(CaseRt) ?? {}; - const validFields = Object.keys(typeProps) as Array; - - beforeEach(() => { - jest.clearAllMocks(); - }); - - it.each(validFields)('supports valid field: %s', async (field) => { - const ids = ['test']; - - await expect(bulkGet({ ids, fields: [field] }, clientArgs)).resolves.not.toThrow(); - }); - - it('throws if the requested field is not valid', async () => { - const ids = ['test']; - - // @ts-expect-error - await expect(bulkGet({ ids, fields: ['not-valid'] }, clientArgs)).rejects.toThrow( - 'Failed to bulk get cases: test: Error: Field: not-valid is not supported' - ); - }); - - it('throws for nested fields', async () => { - const ids = ['test']; - - // @ts-expect-error - await expect(bulkGet({ ids, fields: ['created_by.username'] }, clientArgs)).rejects.toThrow( - 'Failed to bulk get cases: test: Error: Field: created_by.username is not supported' - ); - }); - }); }); diff --git a/x-pack/plugins/cases/server/client/cases/bulk_get.ts b/x-pack/plugins/cases/server/client/cases/bulk_get.ts index 3c2542c244874..aeccd95ed3bec 100644 --- a/x-pack/plugins/cases/server/client/cases/bulk_get.ts +++ b/x-pack/plugins/cases/server/client/cases/bulk_get.ts @@ -14,36 +14,32 @@ import { pick, partition } from 'lodash'; import { MAX_BULK_GET_CASES } from '../../../common/constants'; import type { CasesBulkGetResponse, - CasesBulkGetResponseCertainFields, - CasesBulkGetRequestCertainFields, - Case, + CasesBulkGetRequest, CaseAttributes, } from '../../../common/api'; import { CasesBulkGetRequestRt, - CasesRt, + CasesBulkGetResponseFieldsRt, excess, throwErrors, - getTypeForCertainFieldsFromArray, - CaseRt, + CasesBulkGetResponseRt, } from '../../../common/api'; -import { getTypeProps } from '../../../common/api/runtime_types'; import { createCaseError } from '../../common/error'; -import { asArray, flattenCaseSavedObject } from '../../common/utils'; +import { flattenCaseSavedObject } from '../../common/utils'; import type { CasesClientArgs, SOWithErrors } from '../types'; -import { includeFieldsRequiredForAuthentication } from '../../authorization/utils'; import { Operations } from '../../authorization'; import type { CaseSavedObjectTransformed } from '../../common/types/case'; type CaseSavedObjectWithErrors = SOWithErrors; +type BulkGetCase = CasesBulkGetResponse['cases'][number]; /** * Retrieves multiple cases by ids. */ -export const bulkGet = async ( - params: CasesBulkGetRequestCertainFields, +export const bulkGet = async ( + params: CasesBulkGetRequest, clientArgs: CasesClientArgs -): Promise> => { +): Promise => { const { services: { caseService, attachmentService }, logger, @@ -51,15 +47,16 @@ export const bulkGet = async ( } = clientArgs; try { - const fields = includeFieldsRequiredForAuthentication(asArray(params.fields)); + const fields = Object.keys(CasesBulkGetResponseFieldsRt.props).filter( + (field) => !['totalComments', 'id', 'version'].includes(field) + ); const request = pipe( - excess(CasesBulkGetRequestRt).decode({ ...params, fields }), + excess(CasesBulkGetRequestRt).decode(params), fold(throwErrors(Boom.badRequest), identity) ); throwErrorIfCaseIdsReachTheLimit(request.ids); - throwErrorIfFieldsAreInvalid(fields); const cases = await caseService.getCases({ caseIds: request.ids, fields }); @@ -74,18 +71,12 @@ export const bulkGet = async ( operation: Operations.bulkGetCases, }); - const requestForTotals = ['totalComment', 'totalAlerts'].some( - (totalKey) => !fields || fields.includes(totalKey) - ); - - const commentTotals = requestForTotals - ? await attachmentService.getter.getCaseCommentStats({ - caseIds: authorizedCases.map((theCase) => theCase.id), - }) - : new Map(); + const commentTotals = await attachmentService.getter.getCaseCommentStats({ + caseIds: authorizedCases.map((theCase) => theCase.id), + }); const flattenedCases = authorizedCases.map((theCase) => { - const { alerts, userComments } = commentTotals.get(theCase.id) ?? { + const { userComments } = commentTotals.get(theCase.id) ?? { alerts: 0, userComments: 0, }; @@ -93,22 +84,17 @@ export const bulkGet = async ( const flattenedCase = flattenCaseSavedObject({ savedObject: theCase, totalComment: userComments, - totalAlerts: alerts, }); - if (!fields?.length) { - return flattenedCase; - } - - return pick(flattenedCase, [...fields, 'id', 'version']); + return { + ...(pick(flattenedCase, [...fields, 'id', 'version']) as BulkGetCase), + totalComments: flattenedCase.totalComment, + }; }); - const typeToEncode = getTypeForCertainFieldsFromArray(CasesRt, fields); - const casesToReturn = typeToEncode.encode(flattenedCases); - const errors = constructErrors(soBulkGetErrors, unauthorizedCases); - return { cases: casesToReturn, errors }; + return CasesBulkGetResponseRt.encode({ cases: flattenedCases, errors }); } catch (error) { const ids = params.ids ?? []; throw createCaseError({ @@ -119,21 +105,6 @@ export const bulkGet = async ( } }; -const throwErrorIfFieldsAreInvalid = (fields?: string[]) => { - if (!fields || fields.length === 0) { - return; - } - - const typeProps = getTypeProps(CaseRt) ?? {}; - const validFields = Object.keys(typeProps); - - for (const field of fields) { - if (!validFields.includes(field)) { - throw Boom.badRequest(`Field: ${field} is not supported`); - } - } -}; - const throwErrorIfCaseIdsReachTheLimit = (ids: string[]) => { if (ids.length > MAX_BULK_GET_CASES) { throw Boom.badRequest(`Maximum request limit of ${MAX_BULK_GET_CASES} cases reached`); diff --git a/x-pack/plugins/cases/server/client/cases/client.ts b/x-pack/plugins/cases/server/client/cases/client.ts index a014eeec56a6c..220dd25cad726 100644 --- a/x-pack/plugins/cases/server/client/cases/client.ts +++ b/x-pack/plugins/cases/server/client/cases/client.ts @@ -13,9 +13,8 @@ import type { AllTagsFindRequest, AllReportersFindRequest, CasesByAlertId, - Case, - CasesBulkGetRequestCertainFields, - CasesBulkGetResponseCertainFields, + CasesBulkGetRequest, + CasesBulkGetResponse, } from '../../../common/api'; import type { CasesClient } from '../client'; import type { CasesClientInternal } from '../client_internal'; @@ -65,9 +64,7 @@ export interface CasesSubClient { /** * Retrieves multiple cases with the specified IDs. */ - bulkGet( - params: CasesBulkGetRequestCertainFields - ): Promise>; + bulkGet(params: CasesBulkGetRequest): Promise; /** * Pushes a specific case to an external system. */ diff --git a/x-pack/plugins/cases/server/routes/api/internal/bulk_get_cases.ts b/x-pack/plugins/cases/server/routes/api/internal/bulk_get_cases.ts index 15dd6f0987e42..fb7f38c6cab68 100644 --- a/x-pack/plugins/cases/server/routes/api/internal/bulk_get_cases.ts +++ b/x-pack/plugins/cases/server/routes/api/internal/bulk_get_cases.ts @@ -6,7 +6,7 @@ */ import { INTERNAL_BULK_GET_CASES_URL } from '../../../../common/constants'; -import type { CasesBulkGetRequestCertainFields } from '../../../../common/api'; +import type { CasesBulkGetRequest } from '../../../../common/api'; import { createCaseError } from '../../../common/error'; import { createCasesRoute } from '../create_cases_route'; import { escapeHatch } from '../utils'; @@ -18,7 +18,7 @@ export const bulkGetCasesRoute = createCasesRoute({ body: escapeHatch, }, handler: async ({ context, request, response }) => { - const params = request.body as CasesBulkGetRequestCertainFields; + const params = request.body as CasesBulkGetRequest; try { const casesContext = await context.cases; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/cases/cell.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/cases/cell.tsx index d8e89ee2f5ba7..4442b4e6307df 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/cases/cell.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/cases/cell.tsx @@ -23,7 +23,7 @@ const formatCase = (theCase: Case): CaseTooltipContentProps => ({ fullName: theCase.created_by.full_name ?? undefined, }, status: theCase.status, - totalComments: theCase.totalComment, + totalComments: theCase.totalComments, }); const CasesCellComponent: React.FC = (props) => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/cases/index.mock.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/cases/index.mock.ts index 032ede0c80afb..fa5769ed1f909 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/cases/index.mock.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/cases/index.mock.ts @@ -15,7 +15,7 @@ export const theCase: Case = { description: 'Test description', status: CaseStatuses.open, title: 'Test case', - totalComment: 1, + totalComments: 1, version: 'WzQ3LDFd', owner: 'cases', }; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/api.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/api.test.ts index 684a16c40a0bc..7da93fdeeacc9 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/api.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/api.test.ts @@ -20,20 +20,16 @@ describe('Alerts table APIs', () => { describe('bulkGetCases', () => { it('fetch cases correctly', async () => { - const res = await bulkGetCases( - http, - { ids: ['test-id'], fields: ['title'] }, - abortCtrl.signal - ); + const res = await bulkGetCases(http, { ids: ['test-id'] }, abortCtrl.signal); expect(res).toEqual({ cases: [], errors: [] }); }); it('should call http with correct arguments', async () => { - await bulkGetCases(http, { ids: ['test-id'], fields: ['title'] }, abortCtrl.signal); + await bulkGetCases(http, { ids: ['test-id'] }, abortCtrl.signal); expect(http.post).toHaveBeenCalledWith('/internal/cases/_bulk_get', { - body: '{"ids":["test-id"],"fields":["title"]}', + body: '{"ids":["test-id"]}', signal: abortCtrl.signal, }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/api.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/api.ts index 364c8480b8a2d..3bfdc382478bc 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/api.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/api.ts @@ -14,7 +14,7 @@ export interface Case { title: string; description: string; status: CaseStatuses; - totalComment: number; + totalComments: number; created_at: string; created_by: { email: string | null | undefined; @@ -40,7 +40,7 @@ export interface CasesBulkGetResponse { export const bulkGetCases = async ( http: HttpStart, - params: { ids: string[]; fields: string[] }, + params: { ids: string[] }, signal?: AbortSignal ): Promise => { const res = await http.post(INTERNAL_BULK_GET_CASES_URL, { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx index 3c8bbc7763c0a..fa09b171de879 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx @@ -44,7 +44,6 @@ describe('useBulkGetCases', () => { expect.anything(), { ids: ['case-1'], - fields: ['title', 'description', 'status', 'totalComment', 'created_at', 'created_by'], }, expect.any(AbortSignal) ); @@ -75,7 +74,6 @@ describe('useBulkGetCases', () => { expect.anything(), { ids: ['case-1'], - fields: ['title', 'description', 'status', 'totalComment', 'created_at', 'created_by'], }, expect.any(AbortSignal) ); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.tsx index 4349370235b3f..87ffbf8bd9b04 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.tsx @@ -16,8 +16,6 @@ const ERROR_TITLE = i18n.translate('xpack.triggersActionsUI.cases.api.bulkGet', defaultMessage: 'Error fetching cases data', }); -const caseFields = ['title', 'description', 'status', 'totalComment', 'created_at', 'created_by']; - const transformCases = (data: CasesBulkGetResponse): Map => { const casesMap = new Map(); @@ -38,7 +36,7 @@ export const useBulkGetCases = (caseIds: string[], fetchCases: boolean) => { triggersActionsUiQueriesKeys.casesBulkGet(caseIds), () => { const abortCtrlRef = new AbortController(); - return bulkGetCases(http, { ids: caseIds, fields: caseFields }, abortCtrlRef.signal); + return bulkGetCases(http, { ids: caseIds }, abortCtrlRef.signal); }, { enabled: caseIds.length > 0 && fetchCases, diff --git a/x-pack/test/cases_api_integration/security_and_spaces/tests/common/internal/bulk_get_cases.ts b/x-pack/test/cases_api_integration/security_and_spaces/tests/common/internal/bulk_get_cases.ts index 9c273eecd22eb..21ce756604b06 100644 --- a/x-pack/test/cases_api_integration/security_and_spaces/tests/common/internal/bulk_get_cases.ts +++ b/x-pack/test/cases_api_integration/security_and_spaces/tests/common/internal/bulk_get_cases.ts @@ -7,7 +7,7 @@ import { pick } from 'lodash'; import expect from '@kbn/expect'; -import { CommentType } from '@kbn/cases-plugin/common'; +import { Case, CommentType } from '@kbn/cases-plugin/common'; import { getPostCaseRequest, postCaseReq } from '../../../../common/lib/mock'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; import { @@ -47,23 +47,7 @@ export default ({ getService }: FtrProviderContext): void => { const { cases, errors } = await bulkGetCases({ supertest, ids: [caseOne.id, caseTwo.id] }); - expect(cases).to.eql([caseOne, caseTwo]); - expect(errors.length).to.be(0); - }); - - it('should return the correct cases with specific fields', async () => { - const caseOne = await createCase(supertest, postCaseReq); - const caseTwo = await createCase(supertest, postCaseReq); - - const { cases, errors } = await bulkGetCases({ - supertest, - ids: [caseOne.id, caseTwo.id], - fields: ['title'], - }); - - const fieldsToPick = ['id', 'version', 'owner', 'title']; - - expect(cases).to.eql([pick(caseOne, fieldsToPick), pick(caseTwo, fieldsToPick)]); + expect(cases).to.eql([getBulkGetCase(caseOne), getBulkGetCase(caseTwo)]); expect(errors.length).to.be(0); }); @@ -72,11 +56,11 @@ export default ({ getService }: FtrProviderContext): void => { const { cases, errors } = await bulkGetCases({ supertest, ids: [caseOne.id, 'not-exist'] }); - expect(cases).to.eql([caseOne]); + expect(cases).to.eql([getBulkGetCase(caseOne)]); expect(errors.length).to.be(1); }); - it('should return the correct counts', async () => { + it('should return the correct comment counts', async () => { const caseOne = await createCase(supertest, postCaseReq); const caseTwo = await createCase(supertest, postCaseReq); @@ -119,30 +103,15 @@ export default ({ getService }: FtrProviderContext): void => { ids: [caseOneUpdated.id, caseTwoUpdated.id], }); - /** - * For performance reasons bulk_get does not - * return the comments - */ expect(cases).to.eql([ - { ...caseOneUpdated, comments: [], totalComment: 1, totalAlerts: 2 }, - { ...caseTwoUpdated, comments: [], totalComment: 0, totalAlerts: 1 }, + { ...getBulkGetCase(caseOneUpdated), totalComments: 1 }, + { ...getBulkGetCase(caseTwoUpdated), totalComments: 0 }, ]); expect(errors.length).to.be(0); }); }); describe('errors', () => { - it('400s when requesting invalid fields', async () => { - const caseOne = await createCase(supertest, postCaseReq); - - await bulkGetCases({ - supertest, - ids: [caseOne.id], - fields: ['invalid'], - expectedHttpCode: 400, - }); - }); - it('400s when requesting more than 1000 cases', async () => { const ids = Array(1001).fill('test'); @@ -324,21 +293,23 @@ export default ({ getService }: FtrProviderContext): void => { }); } }); - - it('should NOT request the namespace field', async () => { - const newCase = await createCase( - supertestWithoutAuth, - getPostCaseRequest({ owner: 'securitySolutionFixture' }), - 200 - ); - - await bulkGetCases({ - supertest: supertestWithoutAuth, - ids: [newCase.id], - fields: ['namespace'], - expectedHttpCode: 400, - }); - }); }); }); }; + +const getBulkGetCase = (theCase: Case) => { + const fieldsToPick = [ + 'id', + 'version', + 'owner', + 'title', + 'description', + 'totalComment', + 'status', + 'created_at', + 'created_by', + ]; + + const { totalComment, ...rest } = pick(theCase, fieldsToPick) as Case; + return { ...rest, totalComments: totalComment }; +}; From a513ec6303741a8f4e79c3a0ece1dbc855189df2 Mon Sep 17 00:00:00 2001 From: Jatin Kathuria Date: Mon, 8 May 2023 16:42:25 +0200 Subject: [PATCH 026/102] [Security Solution] [Fix] View all open alerts in Detection Response dashboard (#156893) ## Summary This PR handles : https://github.com/elastic/kibana/issues/149096 - Fixes the redirection of `View all open alerts` button - Adds cypress tests for Detection and Response dashboard |Before|After| |---|---| |