From eaf2d33c592d6db0e614b922728881d73585427c Mon Sep 17 00:00:00 2001 From: Yngrid Coello Date: Wed, 14 Jun 2023 00:00:35 +0200 Subject: [PATCH 01/89] [Logs onboarding] Add service name to logs setup (#159592) Closes https://github.com/elastic/kibana/issues/159492. This PR adds a field to logs setup so users can define optionally the service name of the service generating logs. ### Changes - New input for serviceName in setup step. - ServiceName is added to SO. - ServiceName is used in `generateYml`. #### Demo https://github.com/elastic/kibana/assets/1313018/15fe33ec-1c36-413a-809a-897b2c0a9042 --- .../app/custom_logs/wizard/configure_logs.tsx | 94 +++++++++++++------ .../app/custom_logs/wizard/index.tsx | 2 + .../wizard/install_elastic_agent.tsx | 1 + .../routes/elastic_agent/generate_yml.ts | 13 +++ .../server/routes/elastic_agent/route.ts | 1 + .../observability_onboarding_status.ts | 3 +- 6 files changed, 83 insertions(+), 31 deletions(-) diff --git a/x-pack/plugins/observability_onboarding/public/components/app/custom_logs/wizard/configure_logs.tsx b/x-pack/plugins/observability_onboarding/public/components/app/custom_logs/wizard/configure_logs.tsx index 689068ba792dc..e86710f71c5c8 100644 --- a/x-pack/plugins/observability_onboarding/public/components/app/custom_logs/wizard/configure_logs.tsx +++ b/x-pack/plugins/observability_onboarding/public/components/app/custom_logs/wizard/configure_logs.tsx @@ -42,6 +42,7 @@ export function ConfigureLogs() { const { goToStep, goBack, getState, setState } = useWizard(); const wizardState = getState(); const [datasetName, setDatasetName] = useState(wizardState.datasetName); + const [serviceName, setServiceName] = useState(wizardState.serviceName); const [logFilePaths, setLogFilePaths] = useState(wizardState.logFilePaths); const [namespace, setNamespace] = useState(wizardState.namespace); const [customConfigurations, setCustomConfigurations] = useState( @@ -58,6 +59,7 @@ export function ConfigureLogs() { setState({ ...getState(), datasetName, + serviceName, logFilePaths: logFilePaths.filter((filepath) => !!filepath), namespace, customConfigurations, @@ -194,7 +196,68 @@ export function ConfigureLogs() { )} - + + + + + setDatasetName(replaceSpecialChars(event.target.value)) + } + /> + + + + } + > + setServiceName(event.target.value)} + /> + + + - - - - setDatasetName(replaceSpecialChars(event.target.value)) - } - /> - { const customConfigYaml = load(customConfigurations ?? ''); + const processors = [ + { + add_fields: { + target: 'service', + fields: { + name: serviceName, + }, + }, + }, + ]; return dump({ ...{ @@ -49,6 +61,7 @@ export const generateYml = ({ dataset: datasetName, }, paths: logFilePaths, + ...(serviceName ? { processors } : {}), }, ], }, diff --git a/x-pack/plugins/observability_onboarding/server/routes/elastic_agent/route.ts b/x-pack/plugins/observability_onboarding/server/routes/elastic_agent/route.ts index 320547410bd91..eaa55cc8e4c0a 100644 --- a/x-pack/plugins/observability_onboarding/server/routes/elastic_agent/route.ts +++ b/x-pack/plugins/observability_onboarding/server/routes/elastic_agent/route.ts @@ -41,6 +41,7 @@ const generateConfig = createObservabilityOnboardingServerRoute({ : '$API_KEY', esHost: [elasticsearchUrl], logfileId: `custom-logs-${Date.now()}`, + serviceName: savedState?.state.serviceName, }); return yaml; diff --git a/x-pack/plugins/observability_onboarding/server/saved_objects/observability_onboarding_status.ts b/x-pack/plugins/observability_onboarding/server/saved_objects/observability_onboarding_status.ts index 13cc0e902e617..d5e8f66331afa 100644 --- a/x-pack/plugins/observability_onboarding/server/saved_objects/observability_onboarding_status.ts +++ b/x-pack/plugins/observability_onboarding/server/saved_objects/observability_onboarding_status.ts @@ -13,7 +13,8 @@ export const OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE = export interface ObservabilityOnboardingState { state: { datasetName: string; - customConfigurations: string; + serviceName?: string; + customConfigurations?: string; logFilePaths: string[]; namespace: string; }; From 39c68b52b5c0fa51fe4b18e4755525326286d01e Mon Sep 17 00:00:00 2001 From: Philippe Oberti Date: Tue, 13 Jun 2023 17:17:11 -0500 Subject: [PATCH 02/89] [Security Solution] add prevalence expanded section to expandable flyout (#158606) --- ...rt_details_left_panel_prevalence_tab.cy.ts | 53 ++++-- ...alert_details_left_panel_prevalence_tab.ts | 24 +++ .../left/components/analyze_graph.stories.tsx | 76 -------- .../left/components/analyze_graph.test.tsx | 11 +- .../left/components/entities_details.test.tsx | 14 +- .../components/prevalence_details.test.tsx | 82 ++++++++ .../left/components/prevalence_details.tsx | 159 +++++++++++++++- .../prevalence_details_count_cell.test.tsx | 107 +++++++++++ .../prevalence_details_count_cell.tsx | 70 +++++++ ...revalence_details_prevalence_cell.test.tsx | 168 +++++++++++++++++ .../prevalence_details_prevalence_cell.tsx | 85 +++++++++ .../left/components/response_details.test.tsx | 11 +- .../left/components/response_details.tsx | 10 +- .../left/components/session_view.stories.tsx | 44 ----- .../left/components/session_view.test.tsx | 15 +- .../public/flyout/left/components/test_ids.ts | 30 +++ .../threat_intelligence_details.test.tsx | 11 +- .../threat_intelligence_details.tsx | 2 +- .../flyout/left/components/translations.ts | 49 +++++ .../public/flyout/left/context.tsx | 60 ++++-- .../use_threat_intelligence_details.test.ts | 34 ++-- .../hooks/use_threat_intelligence_details.ts | 20 +- .../public/flyout/left/index.tsx | 4 +- .../public/flyout/left/mocks/mock_context.ts | 6 +- .../components/correlations_overview.test.tsx | 1 + .../components/correlations_overview.tsx | 3 +- .../components/expand_detail_button.test.tsx | 2 + .../right/components/expand_detail_button.tsx | 11 +- .../components/prevalence_overview.test.tsx | 28 +-- .../prevalence_overview_row.test.tsx | 46 ++--- .../components/prevalence_overview_row.tsx | 30 ++- .../threat_intelligence_overview.tsx | 5 +- .../public/flyout/right/context.tsx | 10 +- .../right/hooks/use_fetch_unique_hosts.ts | 81 -------- .../flyout/right/hooks/use_prevalence.tsx | 26 ++- ...ch_field_value_pair_by_event_type.test.ts} | 44 +++-- ...se_fetch_field_value_pair_by_event_type.ts | 177 ++++++++++++++++++ ..._field_value_pair_with_aggregation.test.ts | 104 ++++++++++ ...etch_field_value_pair_with_aggregation.ts} | 80 +++----- .../hooks/use_fetch_unique_by_field.test.ts} | 18 +- .../shared/hooks/use_fetch_unique_by_field.ts | 67 +++++++ .../flyout/shared/utils/build_requests.ts | 38 ++++ .../utils/fetch_data.ts} | 27 ++- 43 files changed, 1486 insertions(+), 457 deletions(-) delete mode 100644 x-pack/plugins/security_solution/public/flyout/left/components/analyze_graph.stories.tsx create mode 100644 x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details.test.tsx create mode 100644 x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_count_cell.test.tsx create mode 100644 x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_count_cell.tsx create mode 100644 x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_prevalence_cell.test.tsx create mode 100644 x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_prevalence_cell.tsx delete mode 100644 x-pack/plugins/security_solution/public/flyout/left/components/session_view.stories.tsx rename x-pack/plugins/security_solution/public/flyout/left/{components => }/hooks/use_threat_intelligence_details.test.ts (70%) rename x-pack/plugins/security_solution/public/flyout/left/{components => }/hooks/use_threat_intelligence_details.ts (76%) delete mode 100644 x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts.ts rename x-pack/plugins/security_solution/public/flyout/{right/hooks/use_fetch_unique_hosts_with_field_value_pair.test.ts => shared/hooks/use_fetch_field_value_pair_by_event_type.test.ts} (68%) create mode 100644 x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_by_event_type.ts create mode 100644 x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_with_aggregation.test.ts rename x-pack/plugins/security_solution/public/flyout/{right/hooks/use_fetch_unique_hosts_with_field_value_pair.ts => shared/hooks/use_fetch_field_value_pair_with_aggregation.ts} (58%) rename x-pack/plugins/security_solution/public/flyout/{right/hooks/use_fetch_unique_hosts.test.tsx => shared/hooks/use_fetch_unique_by_field.test.ts} (76%) create mode 100644 x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_unique_by_field.ts create mode 100644 x-pack/plugins/security_solution/public/flyout/shared/utils/build_requests.ts rename x-pack/plugins/security_solution/public/flyout/{right/utils/fetch_aggregated_data.ts => shared/utils/fetch_data.ts} (67%) diff --git a/x-pack/plugins/security_solution/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts index 972937c4a73f4..599243ae37d29 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts @@ -5,24 +5,33 @@ * 2.0. */ -import { createRule } from '../../../../tasks/api_calls/rules'; -import { getNewRule } from '../../../../objects/rule'; -import { DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_BUTTON } from '../../../../screens/expandable_flyout/alert_details_left_panel_prevalence_tab'; -import { - DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB, - DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_BUTTON_GROUP, -} from '../../../../screens/expandable_flyout/alert_details_left_panel'; import { openPrevalenceTab } from '../../../../tasks/expandable_flyout/alert_details_left_panel_prevalence_tab'; import { openInsightsTab } from '../../../../tasks/expandable_flyout/alert_details_left_panel'; import { expandDocumentDetailsExpandableFlyoutLeftSection } from '../../../../tasks/expandable_flyout/alert_details_right_panel'; import { expandFirstAlertExpandableFlyout } from '../../../../tasks/expandable_flyout/common'; +import { + DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB, + DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_BUTTON_GROUP, +} from '../../../../screens/expandable_flyout/alert_details_left_panel'; +import { + DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_ALERT_COUNT_CELL, + DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_BUTTON, + DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_NAME_CELL, + DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_TYPE_CELL, + DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_DOC_COUNT_CELL, + DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_HOST_PREVALENCE_CELL, + DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_USER_PREVALENCE_CELL, + DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE, +} from '../../../../screens/expandable_flyout/alert_details_left_panel_prevalence_tab'; import { cleanKibana } from '../../../../tasks/common'; -import { waitForAlertsToPopulate } from '../../../../tasks/create_new_rule'; import { login, visit } from '../../../../tasks/login'; +import { createRule } from '../../../../tasks/api_calls/rules'; +import { getNewRule } from '../../../../objects/rule'; import { ALERTS_URL } from '../../../../urls/navigation'; +import { waitForAlertsToPopulate } from '../../../../tasks/create_new_rule'; describe( - 'Expandable flyout left panel prevalence', + 'Alert details expandable flyout left panel prevalence', { env: { ftrConfig: { enableExperimental: ['securityFlyoutEnabled'] } } }, () => { beforeEach(() => { @@ -37,7 +46,7 @@ describe( openPrevalenceTab(); }); - it('should show prevalence table', () => { + it('should display prevalence tab', () => { cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB) .should('be.visible') .and('have.text', 'Insights'); @@ -48,7 +57,29 @@ describe( .should('be.visible') .and('have.text', 'Prevalence'); - // TODO actual test + cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE).should('be.visible'); + cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_TYPE_CELL) + .should('contain.text', 'host.name') + .and('contain.text', 'user.name'); + cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_NAME_CELL) + .should('contain.text', 'siem-kibana') + .and('contain.text', 'test'); + cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_ALERT_COUNT_CELL).should( + 'contain.text', + 2 + ); + cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_DOC_COUNT_CELL).should( + 'contain.text', + 2 + ); + cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_HOST_PREVALENCE_CELL).should( + 'contain.text', + 100 + ); + cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_USER_PREVALENCE_CELL).should( + 'contain.text', + 100 + ); }); } ); diff --git a/x-pack/plugins/security_solution/cypress/screens/expandable_flyout/alert_details_left_panel_prevalence_tab.ts b/x-pack/plugins/security_solution/cypress/screens/expandable_flyout/alert_details_left_panel_prevalence_tab.ts index d682214d4f9f5..b1e19dd9588a2 100644 --- a/x-pack/plugins/security_solution/cypress/screens/expandable_flyout/alert_details_left_panel_prevalence_tab.ts +++ b/x-pack/plugins/security_solution/cypress/screens/expandable_flyout/alert_details_left_panel_prevalence_tab.ts @@ -5,9 +5,33 @@ * 2.0. */ +import { + PREVALENCE_DETAILS_TABLE_ALERT_COUNT_CELL_TEST_ID, + PREVALENCE_DETAILS_TABLE_DOC_COUNT_CELL_TEST_ID, + PREVALENCE_DETAILS_TABLE_HOST_PREVALENCE_CELL_TEST_ID, + PREVALENCE_DETAILS_TABLE_NAME_CELL_TEST_ID, + PREVALENCE_DETAILS_TABLE_TEST_ID, + PREVALENCE_DETAILS_TABLE_TYPE_CELL_TEST_ID, + PREVALENCE_DETAILS_TABLE_USER_PREVALENCE_CELL_TEST_ID, +} from '../../../public/flyout/left/components/test_ids'; import { getDataTestSubjectSelector } from '../../helpers/common'; import { INSIGHTS_TAB_PREVALENCE_BUTTON_TEST_ID } from '../../../public/flyout/left/tabs/test_ids'; export const DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_BUTTON = getDataTestSubjectSelector( INSIGHTS_TAB_PREVALENCE_BUTTON_TEST_ID ); +export const DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE = getDataTestSubjectSelector( + PREVALENCE_DETAILS_TABLE_TEST_ID +); +export const DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_TYPE_CELL = + getDataTestSubjectSelector(PREVALENCE_DETAILS_TABLE_TYPE_CELL_TEST_ID); +export const DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_NAME_CELL = + getDataTestSubjectSelector(PREVALENCE_DETAILS_TABLE_NAME_CELL_TEST_ID); +export const DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_ALERT_COUNT_CELL = + getDataTestSubjectSelector(PREVALENCE_DETAILS_TABLE_ALERT_COUNT_CELL_TEST_ID); +export const DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_DOC_COUNT_CELL = + getDataTestSubjectSelector(PREVALENCE_DETAILS_TABLE_DOC_COUNT_CELL_TEST_ID); +export const DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_HOST_PREVALENCE_CELL = + getDataTestSubjectSelector(PREVALENCE_DETAILS_TABLE_HOST_PREVALENCE_CELL_TEST_ID); +export const DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_USER_PREVALENCE_CELL = + getDataTestSubjectSelector(PREVALENCE_DETAILS_TABLE_USER_PREVALENCE_CELL_TEST_ID); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/analyze_graph.stories.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/analyze_graph.stories.tsx deleted file mode 100644 index 9caff069b96f4..0000000000000 --- a/x-pack/plugins/security_solution/public/flyout/left/components/analyze_graph.stories.tsx +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import type { Story } from '@storybook/react'; -import { Provider as ReduxStoreProvider } from 'react-redux'; -import { configureStore } from '@reduxjs/toolkit'; -import { MemoryRouter } from 'react-router-dom'; -import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; -import type { CoreStart } from '@kbn/core/public'; -import { sourcererReducer } from '../../../common/store/sourcerer'; -import { inputsReducer } from '../../../common/store/inputs'; -import type { LeftPanelContext } from '../context'; -import { LeftFlyoutContext } from '../context'; -import { AnalyzeGraph } from './analyze_graph'; - -export default { - component: AnalyzeGraph, - title: 'Flyout/AnalyzeGraph', -}; - -// TODO to get this working, we need to spent some time getting all the foundation items for storybook -// (ReduxStoreProvider, CellActionsProvider...) similarly to how it was done for the TestProvidersComponent -// see ticket https://github.com/elastic/security-team/issues/6223 -// export const Default: Story = () => { -// const contextValue = { -// eventId: 'some_id', -// } as unknown as LeftPanelContext; -// -// return ( -// -// -// -// ); -// }; - -export const Error: Story = () => { - const store = configureStore({ - reducer: { - inputs: inputsReducer, - sourcerer: sourcererReducer, - }, - }); - const services = { - data: {}, - notifications: { - toasts: { - addError: () => {}, - addSuccess: () => {}, - addWarning: () => {}, - remove: () => {}, - }, - }, - } as unknown as CoreStart; - const KibanaReactContext = createKibanaReactContext({ ...services }); - - const contextValue = { - eventId: null, - } as unknown as LeftPanelContext; - - return ( - - - - - - - - - - ); -}; diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/analyze_graph.test.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/analyze_graph.test.tsx index 460580b098b90..45710eb518428 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/analyze_graph.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/left/components/analyze_graph.test.tsx @@ -8,8 +8,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import '@testing-library/jest-dom'; -import type { LeftPanelContext } from '../context'; -import { LeftFlyoutContext } from '../context'; +import { LeftPanelContext } from '../context'; import { TestProviders } from '../../../common/mock'; import { AnalyzeGraph } from './analyze_graph'; import { ANALYZE_GRAPH_ERROR_TEST_ID, ANALYZER_GRAPH_TEST_ID } from './test_ids'; @@ -39,9 +38,9 @@ describe('', () => { const wrapper = render( - + - + ); expect(wrapper.getByTestId(ANALYZER_GRAPH_TEST_ID)).toBeInTheDocument(); @@ -54,9 +53,9 @@ describe('', () => { const wrapper = render( - + - + ); expect(wrapper.getByTestId(ANALYZE_GRAPH_ERROR_TEST_ID)).toBeInTheDocument(); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/entities_details.test.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/entities_details.test.tsx index 2b83ae558f274..0446218830cef 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/entities_details.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/left/components/entities_details.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import '@testing-library/jest-dom'; -import { LeftFlyoutContext } from '../context'; +import { LeftPanelContext } from '../context'; import { TestProviders } from '../../../common/mock'; import { EntitiesDetails } from './entities_details'; import { ENTITIES_DETAILS_TEST_ID, HOST_DETAILS_TEST_ID, USER_DETAILS_TEST_ID } from './test_ids'; @@ -35,9 +35,9 @@ describe('', () => { it('renders entities details correctly', () => { const { getByTestId } = render( - + - + ); expect(getByTestId(ENTITIES_DETAILS_TEST_ID)).toBeInTheDocument(); @@ -48,7 +48,7 @@ describe('', () => { it('does not render user and host details if user name and host name are not available', () => { const { queryByTestId } = render( - @@ -56,7 +56,7 @@ describe('', () => { }} > - + ); expect(queryByTestId(USER_DETAILS_TEST_ID)).not.toBeInTheDocument(); @@ -66,7 +66,7 @@ describe('', () => { it('does not render user and host details if @timestamp is not available', () => { const { queryByTestId } = render( - { @@ -82,7 +82,7 @@ describe('', () => { }} > - + ); expect(queryByTestId(USER_DETAILS_TEST_ID)).not.toBeInTheDocument(); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details.test.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details.test.tsx new file mode 100644 index 0000000000000..1201ef514ac9f --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details.test.tsx @@ -0,0 +1,82 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { render } from '@testing-library/react'; +import React from 'react'; +import { getSummaryRows } from '../../../common/components/event_details/get_alert_summary_rows'; +import { LeftPanelContext } from '../context'; +import { PrevalenceDetails } from './prevalence_details'; +import { + PREVALENCE_DETAILS_TABLE_ERROR_TEST_ID, + PREVALENCE_DETAILS_TABLE_TEST_ID, +} from './test_ids'; +import { useFetchFieldValuePairByEventType } from '../../shared/hooks/use_fetch_field_value_pair_by_event_type'; +import { useFetchFieldValuePairWithAggregation } from '../../shared/hooks/use_fetch_field_value_pair_with_aggregation'; +import { useFetchUniqueByField } from '../../shared/hooks/use_fetch_unique_by_field'; + +jest.mock('../../../common/components/event_details/get_alert_summary_rows'); +jest.mock('../../shared/hooks/use_fetch_field_value_pair_by_event_type'); +jest.mock('../../shared/hooks/use_fetch_field_value_pair_with_aggregation'); +jest.mock('../../shared/hooks/use_fetch_unique_by_field'); + +const panelContextValue = { + eventId: 'event id', + indexName: 'indexName', + browserFields: {}, + dataFormattedForFieldBrowser: [], +} as unknown as LeftPanelContext; + +describe('PrevalenceDetails', () => { + jest.mocked(useFetchFieldValuePairByEventType).mockReturnValue({ + loading: false, + error: false, + count: 1, + }); + jest.mocked(useFetchFieldValuePairWithAggregation).mockReturnValue({ + loading: false, + error: false, + count: 1, + }); + jest.mocked(useFetchUniqueByField).mockReturnValue({ + loading: false, + error: false, + count: 1, + }); + + it('should render the table', () => { + const mockSummaryRow = { + title: 'test', + description: { + data: { + field: 'field', + }, + values: ['value'], + }, + }; + (getSummaryRows as jest.Mock).mockReturnValue([mockSummaryRow]); + + const { getByTestId } = render( + + + + ); + + expect(getByTestId(PREVALENCE_DETAILS_TABLE_TEST_ID)).toBeInTheDocument(); + }); + + it('should render the error message if no highlighted fields', () => { + jest.mocked(getSummaryRows).mockReturnValue([]); + + const { getByTestId } = render( + + + + ); + + expect(getByTestId(PREVALENCE_DETAILS_TABLE_ERROR_TEST_ID)).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details.tsx index a653c500cf603..b5984d66a5f56 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details.tsx +++ b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details.tsx @@ -5,17 +5,166 @@ * 2.0. */ -import React from 'react'; -import { EuiText } from '@elastic/eui'; -import { PREVALENCE_DETAILS_TEST_ID } from './test_ids'; +import React, { useMemo } from 'react'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBasicTable, EuiEmptyPrompt } from '@elastic/eui'; +import { ERROR_MESSAGE, ERROR_TITLE } from '../../shared/translations'; +import { + PREVALENCE_ERROR_MESSAGE, + PREVALENCE_TABLE_ALERT_COUNT_COLUMN_TITLE, + PREVALENCE_TABLE_DOC_COUNT_COLUMN_TITLE, + PREVALENCE_TABLE_HOST_PREVALENCE_COLUMN_TITLE, + PREVALENCE_TABLE_NAME_COLUMN_TITLE, + PREVALENCE_TABLE_TYPE_COLUMN_TITLE, + PREVALENCE_TABLE_USER_PREVALENCE_COLUMN_TITLE, +} from './translations'; +import { + PREVALENCE_DETAILS_TABLE_ALERT_COUNT_CELL_TEST_ID, + PREVALENCE_DETAILS_TABLE_DOC_COUNT_CELL_TEST_ID, + PREVALENCE_DETAILS_TABLE_ERROR_TEST_ID, + PREVALENCE_DETAILS_TABLE_HOST_PREVALENCE_CELL_TEST_ID, + PREVALENCE_DETAILS_TABLE_NAME_CELL_TEST_ID, + PREVALENCE_DETAILS_TABLE_TEST_ID, + PREVALENCE_DETAILS_TABLE_TYPE_CELL_TEST_ID, + PREVALENCE_DETAILS_TABLE_USER_PREVALENCE_CELL_TEST_ID, +} from './test_ids'; +import { PrevalenceDetailsCountCell } from './prevalence_details_count_cell'; +import type { AlertSummaryRow } from '../../../common/components/event_details/helpers'; +import { PrevalenceDetailsPrevalenceCell } from './prevalence_details_prevalence_cell'; +import { getSummaryRows } from '../../../common/components/event_details/get_alert_summary_rows'; +import { useLeftPanelContext } from '../context'; +import { EventKind } from '../../shared/hooks/use_fetch_field_value_pair_by_event_type'; + +interface PrevalenceDetailsTableCell { + highlightedField: { name: string; values: string[] }; + scopeId: string; +} export const PREVALENCE_TAB_ID = 'prevalence-details'; +const columns: Array> = [ + { + field: 'type', + name: PREVALENCE_TABLE_TYPE_COLUMN_TITLE, + 'data-test-subj': PREVALENCE_DETAILS_TABLE_TYPE_CELL_TEST_ID, + }, + { + field: 'name', + name: PREVALENCE_TABLE_NAME_COLUMN_TITLE, + 'data-test-subj': PREVALENCE_DETAILS_TABLE_NAME_CELL_TEST_ID, + }, + { + field: 'alertCount', + name: PREVALENCE_TABLE_ALERT_COUNT_COLUMN_TITLE, + 'data-test-subj': PREVALENCE_DETAILS_TABLE_ALERT_COUNT_CELL_TEST_ID, + render: (data: PrevalenceDetailsTableCell) => ( + + ), + }, + { + field: 'docCount', + name: PREVALENCE_TABLE_DOC_COUNT_COLUMN_TITLE, + 'data-test-subj': PREVALENCE_DETAILS_TABLE_DOC_COUNT_CELL_TEST_ID, + render: (data: PrevalenceDetailsTableCell) => ( + + ), + }, + { + field: 'hostPrevalence', + name: PREVALENCE_TABLE_HOST_PREVALENCE_COLUMN_TITLE, + 'data-test-subj': PREVALENCE_DETAILS_TABLE_HOST_PREVALENCE_CELL_TEST_ID, + render: (data: PrevalenceDetailsTableCell) => ( + + ), + }, + { + field: 'userPrevalence', + name: PREVALENCE_TABLE_USER_PREVALENCE_COLUMN_TITLE, + 'data-test-subj': PREVALENCE_DETAILS_TABLE_USER_PREVALENCE_CELL_TEST_ID, + render: (data: PrevalenceDetailsTableCell) => ( + + ), + }, +]; + /** - * Prevalence displayed in the document details expandable flyout left section under the Insights tab + * Prevalence table displayed in the document details expandable flyout left section under the Insights tab */ export const PrevalenceDetails: React.FC = () => { - return {'Prevalence'}; + const { browserFields, dataFormattedForFieldBrowser, eventId, scopeId } = useLeftPanelContext(); + + const data = useMemo(() => { + const summaryRows = getSummaryRows({ + browserFields: browserFields || {}, + data: dataFormattedForFieldBrowser || [], + eventId, + scopeId, + isReadOnly: false, + }); + + const getCellRenderFields = (summaryRow: AlertSummaryRow): PrevalenceDetailsTableCell => ({ + highlightedField: { + name: summaryRow.description.data.field, + values: summaryRow.description.values || [], + }, + scopeId, + }); + + return (summaryRows || []).map((summaryRow) => { + const fields = getCellRenderFields(summaryRow); + return { + type: summaryRow.description.data.field, + name: summaryRow.description.values, + alertCount: fields, + docCount: fields, + hostPrevalence: fields, + userPrevalence: fields, + }; + }); + }, [browserFields, dataFormattedForFieldBrowser, eventId, scopeId]); + + if (!eventId || !dataFormattedForFieldBrowser || !browserFields || !data || data.length === 0) { + return ( + {ERROR_TITLE(PREVALENCE_ERROR_MESSAGE)}} + body={

{ERROR_MESSAGE(PREVALENCE_ERROR_MESSAGE)}

} + data-test-subj={PREVALENCE_DETAILS_TABLE_ERROR_TEST_ID} + /> + ); + } + + return ( + + ); }; PrevalenceDetails.displayName = 'PrevalenceDetails'; diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_count_cell.test.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_count_cell.test.tsx new file mode 100644 index 0000000000000..31f56ada7b5f2 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_count_cell.test.tsx @@ -0,0 +1,107 @@ +/* + * 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 { render } from '@testing-library/react'; +import React from 'react'; +import { + EventKind, + useFetchFieldValuePairByEventType, +} from '../../shared/hooks/use_fetch_field_value_pair_by_event_type'; +import { + PREVALENCE_DETAILS_COUNT_CELL_ERROR_TEST_ID, + PREVALENCE_DETAILS_COUNT_CELL_LOADING_TEST_ID, + PREVALENCE_DETAILS_COUNT_CELL_VALUE_TEST_ID, +} from './test_ids'; +import { PrevalenceDetailsCountCell } from './prevalence_details_count_cell'; + +jest.mock('../../shared/hooks/use_fetch_field_value_pair_by_event_type'); + +const highlightedField = { + name: 'field', + values: ['values'], +}; +const scopeId = 'scopeId'; +const type = { + eventKind: EventKind.signal, + include: true, +}; + +describe('PrevalenceDetailsAlertCountCell', () => { + it('should show loading spinner', () => { + jest.mocked(useFetchFieldValuePairByEventType).mockReturnValue({ + loading: true, + error: false, + count: 0, + }); + + const { getByTestId } = render( + + ); + + expect(getByTestId(PREVALENCE_DETAILS_COUNT_CELL_LOADING_TEST_ID)).toBeInTheDocument(); + }); + + it('should return error icon', () => { + jest.mocked(useFetchFieldValuePairByEventType).mockReturnValue({ + loading: false, + error: true, + count: 0, + }); + + const { getByTestId } = render( + + ); + + expect(getByTestId(PREVALENCE_DETAILS_COUNT_CELL_ERROR_TEST_ID)).toBeInTheDocument(); + }); + + it('should show count value with eventKind undefined', () => { + jest.mocked(useFetchFieldValuePairByEventType).mockReturnValue({ + loading: false, + error: false, + count: 1, + }); + + const { getByTestId } = render( + + ); + + expect(getByTestId(PREVALENCE_DETAILS_COUNT_CELL_VALUE_TEST_ID)).toBeInTheDocument(); + expect(getByTestId(PREVALENCE_DETAILS_COUNT_CELL_VALUE_TEST_ID)).toHaveTextContent('1'); + }); + + it('should show count value with eventKind passed via props', () => { + jest.mocked(useFetchFieldValuePairByEventType).mockReturnValue({ + loading: false, + error: false, + count: 1, + }); + + const { getByTestId } = render( + + ); + + expect(getByTestId(PREVALENCE_DETAILS_COUNT_CELL_VALUE_TEST_ID)).toBeInTheDocument(); + expect(getByTestId(PREVALENCE_DETAILS_COUNT_CELL_VALUE_TEST_ID)).toHaveTextContent('1'); + }); +}); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_count_cell.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_count_cell.tsx new file mode 100644 index 0000000000000..72c110de353c6 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_count_cell.tsx @@ -0,0 +1,70 @@ +/* + * 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 type { VFC } from 'react'; +import React from 'react'; +import { EuiIcon, EuiLoadingSpinner } from '@elastic/eui'; +import { + PREVALENCE_DETAILS_COUNT_CELL_ERROR_TEST_ID, + PREVALENCE_DETAILS_COUNT_CELL_LOADING_TEST_ID, + PREVALENCE_DETAILS_COUNT_CELL_VALUE_TEST_ID, +} from './test_ids'; +import type { EventType } from '../../shared/hooks/use_fetch_field_value_pair_by_event_type'; +import { useFetchFieldValuePairByEventType } from '../../shared/hooks/use_fetch_field_value_pair_by_event_type'; +import { TimelineId } from '../../../../common/types'; + +export interface PrevalenceDetailsCountCellProps { + /** + * The highlighted field name and values + * */ + highlightedField: { name: string; values: string[] }; + /** + * The scope id + */ + scopeId: string; + /** + * Limit the search to include or exclude a specific value for the event.kind field + * (alert, asset, enrichment, event, metric, state, pipeline_error, signal) + */ + type: EventType; +} + +/** + * Component displaying a value in many PrevalenceDetails table cells. It is used for the third and fourth columns, + * which display the number of alerts and documents for a given field/value pair. + * For the doc columns, type should "signal" for its eventKind property, and exclude set to true. + * For the alert columns, type should have "signal" for its eventKind property, and include should be true. + */ +export const PrevalenceDetailsCountCell: VFC = ({ + highlightedField, + scopeId, + type, +}) => { + const { loading, error, count } = useFetchFieldValuePairByEventType({ + highlightedField, + isActiveTimelines: scopeId === TimelineId.active, + type, + }); + + if (loading) { + return ; + } + + if (error) { + return ( + + ); + } + + return
{count}
; +}; + +PrevalenceDetailsCountCell.displayName = 'PrevalenceDetailsCountCell'; diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_prevalence_cell.test.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_prevalence_cell.test.tsx new file mode 100644 index 0000000000000..3837162672bfb --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_prevalence_cell.test.tsx @@ -0,0 +1,168 @@ +/* + * 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 { render } from '@testing-library/react'; +import React from 'react'; +import { + PREVALENCE_DETAILS_PREVALENCE_CELL_ERROR_TEST_ID, + PREVALENCE_DETAILS_PREVALENCE_CELL_LOADING_TEST_ID, + PREVALENCE_DETAILS_PREVALENCE_CELL_VALUE_TEST_ID, +} from './test_ids'; +import { PrevalenceDetailsPrevalenceCell } from './prevalence_details_prevalence_cell'; +import { useFetchFieldValuePairWithAggregation } from '../../shared/hooks/use_fetch_field_value_pair_with_aggregation'; +import { useFetchUniqueByField } from '../../shared/hooks/use_fetch_unique_by_field'; + +jest.mock('../../shared/hooks/use_fetch_field_value_pair_with_aggregation'); +jest.mock('../../shared/hooks/use_fetch_unique_by_field'); + +const highlightedField = { + name: 'field', + values: ['values'], +}; +const scopeId = 'scopeId'; +const aggregationField = 'aggregationField'; + +describe('PrevalenceDetailsAlertCountCell', () => { + it('should show loading spinner when useFetchFieldValuePairWithAggregation loading', () => { + jest.mocked(useFetchFieldValuePairWithAggregation).mockReturnValue({ + loading: true, + error: false, + count: 0, + }); + jest.mocked(useFetchUniqueByField).mockReturnValue({ + loading: false, + error: false, + count: 0, + }); + + const { getByTestId } = render( + + ); + + expect(getByTestId(PREVALENCE_DETAILS_PREVALENCE_CELL_LOADING_TEST_ID)).toBeInTheDocument(); + }); + + it('should show loading spinner when useFetchUniqueByField loading', () => { + jest.mocked(useFetchFieldValuePairWithAggregation).mockReturnValue({ + loading: false, + error: false, + count: 0, + }); + jest.mocked(useFetchUniqueByField).mockReturnValue({ + loading: true, + error: false, + count: 0, + }); + + const { getByTestId } = render( + + ); + + expect(getByTestId(PREVALENCE_DETAILS_PREVALENCE_CELL_LOADING_TEST_ID)).toBeInTheDocument(); + }); + + it('should return null if useFetchFieldValuePairWithAggregation errors out', () => { + jest.mocked(useFetchFieldValuePairWithAggregation).mockReturnValue({ + loading: false, + error: true, + count: 0, + }); + jest.mocked(useFetchUniqueByField).mockReturnValue({ + loading: false, + error: false, + count: 0, + }); + + const { getByTestId } = render( + + ); + + expect(getByTestId(PREVALENCE_DETAILS_PREVALENCE_CELL_ERROR_TEST_ID)).toBeInTheDocument(); + }); + + it('should return null if useFetchUniqueByField errors out', () => { + jest.mocked(useFetchFieldValuePairWithAggregation).mockReturnValue({ + loading: false, + error: false, + count: 0, + }); + jest.mocked(useFetchUniqueByField).mockReturnValue({ + loading: false, + error: true, + count: 0, + }); + + const { getByTestId } = render( + + ); + + expect(getByTestId(PREVALENCE_DETAILS_PREVALENCE_CELL_ERROR_TEST_ID)).toBeInTheDocument(); + }); + + it('should return null if prevalence is infinite', () => { + jest.mocked(useFetchFieldValuePairWithAggregation).mockReturnValue({ + loading: false, + error: false, + count: 0, + }); + jest.mocked(useFetchUniqueByField).mockReturnValue({ + loading: false, + error: false, + count: 0, + }); + + const { getByTestId } = render( + + ); + + expect(getByTestId(PREVALENCE_DETAILS_PREVALENCE_CELL_ERROR_TEST_ID)).toBeInTheDocument(); + }); + + it('should show prevalence value', () => { + jest.mocked(useFetchFieldValuePairWithAggregation).mockReturnValue({ + loading: false, + error: false, + count: 1, + }); + jest.mocked(useFetchUniqueByField).mockReturnValue({ + loading: false, + error: false, + count: 1, + }); + + const { getByTestId } = render( + + ); + + expect(getByTestId(PREVALENCE_DETAILS_PREVALENCE_CELL_VALUE_TEST_ID)).toBeInTheDocument(); + expect(getByTestId(PREVALENCE_DETAILS_PREVALENCE_CELL_VALUE_TEST_ID)).toHaveTextContent('1'); + }); +}); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_prevalence_cell.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_prevalence_cell.tsx new file mode 100644 index 0000000000000..ad8fa2e49289c --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_prevalence_cell.tsx @@ -0,0 +1,85 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { VFC } from 'react'; +import React from 'react'; +import { EuiIcon, EuiLoadingSpinner } from '@elastic/eui'; +import { + PREVALENCE_DETAILS_PREVALENCE_CELL_ERROR_TEST_ID, + PREVALENCE_DETAILS_PREVALENCE_CELL_LOADING_TEST_ID, + PREVALENCE_DETAILS_PREVALENCE_CELL_VALUE_TEST_ID, +} from './test_ids'; +import { useFetchFieldValuePairWithAggregation } from '../../shared/hooks/use_fetch_field_value_pair_with_aggregation'; +import { TimelineId } from '../../../../common/types'; +import { useFetchUniqueByField } from '../../shared/hooks/use_fetch_unique_by_field'; + +export interface PrevalenceDetailsPrevalenceCellProps { + /** + * The highlighted field name and values + * */ + highlightedField: { name: string; values: string[] }; + /** + * The scope id + */ + scopeId: string; + /** + * The aggregation field + */ + aggregationField: string; +} + +/** + * Component displaying a value in many PrevalenceDetails table cells. It is used for the fifth and sixth columns, + * which displays the prevalence percentage for host.name and user.name fields. + */ +export const PrevalenceDetailsPrevalenceCell: VFC = ({ + highlightedField, + scopeId, + aggregationField, +}) => { + const { + loading: aggregationLoading, + error: aggregationError, + count: aggregationCount, + } = useFetchFieldValuePairWithAggregation({ + highlightedField, + isActiveTimelines: scopeId === TimelineId.active, + aggregationField, + }); + + const { + loading: uniqueLoading, + error: uniqueError, + count: uniqueCount, + } = useFetchUniqueByField({ field: aggregationField }); + + if (aggregationLoading || uniqueLoading) { + return ( + + ); + } + + const prevalence = aggregationCount / uniqueCount; + if (aggregationError || uniqueError || !isFinite(prevalence)) { + return ( + + ); + } + + return ( +
+ {Math.round(prevalence * 100)} + {'%'} +
+ ); +}; + +PrevalenceDetailsPrevalenceCell.displayName = 'PrevalenceDetailsPrevalenceCell'; diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/response_details.test.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/response_details.test.tsx index a46aee8c9f84b..435df5fb3dcd1 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/response_details.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/left/components/response_details.test.tsx @@ -8,8 +8,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import '@testing-library/jest-dom'; -import type { LeftPanelContext } from '../context'; -import { LeftFlyoutContext } from '../context'; +import { LeftPanelContext } from '../context'; import { rawEventData, TestProviders } from '../../../common/mock'; import { RESPONSE_DETAILS_TEST_ID, RESPONSE_EMPTY_TEST_ID } from './test_ids'; import { ResponseDetails } from './response_details'; @@ -56,12 +55,12 @@ const defaultContextValue = { dataAsNestedObject: { _id: 'test', }, - data: rawEventData, + searchHit: rawEventData, } as unknown as LeftPanelContext; const contextWithResponseActions = { ...defaultContextValue, - data: { + searchHit: { ...rawEventData, fields: { ...rawEventData.fields, @@ -80,9 +79,9 @@ const contextWithResponseActions = { const renderSUT = (contextValue: LeftPanelContext) => render( - + - + ); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/response_details.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/response_details.tsx index 7050bc860ee31..0fed098e0d1ee 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/response_details.tsx +++ b/x-pack/plugins/security_solution/public/flyout/left/components/response_details.tsx @@ -36,23 +36,23 @@ const InlineBlock = styled.div` * Automated response actions results, displayed in the document details expandable flyout left section under the Insights tab, Response tab */ export const ResponseDetails: React.FC = () => { - const { data, dataAsNestedObject } = useLeftPanelContext(); + const { searchHit, dataAsNestedObject } = useLeftPanelContext(); const endpointResponseActionsEnabled = useIsExperimentalFeatureEnabled( 'endpointResponseActionsEnabled' ); - const expandedEventFieldsObject = data - ? (expandDottedObject((data as RawEventData).fields) as ExpandedEventFieldsObject) + const expandedEventFieldsObject = searchHit + ? (expandDottedObject((searchHit as RawEventData).fields) as ExpandedEventFieldsObject) : undefined; const responseActions = expandedEventFieldsObject?.kibana?.alert?.rule?.parameters?.[0].response_actions; const responseActionsView = useResponseActionsView({ - rawEventData: data, + rawEventData: searchHit, ecsData: dataAsNestedObject, }); const osqueryView = useOsqueryTab({ - rawEventData: data, + rawEventData: searchHit, ecsData: dataAsNestedObject, }); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/session_view.stories.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/session_view.stories.tsx deleted file mode 100644 index 40b9b7e7a5b18..0000000000000 --- a/x-pack/plugins/security_solution/public/flyout/left/components/session_view.stories.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import type { Story } from '@storybook/react'; -import { SessionView } from './session_view'; -import type { LeftPanelContext } from '../context'; -import { LeftFlyoutContext } from '../context'; - -export default { - component: SessionView, - title: 'Flyout/SessionView', -}; - -// TODO to get this working, we need to spent some time getting all the foundation items for storybook -// (ReduxStoreProvider, CellActionsProvider...) similarly to how it was done for the TestProvidersComponent -// see ticket https://github.com/elastic/security-team/issues/6223 -// export const Default: Story = () => { -// const contextValue = { -// getFieldsData: () => {}, -// } as unknown as LeftPanelContext; -// -// return ( -// -// -// -// ); -// }; - -export const Error: Story = () => { - const contextValue = { - getFieldsData: () => {}, - } as unknown as LeftPanelContext; - - return ( - - - - ); -}; diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/session_view.test.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/session_view.test.tsx index fbdef60088857..16c15e971f7a7 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/session_view.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/left/components/session_view.test.tsx @@ -8,8 +8,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import '@testing-library/jest-dom'; -import type { LeftPanelContext } from '../context'; -import { LeftFlyoutContext } from '../context'; +import { LeftPanelContext } from '../context'; import { TestProviders } from '../../../common/mock'; import { SESSION_VIEW_ERROR_TEST_ID, SESSION_VIEW_TEST_ID } from './test_ids'; import { @@ -56,9 +55,9 @@ describe('', () => { const wrapper = render( - + - + ); expect(wrapper.getByTestId(SESSION_VIEW_TEST_ID)).toBeInTheDocument(); @@ -72,9 +71,9 @@ describe('', () => { const wrapper = render( - + - + ); expect(wrapper.getByTestId(SESSION_VIEW_TEST_ID)).toBeInTheDocument(); @@ -87,9 +86,9 @@ describe('', () => { const wrapper = render( - + - + ); expect(wrapper.getByTestId(SESSION_VIEW_ERROR_TEST_ID)).toBeInTheDocument(); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/test_ids.ts b/x-pack/plugins/security_solution/public/flyout/left/components/test_ids.ts index 830483cd5ef01..45afe7e95a4cc 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/test_ids.ts +++ b/x-pack/plugins/security_solution/public/flyout/left/components/test_ids.ts @@ -15,6 +15,35 @@ export const SESSION_VIEW_ERROR_TEST_ID = `${PREFIX}SessionViewError` as const; /* Insights tab */ +/* Prevalence */ + +export const PREVALENCE_DETAILS_TABLE_TEST_ID = `${PREFIX}PrevalenceDetailsTable` as const; +export const PREVALENCE_DETAILS_TABLE_TYPE_CELL_TEST_ID = + `${PREFIX}PrevalenceDetailsTableTypeCell` as const; +export const PREVALENCE_DETAILS_TABLE_NAME_CELL_TEST_ID = + `${PREFIX}PrevalenceDetailsTableNameCell` as const; +export const PREVALENCE_DETAILS_TABLE_ALERT_COUNT_CELL_TEST_ID = + `${PREFIX}PrevalenceDetailsTableAlertCountCell` as const; +export const PREVALENCE_DETAILS_TABLE_DOC_COUNT_CELL_TEST_ID = + `${PREFIX}PrevalenceDetailsTableDocCountCell` as const; +export const PREVALENCE_DETAILS_TABLE_HOST_PREVALENCE_CELL_TEST_ID = + `${PREFIX}PrevalenceDetailsTableHostPrevalenceCell` as const; +export const PREVALENCE_DETAILS_TABLE_USER_PREVALENCE_CELL_TEST_ID = + `${PREFIX}PrevalenceDetailsTableUserPrevalenceCell` as const; +export const PREVALENCE_DETAILS_TABLE_ERROR_TEST_ID = `${PREFIX}PrevalenceDetailsTable` as const; +export const PREVALENCE_DETAILS_COUNT_CELL_LOADING_TEST_ID = + `${PREFIX}PrevalenceDetailsCountCellLoading` as const; +export const PREVALENCE_DETAILS_COUNT_CELL_ERROR_TEST_ID = + `${PREFIX}PrevalenceDetailsCountCellError` as const; +export const PREVALENCE_DETAILS_COUNT_CELL_VALUE_TEST_ID = + `${PREFIX}PrevalenceDetailsCountCellValue` as const; +export const PREVALENCE_DETAILS_PREVALENCE_CELL_LOADING_TEST_ID = + `${PREFIX}PrevalenceDetailsPrevalenceCellLoading` as const; +export const PREVALENCE_DETAILS_PREVALENCE_CELL_ERROR_TEST_ID = + `${PREFIX}PrevalenceDetailsPrevalenceCellError` as const; +export const PREVALENCE_DETAILS_PREVALENCE_CELL_VALUE_TEST_ID = + `${PREFIX}PrevalenceDetailsPrevalenceCellValue` as const; + /* Entities */ export const ENTITIES_DETAILS_TEST_ID = `${PREFIX}EntitiesDetails` as const; export const USER_DETAILS_TEST_ID = `${PREFIX}UsersDetails` as const; @@ -26,6 +55,7 @@ export const HOST_DETAILS_INFO_TEST_ID = 'host-overview'; export const HOST_DETAILS_RELATED_USERS_TABLE_TEST_ID = `${PREFIX}HostsDetailsRelatedUsersTable` as const; +export const THREAT_INTELLIGENCE_DETAILS_TEST_ID = `${PREFIX}ThreatIntelligenceDetails` as const; export const PREVALENCE_DETAILS_TEST_ID = `${PREFIX}PrevalenceDetails` as const; export const CORRELATIONS_DETAILS_TEST_ID = `${PREFIX}CorrelationsDetails` as const; diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/threat_intelligence_details.test.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/threat_intelligence_details.test.tsx index 4ba0a4bec98a2..2edb092b22833 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/threat_intelligence_details.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/left/components/threat_intelligence_details.test.tsx @@ -8,15 +8,14 @@ import React from 'react'; import { render } from '@testing-library/react'; import '@testing-library/jest-dom'; -import type { LeftPanelContext } from '../context'; -import { LeftFlyoutContext } from '../context'; +import { LeftPanelContext } from '../context'; import { TestProviders } from '../../../common/mock'; import { THREAT_INTELLIGENCE_DETAILS_ENRICHMENTS_TEST_ID, THREAT_INTELLIGENCE_DETAILS_SPINNER_TEST_ID, } from './test_ids'; import { ThreatIntelligenceDetails } from './threat_intelligence_details'; -import { useThreatIntelligenceDetails } from './hooks/use_threat_intelligence_details'; +import { useThreatIntelligenceDetails } from '../hooks/use_threat_intelligence_details'; jest.mock('../../../common/lib/kibana', () => { const originalModule = jest.requireActual('../../../common/lib/kibana'); @@ -32,7 +31,7 @@ jest.mock('../../../common/lib/kibana', () => { }; }); -jest.mock('./hooks/use_threat_intelligence_details'); +jest.mock('../hooks/use_threat_intelligence_details'); const defaultContextValue = { getFieldsData: () => 'id', @@ -42,9 +41,9 @@ const defaultContextValue = { const renderSUT = (contextValue: LeftPanelContext) => render( - + - + ); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/threat_intelligence_details.tsx b/x-pack/plugins/security_solution/public/flyout/left/components/threat_intelligence_details.tsx index 2078854a97a29..fff9a607f3501 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/threat_intelligence_details.tsx +++ b/x-pack/plugins/security_solution/public/flyout/left/components/threat_intelligence_details.tsx @@ -10,7 +10,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiSpacer } from '@elasti import isEmpty from 'lodash/isEmpty'; import { EnrichmentRangePicker } from '../../../common/components/event_details/cti_details/enrichment_range_picker'; import { ThreatDetailsView } from '../../../common/components/event_details/cti_details/threat_details_view'; -import { useThreatIntelligenceDetails } from './hooks/use_threat_intelligence_details'; +import { useThreatIntelligenceDetails } from '../hooks/use_threat_intelligence_details'; import { THREAT_INTELLIGENCE_DETAILS_SPINNER_TEST_ID } from './test_ids'; export const THREAT_INTELLIGENCE_TAB_ID = 'threat-intelligence-details'; diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/translations.ts b/x-pack/plugins/security_solution/public/flyout/left/components/translations.ts index 30a8e4050587a..c2a22ced6d813 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/translations.ts +++ b/x-pack/plugins/security_solution/public/flyout/left/components/translations.ts @@ -85,6 +85,55 @@ export const RELATED_USERS_TOOL_TIP = i18n.translate( } ); +export const PREVALENCE_ERROR_MESSAGE = i18n.translate( + 'xpack.securitySolution.flyout.prevalenceErrorMessage', + { + defaultMessage: 'prevalence', + } +); + +export const PREVALENCE_TABLE_TYPE_COLUMN_TITLE = i18n.translate( + 'xpack.securitySolution.flyout.prevalenceTableTypeColumnTitle', + { + defaultMessage: 'Type', + } +); + +export const PREVALENCE_TABLE_NAME_COLUMN_TITLE = i18n.translate( + 'xpack.securitySolution.flyout.prevalenceTableNameColumnTitle', + { + defaultMessage: 'Name', + } +); + +export const PREVALENCE_TABLE_ALERT_COUNT_COLUMN_TITLE = i18n.translate( + 'xpack.securitySolution.flyout.prevalenceTableAlertCountColumnTitle', + { + defaultMessage: 'Alert count', + } +); + +export const PREVALENCE_TABLE_DOC_COUNT_COLUMN_TITLE = i18n.translate( + 'xpack.securitySolution.flyout.prevalenceTableDocCountColumnTitle', + { + defaultMessage: 'Doc count', + } +); + +export const PREVALENCE_TABLE_HOST_PREVALENCE_COLUMN_TITLE = i18n.translate( + 'xpack.securitySolution.flyout.prevalenceTableHostPrevalenceColumnTitle', + { + defaultMessage: 'Host prevalence', + } +); + +export const PREVALENCE_TABLE_USER_PREVALENCE_COLUMN_TITLE = i18n.translate( + 'xpack.securitySolution.flyout.prevalenceTableUserPrevalenceColumnTitle', + { + defaultMessage: 'User prevalence', + } +); + export const RESPONSE_TITLE = i18n.translate('xpack.securitySolution.flyout.response.title', { defaultMessage: 'Responses', }); diff --git a/x-pack/plugins/security_solution/public/flyout/left/context.tsx b/x-pack/plugins/security_solution/public/flyout/left/context.tsx index 9585db40b39e7..b552a830fc265 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/context.tsx +++ b/x-pack/plugins/security_solution/public/flyout/left/context.tsx @@ -5,13 +5,14 @@ * 2.0. */ -import React, { createContext, useContext, useMemo } from 'react'; +import type { BrowserFields, TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; import { css } from '@emotion/react'; -import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; +import React, { createContext, useContext, useMemo } from 'react'; import { EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; -import type { Ecs } from '@kbn/cases-plugin/common'; +import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; import type { SearchHit } from '../../../common/search_strategy'; import type { LeftPanelProps } from '.'; +import type { GetFieldsData } from '../../common/hooks/use_get_fields_data'; import { useGetFieldsData } from '../../common/hooks/use_get_fields_data'; import { useTimelineEventsDetails } from '../../timelines/containers/details'; import { getAlertIndexAlias } from '../../timelines/components/side_panel/event_details/helpers'; @@ -31,20 +32,32 @@ export interface LeftPanelContext { */ indexName: string; /** - * Retrieves searchHit values for the provided field + * Maintain backwards compatibility // TODO remove when possible + */ + scopeId: string; + /** + * An object containing fields by type */ - getFieldsData: (field: string) => unknown | unknown[]; + browserFields: BrowserFields | null; + /** + * An object with top level fields from the ECS object + */ + dataAsNestedObject: Ecs | null; /** * An array of field objects with category and value */ dataFormattedForFieldBrowser: TimelineEventsDetailsItem[] | null; - - data: SearchHit | undefined; - - dataAsNestedObject: Ecs | null; + /** + * The actual raw document object + */ + searchHit: SearchHit | undefined; + /** + * Retrieves searchHit values for the provided field + */ + getFieldsData: GetFieldsData; } -export const LeftFlyoutContext = createContext(undefined); +export const LeftPanelContext = createContext(undefined); export type LeftPanelProviderProps = { /** @@ -53,7 +66,7 @@ export type LeftPanelProviderProps = { children: React.ReactNode; } & Partial; -export const LeftPanelProvider = ({ id, indexName, children }: LeftPanelProviderProps) => { +export const LeftPanelProvider = ({ id, indexName, scopeId, children }: LeftPanelProviderProps) => { const currentSpaceId = useSpaceId(); const eventIndex = indexName ? getAlertIndexAlias(indexName, currentSpaceId) ?? indexName : ''; const [{ pageName }] = useRouteSpy(); @@ -73,17 +86,28 @@ export const LeftPanelProvider = ({ id, indexName, children }: LeftPanelProvider const contextValue = useMemo( () => - id && indexName + id && indexName && scopeId ? { eventId: id, indexName, - getFieldsData, - data: searchHit, - dataFormattedForFieldBrowser, + scopeId, + browserFields: sourcererDataView.browserFields, dataAsNestedObject, + dataFormattedForFieldBrowser, + searchHit, + getFieldsData, } : undefined, - [id, indexName, getFieldsData, searchHit, dataFormattedForFieldBrowser, dataAsNestedObject] + [ + id, + indexName, + scopeId, + sourcererDataView.browserFields, + dataFormattedForFieldBrowser, + getFieldsData, + dataAsNestedObject, + searchHit, + ] ); if (loading) { @@ -99,11 +123,11 @@ export const LeftPanelProvider = ({ id, indexName, children }: LeftPanelProvider ); } - return {children}; + return {children}; }; export const useLeftPanelContext = () => { - const contextValue = useContext(LeftFlyoutContext); + const contextValue = useContext(LeftPanelContext); if (!contextValue) { throw new Error('LeftPanelContext can only be used within LeftPanelContext provider'); diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.test.ts b/x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.test.ts similarity index 70% rename from x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.test.ts rename to x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.test.ts index eb658e802ec6d..1a6387d4eb3f2 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.test.ts +++ b/x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.test.ts @@ -8,24 +8,24 @@ import { useThreatIntelligenceDetails } from './use_threat_intelligence_details'; import { renderHook } from '@testing-library/react-hooks'; -import { useTimelineEventsDetails } from '../../../../timelines/containers/details'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; -import { useRouteSpy } from '../../../../common/utils/route/use_route_spy'; -import { useLeftPanelContext } from '../../context'; -import { useInvestigationTimeEnrichment } from '../../../../common/containers/cti/event_enrichment'; -import { SecurityPageName } from '../../../../../common/constants'; -import type { RouteSpyState } from '../../../../common/utils/route/types'; +import { useTimelineEventsDetails } from '../../../timelines/containers/details'; +import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useRouteSpy } from '../../../common/utils/route/use_route_spy'; +import { useLeftPanelContext } from '../context'; +import { useInvestigationTimeEnrichment } from '../../../common/containers/cti/event_enrichment'; +import { SecurityPageName } from '../../../../common/constants'; +import type { RouteSpyState } from '../../../common/utils/route/types'; import { type GetBasicDataFromDetailsData, useBasicDataFromDetailsData, -} from '../../../../timelines/components/side_panel/event_details/helpers'; +} from '../../../timelines/components/side_panel/event_details/helpers'; -jest.mock('../../../../timelines/containers/details'); -jest.mock('../../../../common/containers/sourcerer'); -jest.mock('../../../../common/utils/route/use_route_spy'); -jest.mock('../../context'); -jest.mock('../../../../common/containers/cti/event_enrichment'); -jest.mock('../../../../timelines/components/side_panel/event_details/helpers'); +jest.mock('../../../timelines/containers/details'); +jest.mock('../../../common/containers/sourcerer'); +jest.mock('../../../common/utils/route/use_route_spy'); +jest.mock('../context'); +jest.mock('../../../common/containers/cti/event_enrichment'); +jest.mock('../../../timelines/components/side_panel/event_details/helpers'); describe('useThreatIntelligenceDetails', () => { beforeEach(() => { @@ -66,9 +66,11 @@ describe('useThreatIntelligenceDetails', () => { jest.mocked(useLeftPanelContext).mockReturnValue({ indexName: 'test-index', eventId: 'test-event-id', - getFieldsData: () => {}, + getFieldsData: () => null, dataFormattedForFieldBrowser: null, - data: { + scopeId: 'test-scope-id', + browserFields: null, + searchHit: { _id: 'testId', _index: 'testIndex', }, diff --git a/x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.ts b/x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.ts similarity index 76% rename from x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.ts rename to x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.ts index f23de5df923c2..0cdc66a95a99f 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.ts +++ b/x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.ts @@ -6,22 +6,22 @@ */ import { useMemo } from 'react'; -import type { CtiEnrichment, EventFields } from '../../../../../common/search_strategy'; -import { useBasicDataFromDetailsData } from '../../../../timelines/components/side_panel/event_details/helpers'; +import type { CtiEnrichment, EventFields } from '../../../../common/search_strategy'; +import { useBasicDataFromDetailsData } from '../../../timelines/components/side_panel/event_details/helpers'; import { filterDuplicateEnrichments, getEnrichmentFields, parseExistingEnrichments, timelineDataToEnrichment, -} from '../../../../common/components/event_details/cti_details/helpers'; -import { SecurityPageName } from '../../../../../common/constants'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +} from '../../../common/components/event_details/cti_details/helpers'; +import { SecurityPageName } from '../../../../common/constants'; +import { SourcererScopeName } from '../../../common/store/sourcerer/model'; -import { useInvestigationTimeEnrichment } from '../../../../common/containers/cti/event_enrichment'; -import { useTimelineEventsDetails } from '../../../../timelines/containers/details'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; -import { useRouteSpy } from '../../../../common/utils/route/use_route_spy'; -import { useLeftPanelContext } from '../../context'; +import { useInvestigationTimeEnrichment } from '../../../common/containers/cti/event_enrichment'; +import { useTimelineEventsDetails } from '../../../timelines/containers/details'; +import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useRouteSpy } from '../../../common/utils/route/use_route_spy'; +import { useLeftPanelContext } from '../context'; export interface ThreatIntelligenceDetailsValue { enrichments: CtiEnrichment[]; diff --git a/x-pack/plugins/security_solution/public/flyout/left/index.tsx b/x-pack/plugins/security_solution/public/flyout/left/index.tsx index a104805ed49ca..c92483a0c20aa 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/left/index.tsx @@ -29,12 +29,13 @@ export interface LeftPanelProps extends FlyoutPanel { params?: { id: string; indexName: string; + scopeId: string; }; } export const LeftPanel: FC> = memo(({ path }) => { const { openLeftPanel } = useExpandableFlyoutContext(); - const { eventId, indexName } = useLeftPanelContext(); + const { eventId, indexName, scopeId } = useLeftPanelContext(); const selectedTabId = useMemo(() => { const defaultTab = tabs[0].id; @@ -49,6 +50,7 @@ export const LeftPanel: FC> = memo(({ path }) => { params: { id: eventId, indexName, + scopeId, }, }); }; diff --git a/x-pack/plugins/security_solution/public/flyout/left/mocks/mock_context.ts b/x-pack/plugins/security_solution/public/flyout/left/mocks/mock_context.ts index 975bf30f55755..99bfc24bab50b 100644 --- a/x-pack/plugins/security_solution/public/flyout/left/mocks/mock_context.ts +++ b/x-pack/plugins/security_solution/public/flyout/left/mocks/mock_context.ts @@ -36,9 +36,11 @@ export const mockGetFieldsData = (field: string): string[] => { export const mockContextValue: LeftPanelContext = { eventId: 'eventId', indexName: 'index', - getFieldsData: mockGetFieldsData, + scopeId: 'scopeId', + browserFields: null, dataFormattedForFieldBrowser: null, - data: { + getFieldsData: mockGetFieldsData, + searchHit: { _id: 'testId', _index: 'testIndex', }, diff --git a/x-pack/plugins/security_solution/public/flyout/right/components/correlations_overview.test.tsx b/x-pack/plugins/security_solution/public/flyout/right/components/correlations_overview.test.tsx index 552688dfee2c9..dbd515d59c134 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/components/correlations_overview.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/right/components/correlations_overview.test.tsx @@ -143,6 +143,7 @@ describe('', () => { params: { id: panelContextValue.eventId, indexName: panelContextValue.indexName, + scopeId: panelContextValue.scopeId, }, }); }); diff --git a/x-pack/plugins/security_solution/public/flyout/right/components/correlations_overview.tsx b/x-pack/plugins/security_solution/public/flyout/right/components/correlations_overview.tsx index 0dadc305e6867..fd493d06fe1c0 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/components/correlations_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/right/components/correlations_overview.tsx @@ -33,9 +33,10 @@ export const CorrelationsOverview: React.FC = () => { params: { id: eventId, indexName, + scopeId, }, }); - }, [eventId, openLeftPanel, indexName]); + }, [eventId, openLeftPanel, indexName, scopeId]); const { loading, error, data } = useCorrelations({ eventId, diff --git a/x-pack/plugins/security_solution/public/flyout/right/components/expand_detail_button.test.tsx b/x-pack/plugins/security_solution/public/flyout/right/components/expand_detail_button.test.tsx index d8aef30aa4067..b1d893b19a153 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/components/expand_detail_button.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/right/components/expand_detail_button.test.tsx @@ -22,6 +22,7 @@ describe('', () => { const panelContextValue = { eventId: 'eventId', indexName: 'indexName', + scopeId: 'scopeId', } as unknown as RightPanelContext; const { getByTestId } = render( @@ -40,6 +41,7 @@ describe('', () => { params: { id: panelContextValue.eventId, indexName: panelContextValue.indexName, + scopeId: panelContextValue.scopeId, }, }); }); diff --git a/x-pack/plugins/security_solution/public/flyout/right/components/expand_detail_button.tsx b/x-pack/plugins/security_solution/public/flyout/right/components/expand_detail_button.tsx index 63cbbce03fec3..4e02f423d1720 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/components/expand_detail_button.tsx +++ b/x-pack/plugins/security_solution/public/flyout/right/components/expand_detail_button.tsx @@ -7,7 +7,7 @@ import { EuiButtonEmpty } from '@elastic/eui'; import type { FC } from 'react'; -import React, { memo } from 'react'; +import React, { memo, useCallback } from 'react'; import { useExpandableFlyoutContext } from '@kbn/expandable-flyout'; import { COLLAPSE_DETAILS_BUTTON_TEST_ID, EXPAND_DETAILS_BUTTON_TEST_ID } from './test_ids'; import { LeftPanelKey } from '../../left'; @@ -21,19 +21,20 @@ export const ExpandDetailButton: FC = memo(() => { const { closeLeftPanel, openLeftPanel, panels } = useExpandableFlyoutContext(); const isExpanded: boolean = panels.left != null; - const { eventId, indexName } = useRightPanelContext(); + const { eventId, indexName, scopeId } = useRightPanelContext(); - const expandDetails = () => { + const expandDetails = useCallback(() => { openLeftPanel({ id: LeftPanelKey, params: { id: eventId, indexName, + scopeId, }, }); - }; + }, [eventId, openLeftPanel, indexName, scopeId]); - const collapseDetails = () => closeLeftPanel(); + const collapseDetails = useCallback(() => closeLeftPanel(), [closeLeftPanel]); return isExpanded ? ( ( describe('', () => { it('should render PrevalenceOverviewRows', () => { - (useFetchUniqueHostsWithFieldPair as jest.Mock).mockReturnValue({ + (useFetchFieldValuePairWithAggregation as jest.Mock).mockReturnValue({ loading: false, error: false, count: 1, }); - (useFetchUniqueHosts as jest.Mock).mockReturnValue({ + (useFetchUniqueByField as jest.Mock).mockReturnValue({ loading: false, error: false, count: 10, @@ -58,8 +60,7 @@ describe('', () => { empty: false, prevalenceRows: [ ', () => { }); it('should navigate to left section Insights tab when clicking on button', () => { - (useFetchUniqueHostsWithFieldPair as jest.Mock).mockReturnValue({ + (useFetchFieldValuePairWithAggregation as jest.Mock).mockReturnValue({ loading: false, error: false, count: 1, }); - (useFetchUniqueHosts as jest.Mock).mockReturnValue({ + (useFetchUniqueByField as jest.Mock).mockReturnValue({ loading: false, error: false, count: 10, @@ -104,8 +105,7 @@ describe('', () => { empty: false, prevalenceRows: [ ', () => { it('should display row if prevalence is below or equal threshold', () => { - (useFetchUniqueHostsWithFieldPair as jest.Mock).mockReturnValue({ + (useFetchFieldValuePairWithAggregation as jest.Mock).mockReturnValue({ loading: false, error: false, count: 1, }); - (useFetchUniqueHosts as jest.Mock).mockReturnValue({ + (useFetchUniqueByField as jest.Mock).mockReturnValue({ loading: false, error: false, count: 10, @@ -38,27 +40,28 @@ describe('', () => { const { getByTestId, getAllByText, queryByTestId } = render( {}} data-test-subj={dataTestSubj} /> ); + const { name, values } = highlightedField; + expect(getByTestId(iconDataTestSubj)).toBeInTheDocument(); expect(getByTestId(valueDataTestSubj)).toBeInTheDocument(); - expect(getAllByText(`${field}, ${values} is uncommon`)).toHaveLength(1); + expect(getAllByText(`${name}, ${values} is uncommon`)).toHaveLength(1); expect(queryByTestId(colorDataTestSubj)).not.toBeInTheDocument(); }); it('should not display row if prevalence is higher than threshold', () => { - (useFetchUniqueHostsWithFieldPair as jest.Mock).mockReturnValue({ + (useFetchFieldValuePairWithAggregation as jest.Mock).mockReturnValue({ loading: false, error: false, count: 1, }); - (useFetchUniqueHosts as jest.Mock).mockReturnValue({ + (useFetchUniqueByField as jest.Mock).mockReturnValue({ loading: false, error: false, count: 2, @@ -67,8 +70,7 @@ describe('', () => { const { queryAllByAltText } = render( ', () => { }); it('should not display row if error retrieving data', () => { - (useFetchUniqueHostsWithFieldPair as jest.Mock).mockReturnValue({ + (useFetchFieldValuePairWithAggregation as jest.Mock).mockReturnValue({ loading: false, error: true, count: 0, }); - (useFetchUniqueHosts as jest.Mock).mockReturnValue({ + (useFetchUniqueByField as jest.Mock).mockReturnValue({ loading: false, error: true, count: 0, @@ -94,8 +96,7 @@ describe('', () => { const { queryAllByAltText } = render( ', () => { }); it('should display loading', () => { - (useFetchUniqueHostsWithFieldPair as jest.Mock).mockReturnValue({ + (useFetchFieldValuePairWithAggregation as jest.Mock).mockReturnValue({ loading: true, error: false, count: 1, }); - (useFetchUniqueHosts as jest.Mock).mockReturnValue({ + (useFetchUniqueByField as jest.Mock).mockReturnValue({ loading: false, error: false, count: 10, @@ -120,8 +121,7 @@ describe('', () => { const { getByTestId } = render( {}} data-test-subj={dataTestSubj} diff --git a/x-pack/plugins/security_solution/public/flyout/right/components/prevalence_overview_row.tsx b/x-pack/plugins/security_solution/public/flyout/right/components/prevalence_overview_row.tsx index 3a705ee02ef24..0fd37af5929e8 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/components/prevalence_overview_row.tsx +++ b/x-pack/plugins/security_solution/public/flyout/right/components/prevalence_overview_row.tsx @@ -8,22 +8,19 @@ import type { VFC } from 'react'; import React from 'react'; import { PREVALENCE_ROW_UNCOMMON } from './translations'; -import { useFetchUniqueHostsWithFieldPair } from '../hooks/use_fetch_unique_hosts_with_field_value_pair'; -import { useFetchUniqueHosts } from '../hooks/use_fetch_unique_hosts'; +import { useFetchFieldValuePairWithAggregation } from '../../shared/hooks/use_fetch_field_value_pair_with_aggregation'; +import { useFetchUniqueByField } from '../../shared/hooks/use_fetch_unique_by_field'; import { InsightsSummaryRow } from './insights_summary_row'; import { TimelineId } from '../../../../common/types'; +const HOST_FIELD = 'host.name'; const PERCENTAGE_THRESHOLD = 0.1; // we show the prevalence if its value is below 10% export interface PrevalenceOverviewRowProps { /** - * Highlighted field - */ - field: string; - /** - * Highlighted field value - */ - values: string[]; + * The highlighted field name and values + * */ + highlightedField: { name: string; values: string[] }; /** * Maintain backwards compatibility // TODO remove when possible */ @@ -44,8 +41,7 @@ export interface PrevalenceOverviewRowProps { * the row will render null. */ export const PrevalenceOverviewRow: VFC = ({ - field, - values, + highlightedField, scopeId, callbackIfNull, 'data-test-subj': dataTestSubj, @@ -56,23 +52,25 @@ export const PrevalenceOverviewRow: VFC = ({ loading: hostsLoading, error: hostsError, count: hostsCount, - } = useFetchUniqueHostsWithFieldPair({ - field, - values, + } = useFetchFieldValuePairWithAggregation({ + highlightedField, isActiveTimelines, + aggregationField: HOST_FIELD, }); const { loading: uniqueHostsLoading, error: uniqueHostsError, count: uniqueHostsCount, - } = useFetchUniqueHosts(); + } = useFetchUniqueByField({ field: HOST_FIELD }); + + const { name, values } = highlightedField; // prevalence is number of host(s) where the field/value pair was found divided by the total number of hosts in the environment const prevalence = hostsCount / uniqueHostsCount; const loading = hostsLoading || uniqueHostsLoading; const error = hostsError || uniqueHostsError; - const text = `${field}, ${values} ${PREVALENCE_ROW_UNCOMMON}`; + const text = `${name}, ${values} ${PREVALENCE_ROW_UNCOMMON}`; // we do not want to render the row is the prevalence is Infinite, 0 or above the decided threshold const shouldNotRender = diff --git a/x-pack/plugins/security_solution/public/flyout/right/components/threat_intelligence_overview.tsx b/x-pack/plugins/security_solution/public/flyout/right/components/threat_intelligence_overview.tsx index 0a711eacce604..3c9bbc1e356df 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/components/threat_intelligence_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/right/components/threat_intelligence_overview.tsx @@ -31,7 +31,7 @@ import { LeftPanelKey, LeftPanelInsightsTabPath } from '../../left'; * and the SummaryPanel component for data rendering. */ export const ThreatIntelligenceOverview: FC = () => { - const { eventId, indexName, dataFormattedForFieldBrowser } = useRightPanelContext(); + const { eventId, indexName, scopeId, dataFormattedForFieldBrowser } = useRightPanelContext(); const { openLeftPanel } = useExpandableFlyoutContext(); const goToThreatIntelligenceTab = useCallback(() => { @@ -41,9 +41,10 @@ export const ThreatIntelligenceOverview: FC = () => { params: { id: eventId, indexName, + scopeId, }, }); - }, [eventId, openLeftPanel, indexName]); + }, [eventId, openLeftPanel, indexName, scopeId]); const { loading: threatIntelLoading, diff --git a/x-pack/plugins/security_solution/public/flyout/right/context.tsx b/x-pack/plugins/security_solution/public/flyout/right/context.tsx index 2da844946cbbd..bb1ac1fd2b7ae 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/context.tsx +++ b/x-pack/plugins/security_solution/public/flyout/right/context.tsx @@ -8,9 +8,9 @@ import type { BrowserFields, TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; import { css } from '@emotion/react'; import React, { createContext, useContext, useMemo } from 'react'; -import type { SearchHit } from '@kbn/es-types'; import { EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; +import type { SearchHit } from '../../../common/search_strategy'; import { useTimelineEventsDetails } from '../../timelines/containers/details'; import { getAlertIndexAlias } from '../../timelines/components/side_panel/event_details/helpers'; import { useSpaceId } from '../../common/hooks/use_space_id'; @@ -50,9 +50,9 @@ export interface RightPanelContext { /** * The actual raw document object */ - searchHit: SearchHit | undefined; + searchHit: SearchHit | undefined; /** - * + * Promise to trigger a data refresh */ refetchFlyoutData: () => Promise; /** @@ -101,9 +101,9 @@ export const RightPanelProvider = ({ indexName, scopeId, browserFields: sourcererDataView.browserFields, - dataAsNestedObject: dataAsNestedObject as unknown as Ecs, + dataAsNestedObject, dataFormattedForFieldBrowser, - searchHit: searchHit as SearchHit, + searchHit, refetchFlyoutData, getFieldsData, } diff --git a/x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts.ts b/x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts.ts deleted file mode 100644 index 3f3ccbc21fb07..0000000000000 --- a/x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { useQuery } from '@tanstack/react-query'; -import type { IEsSearchRequest } from '@kbn/data-plugin/common'; -import { createFetchAggregatedData } from '../utils/fetch_aggregated_data'; -import { useKibana } from '../../../common/lib/kibana'; - -const AGG_KEY = 'uniqueHosts'; -const QUERY_KEY = 'useFetchUniqueHosts'; - -interface RawAggregatedDataResponse { - aggregations: { - [AGG_KEY]: { - buckets: unknown[]; - }; - }; -} - -const searchRequest: IEsSearchRequest = { - params: { - body: { - aggs: { - [AGG_KEY]: { - terms: { - field: 'host.name', - size: 1000, - }, - }, - }, - size: 0, - }, - }, -}; - -export interface UseUniqueValuesValue { - /** - * Returns true if data is being loaded - */ - loading: boolean; - /** - * Returns true if fetching data has errored out - */ - error: boolean; - /** - * Number of unique hosts found in the environment - */ - count: number; -} - -/** - * Hook to retrieve all unique hosts in the environment, using ReactQuery. - * The query uses an aggregation by unique hosts. - */ -export const useFetchUniqueHosts = (): UseUniqueValuesValue => { - const { - services: { - data: { search: searchService }, - }, - } = useKibana(); - - const { data, isLoading, isError } = useQuery( - [QUERY_KEY], - () => - createFetchAggregatedData(searchService, searchRequest, AGG_KEY), - { - select: (res) => res.aggregations[AGG_KEY].buckets.length, - keepPreviousData: true, - } - ); - - return { - loading: isLoading, - error: isError, - count: data || 0, - }; -}; diff --git a/x-pack/plugins/security_solution/public/flyout/right/hooks/use_prevalence.tsx b/x-pack/plugins/security_solution/public/flyout/right/hooks/use_prevalence.tsx index 554e8206f8b93..336d9f251f52e 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/hooks/use_prevalence.tsx +++ b/x-pack/plugins/security_solution/public/flyout/right/hooks/use_prevalence.tsx @@ -70,16 +70,22 @@ export const usePrevalence = ({ const prevalenceRows = useMemo( () => - summaryRows.map((row) => ( - setCount((prevCount) => prevCount + 1)} - data-test-subj={INSIGHTS_PREVALENCE_TEST_ID} - key={row.description.data.field} - /> - )), + summaryRows.map((row) => { + const highlightedField = { + name: row.description.data.field, + values: row.description.values || [], + }; + + return ( + setCount((prevCount) => prevCount + 1)} + data-test-subj={INSIGHTS_PREVALENCE_TEST_ID} + key={row.description.data.field} + /> + ); + }), [summaryRows, scopeId] ); diff --git a/x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts_with_field_value_pair.test.ts b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_by_event_type.test.ts similarity index 68% rename from x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts_with_field_value_pair.test.ts rename to x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_by_event_type.test.ts index 4c3f2be096040..8bbd039ff333a 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts_with_field_value_pair.test.ts +++ b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_by_event_type.test.ts @@ -9,38 +9,46 @@ import { useQuery } from '@tanstack/react-query'; import type { RenderHookResult } from '@testing-library/react-hooks'; import { renderHook } from '@testing-library/react-hooks'; import { useKibana } from '../../../common/lib/kibana'; -import type { - UseFetchUniqueHostWithFieldPairParams, - UseFetchUniqueHostWithFieldPairResult, -} from './use_fetch_unique_hosts_with_field_value_pair'; -import { useFetchUniqueHostsWithFieldPair } from './use_fetch_unique_hosts_with_field_value_pair'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { useGlobalTime } from '../../../common/containers/use_global_time'; +import type { + UseFetchFieldValuePairByEventTypeParams, + UseFetchFieldValuePairByEventTypeResult, +} from './use_fetch_field_value_pair_by_event_type'; +import { + EventKind, + useFetchFieldValuePairByEventType, +} from './use_fetch_field_value_pair_by_event_type'; jest.mock('@tanstack/react-query'); jest.mock('../../../common/lib/kibana'); jest.mock('../../../common/hooks/use_selector'); jest.mock('../../../common/containers/use_global_time'); -const field = 'field'; -const values = ['values']; +const highlightedField = { + name: 'field', + values: ['values'], +}; const isActiveTimelines = true; +const type = { + eventKind: EventKind.alert, + include: true, +}; -describe('useFetchUniqueHostsWithFieldPair', () => { +describe('useFetchFieldValuePairByEventType', () => { let hookResult: RenderHookResult< - UseFetchUniqueHostWithFieldPairParams, - UseFetchUniqueHostWithFieldPairResult + UseFetchFieldValuePairByEventTypeParams, + UseFetchFieldValuePairByEventTypeResult >; - (useKibana as jest.Mock).mockReturnValue({ services: { data: { search: jest.fn() }, }, }); - (useDeepEqualSelector as jest.Mock).mockReturnValue({ to: '', from: '' }); + jest.mocked(useDeepEqualSelector).mockReturnValue({ to: '', from: '' }); (useGlobalTime as jest.Mock).mockReturnValue({ to: '', from: '' }); - it('should return loading true while data is being fetched', async () => { + it('should return loading true while data is being fetched', () => { (useQuery as jest.Mock).mockReturnValue({ isLoading: true, isError: false, @@ -48,7 +56,7 @@ describe('useFetchUniqueHostsWithFieldPair', () => { }); hookResult = renderHook(() => - useFetchUniqueHostsWithFieldPair({ field, values, isActiveTimelines }) + useFetchFieldValuePairByEventType({ highlightedField, isActiveTimelines, type }) ); expect(hookResult.result.current.loading).toBeTruthy(); @@ -56,7 +64,7 @@ describe('useFetchUniqueHostsWithFieldPair', () => { expect(hookResult.result.current.count).toBe(0); }); - it('should return error true when data fetching has errored out', async () => { + it('should return error true when data fetching has errored out', () => { (useQuery as jest.Mock).mockReturnValue({ isLoading: false, isError: true, @@ -64,7 +72,7 @@ describe('useFetchUniqueHostsWithFieldPair', () => { }); hookResult = renderHook(() => - useFetchUniqueHostsWithFieldPair({ field, values, isActiveTimelines }) + useFetchFieldValuePairByEventType({ highlightedField, isActiveTimelines, type }) ); expect(hookResult.result.current.loading).toBeFalsy(); @@ -72,7 +80,7 @@ describe('useFetchUniqueHostsWithFieldPair', () => { expect(hookResult.result.current.count).toBe(0); }); - it('should return count on success', async () => { + it('should return count on success', () => { (useQuery as jest.Mock).mockReturnValue({ isLoading: false, isError: false, @@ -80,7 +88,7 @@ describe('useFetchUniqueHostsWithFieldPair', () => { }); hookResult = renderHook(() => - useFetchUniqueHostsWithFieldPair({ field, values, isActiveTimelines }) + useFetchFieldValuePairByEventType({ highlightedField, isActiveTimelines, type }) ); expect(hookResult.result.current.loading).toBeFalsy(); diff --git a/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_by_event_type.ts b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_by_event_type.ts new file mode 100644 index 0000000000000..4f8312c5bec0e --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_by_event_type.ts @@ -0,0 +1,177 @@ +/* + * 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 { buildEsQuery } from '@kbn/es-query'; +import type { IEsSearchRequest } from '@kbn/data-plugin/public'; +import { useQuery } from '@tanstack/react-query'; +import { createFetchData } from '../utils/fetch_data'; +import { useKibana } from '../../../common/lib/kibana'; +import { inputsSelectors } from '../../../common/store'; +import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { useGlobalTime } from '../../../common/containers/use_global_time'; +import type { RawResponse } from '../utils/fetch_data'; + +const QUERY_KEY = 'FetchFieldValuePairByEventType'; + +export enum EventKind { + alert = 'alert', + asset = 'asset', + enrichment = 'enrichment', + event = 'event', + metric = 'metric', + state = 'state', + pipeline_error = 'pipeline_error', + signal = 'signal', +} + +export interface EventType { + eventKind: EventKind; + include?: boolean; + exclude?: boolean; +} + +export interface UseFetchFieldValuePairByEventTypeParams { + /** + * The highlighted field name and values + * */ + highlightedField: { name: string; values: string[] }; + /** + * True is the current timeline is active ('timeline-1') + */ + isActiveTimelines: boolean; + /** + * Limit the search to include or exclude a specific value for the event.kind field + * (alert, asset, enrichment, event, metric, state, pipeline_error, signal) + */ + type: EventType; +} + +export interface UseFetchFieldValuePairByEventTypeResult { + /** + * Returns true if data is being loaded + */ + loading: boolean; + /** + * Returns true if fetching data has errored out + */ + error: boolean; + /** + * Number of unique hosts found for the field/value pair + */ + count: number; +} + +/** + * Hook to retrieve all the unique hosts in the environment that have the field/value pair, using ReactQuery. + */ +export const useFetchFieldValuePairByEventType = ({ + highlightedField, + isActiveTimelines, + type, +}: UseFetchFieldValuePairByEventTypeParams): UseFetchFieldValuePairByEventTypeResult => { + const { + services: { + data: { search: searchService }, + }, + } = useKibana(); + + const timelineTime = useDeepEqualSelector((state) => + inputsSelectors.timelineTimeRangeSelector(state) + ); + const globalTime = useGlobalTime(); + const { to, from } = isActiveTimelines ? timelineTime : globalTime; + + const { name, values } = highlightedField; + + const req: IEsSearchRequest = buildSearchRequest(name, values, from, to, type); + + const { data, isLoading, isError } = useQuery( + [QUERY_KEY, name, values, from, to, type], + () => createFetchData(searchService, req), + { + select: (res) => res.hits.total, + keepPreviousData: true, + } + ); + + return { + loading: isLoading, + error: isError, + count: data || 0, + }; +}; + +/** + * Build the search request for the field/values pair, for a date range from/to. + * We set the size to 0 as we only care about the total number of documents. + * Passing signalEventKind as true will return only alerts (event.kind === "signal"), otherwise return all other documents (event.kind !== "signal") + */ +const buildSearchRequest = ( + field: string, + values: string[], + from: string, + to: string, + type: EventType +): IEsSearchRequest => { + const query = buildEsQuery( + undefined, + [], + [ + { + query: { + bool: { + must: [ + { + match: { + [field]: values[0], + }, + }, + { + range: { + '@timestamp': { + gte: from, + lte: to, + }, + }, + }, + ...(type.include + ? [ + { + match: { + 'event.kind': type.eventKind, + }, + }, + ] + : []), + ], + ...(type.exclude + ? { + must_not: [ + { + match: { + 'event.kind': type.eventKind, + }, + }, + ], + } + : {}), + }, + }, + meta: {}, + }, + ] + ); + + return { + params: { + body: { + query, + size: 1000, + }, + }, + }; +}; diff --git a/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_with_aggregation.test.ts b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_with_aggregation.test.ts new file mode 100644 index 0000000000000..a1ec575db1244 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_with_aggregation.test.ts @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useQuery } from '@tanstack/react-query'; +import type { RenderHookResult } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react-hooks'; +import { useKibana } from '../../../common/lib/kibana'; +import type { + UseFetchFieldValuePairWithAggregationParams, + UseFetchFieldValuePairWithAggregationResult, +} from './use_fetch_field_value_pair_with_aggregation'; +import { useFetchFieldValuePairWithAggregation } from './use_fetch_field_value_pair_with_aggregation'; +import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { useGlobalTime } from '../../../common/containers/use_global_time'; + +jest.mock('@tanstack/react-query'); +jest.mock('../../../common/lib/kibana'); +jest.mock('../../../common/hooks/use_selector'); +jest.mock('../../../common/containers/use_global_time'); + +const highlightedField = { + name: 'field', + values: ['values'], +}; +const isActiveTimelines = true; +const aggregationField = 'aggregationField'; + +describe('useFetchFieldValuePairWithAggregation', () => { + let hookResult: RenderHookResult< + UseFetchFieldValuePairWithAggregationParams, + UseFetchFieldValuePairWithAggregationResult + >; + (useKibana as jest.Mock).mockReturnValue({ + services: { + data: { search: jest.fn() }, + }, + }); + jest.mocked(useDeepEqualSelector).mockReturnValue({ to: '', from: '' }); + (useGlobalTime as jest.Mock).mockReturnValue({ to: '', from: '' }); + + it('should return loading true while data is being fetched', () => { + (useQuery as jest.Mock).mockReturnValue({ + isLoading: true, + isError: false, + data: 0, + }); + + hookResult = renderHook(() => + useFetchFieldValuePairWithAggregation({ + highlightedField, + isActiveTimelines, + aggregationField, + }) + ); + + expect(hookResult.result.current.loading).toBeTruthy(); + expect(hookResult.result.current.error).toBeFalsy(); + expect(hookResult.result.current.count).toBe(0); + }); + + it('should return error true when data fetching has errored out', () => { + (useQuery as jest.Mock).mockReturnValue({ + isLoading: false, + isError: true, + data: 0, + }); + + hookResult = renderHook(() => + useFetchFieldValuePairWithAggregation({ + highlightedField, + isActiveTimelines, + aggregationField, + }) + ); + + expect(hookResult.result.current.loading).toBeFalsy(); + expect(hookResult.result.current.error).toBeTruthy(); + expect(hookResult.result.current.count).toBe(0); + }); + + it('should return count on success', () => { + (useQuery as jest.Mock).mockReturnValue({ + isLoading: false, + isError: false, + data: 1, + }); + + hookResult = renderHook(() => + useFetchFieldValuePairWithAggregation({ + highlightedField, + isActiveTimelines, + aggregationField, + }) + ); + + expect(hookResult.result.current.loading).toBeFalsy(); + expect(hookResult.result.current.error).toBeFalsy(); + expect(hookResult.result.current.count).toBe(1); + }); +}); diff --git a/x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts_with_field_value_pair.ts b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_with_aggregation.ts similarity index 58% rename from x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts_with_field_value_pair.ts rename to x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_with_aggregation.ts index 246a22006bb54..86c30e6008b36 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts_with_field_value_pair.ts +++ b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_field_value_pair_with_aggregation.ts @@ -6,41 +6,34 @@ */ import { buildEsQuery } from '@kbn/es-query'; +import type { IEsSearchRequest } from '@kbn/data-plugin/public'; import { useQuery } from '@tanstack/react-query'; -import type { IEsSearchRequest } from '@kbn/data-plugin/common'; -import { createFetchAggregatedData } from '../utils/fetch_aggregated_data'; +import { buildAggregationSearchRequest } from '../utils/build_requests'; +import type { RawAggregatedDataResponse } from '../utils/fetch_data'; +import { AGG_KEY, createFetchData } from '../utils/fetch_data'; import { useKibana } from '../../../common/lib/kibana'; import { inputsSelectors } from '../../../common/store'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { useGlobalTime } from '../../../common/containers/use_global_time'; -const AGG_KEY = 'hostsWithSameFieldValuePair'; -const QUERY_KEY = 'useFetchUniqueHostsWithFieldPair'; +const QUERY_KEY = 'useFetchFieldValuePairWithAggregation'; -interface RawAggregatedDataResponse { - aggregations: { - [AGG_KEY]: { - buckets: unknown[]; - }; - }; -} - -export interface UseFetchUniqueHostWithFieldPairParams { - /** - * Highlighted field - */ - field: string; +export interface UseFetchFieldValuePairWithAggregationParams { /** - * Highlighted field value - */ - values: string[]; + * The highlighted field name and values + * */ + highlightedField: { name: string; values: string[] }; /** * */ isActiveTimelines: boolean; + /** + * Field to aggregate value by + */ + aggregationField: string; } -export interface UseFetchUniqueHostWithFieldPairResult { +export interface UseFetchFieldValuePairWithAggregationResult { /** * Returns true if data is being loaded */ @@ -56,14 +49,15 @@ export interface UseFetchUniqueHostWithFieldPairResult { } /** - * Hook to retrieve all the unique hosts in the environment that have the field/value pair, using ReactQuery. - * The query uses an aggregation by unique hosts. + * Hook to retrieve all the unique documents for the aggregationField in the environment that have the field/value pair, using ReactQuery. + * + * Foe example, passing 'host.name' via the aggregationField props will return the number of unique hosts in the environment that have the field/value pair. */ -export const useFetchUniqueHostsWithFieldPair = ({ - field, - values, +export const useFetchFieldValuePairWithAggregation = ({ + highlightedField, isActiveTimelines, -}: UseFetchUniqueHostWithFieldPairParams): UseFetchUniqueHostWithFieldPairResult => { + aggregationField, +}: UseFetchFieldValuePairWithAggregationParams): UseFetchFieldValuePairWithAggregationResult => { const { services: { data: { search: searchService }, @@ -76,12 +70,13 @@ export const useFetchUniqueHostsWithFieldPair = ({ const globalTime = useGlobalTime(); const { to, from } = isActiveTimelines ? timelineTime : globalTime; - const searchRequest = buildSearchRequest(field, values, from, to); + const { name, values } = highlightedField; + + const searchRequest = buildSearchRequest(name, values, from, to, aggregationField); const { data, isLoading, isError } = useQuery( - [QUERY_KEY, field, values], - () => - createFetchAggregatedData(searchService, searchRequest, AGG_KEY), + [QUERY_KEY, name, values, from, to, aggregationField], + () => createFetchData(searchService, searchRequest), { select: (res) => res.aggregations[AGG_KEY].buckets.length, keepPreviousData: true, @@ -97,13 +92,14 @@ export const useFetchUniqueHostsWithFieldPair = ({ /** * Build the search request for the field/values pair, for a date range from/to. - * The request contains aggregation by host.name field. + * The request contains aggregation by aggregationField. */ const buildSearchRequest = ( field: string, values: string[], from: string, - to: string + to: string, + aggregationField: string ): IEsSearchRequest => { const query = buildEsQuery( undefined, @@ -133,21 +129,5 @@ const buildSearchRequest = ( }, ] ); - - return { - params: { - body: { - query, - aggs: { - [AGG_KEY]: { - terms: { - field: 'host.name', - size: 1000, - }, - }, - }, - size: 0, - }, - }, - }; + return buildAggregationSearchRequest(aggregationField, AGG_KEY, query); }; diff --git a/x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts.test.tsx b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_unique_by_field.test.ts similarity index 76% rename from x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts.test.tsx rename to x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_unique_by_field.test.ts index 6d6bc6806a8c5..556ff4ecb6164 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/hooks/use_fetch_unique_hosts.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_unique_by_field.test.ts @@ -8,16 +8,20 @@ import { useQuery } from '@tanstack/react-query'; import type { RenderHookResult } from '@testing-library/react-hooks'; import { renderHook } from '@testing-library/react-hooks'; -import type { UseUniqueValuesValue } from './use_fetch_unique_hosts'; -import { useFetchUniqueHosts } from './use_fetch_unique_hosts'; import { useKibana } from '../../../common/lib/kibana'; +import type { + UseFetchUniqueByFieldParams, + UseFetchUniqueByFieldValue, +} from './use_fetch_unique_by_field'; +import { useFetchUniqueByField } from './use_fetch_unique_by_field'; jest.mock('@tanstack/react-query'); jest.mock('../../../common/lib/kibana'); -describe('useFetchUniqueHosts', () => { - let hookResult: RenderHookResult; +const field = 'host.name'; +describe('useFetchUniqueByField', () => { + let hookResult: RenderHookResult; (useKibana as jest.Mock).mockReturnValue({ services: { data: { search: jest.fn() }, @@ -31,7 +35,7 @@ describe('useFetchUniqueHosts', () => { data: 0, }); - hookResult = renderHook(() => useFetchUniqueHosts()); + hookResult = renderHook(() => useFetchUniqueByField({ field })); expect(hookResult.result.current.loading).toBeTruthy(); expect(hookResult.result.current.error).toBeFalsy(); @@ -45,7 +49,7 @@ describe('useFetchUniqueHosts', () => { data: 0, }); - hookResult = renderHook(() => useFetchUniqueHosts()); + hookResult = renderHook(() => useFetchUniqueByField({ field })); expect(hookResult.result.current.loading).toBeFalsy(); expect(hookResult.result.current.error).toBeTruthy(); @@ -59,7 +63,7 @@ describe('useFetchUniqueHosts', () => { data: 1, }); - hookResult = renderHook(() => useFetchUniqueHosts()); + hookResult = renderHook(() => useFetchUniqueByField({ field })); expect(hookResult.result.current.loading).toBeFalsy(); expect(hookResult.result.current.error).toBeFalsy(); diff --git a/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_unique_by_field.ts b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_unique_by_field.ts new file mode 100644 index 0000000000000..74ef08f7a7f28 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/shared/hooks/use_fetch_unique_by_field.ts @@ -0,0 +1,67 @@ +/* + * 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 { useQuery } from '@tanstack/react-query'; +import type { IEsSearchRequest } from '@kbn/data-plugin/common'; +import type { RawAggregatedDataResponse } from '../utils/fetch_data'; +import { AGG_KEY, createFetchData } from '../utils/fetch_data'; +import { useKibana } from '../../../common/lib/kibana'; +import { buildAggregationSearchRequest } from '../utils/build_requests'; + +const QUERY_KEY = 'useFetchUniqueByField'; + +export interface UseFetchUniqueByFieldParams { + /** + * Field to aggregate by + */ + field: string; +} + +export interface UseFetchUniqueByFieldValue { + /** + * Returns true if data is being loaded + */ + loading: boolean; + /** + * Returns true if fetching data has errored out + */ + error: boolean; + /** + * Number of unique document by field found in the environment + */ + count: number; +} + +/** + * Hook to retrieve all unique documents by field in the environment, using ReactQuery. + * + * For example, passing 'host.name' via the field props will return the number of unique hosts in the environment. + */ +export const useFetchUniqueByField = ({ + field, +}: UseFetchUniqueByFieldParams): UseFetchUniqueByFieldValue => { + const { + services: { + data: { search: searchService }, + }, + } = useKibana(); + const searchRequest: IEsSearchRequest = buildAggregationSearchRequest(field, AGG_KEY); + const { data, isLoading, isError } = useQuery( + [QUERY_KEY, field], + () => createFetchData(searchService, searchRequest), + { + select: (res) => res.aggregations[AGG_KEY].buckets.length, + keepPreviousData: true, + } + ); + + return { + loading: isLoading, + error: isError, + count: data || 0, + }; +}; diff --git a/x-pack/plugins/security_solution/public/flyout/shared/utils/build_requests.ts b/x-pack/plugins/security_solution/public/flyout/shared/utils/build_requests.ts new file mode 100644 index 0000000000000..0720d26dd0bcb --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/shared/utils/build_requests.ts @@ -0,0 +1,38 @@ +/* + * 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 type { IEsSearchRequest } from '@kbn/data-plugin/common'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; + +/** + * Builds a search request for an aggregation. + * We're setting the query size to 0 as we only care about the aggregation result here. + * + * @param field aggregation field + * @param key aggregation key + * @param query optional query + */ +export const buildAggregationSearchRequest = ( + field: string, + key: string, + query?: QueryDslQueryContainer +): IEsSearchRequest => ({ + params: { + body: { + query, + aggs: { + [key]: { + terms: { + field, + size: 1000, // setting a high size to get as close as possible to all unique values + }, + }, + }, + size: 0, + }, + }, +}); diff --git a/x-pack/plugins/security_solution/public/flyout/right/utils/fetch_aggregated_data.ts b/x-pack/plugins/security_solution/public/flyout/shared/utils/fetch_data.ts similarity index 67% rename from x-pack/plugins/security_solution/public/flyout/right/utils/fetch_aggregated_data.ts rename to x-pack/plugins/security_solution/public/flyout/shared/utils/fetch_data.ts index f523a30b61892..3fa079b539fc3 100644 --- a/x-pack/plugins/security_solution/public/flyout/right/utils/fetch_aggregated_data.ts +++ b/x-pack/plugins/security_solution/public/flyout/shared/utils/fetch_data.ts @@ -8,13 +8,34 @@ import type { IEsSearchRequest, IKibanaSearchResponse } from '@kbn/data-plugin/common'; import type { ISearchStart } from '@kbn/data-plugin/public'; +export const AGG_KEY = 'aggregation'; + +/** + * Interface for aggregation responses + */ +export interface RawAggregatedDataResponse { + aggregations: { + [AGG_KEY]: { + buckets: unknown[]; + }; + }; +} + +/** + * Interface for non-aggregated responses + */ +export interface RawResponse { + hits: { + total: number; + }; +} + /** * Reusable method that returns a promise wrapping the search functionality of Kibana search service */ -export const createFetchAggregatedData = async ( +export const createFetchData = async ( searchService: ISearchStart, - req: IEsSearchRequest, - aggregationKey: string + req: IEsSearchRequest ): Promise => { return new Promise((resolve, reject) => { searchService.search>(req).subscribe({ From 44bfd0c343ab0d1174bf948b40cab62f12acc477 Mon Sep 17 00:00:00 2001 From: Davis McPhee Date: Tue, 13 Jun 2023 20:29:04 -0300 Subject: [PATCH 03/89] [Discover] Refactor Unified Histogram refetching logic for text based languages (#159438) ## Summary This PR refactors and simplifies the Unified Histogram refetching logic for text based languages in Discover to minimize unnecessary refetches while ensuring the total hits and Lens visualization stay in sync with the results. It also introduces a new set of functional tests to track the number of search requests sent from Discover under various scenarios to help reduce the chance of regressions in data fetching logic. Flaky test runner x 100: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2375. Note: the flaky test runner has a couple of failures, but they all have the error `expected testSubject(globalLoadingIndicator-hidden) to exist`, which is also the same error as these three recently skipped tests related to text based language mode: - #159083 - #159167 - #159194 This suggests the failures aren't related to this PR, and I don't think they should prevent us from merging this. But it also means we have a critical issue related to text based languages that needs to be addressed asap, possibly this one: #158893. Fixes #158819. ### 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: Stratoula Kalafateli --- .../layout/discover_histogram_layout.test.tsx | 2 + .../layout/discover_histogram_layout.tsx | 1 - .../layout/use_discover_histogram.test.tsx | 2 +- .../layout/use_discover_histogram.ts | 158 ++++++----- .../apps/discover/group3/_request_counts.ts | 247 ++++++++++++++++++ test/functional/apps/discover/group3/index.ts | 1 + 6 files changed, 327 insertions(+), 84 deletions(-) create mode 100644 test/functional/apps/discover/group3/_request_counts.ts 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 beb09b473d2c5..ce7c0c9460f73 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 @@ -43,6 +43,8 @@ function getStateContainer(savedSearch?: SavedSearch) { hideChart: false, }); + stateContainer.internalState.transitions.setDataView(dataViewMock); + return stateContainer; } 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 cd6bfd6ab8b75..42ae4e2c18a5c 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 @@ -51,7 +51,6 @@ export const DiscoverHistogramLayout = ({ return ( { act(() => { hook.result.current.ref(api); }); - expect(api.state$.subscribe).toHaveBeenCalledTimes(3); + expect(api.state$.subscribe).toHaveBeenCalledTimes(2); }); it('should sync Unified Histogram state with the state container', async () => { diff --git a/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts b/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts index 329e4f1cefca3..8f38eb9556d85 100644 --- a/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts +++ b/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts @@ -14,17 +14,23 @@ import { } from '@kbn/unified-histogram-plugin/public'; import { isEqual } from 'lodash'; import { useCallback, useEffect, useRef, useMemo, useState } from 'react'; -import { distinctUntilChanged, filter, map, Observable, pairwise, startWith } from 'rxjs'; +import { + debounceTime, + distinctUntilChanged, + filter, + map, + merge, + Observable, + pairwise, + startWith, +} from 'rxjs'; import useObservable from 'react-use/lib/useObservable'; -import type { Suggestion } from '@kbn/lens-plugin/public'; -import useLatest from 'react-use/lib/useLatest'; import type { RequestAdapter } from '@kbn/inspector-plugin/common'; import { useDiscoverServices } from '../../../../hooks/use_discover_services'; import { getUiActions } from '../../../../kibana_services'; import { FetchStatus } from '../../../types'; import { useDataState } from '../../hooks/use_data_state'; import type { InspectorAdapters } from '../../hooks/use_inspector'; -import type { DataDocuments$ } from '../../services/discover_data_state_container'; import { checkHitCount, sendErrorTo } from '../../hooks/use_saved_search_messages'; import type { DiscoverStateContainer } from '../../services/discover_state'; import { addLog } from '../../../../utils/add_log'; @@ -155,22 +161,6 @@ export const useDiscoverHistogram = ({ }; }, [stateContainer.appState.state$, unifiedHistogram]); - /** - * Columns - */ - - // Update the columns only when documents are fetched so the Lens suggestions - // don't constantly change when the user modifies the table columns - const columnsObservable = useMemo( - () => createColumnsObservable(savedSearchData$.documents$), - [savedSearchData$.documents$] - ); - - const columns = useObservable( - columnsObservable, - savedSearchData$.documents$.getValue().textBasedQueryColumns?.map(({ name }) => name) ?? [] - ); - /** * Total hits */ @@ -232,89 +222,89 @@ export const useDiscoverHistogram = ({ timefilter.getTime() ); + // When in text based language mode, update the data view, query, and + // columns only when documents are done fetching so the Lens suggestions + // don't frequently change, such as when the user modifies the table + // columns, which would trigger unnecessary refetches. + const textBasedFetchComplete$ = useMemo( + () => createFetchCompleteObservable(stateContainer), + [stateContainer] + ); + + const { + dataView: textBasedDataView, + query: textBasedQuery, + columns, + } = useObservable(textBasedFetchComplete$, { + dataView: stateContainer.internalState.getState().dataView!, + query: stateContainer.appState.getState().query, + columns: + savedSearchData$.documents$.getValue().textBasedQueryColumns?.map(({ name }) => name) ?? [], + }); + /** * Data fetching */ - const savedSearchFetch$ = stateContainer.dataState.fetch$; - const skipDiscoverRefetch = useRef(); - const skipLensSuggestionRefetch = useRef(); - const usingLensSuggestion = useLatest(isPlainRecord && !hideChart); + const skipRefetch = useRef(); // Skip refetching when showing the chart since Lens will // automatically fetch when the chart is shown useEffect(() => { - if (skipDiscoverRefetch.current === undefined) { - skipDiscoverRefetch.current = false; + if (skipRefetch.current === undefined) { + skipRefetch.current = false; } else { - skipDiscoverRefetch.current = !hideChart; + skipRefetch.current = !hideChart; } }, [hideChart]); - // Trigger a unified histogram refetch when savedSearchFetch$ is triggered + // Handle unified histogram refetching useEffect(() => { - const subscription = savedSearchFetch$.subscribe(() => { - if (!skipDiscoverRefetch.current) { - addLog('Unified Histogram - Discover refetch'); - unifiedHistogram?.refetch(); - } - - skipDiscoverRefetch.current = false; - }); - - return () => { - subscription.unsubscribe(); - }; - }, [savedSearchFetch$, unifiedHistogram, usingLensSuggestion]); - - // Reload the chart when the current suggestion changes - const [currentSuggestion, setCurrentSuggestion] = useState(); + if (!unifiedHistogram) { + return; + } - useEffect(() => { - if (!skipLensSuggestionRefetch.current && currentSuggestion && usingLensSuggestion.current) { - addLog('Unified Histogram - Lens suggestion refetch'); - unifiedHistogram?.refetch(); + let fetch$: Observable; + + // When in text based language mode, we refetch under two conditions: + // 1. When the current Lens suggestion changes. This syncs the visualization + // with the user's selection. + // 2. When the documents are done fetching. This is necessary because we don't + // have access to the latest columns until after the documents are fetched, + // which are required to get the latest Lens suggestion, which would trigger + // a refetch anyway and result in multiple unnecessary fetches. + if (isPlainRecord) { + fetch$ = merge( + createCurrentSuggestionObservable(unifiedHistogram.state$).pipe(map(() => 'lens')), + textBasedFetchComplete$.pipe(map(() => 'discover')) + ).pipe(debounceTime(50)); + } else { + fetch$ = stateContainer.dataState.fetch$.pipe(map(() => 'discover')); } - skipLensSuggestionRefetch.current = false; - }, [currentSuggestion, unifiedHistogram, usingLensSuggestion]); + const subscription = fetch$.subscribe((source) => { + if (!skipRefetch.current) { + if (source === 'discover') addLog('Unified Histogram - Discover refetch'); + if (source === 'lens') addLog('Unified Histogram - Lens suggestion refetch'); + unifiedHistogram.refetch(); + } - useEffect(() => { - const subscription = createCurrentSuggestionObservable(unifiedHistogram?.state$)?.subscribe( - setCurrentSuggestion - ); + skipRefetch.current = false; + }); return () => { - subscription?.unsubscribe(); + subscription.unsubscribe(); }; - }, [unifiedHistogram]); + }, [isPlainRecord, stateContainer.dataState.fetch$, textBasedFetchComplete$, unifiedHistogram]); - // When the data view or query changes, which will trigger a current suggestion change, - // skip the next refetch since we want to wait for the columns to update first, which - // doesn't happen until after the documents are fetched - const dataViewId = useInternalStateSelector((state) => state.dataView?.id); - const skipFetchParams = useRef({ dataViewId, query }); - - useEffect(() => { - const newSkipFetchParams = { dataViewId, query }; - - if (isEqual(skipFetchParams.current, newSkipFetchParams)) { - return; - } - - skipFetchParams.current = newSkipFetchParams; - - if (usingLensSuggestion.current) { - skipLensSuggestionRefetch.current = true; - skipDiscoverRefetch.current = true; - } - }, [dataViewId, query, usingLensSuggestion]); + const dataView = useInternalStateSelector((state) => state.dataView!); return { ref, getCreationOptions, services: { ...services, uiActions: getUiActions() }, - query, + dataView: isPlainRecord ? textBasedDataView : dataView, + query: isPlainRecord ? textBasedQuery : query, filters, timeRange, relativeTimeRange, @@ -389,11 +379,15 @@ const createAppStateObservable = (state$: Observable) => { ); }; -const createColumnsObservable = (documents$: DataDocuments$) => { - return documents$.pipe( +const createFetchCompleteObservable = (stateContainer: DiscoverStateContainer) => { + return stateContainer.dataState.data$.documents$.pipe( distinctUntilChanged((prev, curr) => prev.fetchStatus === curr.fetchStatus), filter(({ fetchStatus }) => fetchStatus === FetchStatus.COMPLETE), - map(({ textBasedQueryColumns }) => textBasedQueryColumns?.map(({ name }) => name) ?? []) + map(({ textBasedQueryColumns }) => ({ + dataView: stateContainer.internalState.getState().dataView!, + query: stateContainer.appState.getState().query!, + columns: textBasedQueryColumns?.map(({ name }) => name) ?? [], + })) ); }; @@ -404,8 +398,8 @@ const createTotalHitsObservable = (state$?: Observable) = ); }; -const createCurrentSuggestionObservable = (state$?: Observable) => { - return state$?.pipe( +const createCurrentSuggestionObservable = (state$: Observable) => { + return state$.pipe( map((state) => state.currentSuggestion), distinctUntilChanged(isEqual) ); diff --git a/test/functional/apps/discover/group3/_request_counts.ts b/test/functional/apps/discover/group3/_request_counts.ts new file mode 100644 index 0000000000000..c4f5676f357e5 --- /dev/null +++ b/test/functional/apps/discover/group3/_request_counts.ts @@ -0,0 +1,247 @@ +/* + * 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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + const PageObjects = getPageObjects([ + 'common', + 'discover', + 'timePicker', + 'header', + 'unifiedSearch', + 'settings', + ]); + const testSubjects = getService('testSubjects'); + const browser = getService('browser'); + const monacoEditor = getService('monacoEditor'); + const filterBar = getService('filterBar'); + const queryBar = getService('queryBar'); + const elasticChart = getService('elasticChart'); + + describe('discover request counts', function describeIndexTests() { + before(async function () { + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/long_window_logstash'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/long_window_logstash_index_pattern' + ); + await kibanaServer.uiSettings.replace({ + defaultIndex: 'logstash-*', + 'bfetch:disable': true, + 'discover:enableSql': true, + }); + await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); + }); + + after(async () => { + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.uiSettings.replace({}); + }); + + beforeEach(async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.header.waitUntilLoadingHasFinished(); + }); + + const getSearchCount = async (type: 'ese' | 'sql') => { + const requests = await browser.execute(() => + performance + .getEntries() + .filter((entry: any) => ['fetch', 'xmlhttprequest'].includes(entry.initiatorType)) + ); + return requests.filter((entry) => entry.name.endsWith(`/internal/search/${type}`)).length; + }; + + const waitForLoadingToFinish = async () => { + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitForDocTableLoadingComplete(); + await elasticChart.canvasExists(); + }; + + const expectSearches = async (type: 'ese' | 'sql', expected: number, cb: Function) => { + await browser.execute(async () => { + performance.clearResourceTimings(); + }); + let searchCount = await getSearchCount(type); + expect(searchCount).to.be(0); + await cb(); + await waitForLoadingToFinish(); + searchCount = await getSearchCount(type); + expect(searchCount).to.be(expected); + }; + + const getSharedTests = ({ + type, + savedSearch, + query1, + query2, + setQuery, + skipSavedSearchTests, + }: { + type: 'ese' | 'sql'; + savedSearch: string; + query1: string; + query2: string; + setQuery: (query: string) => Promise; + skipSavedSearchTests?: boolean; + }) => { + it('should send 2 search requests (documents + chart) on page load', async () => { + await browser.refresh(); + await browser.execute(async () => { + performance.setResourceTimingBufferSize(Number.MAX_SAFE_INTEGER); + }); + await waitForLoadingToFinish(); + const searchCount = await getSearchCount(type); + expect(searchCount).to.be(2); + }); + + it('should send 2 requests (documents + chart) when refreshing', async () => { + await expectSearches(type, 2, async () => { + await queryBar.clickQuerySubmitButton(); + }); + }); + + it('should send 2 requests (documents + chart) when changing the query', async () => { + await expectSearches(type, 2, async () => { + await setQuery(query1); + await queryBar.clickQuerySubmitButton(); + }); + }); + + it('should send 2 requests (documents + chart) when changing the time range', async () => { + await expectSearches(type, 2, async () => { + await PageObjects.timePicker.setAbsoluteRange( + 'Sep 21, 2015 @ 06:31:44.000', + 'Sep 23, 2015 @ 00:00:00.000' + ); + }); + }); + + it('should send 2 requests (documents + chart) when toggling the chart visibility', async () => { + await expectSearches(type, 2, async () => { + await PageObjects.discover.toggleChartVisibility(); + }); + await expectSearches(type, 2, async () => { + await PageObjects.discover.toggleChartVisibility(); + }); + }); + + if (!skipSavedSearchTests) { + it('should send 2 requests for saved search changes', async () => { + await setQuery(query1); + await queryBar.clickQuerySubmitButton(); + await PageObjects.timePicker.setAbsoluteRange( + 'Sep 21, 2015 @ 06:31:44.000', + 'Sep 23, 2015 @ 00:00:00.000' + ); + await waitForLoadingToFinish(); + // creating the saved search + await expectSearches(type, 2, async () => { + await PageObjects.discover.saveSearch(savedSearch); + }); + // resetting the saved search + await setQuery(query2); + await queryBar.clickQuerySubmitButton(); + await waitForLoadingToFinish(); + await expectSearches(type, 2, async () => { + await PageObjects.discover.clickResetSavedSearchButton(); + }); + // clearing the saved search + await expectSearches(type, 2, async () => { + await testSubjects.click('discoverNewButton'); + await waitForLoadingToFinish(); + }); + // loading the saved search + await expectSearches(type, 2, async () => { + await PageObjects.discover.loadSavedSearch(savedSearch); + }); + }); + } + }; + + describe('data view mode', () => { + const type = 'ese'; + + getSharedTests({ + type, + savedSearch: 'data view test', + query1: 'bytes > 1000', + query2: 'bytes < 2000', + setQuery: (query) => queryBar.setQuery(query), + }); + + it('should send 2 requests (documents + chart) when adding a filter', async () => { + await expectSearches(type, 2, async () => { + await filterBar.addFilter({ + field: 'extension', + operation: 'is', + value: 'jpg', + }); + }); + }); + + it('should send 2 requests (documents + chart) when sorting', async () => { + await expectSearches(type, 2, async () => { + await PageObjects.discover.clickFieldSort('@timestamp', 'Sort Old-New'); + }); + }); + + it('should send 2 requests (documents + chart) when changing to a breakdown field without an other bucket', async () => { + await expectSearches(type, 2, async () => { + await PageObjects.discover.chooseBreakdownField('type'); + }); + }); + + it('should send 3 requests (documents + chart + other bucket) when changing to a breakdown field with an other bucket', async () => { + await expectSearches(type, 3, async () => { + await PageObjects.discover.chooseBreakdownField('extension.raw'); + }); + }); + + it('should send 2 requests (documents + chart) when changing the chart interval', async () => { + await expectSearches(type, 2, async () => { + await PageObjects.discover.setChartInterval('Day'); + }); + }); + + it('should send 2 requests (documents + chart) when changing the data view', async () => { + await expectSearches(type, 2, async () => { + await PageObjects.discover.selectIndexPattern('long-window-logstash-*'); + }); + }); + }); + + describe('SQL mode', () => { + const type = 'sql'; + + beforeEach(async () => { + await PageObjects.discover.selectTextBaseLang('SQL'); + monacoEditor.setCodeEditorValue('SELECT count(*) FROM "logstash-*" WHERE bytes > 1000'); + await queryBar.clickQuerySubmitButton(); + await waitForLoadingToFinish(); + }); + + getSharedTests({ + type, + savedSearch: 'sql test', + query1: 'SELECT type, count(*) FROM "logstash-*" WHERE bytes > 1000 GROUP BY type', + query2: 'SELECT type, count(*) FROM "logstash-*" WHERE bytes < 2000 GROUP BY type', + setQuery: (query) => monacoEditor.setCodeEditorValue(query), + // TODO: We get 4 requests instead of 2 for the saved search test in SQL mode, + // so we're skipping them for now until we fix the issue. + skipSavedSearchTests: true, + }); + }); + }); +} diff --git a/test/functional/apps/discover/group3/index.ts b/test/functional/apps/discover/group3/index.ts index a6481a8e7b82b..3a10a8ec6f768 100644 --- a/test/functional/apps/discover/group3/index.ts +++ b/test/functional/apps/discover/group3/index.ts @@ -22,5 +22,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_drag_drop')); loadTestFile(require.resolve('./_sidebar')); + loadTestFile(require.resolve('./_request_counts')); }); } From 6553ebbdd58022740d7719145c7ba9ea194e1dd8 Mon Sep 17 00:00:00 2001 From: Drew Tate Date: Tue, 13 Jun 2023 20:09:01 -0500 Subject: [PATCH 04/89] [Lens][Visualizations] library annotation groups listing page (#157988) --- .github/CODEOWNERS | 4 +- .../public/examples/msearch/msearch_app.tsx | 2 +- .../public/examples/msearch/msearch_table.tsx | 4 +- .../content_management_examples/tsconfig.json | 5 +- package.json | 4 +- .../tabbed_table_list_view/README.mdx | 20 + .../tabbed_table_list_view/index.ts | 11 + .../tabbed_table_list_view/jest.config.js | 13 + .../tabbed_table_list_view/kibana.jsonc | 5 + .../tabbed_table_list_view/package.json | 6 + .../tabbed_table_list_view/src/index.ts | 13 + .../src/tabbed_table_list_view.test.tsx | 128 ++++ .../src/tabbed_table_list_view.tsx | 88 +++ .../tabbed_table_list_view/tsconfig.json | 27 + .../README.mdx | 0 .../table_list_view/index.ts | 12 + .../jest.config.js | 2 +- .../kibana.jsonc | 2 +- .../package.json | 4 +- .../src/table_list_view.stories.tsx | 14 +- .../table_list_view/src/table_list_view.tsx | 131 ++++ .../table_list_view/tsconfig.json | 25 + .../table_list_view_table/README.mdx | 20 + .../index.ts | 5 +- .../table_list_view_table/jest.config.js | 13 + .../table_list_view_table/kibana.jsonc | 5 + .../table_list_view_table/package.json | 6 + .../src/__jest__/index.ts | 0 .../src/__jest__/tests.helpers.tsx | 0 .../src/actions.ts | 2 +- .../src/components/confirm_delete_modal.tsx | 0 .../src/components/index.ts | 0 .../src/components/item_details.tsx | 4 +- .../src/components/listing_limit_warning.tsx | 0 .../src/components/table.tsx | 14 +- .../src/components/table_sort_select.tsx | 2 +- .../src/components/tag_badge.tsx | 0 .../src/components/tag_filter_panel.tsx | 0 .../src/components/updated_at_field.tsx | 0 .../src/components/use_tag_filter_panel.tsx | 0 .../src/constants.ts | 0 .../src/index.ts | 6 +- .../src/mocks.tsx | 2 +- .../src/reducer.tsx | 2 +- .../src/services.tsx | 0 .../src/table_list_view.test.tsx | 140 +++- .../src/table_list_view_table.tsx} | 171 +++-- .../src/types.ts | 0 .../src/use_tags.ts | 2 +- .../src/use_url_state.ts | 0 .../tsconfig.json | 0 packages/kbn-dom-drag-drop/README.md | 13 +- packages/kbn-optimizer/limits.yml | 2 +- .../dashboard_listing.test.tsx | 15 +- .../dashboard_listing/dashboard_listing.tsx | 8 +- src/plugins/dashboard/tsconfig.json | 5 +- src/plugins/event_annotation/.i18nrc.json | 6 + .../event_annotation/common/constants.ts | 4 + .../common/create_copied_annotation.ts | 24 + .../common/fetch_event_annotations/utils.ts | 2 +- src/plugins/event_annotation/common/index.ts | 14 +- .../common/manual_event_annotation/index.ts | 22 + .../query_point_event_annotation/index.ts | 20 + src/plugins/event_annotation/common/types.ts | 10 +- src/plugins/event_annotation/jest.config.js | 7 +- src/plugins/event_annotation/kibana.jsonc | 15 +- .../group_editor_flyout.test.tsx.snap | 38 + .../annotation_editor_controls.tsx | 390 ++++++++++ .../annotation_editor_controls/helpers.ts | 93 +++ .../annotation_editor_controls/icon_set.ts | 111 +++ .../annotation_editor_controls}/index.scss | 0 .../annotation_editor_controls/index.test.tsx | 435 ++++++++++++ .../annotation_editor_controls/index.tsx | 20 + .../manual_annotation_panel.tsx | 37 +- .../query_annotation_panel.tsx | 55 +- .../range_annotation_panel.tsx | 46 +- .../tooltip_annotation_panel.tsx | 33 +- .../annotation_editor_controls/types.ts | 13 + .../components/get_annotation_accessor.ts | 32 + .../group_editor_controls/annotation_list.tsx | 132 ++++ .../get_annotation_accessor.ts | 32 + .../group_editor_controls.test.tsx | 235 ++++++ .../group_editor_controls.tsx | 212 ++++++ .../components/group_editor_controls/index.ts | 9 + .../components/group_editor_flyout.test.tsx | 134 ++++ .../public/components/group_editor_flyout.tsx | 146 ++++ .../public/components/index.ts | 13 + .../public/components/table_list.test.tsx | 222 ++++++ .../public/components/table_list.tsx | 205 ++++++ .../__snapshots__/service.test.ts.snap | 77 +- .../event_annotation_service/helpers.ts | 8 - .../event_annotation_service/service.test.ts | 160 ++--- .../event_annotation_service/service.tsx | 143 +++- .../public/event_annotation_service/types.ts | 9 + .../public/get_table_list.tsx | 61 ++ src/plugins/event_annotation/public/index.ts | 5 + src/plugins/event_annotation/public/plugin.ts | 62 +- src/plugins/event_annotation/server/plugin.ts | 1 - .../event_annotation/server/saved_objects.ts | 8 +- src/plugins/event_annotation/tsconfig.json | 23 +- src/plugins/files_management/public/app.tsx | 6 +- .../public/mount_management_section.tsx | 2 +- src/plugins/files_management/tsconfig.json | 3 +- .../common/index.ts | 9 + .../common/types.ts | 9 + .../visualization_ui_components/kibana.jsonc | 6 +- .../dimension_buttons/dimension_button.tsx | 41 +- .../dimension_button_icon.tsx | 6 +- .../dimension_buttons/empty_button.tsx | 64 ++ .../components/dimension_buttons/index.ts | 4 + .../dimension_buttons/palette_indicator.tsx | 20 +- .../components/dimension_buttons/trigger.tsx | 70 ++ .../public/components/index.ts | 6 + .../components}/line_style_settings.tsx | 25 +- .../public/components/name_input.tsx | 2 +- .../query_input/filter_query_input.scss | 11 + .../query_input/filter_query_input.tsx | 5 +- .../components/text_decoration_setting.tsx | 122 ++++ .../public/index.ts | 9 + .../public/types.ts | 11 + .../public/util.ts | 12 + .../visualization_ui_components/tsconfig.json | 3 +- .../visualizations/common/constants.ts | 1 + src/plugins/visualizations/public/mocks.ts | 1 + src/plugins/visualizations/public/plugin.ts | 10 +- src/plugins/visualizations/public/types.ts | 3 + .../public/visualize_app/app.tsx | 6 +- .../components/visualize_listing.tsx | 319 +++++---- .../public/visualize_app/index.tsx | 2 +- .../public/visualize_app/types.ts | 3 +- src/plugins/visualizations/tsconfig.json | 8 +- .../functional/page_objects/visualize_page.ts | 8 + test/functional/services/listing_table.ts | 16 +- tsconfig.base.json | 8 +- x-pack/plugins/graph/public/application.tsx | 2 +- .../graph/public/apps/listing_route.tsx | 6 +- x-pack/plugins/graph/tsconfig.json | 3 +- x-pack/plugins/lens/common/constants.ts | 6 +- x-pack/plugins/lens/common/types.ts | 4 +- .../lens/public/app_plugin/lens_top_nav.tsx | 4 +- .../lens/public/data_views_service/loader.ts | 4 +- .../dimension_panel/dimension_panel.test.tsx | 4 +- .../datasources/form_based/form_based.tsx | 2 +- .../text_based/text_based_languages.tsx | 2 +- .../buttons/empty_dimension_button.tsx | 65 +- .../config_panel/layer_panel.scss | 110 +-- .../config_panel/layer_panel.test.tsx | 7 +- .../editor_frame/config_panel/layer_panel.tsx | 26 +- .../dimension_trigger/index.tsx | 50 -- .../xy/annotations/actions/index.ts | 6 + .../annotations/actions/save_action.test.tsx | 3 +- .../xy/annotations/actions/save_action.tsx | 25 +- .../visualizations/xy/annotations/helpers.tsx | 76 +- .../lens/public/visualizations/xy/index.ts | 11 +- .../visualizations/xy/to_expression.test.ts | 2 + .../visualizations/xy/visualization.test.tsx | 2 + .../visualizations/xy/visualization.tsx | 20 +- .../annotations_panel.tsx | 446 +++--------- .../annotations_config_panel/helpers.ts | 116 --- .../annotations_config_panel/icon_set.ts | 106 --- .../annotations_config_panel/index.test.tsx | 668 ------------------ .../annotations_config_panel/types.ts | 15 - .../xy/xy_config_panel/dimension_editor.tsx | 25 +- .../reference_line_panel.tsx | 20 +- .../shared/marker_decoration_settings.tsx | 106 +-- .../xy_config_panel/xy_config_panel.test.tsx | 20 +- .../visualizations/xy/xy_suggestions.test.ts | 2 + x-pack/plugins/maps/public/render_app.tsx | 2 +- .../routes/list_page/maps_list_view.tsx | 6 +- x-pack/plugins/maps/tsconfig.json | 3 +- .../translations/translations/fr-FR.json | 36 - .../translations/translations/ja-JP.json | 36 - .../translations/translations/zh-CN.json | 36 - .../apps/lens/group6/annotations.ts | 14 +- .../test/functional/page_objects/lens_page.ts | 4 +- yarn.lock | 10 +- 176 files changed, 4809 insertions(+), 2414 deletions(-) create mode 100644 packages/content-management/tabbed_table_list_view/README.mdx create mode 100644 packages/content-management/tabbed_table_list_view/index.ts create mode 100644 packages/content-management/tabbed_table_list_view/jest.config.js create mode 100644 packages/content-management/tabbed_table_list_view/kibana.jsonc create mode 100644 packages/content-management/tabbed_table_list_view/package.json create mode 100644 packages/content-management/tabbed_table_list_view/src/index.ts create mode 100644 packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.test.tsx create mode 100644 packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx create mode 100644 packages/content-management/tabbed_table_list_view/tsconfig.json rename packages/content-management/{table_list => table_list_view}/README.mdx (100%) create mode 100644 packages/content-management/table_list_view/index.ts rename packages/content-management/{table_list => table_list_view}/jest.config.js (86%) rename packages/content-management/{table_list => table_list_view}/kibana.jsonc (57%) rename packages/content-management/{table_list => table_list_view}/package.json (62%) rename packages/content-management/{table_list => table_list_view}/src/table_list_view.stories.tsx (90%) create mode 100644 packages/content-management/table_list_view/src/table_list_view.tsx create mode 100644 packages/content-management/table_list_view/tsconfig.json create mode 100644 packages/content-management/table_list_view_table/README.mdx rename packages/content-management/{table_list => table_list_view_table}/index.ts (69%) create mode 100644 packages/content-management/table_list_view_table/jest.config.js create mode 100644 packages/content-management/table_list_view_table/kibana.jsonc create mode 100644 packages/content-management/table_list_view_table/package.json rename packages/content-management/{table_list => table_list_view_table}/src/__jest__/index.ts (100%) rename packages/content-management/{table_list => table_list_view_table}/src/__jest__/tests.helpers.tsx (100%) rename packages/content-management/{table_list => table_list_view_table}/src/actions.ts (99%) rename packages/content-management/{table_list => table_list_view_table}/src/components/confirm_delete_modal.tsx (100%) rename packages/content-management/{table_list => table_list_view_table}/src/components/index.ts (100%) rename packages/content-management/{table_list => table_list_view_table}/src/components/item_details.tsx (96%) rename packages/content-management/{table_list => table_list_view_table}/src/components/listing_limit_warning.tsx (100%) rename packages/content-management/{table_list => table_list_view_table}/src/components/table.tsx (94%) rename packages/content-management/{table_list => table_list_view_table}/src/components/table_sort_select.tsx (98%) rename packages/content-management/{table_list => table_list_view_table}/src/components/tag_badge.tsx (100%) rename packages/content-management/{table_list => table_list_view_table}/src/components/tag_filter_panel.tsx (100%) rename packages/content-management/{table_list => table_list_view_table}/src/components/updated_at_field.tsx (100%) rename packages/content-management/{table_list => table_list_view_table}/src/components/use_tag_filter_panel.tsx (100%) rename packages/content-management/{table_list => table_list_view_table}/src/constants.ts (100%) rename packages/content-management/{table_list => table_list_view_table}/src/index.ts (81%) rename packages/content-management/{table_list => table_list_view_table}/src/mocks.tsx (99%) rename packages/content-management/{table_list => table_list_view_table}/src/reducer.tsx (99%) rename packages/content-management/{table_list => table_list_view_table}/src/services.tsx (100%) rename packages/content-management/{table_list => table_list_view_table}/src/table_list_view.test.tsx (91%) rename packages/content-management/{table_list/src/table_list_view.tsx => table_list_view_table/src/table_list_view_table.tsx} (88%) rename packages/content-management/{table_list => table_list_view_table}/src/types.ts (100%) rename packages/content-management/{table_list => table_list_view_table}/src/use_tags.ts (98%) rename packages/content-management/{table_list => table_list_view_table}/src/use_url_state.ts (100%) rename packages/content-management/{table_list => table_list_view_table}/tsconfig.json (100%) create mode 100755 src/plugins/event_annotation/.i18nrc.json create mode 100644 src/plugins/event_annotation/common/create_copied_annotation.ts create mode 100644 src/plugins/event_annotation/public/components/__snapshots__/group_editor_flyout.test.tsx.snap create mode 100644 src/plugins/event_annotation/public/components/annotation_editor_controls/annotation_editor_controls.tsx create mode 100644 src/plugins/event_annotation/public/components/annotation_editor_controls/helpers.ts create mode 100644 src/plugins/event_annotation/public/components/annotation_editor_controls/icon_set.ts rename {x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel => src/plugins/event_annotation/public/components/annotation_editor_controls}/index.scss (100%) create mode 100644 src/plugins/event_annotation/public/components/annotation_editor_controls/index.test.tsx create mode 100644 src/plugins/event_annotation/public/components/annotation_editor_controls/index.tsx rename {x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel => src/plugins/event_annotation/public/components/annotation_editor_controls}/manual_annotation_panel.tsx (80%) rename {x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel => src/plugins/event_annotation/public/components/annotation_editor_controls}/query_annotation_panel.tsx (64%) rename {x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel => src/plugins/event_annotation/public/components/annotation_editor_controls}/range_annotation_panel.tsx (72%) rename {x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel => src/plugins/event_annotation/public/components/annotation_editor_controls}/tooltip_annotation_panel.tsx (84%) create mode 100644 src/plugins/event_annotation/public/components/annotation_editor_controls/types.ts create mode 100644 src/plugins/event_annotation/public/components/get_annotation_accessor.ts create mode 100644 src/plugins/event_annotation/public/components/group_editor_controls/annotation_list.tsx create mode 100644 src/plugins/event_annotation/public/components/group_editor_controls/get_annotation_accessor.ts create mode 100644 src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.test.tsx create mode 100644 src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx create mode 100644 src/plugins/event_annotation/public/components/group_editor_controls/index.ts create mode 100644 src/plugins/event_annotation/public/components/group_editor_flyout.test.tsx create mode 100644 src/plugins/event_annotation/public/components/group_editor_flyout.tsx create mode 100644 src/plugins/event_annotation/public/components/index.ts create mode 100644 src/plugins/event_annotation/public/components/table_list.test.tsx create mode 100644 src/plugins/event_annotation/public/components/table_list.tsx create mode 100644 src/plugins/event_annotation/public/get_table_list.tsx create mode 100644 src/plugins/visualization_ui_components/common/index.ts create mode 100644 src/plugins/visualization_ui_components/common/types.ts create mode 100644 src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.tsx create mode 100644 src/plugins/visualization_ui_components/public/components/dimension_buttons/trigger.tsx rename {x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/shared => src/plugins/visualization_ui_components/public/components}/line_style_settings.tsx (83%) create mode 100644 src/plugins/visualization_ui_components/public/components/query_input/filter_query_input.scss create mode 100644 src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx create mode 100644 src/plugins/visualization_ui_components/public/types.ts create mode 100644 src/plugins/visualization_ui_components/public/util.ts delete mode 100644 x-pack/plugins/lens/public/shared_components/dimension_trigger/index.tsx delete mode 100644 x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/helpers.ts delete mode 100644 x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/icon_set.ts delete mode 100644 x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.test.tsx delete mode 100644 x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/types.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 667b43e3a73da..7d57bd2924ba0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -88,7 +88,9 @@ src/plugins/console @elastic/platform-deployment-management packages/content-management/content_editor @elastic/appex-sharedux examples/content_management_examples @elastic/appex-sharedux src/plugins/content_management @elastic/appex-sharedux -packages/content-management/table_list @elastic/appex-sharedux +packages/content-management/tabbed_table_list_view @elastic/appex-sharedux +packages/content-management/table_list_view @elastic/appex-sharedux +packages/content-management/table_list_view_table @elastic/appex-sharedux packages/kbn-content-management-utils @elastic/kibana-data-discovery examples/controls_example @elastic/kibana-presentation src/plugins/controls @elastic/kibana-presentation diff --git a/examples/content_management_examples/public/examples/msearch/msearch_app.tsx b/examples/content_management_examples/public/examples/msearch/msearch_app.tsx index aa2bc6c1a8b7b..ae05e15db91d0 100644 --- a/examples/content_management_examples/public/examples/msearch/msearch_app.tsx +++ b/examples/content_management_examples/public/examples/msearch/msearch_app.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ContentClientProvider, type ContentClient } from '@kbn/content-management-plugin/public'; -import { TableListViewKibanaProvider } from '@kbn/content-management-table-list'; +import { TableListViewKibanaProvider } from '@kbn/content-management-table-list-view-table'; import type { CoreStart } from '@kbn/core/public'; import { toMountPoint } from '@kbn/kibana-react-plugin/public'; import { FormattedRelative, I18nProvider } from '@kbn/i18n-react'; diff --git a/examples/content_management_examples/public/examples/msearch/msearch_table.tsx b/examples/content_management_examples/public/examples/msearch/msearch_table.tsx index 47eaab4ba602b..a30c652cf0f79 100644 --- a/examples/content_management_examples/public/examples/msearch/msearch_table.tsx +++ b/examples/content_management_examples/public/examples/msearch/msearch_table.tsx @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { TableListView, UserContentCommonSchema } from '@kbn/content-management-table-list'; +import { TableListView, UserContentCommonSchema } from '@kbn/content-management-table-list-view'; import { useContentClient } from '@kbn/content-management-plugin/public'; import React from 'react'; import { SavedObjectsFindOptionsReference } from '@kbn/core-saved-objects-api-browser'; @@ -51,7 +51,7 @@ export const MSearchTable = () => { initialPageSize={50} entityName={`ContentItem`} entityNamePlural={`ContentItems`} - tableListTitle={`MSearch Demo`} + title={`MSearch Demo`} urlStateEnabled={false} emptyPrompt={<>No data found. Try to install some sample data first.} onClickTitle={(item) => { diff --git a/examples/content_management_examples/tsconfig.json b/examples/content_management_examples/tsconfig.json index 7f07213ce82b6..ba1c3f19850c6 100644 --- a/examples/content_management_examples/tsconfig.json +++ b/examples/content_management_examples/tsconfig.json @@ -20,10 +20,13 @@ "@kbn/content-management-plugin", "@kbn/core-application-browser", "@kbn/shared-ux-link-redirect-app", - "@kbn/content-management-table-list", + "@kbn/content-management-table-list-view", + "@kbn/content-management-table-list-view-table", "@kbn/kibana-react-plugin", "@kbn/i18n-react", "@kbn/saved-objects-tagging-oss-plugin", "@kbn/core-saved-objects-api-browser", + "@kbn/content-management-table-list-view-table", + "@kbn/content-management-table-list-view", ] } diff --git a/package.json b/package.json index c00cffaf22cb4..f65e02b6dabec 100644 --- a/package.json +++ b/package.json @@ -189,7 +189,9 @@ "@kbn/content-management-content-editor": "link:packages/content-management/content_editor", "@kbn/content-management-examples-plugin": "link:examples/content_management_examples", "@kbn/content-management-plugin": "link:src/plugins/content_management", - "@kbn/content-management-table-list": "link:packages/content-management/table_list", + "@kbn/content-management-tabbed-table-list-view": "link:packages/content-management/tabbed_table_list_view", + "@kbn/content-management-table-list-view": "link:packages/content-management/table_list_view", + "@kbn/content-management-table-list-view-table": "link:packages/content-management/table_list_view_table", "@kbn/content-management-utils": "link:packages/kbn-content-management-utils", "@kbn/controls-example-plugin": "link:examples/controls_example", "@kbn/controls-plugin": "link:src/plugins/controls", diff --git a/packages/content-management/tabbed_table_list_view/README.mdx b/packages/content-management/tabbed_table_list_view/README.mdx new file mode 100644 index 0000000000000..357a07f8fc1c3 --- /dev/null +++ b/packages/content-management/tabbed_table_list_view/README.mdx @@ -0,0 +1,20 @@ +--- +id: sharedUX/contentManagement/TabbedTableListView +slug: /shared-ux/content-management/tabbed-table-list-view +title: Tabbed table list view +summary: A table to render user generated saved objects. +tags: ['shared-ux', 'content-management'] +date: 2022-08-09 +--- + +The `` renders an eui page to display a list of user content saved object. + +**Uncomplete documentation**. Will be updated. + +## API + +TODO: https://github.com/elastic/kibana/issues/144402 + +## EUI Promotion Status + +This component is not currently considered for promotion to EUI. diff --git a/packages/content-management/tabbed_table_list_view/index.ts b/packages/content-management/tabbed_table_list_view/index.ts new file mode 100644 index 0000000000000..cf228d45a10e3 --- /dev/null +++ b/packages/content-management/tabbed_table_list_view/index.ts @@ -0,0 +1,11 @@ +/* + * 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. + */ + +export { TabbedTableListView, type TableListTab, type TableListTabParentProps } from './src'; + +export type { UserContentCommonSchema } from '@kbn/content-management-table-list-view-table'; diff --git a/packages/content-management/tabbed_table_list_view/jest.config.js b/packages/content-management/tabbed_table_list_view/jest.config.js new file mode 100644 index 0000000000000..dcb469837dcbc --- /dev/null +++ b/packages/content-management/tabbed_table_list_view/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../..', + roots: ['/packages/content-management/tabbed_table_list_view'], +}; diff --git a/packages/content-management/tabbed_table_list_view/kibana.jsonc b/packages/content-management/tabbed_table_list_view/kibana.jsonc new file mode 100644 index 0000000000000..335fdd602037a --- /dev/null +++ b/packages/content-management/tabbed_table_list_view/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/content-management-tabbed-table-list-view", + "owner": "@elastic/appex-sharedux" +} diff --git a/packages/content-management/tabbed_table_list_view/package.json b/packages/content-management/tabbed_table_list_view/package.json new file mode 100644 index 0000000000000..42c4ca6b19c0d --- /dev/null +++ b/packages/content-management/tabbed_table_list_view/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/content-management-tabbed-table-list-view", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/content-management/tabbed_table_list_view/src/index.ts b/packages/content-management/tabbed_table_list_view/src/index.ts new file mode 100644 index 0000000000000..515598b765bcd --- /dev/null +++ b/packages/content-management/tabbed_table_list_view/src/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + +export { + TabbedTableListView, + type TableListTab, + type TableListTabParentProps, +} from './tabbed_table_list_view'; diff --git a/packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.test.tsx b/packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.test.tsx new file mode 100644 index 0000000000000..cc7ced86951a4 --- /dev/null +++ b/packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.test.tsx @@ -0,0 +1,128 @@ +/* + * 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 { ReactWrapper, mount, shallow } from 'enzyme'; +import { + TabbedTableListView, + TableListTabParentProps, + TableListTab, +} from './tabbed_table_list_view'; +import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; +import { EuiPageTemplate } from '@elastic/eui'; +import { act } from 'react-dom/test-utils'; + +// Mock the necessary props for the component +const title = 'Test Title'; +const description = 'Test Description'; +const headingId = 'test-heading-id'; +const children =
Test Children
; + +const tableList1 = 'Test Table List 1'; +const tableList2 = 'Test Table List 2'; + +const tabs: TableListTab[] = [ + { + title: 'Tab 1', + id: 'tab-1', + getTableList: async (props: TableListTabParentProps) =>
{tableList1}
, + }, + { + title: 'Tab 2', + id: 'tab-2', + getTableList: async (props: TableListTabParentProps) =>
{tableList2}
, + }, +]; + +describe('TabbedTableListView', () => { + it('should render without errors', () => { + const wrapper = shallow( + {}} + /> + ); + expect(wrapper.exists()).toBe(true); + }); + + it('should render the correct title and description', () => { + const wrapper = shallow( + {}} + /> + ); + expect(wrapper.find(KibanaPageTemplate.Header).prop('pageTitle')).toMatchInlineSnapshot(` + + Test Title + + `); + expect(wrapper.find(KibanaPageTemplate.Header).prop('description')).toContain(description); + }); + + it('should render the correct number of tabs', () => { + const wrapper = shallow( + {}} + /> + ); + + expect(wrapper.find(EuiPageTemplate.Header).prop('tabs')).toHaveLength(2); + }); + + it('should switch tabs when props change', async () => { + const changeActiveTab = jest.fn(); + + let wrapper: ReactWrapper | undefined; + await act(async () => { + wrapper = mount( + + ); + }); + + if (!wrapper) { + throw new Error("enzyme wrapper didn't initialize"); + } + + expect(wrapper.find(EuiPageTemplate.Section).text()).toContain(tableList1); + + await act(async () => { + wrapper?.setProps({ + activeTabId: 'tab-2', + }); + }); + + expect(wrapper.find(EuiPageTemplate.Section).text()).toContain(tableList2); + }); +}); diff --git a/packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx b/packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx new file mode 100644 index 0000000000000..9872e35d90c88 --- /dev/null +++ b/packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx @@ -0,0 +1,88 @@ +/* + * 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 { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; +import React, { useCallback, useEffect, useState } from 'react'; +import type { + TableListViewTableProps, + UserContentCommonSchema, +} from '@kbn/content-management-table-list-view-table'; +import type { TableListViewProps } from '@kbn/content-management-table-list-view'; + +export type TableListTabParentProps = + Pick, 'onFetchSuccess' | 'setPageDataTestSubject'>; + +export interface TableListTab { + title: string; + id: string; + getTableList: ( + propsFromParent: TableListTabParentProps + ) => Promise | React.ReactNode; +} + +type TabbedTableListViewProps = Pick< + TableListViewProps, + 'title' | 'description' | 'headingId' | 'children' +> & { tabs: TableListTab[]; activeTabId: string; changeActiveTab: (id: string) => void }; + +export const TabbedTableListView = ({ + title, + description, + headingId, + children, + tabs, + activeTabId, + changeActiveTab, +}: TabbedTableListViewProps) => { + const [hasInitialFetchReturned, setHasInitialFetchReturned] = useState(false); + const [pageDataTestSubject, setPageDataTestSubject] = useState(); + + const getActiveTab = useCallback( + () => tabs.find((tab) => tab.id === activeTabId) ?? tabs[0], + [activeTabId, tabs] + ); + + const [tableList, setTableList] = useState(null); + + useEffect(() => { + async function loadTableList() { + const newTableList = await getActiveTab().getTableList({ + onFetchSuccess: () => { + if (!hasInitialFetchReturned) { + setHasInitialFetchReturned(true); + } + }, + setPageDataTestSubject, + }); + setTableList(newTableList); + } + + loadTableList(); + }, [hasInitialFetchReturned, activeTabId, tabs, getActiveTab]); + + return ( + + {title}} + description={description} + data-test-subj="top-nav" + tabs={tabs.map((tab) => ({ + onClick: () => changeActiveTab(tab.id), + isSelected: tab.id === getActiveTab().id, + label: tab.title, + }))} + /> + + {/* Any children passed to the component */} + {children} + + {tableList} + + + ); +}; diff --git a/packages/content-management/tabbed_table_list_view/tsconfig.json b/packages/content-management/tabbed_table_list_view/tsconfig.json new file mode 100644 index 0000000000000..7d0e24d7aff69 --- /dev/null +++ b/packages/content-management/tabbed_table_list_view/tsconfig.json @@ -0,0 +1,27 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react", + "@kbn/ambient-ui-types", + "@kbn/ambient-storybook-types", + "@emotion/react/types/css-prop" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "kbn_references": [ + "@kbn/content-management-table-list-view", + "@kbn/shared-ux-page-kibana-template", + "@kbn/content-management-table-list-view-table", + "@kbn/content-management-table-list-view", + ], + "exclude": [ + "target/**/*", + ] +} diff --git a/packages/content-management/table_list/README.mdx b/packages/content-management/table_list_view/README.mdx similarity index 100% rename from packages/content-management/table_list/README.mdx rename to packages/content-management/table_list_view/README.mdx diff --git a/packages/content-management/table_list_view/index.ts b/packages/content-management/table_list_view/index.ts new file mode 100644 index 0000000000000..cb075152947ed --- /dev/null +++ b/packages/content-management/table_list_view/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + +export { TableListView } from './src/table_list_view'; +export type { TableListViewProps } from './src/table_list_view'; + +export type { UserContentCommonSchema } from '@kbn/content-management-table-list-view-table'; diff --git a/packages/content-management/table_list/jest.config.js b/packages/content-management/table_list_view/jest.config.js similarity index 86% rename from packages/content-management/table_list/jest.config.js rename to packages/content-management/table_list_view/jest.config.js index 546d16dd86cf0..aab014b44dcb8 100644 --- a/packages/content-management/table_list/jest.config.js +++ b/packages/content-management/table_list_view/jest.config.js @@ -9,5 +9,5 @@ module.exports = { preset: '@kbn/test', rootDir: '../../..', - roots: ['/packages/content-management/table_list'], + roots: ['/packages/content-management/table_list_view'], }; diff --git a/packages/content-management/table_list/kibana.jsonc b/packages/content-management/table_list_view/kibana.jsonc similarity index 57% rename from packages/content-management/table_list/kibana.jsonc rename to packages/content-management/table_list_view/kibana.jsonc index 2e4dd9548f604..a9c3a12553ff4 100644 --- a/packages/content-management/table_list/kibana.jsonc +++ b/packages/content-management/table_list_view/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", - "id": "@kbn/content-management-table-list", + "id": "@kbn/content-management-table-list-view", "owner": "@elastic/appex-sharedux" } diff --git a/packages/content-management/table_list/package.json b/packages/content-management/table_list_view/package.json similarity index 62% rename from packages/content-management/table_list/package.json rename to packages/content-management/table_list_view/package.json index b387c8a466b5e..1a3dbce9e195c 100644 --- a/packages/content-management/table_list/package.json +++ b/packages/content-management/table_list_view/package.json @@ -1,6 +1,6 @@ { - "name": "@kbn/content-management-table-list", + "name": "@kbn/content-management-table-list-view", "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0" -} \ No newline at end of file +} diff --git a/packages/content-management/table_list/src/table_list_view.stories.tsx b/packages/content-management/table_list_view/src/table_list_view.stories.tsx similarity index 90% rename from packages/content-management/table_list/src/table_list_view.stories.tsx rename to packages/content-management/table_list_view/src/table_list_view.stories.tsx index 4943c9d0be657..878e5413b6774 100644 --- a/packages/content-management/table_list/src/table_list_view.stories.tsx +++ b/packages/content-management/table_list_view/src/table_list_view.stories.tsx @@ -11,10 +11,16 @@ import Chance from 'chance'; import moment from 'moment'; import { action } from '@storybook/addon-actions'; -import { Params, getStoryArgTypes, getStoryServices } from './mocks'; - -import { TableListView as Component, UserContentCommonSchema } from './table_list_view'; -import { TableListViewProvider } from './services'; +import { + TableListViewProvider, + UserContentCommonSchema, +} from '@kbn/content-management-table-list-view-table'; +import { + Params, + getStoryArgTypes, + getStoryServices, +} from '@kbn/content-management-table-list-view-table/src/mocks'; +import { TableListView as Component } from './table_list_view'; import mdx from '../README.mdx'; diff --git a/packages/content-management/table_list_view/src/table_list_view.tsx b/packages/content-management/table_list_view/src/table_list_view.tsx new file mode 100644 index 0000000000000..59fbe67a4a4c5 --- /dev/null +++ b/packages/content-management/table_list_view/src/table_list_view.tsx @@ -0,0 +1,131 @@ +/* + * 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 { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; +import React, { ReactNode, useState } from 'react'; +import { + TableListViewTable, + type TableListViewTableProps, + type UserContentCommonSchema, +} from '@kbn/content-management-table-list-view-table'; + +export type TableListViewProps = Pick< + TableListViewTableProps, + | 'entityName' + | 'entityNamePlural' + | 'initialFilter' + | 'headingId' + | 'initialPageSize' + | 'listingLimit' + | 'urlStateEnabled' + | 'customTableColumn' + | 'emptyPrompt' + | 'findItems' + | 'createItem' + | 'editItem' + | 'deleteItems' + | 'getDetailViewLink' + | 'onClickTitle' + | 'id' + | 'rowItemActions' + | 'contentEditor' + | 'titleColumnName' + | 'withoutPageTemplateWrapper' + | 'showEditActionForItem' +> & { + title: string; + description?: string; + /** + * Additional actions (buttons) to be placed in the page header. + * @note only the first two values will be used. + */ + additionalRightSideActions?: ReactNode[]; + children?: ReactNode | undefined; +}; + +export const TableListView = ({ + title, + description, + entityName, + entityNamePlural, + initialFilter, + headingId, + initialPageSize, + listingLimit, + urlStateEnabled = true, + customTableColumn, + emptyPrompt, + findItems, + createItem, + editItem, + deleteItems, + getDetailViewLink, + onClickTitle, + rowItemActions, + id: listingId, + contentEditor, + children, + titleColumnName, + additionalRightSideActions, + withoutPageTemplateWrapper, +}: TableListViewProps) => { + const PageTemplate = withoutPageTemplateWrapper + ? (React.Fragment as unknown as typeof KibanaPageTemplate) + : KibanaPageTemplate; + + const [hasInitialFetchReturned, setHasInitialFetchReturned] = useState(false); + const [pageDataTestSubject, setPageDataTestSubject] = useState(); + + return ( + + {title}} + description={description} + rightSideItems={additionalRightSideActions?.slice(0, 2)} + data-test-subj="top-nav" + /> + + {/* Any children passed to the component */} + {children} + + { + if (!hasInitialFetchReturned) { + setHasInitialFetchReturned(true); + } + }} + setPageDataTestSubject={setPageDataTestSubject} + /> + + + ); +}; + +// eslint-disable-next-line import/no-default-export +export default TableListView; diff --git a/packages/content-management/table_list_view/tsconfig.json b/packages/content-management/table_list_view/tsconfig.json new file mode 100644 index 0000000000000..8b09db8f78c5a --- /dev/null +++ b/packages/content-management/table_list_view/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react", + "@kbn/ambient-ui-types", + "@kbn/ambient-storybook-types", + "@emotion/react/types/css-prop" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "kbn_references": [ + "@kbn/shared-ux-page-kibana-template", + "@kbn/content-management-table-list-view-table" + ], + "exclude": [ + "target/**/*", + ] +} diff --git a/packages/content-management/table_list_view_table/README.mdx b/packages/content-management/table_list_view_table/README.mdx new file mode 100644 index 0000000000000..df3fdc9db53e9 --- /dev/null +++ b/packages/content-management/table_list_view_table/README.mdx @@ -0,0 +1,20 @@ +--- +id: sharedUX/contentManagement/TableListViewTable +slug: /shared-ux/content-management/table-list-view-table +title: Table list view +summary: A table to render user generated saved objects. +tags: ['shared-ux', 'content-management'] +date: 2022-08-09 +--- + +The `` renders a list of user content saved object. + +**Uncomplete documentation**. Will be updated. + +## API + +TODO: https://github.com/elastic/kibana/issues/144402 + +## EUI Promotion Status + +This component is not currently considered for promotion to EUI. diff --git a/packages/content-management/table_list/index.ts b/packages/content-management/table_list_view_table/index.ts similarity index 69% rename from packages/content-management/table_list/index.ts rename to packages/content-management/table_list_view_table/index.ts index 9a608b2d6dda3..28acf44221f89 100644 --- a/packages/content-management/table_list/index.ts +++ b/packages/content-management/table_list_view_table/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -export { TableListView, TableListViewProvider, TableListViewKibanaProvider } from './src'; +export { TableListViewTable, TableListViewProvider, TableListViewKibanaProvider } from './src'; + +export type { UserContentCommonSchema, TableListViewTableProps, RowActions } from './src'; -export type { UserContentCommonSchema, RowActions } from './src'; export type { TableListViewKibanaDependencies } from './src/services'; diff --git a/packages/content-management/table_list_view_table/jest.config.js b/packages/content-management/table_list_view_table/jest.config.js new file mode 100644 index 0000000000000..6f81c7abbaf3c --- /dev/null +++ b/packages/content-management/table_list_view_table/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../..', + roots: ['/packages/content-management/table_list_view_table'], +}; diff --git a/packages/content-management/table_list_view_table/kibana.jsonc b/packages/content-management/table_list_view_table/kibana.jsonc new file mode 100644 index 0000000000000..85861c453bffb --- /dev/null +++ b/packages/content-management/table_list_view_table/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/content-management-table-list-view-table", + "owner": "@elastic/appex-sharedux" +} diff --git a/packages/content-management/table_list_view_table/package.json b/packages/content-management/table_list_view_table/package.json new file mode 100644 index 0000000000000..b9d5dcf7a03f2 --- /dev/null +++ b/packages/content-management/table_list_view_table/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/content-management-table-list-view-table", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/content-management/table_list/src/__jest__/index.ts b/packages/content-management/table_list_view_table/src/__jest__/index.ts similarity index 100% rename from packages/content-management/table_list/src/__jest__/index.ts rename to packages/content-management/table_list_view_table/src/__jest__/index.ts diff --git a/packages/content-management/table_list/src/__jest__/tests.helpers.tsx b/packages/content-management/table_list_view_table/src/__jest__/tests.helpers.tsx similarity index 100% rename from packages/content-management/table_list/src/__jest__/tests.helpers.tsx rename to packages/content-management/table_list_view_table/src/__jest__/tests.helpers.tsx diff --git a/packages/content-management/table_list/src/actions.ts b/packages/content-management/table_list_view_table/src/actions.ts similarity index 99% rename from packages/content-management/table_list/src/actions.ts rename to packages/content-management/table_list_view_table/src/actions.ts index 6ae2740381fcc..0a18c74a571aa 100644 --- a/packages/content-management/table_list/src/actions.ts +++ b/packages/content-management/table_list_view_table/src/actions.ts @@ -8,7 +8,7 @@ import type { IHttpFetchError } from '@kbn/core-http-browser'; import type { Query } from '@elastic/eui'; -import type { State, UserContentCommonSchema } from './table_list_view'; +import type { State, UserContentCommonSchema } from './table_list_view_table'; /** Action to trigger a fetch of the table items */ export interface OnFetchItemsAction { diff --git a/packages/content-management/table_list/src/components/confirm_delete_modal.tsx b/packages/content-management/table_list_view_table/src/components/confirm_delete_modal.tsx similarity index 100% rename from packages/content-management/table_list/src/components/confirm_delete_modal.tsx rename to packages/content-management/table_list_view_table/src/components/confirm_delete_modal.tsx diff --git a/packages/content-management/table_list/src/components/index.ts b/packages/content-management/table_list_view_table/src/components/index.ts similarity index 100% rename from packages/content-management/table_list/src/components/index.ts rename to packages/content-management/table_list_view_table/src/components/index.ts diff --git a/packages/content-management/table_list/src/components/item_details.tsx b/packages/content-management/table_list_view_table/src/components/item_details.tsx similarity index 96% rename from packages/content-management/table_list/src/components/item_details.tsx rename to packages/content-management/table_list_view_table/src/components/item_details.tsx index b7f4186438b66..0b2f52b216905 100644 --- a/packages/content-management/table_list/src/components/item_details.tsx +++ b/packages/content-management/table_list_view_table/src/components/item_details.tsx @@ -12,11 +12,11 @@ import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; import type { Tag } from '../types'; import { useServices } from '../services'; -import type { UserContentCommonSchema, Props as TableListViewProps } from '../table_list_view'; +import type { UserContentCommonSchema, TableListViewTableProps } from '../table_list_view_table'; import { TagBadge } from './tag_badge'; type InheritedProps = Pick< - TableListViewProps, + TableListViewTableProps, 'onClickTitle' | 'getDetailViewLink' | 'id' >; interface Props extends InheritedProps { diff --git a/packages/content-management/table_list/src/components/listing_limit_warning.tsx b/packages/content-management/table_list_view_table/src/components/listing_limit_warning.tsx similarity index 100% rename from packages/content-management/table_list/src/components/listing_limit_warning.tsx rename to packages/content-management/table_list_view_table/src/components/listing_limit_warning.tsx diff --git a/packages/content-management/table_list/src/components/table.tsx b/packages/content-management/table_list_view_table/src/components/table.tsx similarity index 94% rename from packages/content-management/table_list/src/components/table.tsx rename to packages/content-management/table_list_view_table/src/components/table.tsx index 3214e7bf00a72..875d1ddedfa41 100644 --- a/packages/content-management/table_list/src/components/table.tsx +++ b/packages/content-management/table_list_view_table/src/components/table.tsx @@ -17,6 +17,7 @@ import { SearchFilterConfig, Direction, Query, + Search, type EuiTableSelectionType, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -25,9 +26,9 @@ import { useServices } from '../services'; import type { Action } from '../actions'; import type { State as TableListViewState, - Props as TableListViewProps, + TableListViewTableProps, UserContentCommonSchema, -} from '../table_list_view'; +} from '../table_list_view_table'; import type { TableItemsRowActions } from '../types'; import { TableSortSelect } from './table_sort_select'; import { TagFilterPanel } from './tag_filter_panel'; @@ -53,8 +54,9 @@ interface Props extends State, TagManageme tableCaption: string; tableColumns: Array>; hasUpdatedAtMetadata: boolean; - deleteItems: TableListViewProps['deleteItems']; + deleteItems: TableListViewTableProps['deleteItems']; tableItemsRowActions: TableItemsRowActions; + renderCreateButton: () => React.ReactElement | undefined; onSortChange: (column: SortColumnField, direction: Direction) => void; onTableChange: (criteria: CriteriaWithPagination) => void; onTableSearchChange: (arg: { query: Query | null; queryText: string }) => void; @@ -76,6 +78,7 @@ export function Table({ tagsToTableItemMap, tableItemsRowActions, deleteItems, + renderCreateButton, tableCaption, onTableChange, onTableSearchChange, @@ -201,10 +204,11 @@ export function Table({ return [tableSortSelectFilter, tagFilterPanel]; }, [tableSortSelectFilter, tagFilterPanel]); - const search = useMemo(() => { + const search = useMemo((): Search => { return { onChange: onTableSearchChange, toolsLeft: renderToolsLeft(), + toolsRight: renderCreateButton(), query: searchQuery.query ?? undefined, box: { incremental: true, @@ -212,7 +216,7 @@ export function Table({ }, filters: searchFilters, }; - }, [onTableSearchChange, renderToolsLeft, searchFilters, searchQuery.query]); + }, [onTableSearchChange, renderCreateButton, renderToolsLeft, searchFilters, searchQuery.query]); const noItemsMessage = ( {}) => * consuming component stories. */ export const getStoryArgTypes = () => ({ - tableListTitle: { + title: { control: { type: 'text', }, diff --git a/packages/content-management/table_list/src/reducer.tsx b/packages/content-management/table_list_view_table/src/reducer.tsx similarity index 99% rename from packages/content-management/table_list/src/reducer.tsx rename to packages/content-management/table_list_view_table/src/reducer.tsx index 84ff8c0308f96..c8486d92caced 100644 --- a/packages/content-management/table_list/src/reducer.tsx +++ b/packages/content-management/table_list_view_table/src/reducer.tsx @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import type { State, UserContentCommonSchema } from './table_list_view'; +import type { State, UserContentCommonSchema } from './table_list_view_table'; import type { Action } from './actions'; export function getReducer() { diff --git a/packages/content-management/table_list/src/services.tsx b/packages/content-management/table_list_view_table/src/services.tsx similarity index 100% rename from packages/content-management/table_list/src/services.tsx rename to packages/content-management/table_list_view_table/src/services.tsx diff --git a/packages/content-management/table_list/src/table_list_view.test.tsx b/packages/content-management/table_list_view_table/src/table_list_view.test.tsx similarity index 91% rename from packages/content-management/table_list/src/table_list_view.test.tsx rename to packages/content-management/table_list_view_table/src/table_list_view.test.tsx index 6b0b850cddcd4..f03ab50c5234b 100644 --- a/packages/content-management/table_list/src/table_list_view.test.tsx +++ b/packages/content-management/table_list_view_table/src/table_list_view.test.tsx @@ -18,10 +18,10 @@ import type { LocationDescriptor, History } from 'history'; import { WithServices } from './__jest__'; import { getTagList } from './mocks'; import { - TableListView, - Props as TableListViewProps, - UserContentCommonSchema, -} from './table_list_view'; + TableListViewTable, + type TableListViewTableProps, + type UserContentCommonSchema, +} from './table_list_view_table'; const mockUseEffect = useEffect; @@ -49,18 +49,6 @@ interface Router { }; } -const requiredProps: TableListViewProps = { - entityName: 'test', - entityNamePlural: 'tests', - listingLimit: 500, - initialFilter: '', - initialPageSize: 20, - tableListTitle: 'test title', - findItems: jest.fn().mockResolvedValue({ total: 0, hits: [] }), - getDetailViewLink: () => 'http://elastic.co', - urlStateEnabled: false, -}; - const twoDaysAgo = new Date(new Date().setDate(new Date().getDate() - 2)); const twoDaysAgoToString = new Date(twoDaysAgo.getTime()).toDateString(); const yesterday = new Date(new Date().setDate(new Date().getDate() - 1)); @@ -73,6 +61,20 @@ const getActions = (testBed: TestBed) => ({ }); describe('TableListView', () => { + const requiredProps: TableListViewTableProps = { + entityName: 'test', + entityNamePlural: 'tests', + listingLimit: 500, + initialFilter: '', + initialPageSize: 20, + findItems: jest.fn().mockResolvedValue({ total: 0, hits: [] }), + getDetailViewLink: () => 'http://elastic.co', + urlStateEnabled: false, + onFetchSuccess: () => {}, + tableCaption: 'my caption', + setPageDataTestSubject: () => {}, + }; + beforeAll(() => { jest.useFakeTimers({ legacyFakeTimers: true }); }); @@ -81,8 +83,8 @@ describe('TableListView', () => { jest.useRealTimers(); }); - const setup = registerTestBed( - WithServices(TableListView), + const setup = registerTestBed( + WithServices(TableListViewTable), { defaultProps: { ...requiredProps }, memoryRouter: { wrapComponent: true }, @@ -376,8 +378,8 @@ describe('TableListView', () => { }); describe('column sorting', () => { - const setupColumnSorting = registerTestBed( - WithServices(TableListView, { + const setupColumnSorting = registerTestBed( + WithServices(TableListViewTable, { TagList: getTagList({ references: [] }), }), { @@ -579,8 +581,8 @@ describe('TableListView', () => { }); describe('content editor', () => { - const setupInspector = registerTestBed( - WithServices(TableListView), + const setupInspector = registerTestBed( + WithServices(TableListViewTable), { defaultProps: { ...requiredProps }, memoryRouter: { wrapComponent: true }, @@ -630,8 +632,8 @@ describe('TableListView', () => { }); describe('tag filtering', () => { - const setupTagFiltering = registerTestBed( - WithServices(TableListView, { + const setupTagFiltering = registerTestBed( + WithServices(TableListViewTable, { getTagList: () => [ { id: 'id-tag-1', name: 'tag-1', type: 'tag', description: '', color: '' }, { id: 'id-tag-2', name: 'tag-2', type: 'tag', description: '', color: '' }, @@ -782,8 +784,8 @@ describe('TableListView', () => { describe('url state', () => { let router: Router | undefined; - const setupTagFiltering = registerTestBed( - WithServices(TableListView, { + const setupTagFiltering = registerTestBed( + WithServices(TableListViewTable, { getTagList: () => [ { id: 'id-tag-1', name: 'tag-1', type: 'tag', description: '', color: '' }, { id: 'id-tag-2', name: 'tag-2', type: 'tag', description: '', color: '' }, @@ -1092,7 +1094,7 @@ describe('TableListView', () => { }, ]; - const setupTest = async (props?: Partial) => { + const setupTest = async (props?: Partial) => { let testBed: TestBed | undefined; const deleteItems = jest.fn(); await act(async () => { @@ -1173,3 +1175,87 @@ describe('TableListView', () => { }); }); }); + +describe('TableList', () => { + const requiredProps: TableListViewTableProps = { + entityName: 'test', + entityNamePlural: 'tests', + initialPageSize: 20, + listingLimit: 500, + findItems: jest.fn().mockResolvedValue({ total: 0, hits: [] }), + onFetchSuccess: jest.fn(), + tableCaption: 'test title', + getDetailViewLink: () => '', + setPageDataTestSubject: () => {}, + }; + + const setup = registerTestBed( + WithServices(TableListViewTable), + { + defaultProps: { ...requiredProps, refreshListBouncer: false }, + memoryRouter: { wrapComponent: true }, + } + ); + + it('refreshes the list when the bouncer changes', async () => { + let testBed: TestBed; + + const findItems = jest.fn().mockResolvedValue({ total: 0, hits: [] }); + + await act(async () => { + testBed = setup({ findItems }); + }); + + const { component, table } = testBed!; + + findItems.mockClear(); + expect(findItems).not.toHaveBeenCalled(); + + const hits: UserContentCommonSchema[] = [ + { + id: `item`, + type: 'dashboard', + updatedAt: 'some date', + attributes: { + title: `Updated title`, + }, + references: [], + }, + ]; + findItems.mockResolvedValue({ total: hits.length, hits }); + + await act(async () => { + component.setProps({ + refreshListBouncer: true, + }); + }); + + component.update(); + + expect(findItems).toHaveBeenCalledTimes(1); + + const metadata = table.getMetaData('itemsInMemTable'); + + expect(metadata.tableCellsValues[0][0]).toBe('Updated title'); + }); + + it('reports successful fetches', async () => { + const onFetchSuccess = jest.fn(); + + await act(async () => { + setup({ onFetchSuccess }); + }); + + expect(onFetchSuccess).toHaveBeenCalled(); + }); + + it('reports the page data test subject', async () => { + const setPageDataTestSubject = jest.fn(); + + act(() => { + setup({ setPageDataTestSubject }); + }); + + expect(setPageDataTestSubject).toHaveBeenCalledWith('testLandingPage'); + }); +}); diff --git a/packages/content-management/table_list/src/table_list_view.tsx b/packages/content-management/table_list_view_table/src/table_list_view_table.tsx similarity index 88% rename from packages/content-management/table_list/src/table_list_view.tsx rename to packages/content-management/table_list_view_table/src/table_list_view_table.tsx index 030aaad0527a9..a0d544de5687e 100644 --- a/packages/content-management/table_list/src/table_list_view.tsx +++ b/packages/content-management/table_list_view_table/src/table_list_view_table.tsx @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import React, { useReducer, useCallback, useEffect, useRef, useMemo, ReactNode } from 'react'; +import React, { useReducer, useCallback, useEffect, useRef, useMemo } from 'react'; import useDebounce from 'react-use/lib/useDebounce'; import { EuiBasicTableColumn, @@ -49,11 +49,11 @@ interface ContentEditorConfig enabled?: boolean; } -export interface Props { +export interface TableListViewTableProps< + T extends UserContentCommonSchema = UserContentCommonSchema +> { entityName: string; entityNamePlural: string; - tableListTitle: string; - tableListDescription?: string; listingLimit: number; initialFilter?: string; initialPageSize: number; @@ -73,7 +73,6 @@ export interface Props RowActions | undefined; - children?: ReactNode | undefined; findItems( searchQuery: string, refs?: { @@ -99,11 +98,7 @@ export interface Props void; + setPageDataTestSubject: (subject: string) => void; } export interface State { @@ -242,9 +242,8 @@ const tableColumnMetadata = { }, } as const; -function TableListViewComp({ - tableListTitle, - tableListDescription, +function TableListViewTableComp({ + tableCaption, entityName, entityNamePlural, initialFilter: initialQuery, @@ -264,11 +263,16 @@ function TableListViewComp({ onClickTitle, id: listingId = 'userContent', contentEditor = { enabled: false }, - children, titleColumnName, - additionalRightSideActions = [], withoutPageTemplateWrapper, -}: Props) { + onFetchSuccess, + refreshListBouncer, + setPageDataTestSubject, +}: TableListViewTableProps) { + useEffect(() => { + setPageDataTestSubject(`${entityName}LandingPage`); + }, [entityName, setPageDataTestSubject]); + if (!getDetailViewLink && !onClickTitle) { throw new Error( `[TableListView] One o["getDetailViewLink" or "onClickTitle"] prop must be provided.` @@ -366,7 +370,6 @@ function TableListViewComp({ const hasQuery = searchQuery.text !== ''; const hasNoItems = !isFetchingItems && items.length === 0 && !hasQuery; - const pageDataTestSubject = `${entityName}LandingPage`; const showFetchError = Boolean(fetchError); const showLimitError = !showFetchError && totalItems > listingLimit; @@ -397,6 +400,8 @@ function TableListViewComp({ response, }, }); + + onFetchSuccess(); } } catch (err) { dispatch({ @@ -404,7 +409,11 @@ function TableListViewComp({ data: err, }); } - }, [searchQueryParser, findItems, searchQuery.text]); + }, [searchQueryParser, searchQuery.text, findItems, onFetchSuccess]); + + useEffect(() => { + fetchItems(); + }, [fetchItems, refreshListBouncer]); const updateQuery = useCallback( (query: Query) => { @@ -903,7 +912,7 @@ function TableListViewComp({ if (!showFetchError && hasNoItems) { return ( - + @@ -920,80 +929,64 @@ function TableListViewComp({ : 'table-is-loading'; return ( - - {tableListTitle}} - description={tableListDescription} - rightSideItems={[ - renderCreateButton() ?? , - ...additionalRightSideActions?.slice(0, 2), - ]} - data-test-subj="top-nav" - /> - - {/* Any children passed to the component */} - {children} - - {/* Too many items error */} - {showLimitError && ( - - )} + <> + {/* Too many items error */} + {showLimitError && ( + + )} + + {/* Error while fetching items */} + {showFetchError && renderFetchError()} + + {/* Table of items */} +
+ + dispatch={dispatch} + items={items} + renderCreateButton={renderCreateButton} + isFetchingItems={isFetchingItems} + searchQuery={searchQuery} + tableColumns={tableColumns} + hasUpdatedAtMetadata={hasUpdatedAtMetadata} + tableSort={tableSort} + tableItemsRowActions={tableItemsRowActions} + pagination={pagination} + selectedIds={selectedIds} + entityName={entityName} + entityNamePlural={entityNamePlural} + tagsToTableItemMap={tagsToTableItemMap} + deleteItems={deleteItems} + tableCaption={tableCaption} + onTableChange={onTableChange} + onTableSearchChange={onTableSearchChange} + onSortChange={onSortChange} + addOrRemoveIncludeTagFilter={addOrRemoveIncludeTagFilter} + addOrRemoveExcludeTagFilter={addOrRemoveExcludeTagFilter} + clearTagSelection={clearTagSelection} + /> - {/* Error while fetching items */} - {showFetchError && renderFetchError()} - - {/* Table of items */} -
- - dispatch={dispatch} - items={items} - isFetchingItems={isFetchingItems} - searchQuery={searchQuery} - tableColumns={tableColumns} - hasUpdatedAtMetadata={hasUpdatedAtMetadata} - tableSort={tableSort} - pagination={pagination} - selectedIds={selectedIds} + {/* Delete modal */} + {showDeleteModal && ( + + isDeletingItems={isDeletingItems} entityName={entityName} entityNamePlural={entityNamePlural} - tagsToTableItemMap={tagsToTableItemMap} - deleteItems={deleteItems} - tableCaption={tableListTitle} - tableItemsRowActions={tableItemsRowActions} - onTableChange={onTableChange} - onTableSearchChange={onTableSearchChange} - onSortChange={onSortChange} - addOrRemoveIncludeTagFilter={addOrRemoveIncludeTagFilter} - addOrRemoveExcludeTagFilter={addOrRemoveExcludeTagFilter} - clearTagSelection={clearTagSelection} + items={selectedItems} + onConfirm={deleteSelectedItems} + onCancel={() => dispatch({ type: 'onCancelDeleteItems' })} /> - - {/* Delete modal */} - {showDeleteModal && ( - - isDeletingItems={isDeletingItems} - entityName={entityName} - entityNamePlural={entityNamePlural} - items={selectedItems} - onConfirm={deleteSelectedItems} - onCancel={() => dispatch({ type: 'onCancelDeleteItems' })} - /> - )} -
- - + )} +
+ ); } -const TableListView = React.memo(TableListViewComp) as typeof TableListViewComp; - -export { TableListView }; - -// eslint-disable-next-line import/no-default-export -export default TableListView; +export const TableListViewTable = React.memo( + TableListViewTableComp +) as typeof TableListViewTableComp; diff --git a/packages/content-management/table_list/src/types.ts b/packages/content-management/table_list_view_table/src/types.ts similarity index 100% rename from packages/content-management/table_list/src/types.ts rename to packages/content-management/table_list_view_table/src/types.ts diff --git a/packages/content-management/table_list/src/use_tags.ts b/packages/content-management/table_list_view_table/src/use_tags.ts similarity index 98% rename from packages/content-management/table_list/src/use_tags.ts rename to packages/content-management/table_list_view_table/src/use_tags.ts index 345a3484306ff..207304564a829 100644 --- a/packages/content-management/table_list/src/use_tags.ts +++ b/packages/content-management/table_list_view_table/src/use_tags.ts @@ -9,7 +9,7 @@ import { useCallback, useMemo } from 'react'; import { Query } from '@elastic/eui'; import type { Tag } from './types'; -import type { UserContentCommonSchema } from './table_list_view'; +import type { UserContentCommonSchema } from './table_list_view_table'; type QueryUpdater = (query: Query, tag: Tag) => Query; diff --git a/packages/content-management/table_list/src/use_url_state.ts b/packages/content-management/table_list_view_table/src/use_url_state.ts similarity index 100% rename from packages/content-management/table_list/src/use_url_state.ts rename to packages/content-management/table_list_view_table/src/use_url_state.ts diff --git a/packages/content-management/table_list/tsconfig.json b/packages/content-management/table_list_view_table/tsconfig.json similarity index 100% rename from packages/content-management/table_list/tsconfig.json rename to packages/content-management/table_list_view_table/tsconfig.json diff --git a/packages/kbn-dom-drag-drop/README.md b/packages/kbn-dom-drag-drop/README.md index c0145516a811e..892bb60675d92 100644 --- a/packages/kbn-dom-drag-drop/README.md +++ b/packages/kbn-dom-drag-drop/README.md @@ -23,9 +23,7 @@ const context = useContext(DragContext); In your child application, place a `ChildDragDropProvider` at the root of that, and spread the context into it: ```js - - ... your child app here ... - +... your child app here ... ``` This enables your child application to share the same drag / drop context as the root application. @@ -71,9 +69,7 @@ return ( To create a reordering group, surround the elements from the same group with a `ReorderProvider`: ```js - - ... elements from one group here ... - +... elements from one group here ... ``` The children `DragDrop` components must have props defined as in the example: @@ -85,8 +81,8 @@ The children `DragDrop` components must have props defined as in the example: ``` - diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 0ea5cfba97e61..db5f45fb4447f 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -41,7 +41,7 @@ pageLoadAssetSize: enterpriseSearch: 35741 essSecurity: 16573 esUiShared: 326654 - eventAnnotation: 22000 + eventAnnotation: 48565 exploratoryView: 74673 expressionError: 22127 expressionGauge: 25000 diff --git a/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.test.tsx b/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.test.tsx index 383b51fbd65fa..99b164433fe41 100644 --- a/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.test.tsx +++ b/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.test.tsx @@ -19,16 +19,23 @@ import { DashboardListing, DashboardListingProps } from './dashboard_listing'; * need to ensure we're passing down the correct props, but the table list view itself doesn't need to be rendered * in our tests because it is covered in its package. */ -import { TableListView } from '@kbn/content-management-table-list'; -// import { TableListViewKibanaProvider } from '@kbn/content-management-table-list'; -jest.mock('@kbn/content-management-table-list', () => { - const originalModule = jest.requireActual('@kbn/content-management-table-list'); +import { TableListView } from '@kbn/content-management-table-list-view'; +// import { TableListViewKibanaProvider } from '@kbn/content-management-table-list-view'; +jest.mock('@kbn/content-management-table-list-view-table', () => { + const originalModule = jest.requireActual('@kbn/content-management-table-list-view-table'); return { __esModule: true, ...originalModule, TableListViewKibanaProvider: jest.fn().mockImplementation(({ children }) => { return <>{children}; }), + }; +}); +jest.mock('@kbn/content-management-table-list-view', () => { + const originalModule = jest.requireActual('@kbn/content-management-table-list-view-table'); + return { + __esModule: true, + ...originalModule, TableListView: jest.fn().mockReturnValue(null), }; }); diff --git a/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.tsx b/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.tsx index 4d867be5c1fd1..57716ee8b525e 100644 --- a/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.tsx +++ b/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.tsx @@ -10,11 +10,11 @@ import { FormattedRelative, I18nProvider } from '@kbn/i18n-react'; import React, { PropsWithChildren, useCallback, useState } from 'react'; import { - TableListView, - TableListViewKibanaDependencies, + type TableListViewKibanaDependencies, TableListViewKibanaProvider, type UserContentCommonSchema, -} from '@kbn/content-management-table-list'; +} from '@kbn/content-management-table-list-view-table'; +import { TableListView } from '@kbn/content-management-table-list-view'; import { ViewMode } from '@kbn/embeddable-plugin/public'; import { reportPerformanceMetricEvent } from '@kbn/ebt-tools'; import type { SavedObjectsFindOptionsReference } from '@kbn/core/public'; @@ -233,7 +233,7 @@ export const DashboardListing = ({ createItem={!showWriteControls ? undefined : createItem} editItem={!showWriteControls ? undefined : editItem} entityNamePlural={getEntityNamePlural()} - tableListTitle={getTableListTitle()} + title={getTableListTitle()} headingId="dashboardListingHeading" initialPageSize={initialPageSize} initialFilter={initialFilter} diff --git a/src/plugins/dashboard/tsconfig.json b/src/plugins/dashboard/tsconfig.json index 78c7ba0dccd52..a4ca23893c48c 100644 --- a/src/plugins/dashboard/tsconfig.json +++ b/src/plugins/dashboard/tsconfig.json @@ -32,7 +32,6 @@ "@kbn/data-view-editor-plugin", "@kbn/unified-search-plugin", "@kbn/shared-ux-page-analytics-no-data", - "@kbn/content-management-table-list", "@kbn/content-management-plugin", "@kbn/content-management-utils", "@kbn/i18n-react", @@ -60,7 +59,9 @@ "@kbn/core-saved-objects-server", "@kbn/core-saved-objects-utils-server", "@kbn/object-versioning", - "@kbn/core-saved-objects-api-server" + "@kbn/core-saved-objects-api-server", + "@kbn/content-management-table-list-view", + "@kbn/content-management-table-list-view-table" ], "exclude": ["target/**/*"] } diff --git a/src/plugins/event_annotation/.i18nrc.json b/src/plugins/event_annotation/.i18nrc.json new file mode 100755 index 0000000000000..0be009b9d4364 --- /dev/null +++ b/src/plugins/event_annotation/.i18nrc.json @@ -0,0 +1,6 @@ +{ + "prefix": "eventAnnotations", + "paths": { + "eventAnnotations": "." + } +} diff --git a/src/plugins/event_annotation/common/constants.ts b/src/plugins/event_annotation/common/constants.ts index 04255cee00c22..08398d53119cc 100644 --- a/src/plugins/event_annotation/common/constants.ts +++ b/src/plugins/event_annotation/common/constants.ts @@ -25,3 +25,7 @@ export const AvailableAnnotationIcons = { } as const; export const EVENT_ANNOTATION_GROUP_TYPE = 'event-annotation-group'; + +export const ANNOTATIONS_LISTING_VIEW_ID = 'annotations'; + +export const EVENT_ANNOTATION_APP_NAME = 'event-annotations'; diff --git a/src/plugins/event_annotation/common/create_copied_annotation.ts b/src/plugins/event_annotation/common/create_copied_annotation.ts new file mode 100644 index 0000000000000..caab8923c855e --- /dev/null +++ b/src/plugins/event_annotation/common/create_copied_annotation.ts @@ -0,0 +1,24 @@ +/* + * 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 { getDefaultManualAnnotation } from './manual_event_annotation'; +import { EventAnnotationConfig } from './types'; + +export const createCopiedAnnotation = ( + newId: string, + timestamp: string, + source?: EventAnnotationConfig +): EventAnnotationConfig => { + if (!source) { + return getDefaultManualAnnotation(newId, timestamp); + } + return { + ...source, + id: newId, + }; +}; diff --git a/src/plugins/event_annotation/common/fetch_event_annotations/utils.ts b/src/plugins/event_annotation/common/fetch_event_annotations/utils.ts index b8658b8b81565..88979fce32002 100644 --- a/src/plugins/event_annotation/common/fetch_event_annotations/utils.ts +++ b/src/plugins/event_annotation/common/fetch_event_annotations/utils.ts @@ -12,6 +12,7 @@ import { omit, pick } from 'lodash'; import dateMath from '@kbn/datemath'; import moment from 'moment'; import { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; +import { LineStyle } from '@kbn/visualization-ui-components/common/types'; import { ManualEventAnnotationOutput, ManualPointEventAnnotationOutput, @@ -22,7 +23,6 @@ import { annotationColumns, AvailableAnnotationIcon, EventAnnotationOutput, - LineStyle, PointStyleProps, } from '../types'; diff --git a/src/plugins/event_annotation/common/index.ts b/src/plugins/event_annotation/common/index.ts index f7a62d4f3918a..0341a9e5ed4a2 100644 --- a/src/plugins/event_annotation/common/index.ts +++ b/src/plugins/event_annotation/common/index.ts @@ -18,8 +18,16 @@ export type { QueryPointEventAnnotationArgs, QueryPointEventAnnotationOutput, } from './query_point_event_annotation/types'; -export { manualPointEventAnnotation, manualRangeEventAnnotation } from './manual_event_annotation'; -export { queryPointEventAnnotation } from './query_point_event_annotation'; +export { + manualPointEventAnnotation, + manualRangeEventAnnotation, + getDefaultManualAnnotation, +} from './manual_event_annotation'; +export { + queryPointEventAnnotation, + getDefaultQueryAnnotation, +} from './query_point_event_annotation'; +export { createCopiedAnnotation } from './create_copied_annotation'; export { eventAnnotationGroup } from './event_annotation_group'; export type { EventAnnotationGroupArgs } from './event_annotation_group'; @@ -36,4 +44,4 @@ export type { EventAnnotationGroupAttributes, } from './types'; -export { EVENT_ANNOTATION_GROUP_TYPE } from './constants'; +export { EVENT_ANNOTATION_GROUP_TYPE, ANNOTATIONS_LISTING_VIEW_ID } from './constants'; diff --git a/src/plugins/event_annotation/common/manual_event_annotation/index.ts b/src/plugins/event_annotation/common/manual_event_annotation/index.ts index a178211164822..12d00cefc75b4 100644 --- a/src/plugins/event_annotation/common/manual_event_annotation/index.ts +++ b/src/plugins/event_annotation/common/manual_event_annotation/index.ts @@ -9,6 +9,7 @@ import type { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; import { i18n } from '@kbn/i18n'; import { AvailableAnnotationIcons } from '../constants'; +import { EventAnnotationConfig } from '../types'; import type { ManualRangeEventAnnotationArgs, @@ -163,3 +164,24 @@ export const manualRangeEventAnnotation: ExpressionFunctionDefinition< }; }, }; + +export const defaultAnnotationLabel = i18n.translate( + 'eventAnnotation.manualAnnotation.defaultAnnotationLabel', + { + defaultMessage: 'Event', + } +); + +export const getDefaultManualAnnotation = ( + id: string, + timestamp: string +): EventAnnotationConfig => ({ + label: defaultAnnotationLabel, + type: 'manual', + key: { + type: 'point_in_time', + timestamp, + }, + icon: 'triangle', + id, +}); diff --git a/src/plugins/event_annotation/common/query_point_event_annotation/index.ts b/src/plugins/event_annotation/common/query_point_event_annotation/index.ts index cb9ba882a9f89..6c0ee0bd62eb7 100644 --- a/src/plugins/event_annotation/common/query_point_event_annotation/index.ts +++ b/src/plugins/event_annotation/common/query_point_event_annotation/index.ts @@ -9,6 +9,7 @@ import type { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; import { i18n } from '@kbn/i18n'; import { AvailableAnnotationIcons } from '../constants'; +import { EventAnnotationConfig } from '../types'; import type { QueryPointEventAnnotationArgs, QueryPointEventAnnotationOutput } from './types'; @@ -111,3 +112,22 @@ export const queryPointEventAnnotation: ExpressionFunctionDefinition< }; }, }; + +export const getDefaultQueryAnnotation = ( + id: string, + fieldName: string, + timeField: string +): EventAnnotationConfig => ({ + filter: { + type: 'kibana_query', + query: `${fieldName}: *`, + language: 'kuery', + }, + timeField, + type: 'query', + key: { + type: 'point_in_time', + }, + id, + label: `${fieldName}: *`, +}); diff --git a/src/plugins/event_annotation/common/types.ts b/src/plugins/event_annotation/common/types.ts index b3e704ef647e5..9bdd4cd283523 100644 --- a/src/plugins/event_annotation/common/types.ts +++ b/src/plugins/event_annotation/common/types.ts @@ -6,9 +6,11 @@ * Side Public License, v 1. */ +import type { UserContentCommonSchema } from '@kbn/content-management-table-list-view'; import { DataViewSpec, KibanaQueryOutput } from '@kbn/data-plugin/common'; import { DatatableColumn } from '@kbn/expressions-plugin/common'; import { $Values } from '@kbn/utility-types'; +import { LineStyle } from '@kbn/visualization-ui-components/common/types'; import { AvailableAnnotationIcons } from './constants'; import { ManualEventAnnotationOutput, @@ -20,7 +22,6 @@ import { QueryPointEventAnnotationOutput, } from './query_point_event_annotation/types'; -export type LineStyle = 'solid' | 'dashed' | 'dotted'; export type Fill = 'inside' | 'outside' | 'none'; export type ManualAnnotationType = 'manual'; export type QueryAnnotationType = 'query'; @@ -85,10 +86,9 @@ export type EventAnnotationConfig = export interface EventAnnotationGroupAttributes { title: string; description: string; - tags: string[]; ignoreGlobalFilters: boolean; annotations: EventAnnotationConfig[]; - dataViewSpec?: DataViewSpec; + dataViewSpec?: DataViewSpec | null; } export interface EventAnnotationGroupConfig { @@ -101,6 +101,10 @@ export interface EventAnnotationGroupConfig { dataViewSpec?: DataViewSpec; } +export type EventAnnotationGroupContent = UserContentCommonSchema & { + attributes: { indexPatternId: string; dataViewSpec?: DataViewSpec }; +}; + export type EventAnnotationArgs = | ManualPointEventAnnotationArgs | ManualRangeEventAnnotationArgs diff --git a/src/plugins/event_annotation/jest.config.js b/src/plugins/event_annotation/jest.config.js index 61269c91a8bfd..e7e58e57eb37d 100644 --- a/src/plugins/event_annotation/jest.config.js +++ b/src/plugins/event_annotation/jest.config.js @@ -10,7 +10,10 @@ module.exports = { preset: '@kbn/test', rootDir: '../../..', roots: ['/src/plugins/event_annotation'], - coverageDirectory: '/target/kibana-coverage/jest/src/plugins/event_ann', + coverageDirectory: '/target/kibana-coverage/jest/src/plugins/event_annotation', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/src/plugins/event_ann/{common,public,server}/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/src/plugins/event_annotation/{common,public,server}/**/*.{ts,tsx}', + ], + setupFiles: ['jest-canvas-mock'], }; diff --git a/src/plugins/event_annotation/kibana.jsonc b/src/plugins/event_annotation/kibana.jsonc index b4df5edf135af..1099c467d502f 100644 --- a/src/plugins/event_annotation/kibana.jsonc +++ b/src/plugins/event_annotation/kibana.jsonc @@ -11,10 +11,23 @@ "expressions", "savedObjectsManagement", "data", + "presentationUtil", + "visualizations", + "dataViews", + "unifiedSearch", + "kibanaUtils", + "visualizationUiComponents" + ], + "optionalPlugins": [ + "savedObjectsTagging", ], "requiredBundles": [ + "data", "savedObjectsFinder", - "dataViews" + "dataViews", + "kibanaReact", + "visualizationUiComponents", + "unifiedFieldList" ], "extraPublicDirs": [ "common" diff --git a/src/plugins/event_annotation/public/components/__snapshots__/group_editor_flyout.test.tsx.snap b/src/plugins/event_annotation/public/components/__snapshots__/group_editor_flyout.test.tsx.snap new file mode 100644 index 0000000000000..49def88aecb70 --- /dev/null +++ b/src/plugins/event_annotation/public/components/__snapshots__/group_editor_flyout.test.tsx.snap @@ -0,0 +1,38 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`group editor flyout renders controls 1`] = ` +Object { + "TagSelector": [MockFunction], + "createDataView": [MockFunction], + "dataViews": Array [ + Object { + "id": "some-id", + "title": "My Data View", + }, + ], + "group": Object { + "annotations": Array [ + Object { + "icon": "triangle", + "id": "my-id", + "key": Object { + "timestamp": "some-timestamp", + "type": "point_in_time", + }, + "label": "Event", + "type": "manual", + }, + ], + "description": "", + "ignoreGlobalFilters": false, + "indexPatternId": "some-id", + "tags": Array [], + "title": "My group", + }, + "queryInputServices": Object {}, + "selectedAnnotation": undefined, + "setSelectedAnnotation": [Function], + "showValidation": false, + "update": [MockFunction], +} +`; diff --git a/src/plugins/event_annotation/public/components/annotation_editor_controls/annotation_editor_controls.tsx b/src/plugins/event_annotation/public/components/annotation_editor_controls/annotation_editor_controls.tsx new file mode 100644 index 0000000000000..e88aa0d72558a --- /dev/null +++ b/src/plugins/event_annotation/public/components/annotation_editor_controls/annotation_editor_controls.tsx @@ -0,0 +1,390 @@ +/* + * 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 './index.scss'; +import { isFieldLensCompatible } from '@kbn/visualization-ui-components/public'; +import React, { useCallback, useEffect } from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiFormRow, EuiSwitch, EuiSwitchEvent, EuiButtonGroup, EuiSpacer } from '@elastic/eui'; +import { + IconSelectSetting, + DimensionEditorSection, + NameInput, + ColorPicker, + LineStyleSettings, + TextDecorationSetting, + FieldPicker, + FieldOption, + type QueryInputServices, +} from '@kbn/visualization-ui-components/public'; +import type { FieldOptionValue } from '@kbn/visualization-ui-components/public'; +import { DataView } from '@kbn/data-views-plugin/common'; +import { useExistingFieldsReader } from '@kbn/unified-field-list-plugin/public'; +import moment from 'moment'; +import { htmlIdGenerator } from '@elastic/eui'; +import { isQueryAnnotationConfig, isRangeAnnotationConfig } from '../..'; +import { + AvailableAnnotationIcon, + EventAnnotationConfig, + PointInTimeEventAnnotationConfig, + QueryPointEventAnnotationConfig, +} from '../../../common'; +import { + defaultAnnotationColor, + defaultAnnotationLabel, + defaultAnnotationRangeColor, + defaultRangeAnnotationLabel, + toLineAnnotationColor, +} from './helpers'; +import { annotationsIconSet } from './icon_set'; +import { sanitizeProperties } from './helpers'; +import { TooltipSection } from './tooltip_annotation_panel'; +import { ConfigPanelManualAnnotation } from './manual_annotation_panel'; +import { ConfigPanelQueryAnnotation } from './query_annotation_panel'; + +export interface Props { + annotation: EventAnnotationConfig; + onAnnotationChange: (annotation: EventAnnotationConfig) => void; + dataView: DataView; + getDefaultRangeEnd: (rangeStart: string) => string; + calendarClassName?: string; + queryInputServices: QueryInputServices; + appName: string; +} + +export const idPrefix = htmlIdGenerator()(); + +const AnnotationEditorControls = ({ + annotation: currentAnnotation, + onAnnotationChange, + dataView, + getDefaultRangeEnd, + calendarClassName, + queryInputServices, + appName, +}: Props) => { + const { hasFieldData } = useExistingFieldsReader(); + + const isQueryBased = isQueryAnnotationConfig(currentAnnotation); + const isRange = isRangeAnnotationConfig(currentAnnotation); + + const [queryInputShouldOpen, setQueryInputShouldOpen] = React.useState(false); + useEffect(() => { + setQueryInputShouldOpen(!isQueryBased); + }, [isQueryBased]); + + const update = useCallback( + (newAnnotation: Partial | undefined) => + newAnnotation && + onAnnotationChange(sanitizeProperties({ ...currentAnnotation, ...newAnnotation })), + [currentAnnotation, onAnnotationChange] + ); + + return ( + <> + + + { + const typeFromId = id.replace( + 'lens_xyChart_annotation_', + '' + ) as EventAnnotationConfig['type']; + if (currentAnnotation?.type === typeFromId) { + return; + } + if (typeFromId === 'query') { + // If coming from a range type, it requires some additional resets + const additionalRangeResets = isRangeAnnotationConfig(currentAnnotation) + ? { + label: + currentAnnotation.label === defaultRangeAnnotationLabel + ? defaultAnnotationLabel + : currentAnnotation.label, + color: toLineAnnotationColor(currentAnnotation.color), + } + : {}; + return update({ + type: typeFromId, + timeField: + (dataView.timeFieldName || + // fallback to the first avaiable date field in the dataView + dataView.fields + .filter(isFieldLensCompatible) + .find(({ type: fieldType }) => fieldType === 'date')?.displayName) ?? + '', + key: { type: 'point_in_time' }, + ...additionalRangeResets, + }); + } + // From query to manual annotation + return update({ + type: typeFromId, + key: { type: 'point_in_time', timestamp: moment().toISOString() }, + }); + }} + isFullWidth + /> + + {isQueryBased ? ( + + ) : ( + + )} + + + { + update({ label: value }); + }} + /> + {!isRange && ( + <> + + currentIcon={currentAnnotation.icon} + setIcon={(icon) => update({ icon })} + defaultIcon="triangle" + customIconSet={annotationsIconSet} + /> + + {(textDecorationSelected) => { + if (textDecorationSelected !== 'field') { + return null; + } + const options = dataView.fields + .filter(isFieldLensCompatible) + .filter(({ displayName, type }) => displayName && type !== 'document') + .map( + (field) => + ({ + label: field.displayName, + value: { + type: 'field', + field: field.name, + dataType: field.type, + }, + exists: hasFieldData(dataView.id!, field.name), + compatible: true, + 'data-test-subj': `lnsXY-annotation-fieldOption-${field.name}`, + } as FieldOption) + ); + const selectedField = (currentAnnotation as QueryPointEventAnnotationConfig) + .textField; + + const fieldIsValid = selectedField + ? Boolean(dataView.getFieldByName(selectedField)) + : true; + + return ( + <> + + + + ); + }} + + + + )} + {isRange && ( + + { + update({ + outside: id === `lens_xyChart_fillStyle_outside`, + }); + }} + isFullWidth + /> + + )} + + + update({ isHidden: ev.target.checked })} + /> + + {isQueryBased && currentAnnotation && ( + + + + + + )} + + ); +}; + +const ConfigPanelGenericSwitch = ({ + label, + ['data-test-subj']: dataTestSubj, + value, + onChange, +}: { + label: string; + 'data-test-subj': string; + value: boolean; + onChange: (event: EuiSwitchEvent) => void; +}) => ( + + + +); + +// eslint-disable-next-line import/no-default-export +export default AnnotationEditorControls; diff --git a/src/plugins/event_annotation/public/components/annotation_editor_controls/helpers.ts b/src/plugins/event_annotation/public/components/annotation_editor_controls/helpers.ts new file mode 100644 index 0000000000000..f823dab7e7357 --- /dev/null +++ b/src/plugins/event_annotation/public/components/annotation_editor_controls/helpers.ts @@ -0,0 +1,93 @@ +/* + * 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 { transparentize } from '@elastic/eui'; +import { pick } from 'lodash'; +import { euiLightVars } from '@kbn/ui-theme'; +import { i18n } from '@kbn/i18n'; +import chroma from 'chroma-js'; +import { isQueryAnnotationConfig, isRangeAnnotationConfig } from '../..'; +import type { + EventAnnotationConfig, + RangeEventAnnotationConfig, + PointInTimeEventAnnotationConfig, + QueryPointEventAnnotationConfig, +} from '../../../common'; + +export const defaultAnnotationColor = euiLightVars.euiColorAccent; +// Do not compute it live as dependencies will add tens of Kbs to the plugin +export const defaultAnnotationRangeColor = `#F04E981A`; // defaultAnnotationColor with opacity 0.1 + +export const defaultAnnotationLabel = i18n.translate( + 'eventAnnotation.xyChart.defaultAnnotationLabel', + { + defaultMessage: 'Event', + } +); + +export const defaultRangeAnnotationLabel = i18n.translate( + 'eventAnnotation.xyChart.defaultRangeAnnotationLabel', + { + defaultMessage: 'Event range', + } +); + +export const toRangeAnnotationColor = (color = defaultAnnotationColor) => { + return chroma(transparentize(color, 0.1)).hex().toUpperCase(); +}; + +export const toLineAnnotationColor = (color = defaultAnnotationRangeColor) => { + return chroma(transparentize(color, 1)).hex().toUpperCase(); +}; + +export const sanitizeProperties = (annotation: EventAnnotationConfig) => { + if (isRangeAnnotationConfig(annotation)) { + const rangeAnnotation: RangeEventAnnotationConfig = pick(annotation, [ + 'type', + 'label', + 'key', + 'id', + 'isHidden', + 'color', + 'outside', + ]); + return rangeAnnotation; + } + if (isQueryAnnotationConfig(annotation)) { + const lineAnnotation: QueryPointEventAnnotationConfig = pick(annotation, [ + 'type', + 'id', + 'label', + 'key', + 'timeField', + 'isHidden', + 'lineStyle', + 'lineWidth', + 'color', + 'icon', + 'textVisibility', + 'textField', + 'filter', + 'extraFields', + ]); + return lineAnnotation; + } + const lineAnnotation: PointInTimeEventAnnotationConfig = pick(annotation, [ + 'type', + 'id', + 'label', + 'key', + 'isHidden', + 'lineStyle', + 'lineWidth', + 'color', + 'icon', + 'textVisibility', + ]); + return lineAnnotation; +}; diff --git a/src/plugins/event_annotation/public/components/annotation_editor_controls/icon_set.ts b/src/plugins/event_annotation/public/components/annotation_editor_controls/icon_set.ts new file mode 100644 index 0000000000000..e4ea40acb48ed --- /dev/null +++ b/src/plugins/event_annotation/public/components/annotation_editor_controls/icon_set.ts @@ -0,0 +1,111 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { IconTriangle, IconCircle } from '@kbn/chart-icons'; +import type { IconSet } from '@kbn/visualization-ui-components/public'; +import { AvailableAnnotationIcon } from '../../../common'; + +export const annotationsIconSet: IconSet = [ + { + value: 'asterisk', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.asteriskIconLabel', { + defaultMessage: 'Asterisk', + }), + }, + { + value: 'alert', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.alertIconLabel', { + defaultMessage: 'Alert', + }), + }, + { + value: 'bell', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.bellIconLabel', { + defaultMessage: 'Bell', + }), + }, + { + value: 'bolt', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.boltIconLabel', { + defaultMessage: 'Bolt', + }), + }, + { + value: 'bug', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.bugIconLabel', { + defaultMessage: 'Bug', + }), + }, + { + value: 'circle', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.circleIconLabel', { + defaultMessage: 'Circle', + }), + icon: IconCircle, + canFill: true, + }, + + { + value: 'editorComment', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.commentIconLabel', { + defaultMessage: 'Comment', + }), + }, + { + value: 'flag', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.flagIconLabel', { + defaultMessage: 'Flag', + }), + }, + { + value: 'heart', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.heartLabel', { + defaultMessage: 'Heart', + }), + }, + { + value: 'mapMarker', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.mapMarkerLabel', { + defaultMessage: 'Map Marker', + }), + }, + { + value: 'pinFilled', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.mapPinLabel', { + defaultMessage: 'Map Pin', + }), + }, + { + value: 'starEmpty', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.starLabel', { + defaultMessage: 'Star', + }), + }, + { + value: 'starFilled', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.starFilledLabel', { + defaultMessage: 'Star filled', + }), + }, + { + value: 'tag', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.tagIconLabel', { + defaultMessage: 'Tag', + }), + }, + { + value: 'triangle', + label: i18n.translate('eventAnnotation.xyChart.iconSelect.triangleIconLabel', { + defaultMessage: 'Triangle', + }), + icon: IconTriangle, + shouldRotate: true, + canFill: true, + }, +]; diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.scss b/src/plugins/event_annotation/public/components/annotation_editor_controls/index.scss similarity index 100% rename from x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.scss rename to src/plugins/event_annotation/public/components/annotation_editor_controls/index.scss diff --git a/src/plugins/event_annotation/public/components/annotation_editor_controls/index.test.tsx b/src/plugins/event_annotation/public/components/annotation_editor_controls/index.test.tsx new file mode 100644 index 0000000000000..bfbd8a5d65b44 --- /dev/null +++ b/src/plugins/event_annotation/public/components/annotation_editor_controls/index.test.tsx @@ -0,0 +1,435 @@ +/* + * 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 { DataView, DataViewField, IIndexPatternFieldList } from '@kbn/data-views-plugin/common'; +import AnnotationEditorControls from './annotation_editor_controls'; + +import React from 'react'; +import { mount } from 'enzyme'; +import { EventAnnotationConfig, RangeEventAnnotationConfig } from '../../../common'; +import { QueryInputServices } from '@kbn/visualization-ui-components/public'; +import moment from 'moment'; +import { act } from 'react-dom/test-utils'; +import { EuiButtonGroup } from '@elastic/eui'; + +jest.mock('@kbn/unified-search-plugin/public', () => ({ + QueryStringInput: () => { + return 'QueryStringInput'; + }, +})); + +const customLineStaticAnnotation: EventAnnotationConfig = { + id: 'ann1', + type: 'manual', + key: { type: 'point_in_time' as const, timestamp: '2022-03-18T08:25:00.000Z' }, + label: 'Event', + icon: 'triangle' as const, + color: 'red', + lineStyle: 'dashed' as const, + lineWidth: 3, +}; + +describe('AnnotationsPanel', () => { + const mockDataView: DataView = { + fields: [ + new DataViewField({ + type: 'date', + name: 'field1', + searchable: true, + aggregatable: true, + }), + new DataViewField({ + type: 'date', + name: '@timestamp', + searchable: true, + aggregatable: true, + }), + ] as unknown as IIndexPatternFieldList, + getFieldByName: (name) => + new DataViewField({ type: 'some-type', name, searchable: true, aggregatable: true }), + timeFieldName: '@timestamp', + } as Partial as DataView; + + const mockQueryInputServices = { + http: {}, + uiSettings: {}, + storage: {}, + dataViews: {}, + unifiedSearch: {}, + docLinks: {}, + notifications: {}, + data: {}, + } as QueryInputServices; + + describe('Dimension Editor', () => { + test('shows correct options for line annotations', () => { + const component = mount( + {}} + dataView={{} as DataView} + getDefaultRangeEnd={() => ''} + queryInputServices={mockQueryInputServices} + appName="myApp" + /> + ); + + expect( + component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-time"]').prop('selected') + ).toEqual(moment('2022-03-18T08:25:00.000Z')); + expect( + component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-fromTime"]').exists() + ).toBeFalsy(); + expect( + component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-toTime"]').exists() + ).toBeFalsy(); + expect( + component.find('EuiSwitch[data-test-subj="lns-xyAnnotation-rangeSwitch"]').prop('checked') + ).toEqual(false); + expect(component.find('EuiFieldText[data-test-subj="name-input"]').prop('value')).toEqual( + 'Event' + ); + expect( + component.find('EuiComboBox[data-test-subj="lns-icon-select"]').prop('selectedOptions') + ).toEqual([{ label: 'Triangle', value: 'triangle' }]); + expect(component.find('TextDecorationSetting').exists()).toBeTruthy(); + expect(component.find('LineStyleSettings').exists()).toBeTruthy(); + expect( + component.find('EuiButtonGroup[data-test-subj="lns-xyAnnotation-fillStyle"]').exists() + ).toBeFalsy(); + }); + test('shows correct options for range annotations', () => { + const rangeAnnotation: EventAnnotationConfig = { + color: 'red', + icon: 'triangle', + id: 'ann1', + type: 'manual', + isHidden: undefined, + key: { + endTimestamp: '2022-03-21T10:49:00.000Z', + timestamp: '2022-03-18T08:25:00.000Z', + type: 'range', + }, + label: 'Event range', + lineStyle: 'dashed', + lineWidth: 3, + }; + + const component = mount( + {}} + dataView={{} as DataView} + getDefaultRangeEnd={() => ''} + queryInputServices={mockQueryInputServices} + appName="myApp" + /> + ); + + expect( + component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-fromTime"]').prop('selected') + ).toEqual(moment('2022-03-18T08:25:00.000Z')); + expect( + component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-toTime"]').prop('selected') + ).toEqual(moment('2022-03-21T10:49:00.000Z')); + expect( + component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-time"]').exists() + ).toBeFalsy(); + expect( + component.find('EuiSwitch[data-test-subj="lns-xyAnnotation-rangeSwitch"]').prop('checked') + ).toEqual(true); + expect(component.find('EuiFieldText[data-test-subj="name-input"]').prop('value')).toEqual( + 'Event range' + ); + expect(component.find('EuiComboBox[data-test-subj="lns-icon-select"]').exists()).toBeFalsy(); + expect(component.find('TextDecorationSetting').exists()).toBeFalsy(); + expect(component.find('LineStyleSettings').exists()).toBeFalsy(); + expect(component.find('[data-test-subj="lns-xyAnnotation-fillStyle"]').exists()).toBeTruthy(); + }); + + test('calculates correct endTimstamp and transparent color when switching for range annotation and back', async () => { + const onAnnotationChange = jest.fn(); + const rangeEndTimestamp = new Date().toISOString(); + const component = mount( + rangeEndTimestamp} + queryInputServices={mockQueryInputServices} + appName="myApp" + /> + ); + + component.find('button[data-test-subj="lns-xyAnnotation-rangeSwitch"]').simulate('click'); + + const expectedRangeAnnotation: RangeEventAnnotationConfig = { + color: '#FF00001A', + id: 'ann1', + isHidden: undefined, + label: 'Event range', + type: 'manual', + key: { + endTimestamp: rangeEndTimestamp, + timestamp: '2022-03-18T08:25:00.000Z', + type: 'range', + }, + }; + + expect(onAnnotationChange).toBeCalledWith(expectedRangeAnnotation); + + act(() => { + component.setProps({ annotation: expectedRangeAnnotation }); + }); + + expect( + component.find('EuiSwitch[data-test-subj="lns-xyAnnotation-rangeSwitch"]').prop('checked') + ).toEqual(true); + + component.find('button[data-test-subj="lns-xyAnnotation-rangeSwitch"]').simulate('click'); + + expect(onAnnotationChange).toBeCalledWith({ + color: '#FF0000', + id: 'ann1', + isHidden: undefined, + key: { + timestamp: '2022-03-18T08:25:00.000Z', + type: 'point_in_time', + }, + label: 'Event', + type: 'manual', + }); + }); + + test('shows correct options for query based', () => { + const annotation: EventAnnotationConfig = { + color: 'red', + icon: 'triangle', + id: 'ann1', + type: 'query', + isHidden: undefined, + timeField: 'timestamp', + key: { + type: 'point_in_time', + }, + label: 'Query based event', + lineStyle: 'dashed', + lineWidth: 3, + filter: { type: 'kibana_query', query: '', language: 'kuery' }, + }; + + const component = mount( + {}} + dataView={mockDataView} + getDefaultRangeEnd={() => ''} + queryInputServices={mockQueryInputServices} + appName="myApp" + /> + ); + + expect( + component.find('[data-test-subj="lnsXY-annotation-query-based-field-picker"]').exists() + ).toBeTruthy(); + expect( + component.find('[data-test-subj="annotation-query-based-query-input"]').exists() + ).toBeTruthy(); + + // The provided indexPattern has 2 date fields + expect( + component + .find('[data-test-subj="lnsXY-annotation-query-based-field-picker"]') + .at(0) + .prop('options') + ).toHaveLength(2); + // When in query mode a new "field" option is added to the previous 2 ones + expect( + component.find('[data-test-subj="lns-lineMarker-text-visibility"]').at(0).prop('options') + ).toHaveLength(3); + expect( + component.find('[data-test-subj="lnsXY-annotation-tooltip-add_field"]').exists() + ).toBeTruthy(); + }); + + test('should prefill timeField with the default time field when switching to query based annotations', () => { + const onAnnotationChange = jest.fn(); + + const component = mount( + ''} + queryInputServices={mockQueryInputServices} + appName="myApp" + /> + ); + + act(() => { + component + .find(`[data-test-subj="lns-xyAnnotation-placementType"]`) + .find(EuiButtonGroup) + .prop('onChange')!('lens_xyChart_annotation_query'); + }); + component.update(); + + expect(onAnnotationChange).toHaveBeenCalledWith( + expect.objectContaining({ timeField: '@timestamp' }) + ); + }); + + test('should avoid to retain specific manual configurations when switching to query based annotations', () => { + const onAnnotationChange = jest.fn(); + + const component = mount( + ''} + queryInputServices={mockQueryInputServices} + appName="myApp" + /> + ); + + act(() => { + component + .find(`[data-test-subj="lns-xyAnnotation-placementType"]`) + .find(EuiButtonGroup) + .prop('onChange')!('lens_xyChart_annotation_query'); + }); + component.update(); + + expect(onAnnotationChange).toHaveBeenCalledWith( + expect.objectContaining({ + key: expect.not.objectContaining({ timestamp: expect.any('string') }), + }) + ); + }); + + test('should avoid to retain range manual configurations when switching to query based annotations', () => { + const annotation: EventAnnotationConfig = { + color: 'red', + icon: 'triangle', + id: 'ann1', + type: 'manual', + isHidden: undefined, + key: { + endTimestamp: '2022-03-21T10:49:00.000Z', + timestamp: '2022-03-18T08:25:00.000Z', + type: 'range', + }, + label: 'Event range', + lineStyle: 'dashed', + lineWidth: 3, + }; + + const onAnnotationChange = jest.fn(); + + const component = mount( + ''} + queryInputServices={mockQueryInputServices} + appName="myApp" + /> + ); + + act(() => { + component + .find(`[data-test-subj="lns-xyAnnotation-placementType"]`) + .find(EuiButtonGroup) + .prop('onChange')!('lens_xyChart_annotation_query'); + }); + component.update(); + + expect(onAnnotationChange).toHaveBeenCalledWith( + expect.objectContaining({ label: expect.not.stringContaining('Event range') }) + ); + }); + + test('should set a default tiemstamp when switching from query based to manual annotations', () => { + const annotation: EventAnnotationConfig = { + color: 'red', + icon: 'triangle', + id: 'ann1', + type: 'query', + isHidden: undefined, + timeField: 'timestamp', + key: { + type: 'point_in_time', + }, + label: 'Query based event', + lineStyle: 'dashed', + lineWidth: 3, + filter: { type: 'kibana_query', query: '', language: 'kuery' }, + }; + + const onAnnotationChange = jest.fn(); + + const component = mount( + ''} + queryInputServices={mockQueryInputServices} + appName="myApp" + /> + ); + + act(() => { + component + .find(`[data-test-subj="lns-xyAnnotation-placementType"]`) + .find(EuiButtonGroup) + .prop('onChange')!('lens_xyChart_annotation_manual'); + }); + component.update(); + + expect(onAnnotationChange).toHaveBeenCalledWith( + expect.objectContaining({ + key: { type: 'point_in_time', timestamp: expect.any(String) }, + }) + ); + + // also check query specific props are not carried over + expect(onAnnotationChange).toHaveBeenCalledWith( + expect.not.objectContaining({ timeField: 'timestamp' }) + ); + }); + + test('should fallback to the first date field available in the dataView if not time-based', () => { + const onAnnotationChange = jest.fn(); + const component = mount( + ''} + queryInputServices={mockQueryInputServices} + appName="myApp" + /> + ); + + act(() => { + component + .find(`[data-test-subj="lns-xyAnnotation-placementType"]`) + .find(EuiButtonGroup) + .prop('onChange')!('lens_xyChart_annotation_query'); + }); + component.update(); + + expect(onAnnotationChange).toHaveBeenCalledWith( + expect.objectContaining({ timeField: 'field1' }) + ); + }); + }); +}); diff --git a/src/plugins/event_annotation/public/components/annotation_editor_controls/index.tsx b/src/plugins/event_annotation/public/components/annotation_editor_controls/index.tsx new file mode 100644 index 0000000000000..9da375cc584ca --- /dev/null +++ b/src/plugins/event_annotation/public/components/annotation_editor_controls/index.tsx @@ -0,0 +1,20 @@ +/* + * 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, { Suspense, lazy } from 'react'; +import type { Props } from './annotation_editor_controls'; + +const AnnotationEditorControlsLazy = lazy(() => import('./annotation_editor_controls')); + +export const AnnotationEditorControls = (props: Props) => ( + + + +); + +export { annotationsIconSet } from './icon_set'; diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/manual_annotation_panel.tsx b/src/plugins/event_annotation/public/components/annotation_editor_controls/manual_annotation_panel.tsx similarity index 80% rename from x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/manual_annotation_panel.tsx rename to src/plugins/event_annotation/public/components/annotation_editor_controls/manual_annotation_panel.tsx index 795d076f22f0f..8ddac6c6173c4 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/manual_annotation_panel.tsx +++ b/src/plugins/event_annotation/public/components/annotation_editor_controls/manual_annotation_panel.tsx @@ -1,35 +1,31 @@ /* * 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. + * 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 { DatatableUtilitiesService } from '@kbn/data-plugin/common'; -import { isRangeAnnotationConfig } from '@kbn/event-annotation-plugin/public'; import { i18n } from '@kbn/i18n'; import moment from 'moment'; import React from 'react'; -import type { FramePublicAPI } from '../../../../types'; -import type { XYState } from '../../types'; +import { isRangeAnnotationConfig } from '../..'; import { - ConfigPanelRangeDatePicker, ConfigPanelApplyAsRangeSwitch, + ConfigPanelRangeDatePicker, } from './range_annotation_panel'; import type { ManualEventAnnotationType } from './types'; export const ConfigPanelManualAnnotation = ({ annotation, - frame, - state, onChange, - datatableUtilities, + getDefaultRangeEnd, + calendarClassName, }: { annotation?: ManualEventAnnotationType | undefined; onChange: (annotation: Partial | undefined) => void; - datatableUtilities: DatatableUtilitiesService; - frame: FramePublicAPI; - state: XYState; + getDefaultRangeEnd: (rangeStart: string) => string; + calendarClassName: string | undefined; }) => { const isRange = isRangeAnnotationConfig(annotation); return ( @@ -38,7 +34,8 @@ export const ConfigPanelManualAnnotation = ({ <> ); diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/query_annotation_panel.tsx b/src/plugins/event_annotation/public/components/annotation_editor_controls/query_annotation_panel.tsx similarity index 64% rename from x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/query_annotation_panel.tsx rename to src/plugins/event_annotation/public/components/annotation_editor_controls/query_annotation_panel.tsx index e502efe559597..85b9c08d0e138 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/query_annotation_panel.tsx +++ b/src/plugins/event_annotation/public/components/annotation_editor_controls/query_annotation_panel.tsx @@ -1,27 +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. + * 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 { EuiFormRow } from '@elastic/eui'; import type { Query } from '@kbn/data-plugin/common'; -import type { QueryPointEventAnnotationConfig } from '@kbn/event-annotation-plugin/common'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useExistingFieldsReader } from '@kbn/unified-field-list-plugin/public'; import { FieldOption, - FilterQueryInput, FieldOptionValue, FieldPicker, + FilterQueryInput, + type QueryInputServices, } from '@kbn/visualization-ui-components/public'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { LENS_APP_NAME } from '../../../../../common/constants'; -import type { FramePublicAPI } from '../../../../types'; -import type { XYState, XYAnnotationLayerConfig } from '../../types'; -import { LensAppServices } from '../../../../app_plugin/types'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import { isFieldLensCompatible } from '@kbn/visualization-ui-components/public'; +import type { QueryPointEventAnnotationConfig } from '../../../common'; export const defaultQuery: Query = { query: '', @@ -30,23 +29,23 @@ export const defaultQuery: Query = { export const ConfigPanelQueryAnnotation = ({ annotation, - frame, - state, + dataView, onChange, - layer, queryInputShouldOpen, + queryInputServices, + appName, }: { annotation?: QueryPointEventAnnotationConfig; onChange: (annotations: Partial | undefined) => void; - frame: FramePublicAPI; - state: XYState; - layer: XYAnnotationLayerConfig; + dataView: DataView; queryInputShouldOpen?: boolean; + queryInputServices: QueryInputServices; + appName: string; }) => { - const currentIndexPattern = frame.dataViews.indexPatterns[layer.indexPatternId]; const { hasFieldData } = useExistingFieldsReader(); // list only date fields - const options = currentIndexPattern.fields + const options = dataView.fields + .filter(isFieldLensCompatible) .filter((field) => field.type === 'date' && field.displayName) .map((field) => { return { @@ -56,17 +55,14 @@ export const ConfigPanelQueryAnnotation = ({ field: field.name, dataType: field.type, }, - exists: hasFieldData(currentIndexPattern.id, field.name), + exists: dataView.id ? hasFieldData(dataView.id, field.name) : false, compatible: true, 'data-test-subj': `lns-fieldOption-${field.name}`, } as FieldOption; }); - const selectedField = - annotation?.timeField || currentIndexPattern.timeFieldName || options[0]?.value.field; - const fieldIsValid = selectedField - ? Boolean(currentIndexPattern.getFieldByName(selectedField)) - : true; + const selectedField = annotation?.timeField || dataView.timeFieldName || options[0]?.value.field; + const fieldIsValid = selectedField ? Boolean(dataView.getFieldByName(selectedField)) : true; return ( <> @@ -75,29 +71,28 @@ export const ConfigPanelQueryAnnotation = ({ display="rowCompressed" className="lnsRowCompressedMargin" fullWidth - label={i18n.translate('xpack.lens.xyChart.annotation.queryInput', { + label={i18n.translate('eventAnnotation.xyChart.annotation.queryInput', { defaultMessage: 'Annotation query', })} - data-test-subj="annotation-query-based-query-input" > { onChange({ filter: { type: 'kibana_query', ...query } }); }} - data-test-subj="lnsXY-annotation-query-based-query-input" - dataView={currentIndexPattern} - appName={LENS_APP_NAME} - queryInputServices={useKibana().services} + dataView={dataView} + appName={appName} + queryInputServices={queryInputServices} /> diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/range_annotation_panel.tsx b/src/plugins/event_annotation/public/components/annotation_editor_controls/range_annotation_panel.tsx similarity index 72% rename from x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/range_annotation_panel.tsx rename to src/plugins/event_annotation/public/components/annotation_editor_controls/range_annotation_panel.tsx index 1bed2d760514b..0418994677947 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/range_annotation_panel.tsx +++ b/src/plugins/event_annotation/public/components/annotation_editor_controls/range_annotation_panel.tsx @@ -1,16 +1,11 @@ /* * 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. + * 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 { DatatableUtilitiesService } from '@kbn/data-plugin/common'; -import type { - PointInTimeEventAnnotationConfig, - RangeEventAnnotationConfig, -} from '@kbn/event-annotation-plugin/common'; -import { isRangeAnnotationConfig } from '@kbn/event-annotation-plugin/public'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { @@ -22,26 +17,20 @@ import { EuiDatePicker, } from '@elastic/eui'; import moment from 'moment'; -import { DONT_CLOSE_DIMENSION_CONTAINER_ON_CLICK_CLASS } from '../../../../utils'; -import type { FramePublicAPI } from '../../../../types'; -import { defaultRangeAnnotationLabel, defaultAnnotationLabel } from '../../annotations/helpers'; -import type { XYState } from '../../types'; -import { getDataLayers } from '../../visualization_helpers'; -import { toLineAnnotationColor, getEndTimestamp, toRangeAnnotationColor } from './helpers'; +import { isRangeAnnotationConfig } from '../..'; +import type { PointInTimeEventAnnotationConfig, RangeEventAnnotationConfig } from '../../../common'; +import { defaultRangeAnnotationLabel, defaultAnnotationLabel } from './helpers'; +import { toLineAnnotationColor, toRangeAnnotationColor } from './helpers'; import type { ManualEventAnnotationType } from './types'; export const ConfigPanelApplyAsRangeSwitch = ({ annotation, - datatableUtilities, onChange, - frame, - state, + getDefaultRangeEnd, }: { annotation?: ManualEventAnnotationType; - datatableUtilities: DatatableUtilitiesService; onChange: (annotations: Partial | undefined) => void; - frame: FramePublicAPI; - state: XYState; + getDefaultRangeEnd: (rangeStart: string) => string; }) => { const isRange = isRangeAnnotationConfig(annotation); return ( @@ -50,7 +39,7 @@ export const ConfigPanelApplyAsRangeSwitch = ({ data-test-subj="lns-xyAnnotation-rangeSwitch" label={ - {i18n.translate('xpack.lens.xyChart.applyAsRange', { + {i18n.translate('eventAnnotation.xyChart.applyAsRange', { defaultMessage: 'Apply as range', })} @@ -74,19 +63,12 @@ export const ConfigPanelApplyAsRangeSwitch = ({ }; onChange(newPointAnnotation); } else if (annotation) { - const fromTimestamp = moment(annotation?.key.timestamp); - const dataLayers = getDataLayers(state.layers); const newRangeAnnotation: RangeEventAnnotationConfig = { type: 'manual', key: { type: 'range', timestamp: annotation.key.timestamp, - endTimestamp: getEndTimestamp( - datatableUtilities, - fromTimestamp.toISOString(), - frame, - dataLayers - ), + endTimestamp: getDefaultRangeEnd(annotation.key.timestamp), }, id: annotation.id, label: @@ -110,12 +92,14 @@ export const ConfigPanelRangeDatePicker = ({ label, prependLabel, onChange, + calendarClassName, dataTestSubj = 'lnsXY_annotation_date_picker', }: { value: moment.Moment; prependLabel?: string; label?: string; onChange: (val: moment.Moment | null) => void; + calendarClassName: string | undefined; dataTestSubj?: string; }) => { return ( @@ -129,7 +113,7 @@ export const ConfigPanelRangeDatePicker = ({ } > ) : ( void; - indexPattern: IndexPattern; + dataView: DataView; invalidFields?: string[]; } @@ -51,7 +51,7 @@ function removeNewEmptyField(v: WrappedValue): v is SafeWrappedValue { export function TooltipSection({ currentConfig, setConfig, - indexPattern, + dataView, invalidFields, }: FieldInputsProps) { const { hasFieldData } = useExistingFieldsReader(); @@ -81,14 +81,14 @@ export function TooltipSection({ (choice, index = 0) => { const fields = [...localValues]; - if (indexPattern.getFieldByName(choice.field)) { + if (dataView.getFieldByName(choice.field)) { fields[index] = { id: generateId(), value: choice.field }; // update the layer state handleInputChange(fields); } }, - [localValues, indexPattern, handleInputChange] + [localValues, dataView, handleInputChange] ); const newBucketButton = ( @@ -98,7 +98,7 @@ export function TooltipSection({ onClick={() => { handleInputChange([...localValues, { id: generateId(), value: undefined, isNew: true }]); }} - label={i18n.translate('xpack.lens.xyChart.annotation.tooltip.addField', { + label={i18n.translate('eventAnnotation.xyChart.annotation.tooltip.addField', { defaultMessage: 'Add field', })} isDisabled={localValues.length > MAX_TOOLTIP_FIELDS_SIZE} @@ -115,7 +115,7 @@ export function TooltipSection({ className="lnsConfigPanelAnnotations__noFieldsPrompt" > - {i18n.translate('xpack.lens.xyChart.annotation.tooltip.noFields', { + {i18n.translate('eventAnnotation.xyChart.annotation.tooltip.noFields', { defaultMessage: 'None selected', })} @@ -126,7 +126,8 @@ export function TooltipSection({ ); } - const options = indexPattern.fields + const options = dataView.fields + .filter(isFieldLensCompatible) .filter( ({ displayName, type }) => displayName && !rawValuesLookup.has(displayName) && supportedTypes.has(type) @@ -140,7 +141,7 @@ export function TooltipSection({ field: field.name, dataType: field.type, }, - exists: hasFieldData(indexPattern.id, field.name), + exists: dataView.id ? hasFieldData(dataView.id, field.name) : false, compatible: true, 'data-test-subj': `lnsXY-annotation-tooltip-fieldOption-${field.name}`, } as FieldOption) @@ -158,7 +159,7 @@ export function TooltipSection({ bgColor="subdued" > {localValues.map(({ id, value, isNew }, index, arrayRef) => { - const fieldIsValid = value ? Boolean(indexPattern.getFieldByName(value)) : true; + const fieldIsValid = value ? Boolean(dataView.getFieldByName(value)) : true; return ( i !== index)); }} removeTitle={i18n.translate( - 'xpack.lens.xyChart.annotation.tooltip.deleteButtonLabel', + 'eventAnnotation.xyChart.annotation.tooltip.deleteButtonLabel', { defaultMessage: 'Delete', } diff --git a/src/plugins/event_annotation/public/components/annotation_editor_controls/types.ts b/src/plugins/event_annotation/public/components/annotation_editor_controls/types.ts new file mode 100644 index 0000000000000..094543e4f71d8 --- /dev/null +++ b/src/plugins/event_annotation/public/components/annotation_editor_controls/types.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { PointInTimeEventAnnotationConfig, RangeEventAnnotationConfig } from '../../../common'; + +export type ManualEventAnnotationType = + | PointInTimeEventAnnotationConfig + | RangeEventAnnotationConfig; diff --git a/src/plugins/event_annotation/public/components/get_annotation_accessor.ts b/src/plugins/event_annotation/public/components/get_annotation_accessor.ts new file mode 100644 index 0000000000000..1ece7164f2557 --- /dev/null +++ b/src/plugins/event_annotation/public/components/get_annotation_accessor.ts @@ -0,0 +1,32 @@ +/* + * 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 { AccessorConfig } from '@kbn/visualization-ui-components/public'; +import { EventAnnotationConfig } from '../../common'; +import { + defaultAnnotationColor, + defaultAnnotationRangeColor, + isRangeAnnotationConfig, +} from '../event_annotation_service/helpers'; +import { annotationsIconSet } from './annotation_editor_controls/icon_set'; + +export const getAnnotationAccessor = (annotation: EventAnnotationConfig): AccessorConfig => { + const annotationIcon = !isRangeAnnotationConfig(annotation) + ? annotationsIconSet.find((option) => option.value === annotation?.icon) || + annotationsIconSet.find((option) => option.value === 'triangle') + : undefined; + const icon = annotationIcon?.icon ?? annotationIcon?.value; + return { + columnId: annotation.id, + triggerIconType: annotation.isHidden ? 'invisible' : icon ? 'custom' : 'color', + customIcon: icon, + color: + annotation?.color || + (isRangeAnnotationConfig(annotation) ? defaultAnnotationRangeColor : defaultAnnotationColor), + }; +}; diff --git a/src/plugins/event_annotation/public/components/group_editor_controls/annotation_list.tsx b/src/plugins/event_annotation/public/components/group_editor_controls/annotation_list.tsx new file mode 100644 index 0000000000000..f29638e202548 --- /dev/null +++ b/src/plugins/event_annotation/public/components/group_editor_controls/annotation_list.tsx @@ -0,0 +1,132 @@ +/* + * 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 { css } from '@emotion/react'; +import { DragContext, DragDrop, DropTargetSwapDuplicateCombine } from '@kbn/dom-drag-drop'; +import { + DimensionButton, + DimensionTrigger, + EmptyDimensionButton, +} from '@kbn/visualization-ui-components/public'; +import React, { useCallback, useContext, useEffect, useState } from 'react'; +import { v4 as uuidv4 } from 'uuid'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { i18n } from '@kbn/i18n'; +import { createCopiedAnnotation, EventAnnotationConfig } from '../../../common'; +import { getAnnotationAccessor } from '..'; + +export const AnnotationList = ({ + annotations, + selectAnnotation, + update: updateAnnotations, +}: { + annotations: EventAnnotationConfig[]; + selectAnnotation: (annotation: EventAnnotationConfig) => void; + update: (annotations: EventAnnotationConfig[]) => void; +}) => { + const [newAnnotationId, setNewAnnotationId] = useState(uuidv4()); + useEffect(() => { + setNewAnnotationId(uuidv4()); + }, [annotations.length]); + + const { dragging } = useContext(DragContext); + + const addAnnotationText = i18n.translate('eventAnnotation.annotationList.add', { + defaultMessage: 'Add annotation', + }); + + const addNewAnnotation = useCallback( + (sourceAnnotationId?: string) => { + const source = sourceAnnotationId + ? annotations.find(({ id }) => id === sourceAnnotationId) + : undefined; + const newAnnotation = createCopiedAnnotation( + newAnnotationId, + new Date().toISOString(), + source + ); + + if (!source) { + selectAnnotation(newAnnotation); + } + updateAnnotations([...annotations, newAnnotation]); + }, + [annotations, newAnnotationId, selectAnnotation, updateAnnotations] + ); + + return ( +
+ {annotations.map((annotation, index) => ( +
+ + selectAnnotation(annotation)} + onRemoveClick={() => + updateAnnotations(annotations.filter(({ id }) => id !== annotation.id)) + } + accessorConfig={getAnnotationAccessor(annotation)} + label={annotation.label} + > + + + +
+ ))} + +
+ addNewAnnotation(sourceId)} + > + addNewAnnotation()} + /> + +
+
+ ); +}; diff --git a/src/plugins/event_annotation/public/components/group_editor_controls/get_annotation_accessor.ts b/src/plugins/event_annotation/public/components/group_editor_controls/get_annotation_accessor.ts new file mode 100644 index 0000000000000..59cdfe15d0814 --- /dev/null +++ b/src/plugins/event_annotation/public/components/group_editor_controls/get_annotation_accessor.ts @@ -0,0 +1,32 @@ +/* + * 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 { AccessorConfig } from '@kbn/visualization-ui-components/public'; +import type { EventAnnotationConfig } from '../../../common'; +import { + defaultAnnotationColor, + defaultAnnotationRangeColor, + isRangeAnnotationConfig, +} from '../../event_annotation_service/helpers'; +import { annotationsIconSet } from '../annotation_editor_controls'; + +export const getAnnotationAccessor = (annotation: EventAnnotationConfig): AccessorConfig => { + const annotationIcon = !isRangeAnnotationConfig(annotation) + ? annotationsIconSet.find((option) => option.value === annotation?.icon) || + annotationsIconSet.find((option) => option.value === 'triangle') + : undefined; + const icon = annotationIcon?.icon ?? annotationIcon?.value; + return { + columnId: annotation.id, + triggerIconType: annotation.isHidden ? 'invisible' : icon ? 'custom' : 'color', + customIcon: icon, + color: + annotation?.color || + (isRangeAnnotationConfig(annotation) ? defaultAnnotationRangeColor : defaultAnnotationColor), + }; +}; diff --git a/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.test.tsx b/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.test.tsx new file mode 100644 index 0000000000000..d3b9f384a185f --- /dev/null +++ b/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.test.tsx @@ -0,0 +1,235 @@ +/* + * 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, { ChangeEvent, FormEvent } from 'react'; +import { EventAnnotationGroupConfig, getDefaultManualAnnotation } from '../../../common'; +import { ReactWrapper } from 'enzyme'; +import { mountWithIntl } from '@kbn/test-jest-helpers'; +import { GroupEditorControls } from './group_editor_controls'; +import { EuiTextAreaProps, EuiTextProps } from '@elastic/eui'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import { act } from 'react-dom/test-utils'; +import type { QueryInputServices } from '@kbn/visualization-ui-components/public'; +import { AnnotationEditorControls, ENABLE_INDIVIDUAL_ANNOTATION_EDITING } from '..'; + +jest.mock('@elastic/eui', () => { + return { + ...jest.requireActual('@elastic/eui'), + EuiDatePicker: () => <>, // for some reason this component caused an infinite loop when the props updated + }; +}); + +describe('event annotation group editor', () => { + const dataViewId = 'my-index-pattern'; + const adHocDataViewId = 'ad-hoc'; + const adHocDataViewSpec = { + id: adHocDataViewId, + title: 'Ad Hoc Data View', + }; + + const group: EventAnnotationGroupConfig = { + annotations: [], + description: '', + tags: [], + indexPatternId: dataViewId, + title: 'My group', + ignoreGlobalFilters: false, + dataViewSpec: adHocDataViewSpec, + }; + + let wrapper: ReactWrapper; + let updateMock: jest.Mock; + let setSelectedAnnotationMock: jest.Mock; + + const TagSelector = (_props: { onTagsSelected: (tags: string[]) => void }) =>
; + + beforeEach(async () => { + updateMock = jest.fn(); + setSelectedAnnotationMock = jest.fn(); + + wrapper = mountWithIntl( + + Promise.resolve({ + id: spec.id, + title: spec.title, + toSpec: () => spec, + } as unknown as DataView) + } + queryInputServices={{} as QueryInputServices} + showValidation={false} + /> + ); + + await act(async () => { + await new Promise((resolve) => setImmediate(resolve)); + wrapper.update(); + }); + }); + + it('reports group updates', () => { + ( + wrapper.find( + "EuiFieldText[data-test-subj='annotationGroupTitle']" + ) as ReactWrapper + ).prop('onChange')!({ + target: { + value: 'im a new title!', + } as Partial as EventTarget, + } as FormEvent); + + ( + wrapper.find( + "EuiTextArea[data-test-subj='annotationGroupDescription']" + ) as ReactWrapper + ).prop('onChange')!({ + target: { + value: 'im a new description!', + }, + } as ChangeEvent); + + act(() => { + wrapper.find(TagSelector).prop('onTagsSelected')(['im a new tag!']); + }); + + // TODO - reenable data view selection tests when ENABLE_INDIVIDUAL_ANNOTATION_EDITING is set to true! + // this will happen in https://github.com/elastic/kibana/issues/158774 + + // const setDataViewId = (id: string) => + // ( + // wrapper.find( + // "EuiSelect[data-test-subj='annotationDataViewSelection']" + // ) as ReactWrapper + // ).prop('onChange')!({ target: { value: id } } as React.ChangeEvent); + + // setDataViewId(dataViewId); + // setDataViewId(adHocDataViewId); + + expect(updateMock.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "annotations": Array [], + "dataViewSpec": Object { + "id": "ad-hoc", + "title": "Ad Hoc Data View", + }, + "description": "", + "ignoreGlobalFilters": false, + "indexPatternId": "my-index-pattern", + "tags": Array [], + "title": "im a new title!", + }, + ], + Array [ + Object { + "annotations": Array [], + "dataViewSpec": Object { + "id": "ad-hoc", + "title": "Ad Hoc Data View", + }, + "description": "im a new description!", + "ignoreGlobalFilters": false, + "indexPatternId": "my-index-pattern", + "tags": Array [], + "title": "My group", + }, + ], + Array [ + Object { + "annotations": Array [], + "dataViewSpec": Object { + "id": "ad-hoc", + "title": "Ad Hoc Data View", + }, + "description": "", + "ignoreGlobalFilters": false, + "indexPatternId": "my-index-pattern", + "tags": Array [ + "im a new tag!", + ], + "title": "My group", + }, + ], + ] + `); + }); + + if (ENABLE_INDIVIDUAL_ANNOTATION_EDITING) { + it('adds a new annotation group', () => { + act(() => { + wrapper.find('button[data-test-subj="addAnnotation"]').simulate('click'); + }); + + expect(updateMock).toHaveBeenCalledTimes(2); + const newAnnotations = (updateMock.mock.calls[0][0] as EventAnnotationGroupConfig) + .annotations; + expect(newAnnotations.length).toBe(group.annotations.length + 1); + expect(wrapper.exists(AnnotationEditorControls)); // annotation controls opened + }); + + it('incorporates annotation updates into group', () => { + const annotations = [ + getDefaultManualAnnotation('1', ''), + getDefaultManualAnnotation('2', ''), + ]; + + act(() => { + wrapper.setProps({ + selectedAnnotation: annotations[0], + group: { ...group, annotations }, + }); + }); + + wrapper.find(AnnotationEditorControls).prop('onAnnotationChange')({ + ...annotations[0], + color: 'newColor', + }); + + expect(updateMock).toHaveBeenCalledTimes(1); + expect(updateMock.mock.calls[0][0].annotations[0].color).toBe('newColor'); + expect(setSelectedAnnotationMock).toHaveBeenCalledTimes(1); + }); + + it('removes an annotation from a group', () => { + const annotations = [ + getDefaultManualAnnotation('1', ''), + getDefaultManualAnnotation('2', ''), + ]; + + act(() => { + wrapper.setProps({ + group: { ...group, annotations }, + }); + }); + + act(() => { + wrapper + .find('button[data-test-subj="indexPattern-dimension-remove"]') + .last() + .simulate('click'); + }); + + expect(updateMock).toHaveBeenCalledTimes(1); + expect(updateMock.mock.calls[0][0].annotations).toEqual(annotations.slice(0, 1)); + }); + } +}); diff --git a/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx b/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx new file mode 100644 index 0000000000000..c0a07a6fcb72b --- /dev/null +++ b/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx @@ -0,0 +1,212 @@ +/* + * 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 { + EuiFieldText, + EuiForm, + EuiFormRow, + EuiSelect, + EuiText, + EuiTextArea, + EuiTitle, +} from '@elastic/eui'; +import { css } from '@emotion/react'; +import type { DataView, DataViewSpec } from '@kbn/data-views-plugin/common'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { SavedObjectsTaggingApiUiComponent } from '@kbn/saved-objects-tagging-oss-plugin/public'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { QueryInputServices } from '@kbn/visualization-ui-components/public'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import { EVENT_ANNOTATION_APP_NAME } from '../../../common/constants'; +import { EventAnnotationConfig, EventAnnotationGroupConfig } from '../../../common'; +import { AnnotationEditorControls } from '../annotation_editor_controls'; +import { AnnotationList } from './annotation_list'; + +export const ENABLE_INDIVIDUAL_ANNOTATION_EDITING = false; + +const isTitleValid = (title: string) => Boolean(title.length); + +export const isGroupValid = (group: EventAnnotationGroupConfig) => isTitleValid(group.title); + +export const GroupEditorControls = ({ + group, + update, + setSelectedAnnotation: _setSelectedAnnotation, + selectedAnnotation, + TagSelector, + dataViews: globalDataViews, + createDataView, + queryInputServices, + showValidation, +}: { + group: EventAnnotationGroupConfig; + update: (group: EventAnnotationGroupConfig) => void; + selectedAnnotation: EventAnnotationConfig | undefined; + setSelectedAnnotation: (annotation: EventAnnotationConfig) => void; + TagSelector: SavedObjectsTaggingApiUiComponent['SavedObjectSaveModalTagSelector']; + dataViews: DataView[]; + createDataView: (spec: DataViewSpec) => Promise; + queryInputServices: QueryInputServices; + showValidation: boolean; +}) => { + // save the spec for the life of the component since the user might change their mind after selecting another data view + const [adHocDataView, setAdHocDataView] = useState(); + + useEffect(() => { + if (group.dataViewSpec) { + createDataView(group.dataViewSpec).then(setAdHocDataView); + } + }, [createDataView, group.dataViewSpec]); + + const setSelectedAnnotation = useCallback( + (newSelection: EventAnnotationConfig) => { + update({ + ...group, + annotations: group.annotations.map((annotation) => + annotation.id === newSelection.id ? newSelection : annotation + ), + }); + _setSelectedAnnotation(newSelection); + }, + [_setSelectedAnnotation, group, update] + ); + + const dataViews = useMemo(() => { + const items = [...globalDataViews]; + if (adHocDataView) { + items.push(adHocDataView); + } + return items; + }, [adHocDataView, globalDataViews]); + + const currentDataView = useMemo( + () => dataViews.find((dataView) => dataView.id === group.indexPatternId) || dataViews[0], + [dataViews, group.indexPatternId] + ); + + return !selectedAnnotation ? ( + <> + +

+ +

+
+ + + + update({ + ...group, + title: value, + }) + } + /> + + + + + } + > + + update({ + ...group, + description: value, + }) + } + /> + + + + update({ + ...group, + tags, + }) + } + /> + + {ENABLE_INDIVIDUAL_ANNOTATION_EDITING && ( + <> + + ({ + value, + text: name ?? title, + }))} + value={group.indexPatternId} + onChange={({ target: { value } }) => + update({ + ...group, + indexPatternId: value, + dataViewSpec: + value === adHocDataView?.id ? adHocDataView.toSpec(false) : undefined, + }) + } + /> + + + update({ ...group, annotations: newAnnotations })} + /> + + + )} + + + ) : ( + setSelectedAnnotation({ ...selectedAnnotation, ...changes })} + dataView={currentDataView} + getDefaultRangeEnd={(rangeStart) => rangeStart} + queryInputServices={queryInputServices} + appName={EVENT_ANNOTATION_APP_NAME} + /> + ); +}; diff --git a/src/plugins/event_annotation/public/components/group_editor_controls/index.ts b/src/plugins/event_annotation/public/components/group_editor_controls/index.ts new file mode 100644 index 0000000000000..b9db18b4682f4 --- /dev/null +++ b/src/plugins/event_annotation/public/components/group_editor_controls/index.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ + +export * from './group_editor_controls'; diff --git a/src/plugins/event_annotation/public/components/group_editor_flyout.test.tsx b/src/plugins/event_annotation/public/components/group_editor_flyout.test.tsx new file mode 100644 index 0000000000000..7f732aa882ffb --- /dev/null +++ b/src/plugins/event_annotation/public/components/group_editor_flyout.test.tsx @@ -0,0 +1,134 @@ +/* + * 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 { EuiButton, EuiFlyout } from '@elastic/eui'; +import { EventAnnotationGroupConfig, getDefaultManualAnnotation } from '../../common'; +import { taggingApiMock } from '@kbn/saved-objects-tagging-oss-plugin/public/api.mock'; +import { shallow, ShallowWrapper } from 'enzyme'; +import React from 'react'; +import { GroupEditorControls } from './group_editor_controls'; +import { GroupEditorFlyout } from './group_editor_flyout'; +import { DataView } from '@kbn/data-views-plugin/common'; +import type { QueryInputServices } from '@kbn/visualization-ui-components/public'; + +const simulateButtonClick = (component: ShallowWrapper, selector: string) => { + (component.find(selector) as ShallowWrapper[0]>).prop('onClick')!( + {} as any + ); +}; + +const SELECTORS = { + SAVE_BUTTON: '[data-test-subj="saveAnnotationGroup"]', + CANCEL_BUTTON: '[data-test-subj="cancelGroupEdit"]', + BACK_BUTTON: '[data-test-subj="backToGroupSettings"]', +}; + +const assertGroupEditingState = (component: ShallowWrapper) => { + expect(component.exists(SELECTORS.SAVE_BUTTON)).toBeTruthy(); + expect(component.exists(SELECTORS.CANCEL_BUTTON)).toBeTruthy(); + expect(component.exists(SELECTORS.BACK_BUTTON)).toBeFalsy(); +}; + +const assertAnnotationEditingState = (component: ShallowWrapper) => { + expect(component.exists(SELECTORS.BACK_BUTTON)).toBeTruthy(); + expect(component.exists(SELECTORS.SAVE_BUTTON)).toBeFalsy(); + expect(component.exists(SELECTORS.CANCEL_BUTTON)).toBeFalsy(); +}; + +describe('group editor flyout', () => { + const annotation = getDefaultManualAnnotation('my-id', 'some-timestamp'); + + const group: EventAnnotationGroupConfig = { + annotations: [annotation], + description: '', + tags: [], + indexPatternId: 'some-id', + title: 'My group', + ignoreGlobalFilters: false, + }; + + const mockTaggingApi = taggingApiMock.create(); + + let component: ShallowWrapper; + let onSave: jest.Mock; + let onClose: jest.Mock; + let updateGroup: jest.Mock; + + beforeEach(() => { + onSave = jest.fn(); + onClose = jest.fn(); + updateGroup = jest.fn(); + component = shallow( + + ); + }); + + it('renders controls', () => { + expect(component.find(GroupEditorControls).props()).toMatchSnapshot(); + }); + it('signals close', () => { + component.find(EuiFlyout).prop('onClose')({} as MouseEvent); + simulateButtonClick(component, SELECTORS.CANCEL_BUTTON); + + expect(onClose).toHaveBeenCalledTimes(2); + }); + it('signals save', () => { + simulateButtonClick(component, SELECTORS.SAVE_BUTTON); + + expect(onSave).toHaveBeenCalledTimes(1); + }); + it("doesn't save invalid group config", () => { + component.setProps({ + group: { ...group, title: '' }, + }); + + simulateButtonClick(component, SELECTORS.SAVE_BUTTON); + + expect(onSave).not.toHaveBeenCalled(); + }); + it('reports group updates', () => { + const newGroup = { ...group, description: 'new description' }; + component.find(GroupEditorControls).prop('update')(newGroup); + + expect(updateGroup).toHaveBeenCalledWith(newGroup); + }); + test('specific annotation editing', () => { + assertGroupEditingState(component); + + component.find(GroupEditorControls).prop('setSelectedAnnotation')(annotation); + + assertAnnotationEditingState(component); + + component.find(SELECTORS.BACK_BUTTON).simulate('click'); + + assertGroupEditingState(component); + }); + it('removes active annotation instead of signaling close', () => { + component.find(GroupEditorControls).prop('setSelectedAnnotation')(annotation); + + assertAnnotationEditingState(component); + + component.find(EuiFlyout).prop('onClose')({} as MouseEvent); + + assertGroupEditingState(component); + }); +}); diff --git a/src/plugins/event_annotation/public/components/group_editor_flyout.tsx b/src/plugins/event_annotation/public/components/group_editor_flyout.tsx new file mode 100644 index 0000000000000..3e296951542a8 --- /dev/null +++ b/src/plugins/event_annotation/public/components/group_editor_flyout.tsx @@ -0,0 +1,146 @@ +/* + * 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 { + EuiFlyout, + EuiFlyoutHeader, + EuiTitle, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlexGroup, + EuiFlexItem, + EuiButtonEmpty, + EuiButton, + htmlIdGenerator, +} from '@elastic/eui'; +import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; +import { DataView, DataViewSpec } from '@kbn/data-views-plugin/common'; +import type { QueryInputServices } from '@kbn/visualization-ui-components/public'; +import { EventAnnotationConfig, EventAnnotationGroupConfig } from '../../common'; +import { GroupEditorControls, isGroupValid } from './group_editor_controls'; + +export const GroupEditorFlyout = ({ + group, + updateGroup, + onClose: parentOnClose, + onSave, + savedObjectsTagging, + dataViews, + createDataView, + queryInputServices, +}: { + group: EventAnnotationGroupConfig; + updateGroup: (newGroup: EventAnnotationGroupConfig) => void; + onClose: () => void; + onSave: () => void; + savedObjectsTagging: SavedObjectsTaggingApi; + dataViews: DataView[]; + createDataView: (spec: DataViewSpec) => Promise; + queryInputServices: QueryInputServices; +}) => { + const flyoutHeadingId = useMemo(() => htmlIdGenerator()(), []); + const flyoutBodyOverflowRef = useRef(null); + useEffect(() => { + if (!flyoutBodyOverflowRef.current) { + flyoutBodyOverflowRef.current = document.querySelector('.euiFlyoutBody__overflow'); + } + }, []); + + const [hasAttemptedSave, setHasAttemptedSave] = useState(false); + + const resetContentScroll = useCallback( + () => flyoutBodyOverflowRef.current && flyoutBodyOverflowRef.current.scroll(0, 0), + [] + ); + + const [selectedAnnotation, _setSelectedAnnotation] = useState(); + const setSelectedAnnotation = useCallback( + (newValue: EventAnnotationConfig | undefined) => { + if ((!newValue && selectedAnnotation) || (newValue && !selectedAnnotation)) + resetContentScroll(); + _setSelectedAnnotation(newValue); + }, + [resetContentScroll, selectedAnnotation] + ); + + const onClose = () => (selectedAnnotation ? setSelectedAnnotation(undefined) : parentOnClose()); + + return ( + + + +

+ +

+
+
+ + + + + + + + {selectedAnnotation ? ( + + setSelectedAnnotation(undefined)} + > + + + + ) : ( + <> + + + + + + + { + setHasAttemptedSave(true); + + if (isGroupValid(group)) { + onSave(); + } + }} + > + + + + + )} + + +
+ ); +}; diff --git a/src/plugins/event_annotation/public/components/index.ts b/src/plugins/event_annotation/public/components/index.ts new file mode 100644 index 0000000000000..5433625c6344b --- /dev/null +++ b/src/plugins/event_annotation/public/components/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + +export { AnnotationEditorControls, annotationsIconSet } from './annotation_editor_controls'; + +export * from './group_editor_controls'; + +export * from './get_annotation_accessor'; diff --git a/src/plugins/event_annotation/public/components/table_list.test.tsx b/src/plugins/event_annotation/public/components/table_list.test.tsx new file mode 100644 index 0000000000000..b6d20e64dc8d4 --- /dev/null +++ b/src/plugins/event_annotation/public/components/table_list.test.tsx @@ -0,0 +1,222 @@ +/* + * 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 { + EventAnnotationGroupTableList, + SAVED_OBJECTS_LIMIT_SETTING, + SAVED_OBJECTS_PER_PAGE_SETTING, +} from './table_list'; +import { + TableListViewTable, + type UserContentCommonSchema, +} from '@kbn/content-management-table-list-view-table'; +import { EventAnnotationServiceType } from '../event_annotation_service/types'; +import { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; +import { shallow, ShallowWrapper } from 'enzyme'; +import { EventAnnotationGroupConfig, EVENT_ANNOTATION_GROUP_TYPE } from '../../common'; +import { taggingApiMock } from '@kbn/saved-objects-tagging-oss-plugin/public/mocks'; + +import { act } from 'react-dom/test-utils'; +import { GroupEditorFlyout } from './group_editor_flyout'; +import { DataView } from '@kbn/data-views-plugin/common'; +import { QueryInputServices } from '@kbn/visualization-ui-components/public'; +import { toastsServiceMock } from '@kbn/core-notifications-browser-mocks/src/toasts_service.mock'; +import { IToasts } from '@kbn/core-notifications-browser'; + +describe('annotation list view', () => { + const adHocDVId = 'ad-hoc'; + + const group: EventAnnotationGroupConfig = { + annotations: [], + description: '', + tags: [], + indexPatternId: adHocDVId, + title: 'My group', + ignoreGlobalFilters: false, + dataViewSpec: { + id: adHocDVId, + title: 'Ad hoc data view', + }, + }; + + let wrapper: ShallowWrapper; + let mockEventAnnotationService: EventAnnotationServiceType; + let mockToasts: IToasts; + + beforeEach(() => { + mockEventAnnotationService = { + findAnnotationGroupContent: jest.fn(), + deleteAnnotationGroups: jest.fn(), + loadAnnotationGroup: jest.fn().mockResolvedValue(group), + updateAnnotationGroup: jest.fn(() => Promise.resolve()), + } as Partial as EventAnnotationServiceType; + + const mockUiSettings = { + get: jest.fn( + (key) => + ({ + [SAVED_OBJECTS_LIMIT_SETTING]: 30, + [SAVED_OBJECTS_PER_PAGE_SETTING]: 10, + }[key]) + ), + } as Partial as IUiSettingsClient; + + mockToasts = toastsServiceMock.createStartContract(); + + wrapper = shallow( + {}, + setPageDataTestSubject: () => {}, + }} + dataViews={[ + { + id: 'some-id', + title: 'Some data view', + } as DataView, + ]} + createDataView={() => Promise.resolve({} as DataView)} + queryInputServices={{} as QueryInputServices} + toasts={mockToasts} + navigateToLens={() => {}} + /> + ); + }); + + it('searches for groups', () => { + const searchQuery = 'My Search Query'; + const references = [{ id: 'first_id', type: 'sometype' }]; + const referencesToExclude = [{ id: 'second_id', type: 'sometype' }]; + wrapper.find(TableListViewTable).prop('findItems')(searchQuery, { + references, + referencesToExclude, + }); + + expect(mockEventAnnotationService.findAnnotationGroupContent).toHaveBeenCalledWith( + 'My Search Query', + 30, + [{ id: 'first_id', type: 'sometype' }], + [{ id: 'second_id', type: 'sometype' }] + ); + }); + + describe('deleting groups', () => { + it('prevent deleting when user is missing perms', () => { + wrapper.setProps({ visualizeCapabilities: { delete: false } }); + + expect(wrapper.find(TableListViewTable).prop('deleteItems')).toBeUndefined(); + }); + + it('deletes groups using the service', () => { + expect(wrapper.find(TableListViewTable).prop('deleteItems')).toBeDefined(); + + wrapper.find(TableListViewTable).prop('deleteItems')!([ + { + id: 'some-id-1', + references: [ + { + type: 'index-pattern', + name: 'metrics-*', + id: 'metrics-*', + }, + ], + type: EVENT_ANNOTATION_GROUP_TYPE, + updatedAt: '', + attributes: { + title: 'group1', + }, + }, + { + id: 'some-id-2', + references: [], + type: EVENT_ANNOTATION_GROUP_TYPE, + updatedAt: '', + attributes: { + title: 'group2', + }, + }, + ]); + + expect((mockEventAnnotationService.deleteAnnotationGroups as jest.Mock).mock.calls) + .toMatchInlineSnapshot(` + Array [ + Array [ + Array [ + "some-id-1", + "some-id-2", + ], + ], + ] + `); + }); + }); + + describe('editing groups', () => { + it('prevents editing when user is missing perms', () => { + wrapper.setProps({ visualizeCapabilities: { save: false } }); + + expect(wrapper.find(TableListViewTable).prop('deleteItems')).toBeUndefined(); + }); + + it('edits existing group', async () => { + expect(wrapper.find(GroupEditorFlyout).exists()).toBeFalsy(); + const initialBouncerValue = wrapper.find(TableListViewTable).prop('refreshListBouncer'); + + act(() => { + wrapper.find(TableListViewTable).prop('editItem')!({ + id: '1234', + } as UserContentCommonSchema); + }); + + // wait one tick to give promise time to settle + await new Promise((resolve) => setTimeout(resolve, 0)); + + expect(mockEventAnnotationService.loadAnnotationGroup).toHaveBeenCalledWith('1234'); + + expect(wrapper.find(GroupEditorFlyout).exists()).toBeTruthy(); + + const updatedGroup = { ...group, tags: ['my-new-tag'] }; + + wrapper.find(GroupEditorFlyout).prop('updateGroup')(updatedGroup); + + wrapper.find(GroupEditorFlyout).prop('onSave')(); + + await new Promise((resolve) => setTimeout(resolve, 0)); + + expect(mockEventAnnotationService.updateAnnotationGroup).toHaveBeenCalledWith( + updatedGroup, + '1234' + ); + + expect(wrapper.find(GroupEditorFlyout).exists()).toBeFalsy(); + expect(wrapper.find(TableListViewTable).prop('refreshListBouncer')).not.toBe( + initialBouncerValue + ); // (should refresh list) + }); + + it('opens editor when title is clicked', async () => { + act(() => { + wrapper.find(TableListViewTable).prop('onClickTitle')!({ + id: '1234', + } as UserContentCommonSchema); + }); + + await new Promise((resolve) => setTimeout(resolve, 0)); + + expect(wrapper.find(GroupEditorFlyout).exists()).toBeTruthy(); + }); + }); +}); diff --git a/src/plugins/event_annotation/public/components/table_list.tsx b/src/plugins/event_annotation/public/components/table_list.tsx new file mode 100644 index 0000000000000..84535f2ffefc5 --- /dev/null +++ b/src/plugins/event_annotation/public/components/table_list.tsx @@ -0,0 +1,205 @@ +/* + * 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, { useCallback, useState } from 'react'; +import { TableListViewTable } from '@kbn/content-management-table-list-view-table'; +import type { TableListTabParentProps } from '@kbn/content-management-tabbed-table-list-view'; +import { i18n } from '@kbn/i18n'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; +import { SavedObjectsFindOptionsReference } from '@kbn/core-saved-objects-api-browser'; +import { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; +import { DataView, DataViewSpec } from '@kbn/data-views-plugin/common'; +import type { QueryInputServices } from '@kbn/visualization-ui-components/public'; +import { IToasts } from '@kbn/core-notifications-browser'; +import { EuiButton, EuiEmptyPrompt, EuiTitle } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { EventAnnotationGroupConfig } from '../../common'; +import type { EventAnnotationServiceType } from '../event_annotation_service/types'; +import { EventAnnotationGroupContent } from '../../common/types'; +import { GroupEditorFlyout } from './group_editor_flyout'; + +export const SAVED_OBJECTS_LIMIT_SETTING = 'savedObjects:listingLimit'; +export const SAVED_OBJECTS_PER_PAGE_SETTING = 'savedObjects:perPage'; + +const getCustomColumn = (dataViews: DataView[]) => { + const dataViewNameMap = Object.fromEntries( + dataViews.map((dataView) => [dataView.id, dataView.name ?? dataView.title]) + ); + + return { + field: 'dataView', + name: i18n.translate('eventAnnotation.tableList.dataView', { + defaultMessage: 'Data view', + }), + sortable: false, + width: '150px', + render: (_field: string, record: EventAnnotationGroupContent) => ( +
+ {record.attributes.dataViewSpec + ? record.attributes.dataViewSpec.name + : dataViewNameMap[record.attributes.indexPatternId]} +
+ ), + }; +}; + +export const EventAnnotationGroupTableList = ({ + uiSettings, + eventAnnotationService, + visualizeCapabilities, + savedObjectsTagging, + parentProps, + dataViews, + createDataView, + queryInputServices, + toasts, + navigateToLens, +}: { + uiSettings: IUiSettingsClient; + eventAnnotationService: EventAnnotationServiceType; + visualizeCapabilities: Record>; + savedObjectsTagging: SavedObjectsTaggingApi; + parentProps: TableListTabParentProps; + dataViews: DataView[]; + createDataView: (spec: DataViewSpec) => Promise; + queryInputServices: QueryInputServices; + toasts: IToasts; + navigateToLens: () => void; +}) => { + const listingLimit = uiSettings.get(SAVED_OBJECTS_LIMIT_SETTING); + const initialPageSize = uiSettings.get(SAVED_OBJECTS_PER_PAGE_SETTING); + + const [refreshListBouncer, setRefreshListBouncer] = useState(false); + + const refreshList = useCallback(() => { + setRefreshListBouncer(!refreshListBouncer); + }, [refreshListBouncer]); + + const fetchItems = useCallback( + ( + searchTerm: string, + { + references, + referencesToExclude, + }: { + references?: SavedObjectsFindOptionsReference[]; + referencesToExclude?: SavedObjectsFindOptionsReference[]; + } = {} + ) => { + // todo - allow page size changes + return eventAnnotationService.findAnnotationGroupContent( + searchTerm, + listingLimit, // TODO is this right? + references, + referencesToExclude + ); + }, + [eventAnnotationService, listingLimit] + ); + + const editItem = useCallback( + ({ id }: EventAnnotationGroupContent) => { + if (visualizeCapabilities.save) { + eventAnnotationService + .loadAnnotationGroup(id) + .then((group) => setGroupToEditInfo({ group, id })); + } + }, + [eventAnnotationService, visualizeCapabilities.save] + ); + + const [groupToEditInfo, setGroupToEditInfo] = useState<{ + group: EventAnnotationGroupConfig; + id: string; + }>(); + + const flyout = groupToEditInfo ? ( + setGroupToEditInfo({ group: newGroup, id: groupToEditInfo.id })} + onClose={() => setGroupToEditInfo(undefined)} + onSave={() => + (groupToEditInfo.id + ? eventAnnotationService.updateAnnotationGroup(groupToEditInfo.group, groupToEditInfo.id) + : eventAnnotationService.createAnnotationGroup(groupToEditInfo.group) + ).then(() => { + setGroupToEditInfo(undefined); + toasts.addSuccess(`Saved "${groupToEditInfo.group.title}"`); + refreshList(); + }) + } + savedObjectsTagging={savedObjectsTagging} + dataViews={dataViews} + createDataView={createDataView} + queryInputServices={queryInputServices} + /> + ) : undefined; + + return ( + <> + + refreshListBouncer={refreshListBouncer} + tableCaption={i18n.translate('eventAnnotation.tableList.listTitle', { + defaultMessage: 'Annotation Library', + })} + findItems={fetchItems} + deleteItems={ + visualizeCapabilities.delete + ? (items) => eventAnnotationService.deleteAnnotationGroups(items.map(({ id }) => id)) + : undefined + } + editItem={editItem} + listingLimit={listingLimit} + initialPageSize={initialPageSize} + initialFilter={''} + customTableColumn={getCustomColumn(dataViews)} + emptyPrompt={ + +

+ +

+ + } + body={ +

+ +

+ } + actions={ + + + + } + iconType="flag" + /> + } + entityName={i18n.translate('eventAnnotation.tableList.entityName', { + defaultMessage: 'annotation group', + })} + entityNamePlural={i18n.translate('eventAnnotation.tableList.entityNamePlural', { + defaultMessage: 'annotation groups', + })} + onClickTitle={editItem} + {...parentProps} + /> + {flyout} + + ); +}; diff --git a/src/plugins/event_annotation/public/event_annotation_service/__snapshots__/service.test.ts.snap b/src/plugins/event_annotation/public/event_annotation_service/__snapshots__/service.test.ts.snap index 73073c0e7ea16..0bd643095dcdc 100644 --- a/src/plugins/event_annotation/public/event_annotation_service/__snapshots__/service.test.ts.snap +++ b/src/plugins/event_annotation/public/event_annotation_service/__snapshots__/service.test.ts.snap @@ -1,5 +1,80 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Event Annotation Service findAnnotationGroupContent should retrieve saved objects and format them 1`] = ` +Object { + "hits": Array [ + Object { + "attributes": Object { + "dataViewSpec": undefined, + "description": undefined, + "indexPatternId": undefined, + "title": undefined, + }, + "id": "nonExistingGroup", + "references": Array [], + "type": undefined, + "updatedAt": "", + }, + Object { + "attributes": Object { + "dataViewSpec": undefined, + "description": "", + "indexPatternId": "ipid", + "title": "groupTitle", + }, + "id": undefined, + "references": Array [ + Object { + "id": "ipid", + "name": "ipid", + "type": "index-pattern", + }, + Object { + "id": "some-tag", + "name": "some-tag", + "type": "tag", + }, + ], + "type": "event-annotation-group", + "updatedAt": "", + }, + Object { + "attributes": Object { + "dataViewSpec": undefined, + "description": undefined, + "indexPatternId": "ipid", + "title": "groupTitle", + }, + "id": "multiAnnotations", + "references": Array [ + Object { + "id": "ipid", + "name": "ipid", + "type": "index-pattern", + }, + ], + "type": "event-annotation-group", + "updatedAt": "", + }, + Object { + "attributes": Object { + "dataViewSpec": Object { + "id": "my-id", + }, + "description": undefined, + "indexPatternId": "my-id", + "title": "groupTitle", + }, + "id": "multiAnnotations", + "references": Array [], + "type": "event-annotation-group", + "updatedAt": "", + }, + ], + "total": 10, +} +`; + exports[`Event Annotation Service loadAnnotationGroup should properly load an annotation group with a multiple annotation 1`] = ` Object { "annotations": undefined, @@ -7,7 +82,7 @@ Object { "description": undefined, "ignoreGlobalFilters": undefined, "indexPatternId": "ipid", - "tags": undefined, + "tags": Array [], "title": "groupTitle", } `; diff --git a/src/plugins/event_annotation/public/event_annotation_service/helpers.ts b/src/plugins/event_annotation/public/event_annotation_service/helpers.ts index afe64a5a47eb2..31dabb34cdc09 100644 --- a/src/plugins/event_annotation/public/event_annotation_service/helpers.ts +++ b/src/plugins/event_annotation/public/event_annotation_service/helpers.ts @@ -5,7 +5,6 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { i18n } from '@kbn/i18n'; import { euiLightVars } from '@kbn/ui-theme'; import { EventAnnotationConfig, @@ -17,13 +16,6 @@ export const defaultAnnotationColor = euiLightVars.euiColorAccent; // Do not compute it live as dependencies will add tens of Kbs to the plugin export const defaultAnnotationRangeColor = `#F04E981A`; // defaultAnnotationColor with opacity 0.1 -export const defaultAnnotationLabel = i18n.translate( - 'eventAnnotation.manualAnnotation.defaultAnnotationLabel', - { - defaultMessage: 'Event', - } -); - export const isRangeAnnotationConfig = ( annotation?: EventAnnotationConfig ): annotation is RangeEventAnnotationConfig => { diff --git a/src/plugins/event_annotation/public/event_annotation_service/service.test.ts b/src/plugins/event_annotation/public/event_annotation_service/service.test.ts index c131ca288a88d..905435bc4f4d0 100644 --- a/src/plugins/event_annotation/public/event_annotation_service/service.test.ts +++ b/src/plugins/event_annotation/public/event_annotation_service/service.test.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import { SavedObjectsFindResponse } from '@kbn/core-saved-objects-api-browser'; import { CoreStart, SimpleSavedObject } from '@kbn/core/public'; import { coreMock } from '@kbn/core/public/mocks'; import { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; @@ -41,6 +42,11 @@ const annotationGroupResolveMocks: Record = name: 'ipid', type: 'index-pattern', }, + { + id: 'some-tag', + name: 'some-tag', + type: 'tag', + }, ], } as Partial as AnnotationGroupSavedObject, multiAnnotations: { @@ -138,6 +144,10 @@ describe('Event Annotation Service', () => { const typedId = id as keyof typeof annotationGroupResolveMocks; return annotationGroupResolveMocks[typedId]; }); + (core.savedObjects.client.find as jest.Mock).mockResolvedValue({ + total: 10, + savedObjects: Object.values(annotationGroupResolveMocks), + } as Pick, 'total' | 'savedObjects'>); (core.savedObjects.client.bulkCreate as jest.Mock).mockImplementation(() => { return annotationResolveMocks.multiAnnotations; }); @@ -474,7 +484,9 @@ describe('Event Annotation Service', () => { "description": "", "ignoreGlobalFilters": false, "indexPatternId": "ipid", - "tags": Array [], + "tags": Array [ + "some-tag", + ], "title": "groupTitle", } `); @@ -490,16 +502,53 @@ describe('Event Annotation Service', () => { expect(group.indexPatternId).toBe(group.dataViewSpec?.id); }); }); - // describe.skip('deleteAnnotationGroup', () => { - // it('deletes annotation group along with annotations that reference them', async () => { - // await eventAnnotationService.deleteAnnotationGroup('multiAnnotations'); - // expect(core.savedObjects.client.bulkDelete).toHaveBeenCalledWith([ - // { id: 'multiAnnotations', type: 'event-annotation-group' }, - // { id: 'annotation1', type: 'event-annotation' }, - // { id: 'annotation2', type: 'event-annotation' }, - // ]); - // }); - // }); + describe('findAnnotationGroupContent', () => { + it('should retrieve saved objects and format them', async () => { + const searchTerm = 'my search'; + + const content = await eventAnnotationService.findAnnotationGroupContent(searchTerm, 20, [ + { type: 'mytype', id: '1234' }, + ]); + + expect(content).toMatchSnapshot(); + + expect((core.savedObjects.client.find as jest.Mock).mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "defaultSearchOperator": "AND", + "hasNoReference": undefined, + "hasReference": Array [ + Object { + "id": "1234", + "type": "mytype", + }, + ], + "page": 1, + "perPage": 20, + "search": "my search*", + "searchFields": Array [ + "title^3", + "description", + ], + "type": Array [ + "event-annotation-group", + ], + }, + ], + ] + `); + }); + }); + describe('deleteAnnotationGroups', () => { + it('deletes annotation group along with annotations that reference them', async () => { + await eventAnnotationService.deleteAnnotationGroups(['id1', 'id2']); + expect(core.savedObjects.client.bulkDelete).toHaveBeenCalledWith([ + { id: 'id1', type: 'event-annotation-group' }, + { id: 'id2', type: 'event-annotation-group' }, + ]); + }); + }); describe('createAnnotationGroup', () => { it('creates annotation group along with annotations', async () => { const annotations = [ @@ -509,7 +558,7 @@ describe('Event Annotation Service', () => { await eventAnnotationService.createAnnotationGroup({ title: 'newGroupTitle', description: 'my description', - tags: ['my', 'many', 'tags'], + tags: ['tag1', 'tag2', 'tag3'], indexPatternId: 'ipid', ignoreGlobalFilters: false, annotations, @@ -519,7 +568,6 @@ describe('Event Annotation Service', () => { { title: 'newGroupTitle', description: 'my description', - tags: ['my', 'many', 'tags'], ignoreGlobalFilters: false, dataViewSpec: null, annotations, @@ -531,6 +579,21 @@ describe('Event Annotation Service', () => { name: 'event-annotation-group_dataView-ref-ipid', type: 'index-pattern', }, + { + id: 'tag1', + name: 'tag1', + type: 'tag', + }, + { + id: 'tag2', + name: 'tag2', + type: 'tag', + }, + { + id: 'tag3', + name: 'tag3', + type: 'tag', + }, ], } ); @@ -555,11 +618,10 @@ describe('Event Annotation Service', () => { { title: 'newTitle', description: '', - tags: [], annotations: [], dataViewSpec: null, ignoreGlobalFilters: false, - }, + } as EventAnnotationGroupAttributes, { references: [ { @@ -572,72 +634,4 @@ describe('Event Annotation Service', () => { ); }); }); - // describe.skip('updateAnnotations', () => { - // const upsert = [ - // { - // id: 'annotation2', - // label: 'Query based event', - // icon: 'triangle', - // color: 'red', - // type: 'query', - // timeField: 'timestamp', - // key: { - // type: 'point_in_time', - // }, - // lineStyle: 'dashed', - // lineWidth: 3, - // filter: { type: 'kibana_query', query: '', language: 'kuery' }, - // }, - // { - // id: 'annotation4', - // label: 'Query based event', - // type: 'query', - // timeField: 'timestamp', - // key: { - // type: 'point_in_time', - // }, - // filter: { type: 'kibana_query', query: '', language: 'kuery' }, - // }, - // ] as EventAnnotationConfig[]; - // it('updates annotations - deletes annotations', async () => { - // await eventAnnotationService.updateAnnotations('multiAnnotations', { - // delete: ['annotation1', 'annotation2'], - // }); - // expect(core.savedObjects.client.bulkDelete).toHaveBeenCalledWith([ - // { id: 'annotation1', type: 'event-annotation' }, - // { id: 'annotation2', type: 'event-annotation' }, - // ]); - // }); - // it('updates annotations - inserts new annotations', async () => { - // await eventAnnotationService.updateAnnotations('multiAnnotations', { upsert }); - // expect(core.savedObjects.client.bulkCreate).toHaveBeenCalledWith([ - // { - // id: 'annotation2', - // type: 'event-annotation', - // attributes: upsert[0], - // overwrite: true, - // references: [ - // { - // id: 'multiAnnotations', - // name: 'event-annotation-group-ref-annotation2', - // type: 'event-annotation-group', - // }, - // ], - // }, - // { - // id: 'annotation4', - // type: 'event-annotation', - // attributes: upsert[1], - // overwrite: true, - // references: [ - // { - // id: 'multiAnnotations', - // name: 'event-annotation-group-ref-annotation4', - // type: 'event-annotation-group', - // }, - // ], - // }, - // ]); - // }); - // }); }); diff --git a/src/plugins/event_annotation/public/event_annotation_service/service.tsx b/src/plugins/event_annotation/public/event_annotation_service/service.tsx index a5ac2e265b0f7..65c2b9146df1c 100644 --- a/src/plugins/event_annotation/public/event_annotation_service/service.tsx +++ b/src/plugins/event_annotation/public/event_annotation_service/service.tsx @@ -10,9 +10,18 @@ import React from 'react'; import { partition } from 'lodash'; import { queryToAst } from '@kbn/data-plugin/common'; import { ExpressionAstExpression } from '@kbn/expressions-plugin/common'; -import { CoreStart, SavedObjectReference, SavedObjectsClientContract } from '@kbn/core/public'; +import { + CoreStart, + SavedObjectReference, + SavedObjectsClientContract, + SavedObjectsFindOptions, + SavedObjectsFindOptionsReference, + SimpleSavedObject, +} from '@kbn/core/public'; import { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; import { DataViewPersistableStateService } from '@kbn/data-views-plugin/common'; +import { defaultAnnotationLabel } from '../../common/manual_event_annotation'; +import { EventAnnotationGroupContent } from '../../common/types'; import { EventAnnotationConfig, EventAnnotationGroupAttributes, @@ -23,7 +32,6 @@ import { EventAnnotationServiceType } from './types'; import { defaultAnnotationColor, defaultAnnotationRangeColor, - defaultAnnotationLabel, isRangeAnnotationConfig, isQueryAnnotationConfig, } from './helpers'; @@ -39,18 +47,9 @@ export function getEventAnnotationService( ): EventAnnotationServiceType { const client: SavedObjectsClientContract = core.savedObjects.client; - const loadAnnotationGroup = async ( - savedObjectId: string - ): Promise => { - const savedObject = await client.get( - EVENT_ANNOTATION_GROUP_TYPE, - savedObjectId - ); - - if (savedObject.error) { - throw savedObject.error; - } - + const mapSavedObjectToGroupConfig = ( + savedObject: SimpleSavedObject + ): EventAnnotationGroupConfig => { const adHocDataViewSpec = savedObject.attributes.dataViewSpec ? DataViewPersistableStateService.inject( savedObject.attributes.dataViewSpec, @@ -61,7 +60,7 @@ export function getEventAnnotationService( return { title: savedObject.attributes.title, description: savedObject.attributes.description, - tags: savedObject.attributes.tags, + tags: savedObject.references.filter((ref) => ref.type === 'tag').map(({ id }) => id), ignoreGlobalFilters: savedObject.attributes.ignoreGlobalFilters, indexPatternId: adHocDataViewSpec ? adHocDataViewSpec.id! @@ -71,6 +70,71 @@ export function getEventAnnotationService( }; }; + const mapSavedObjectToGroupContent = ( + savedObject: SimpleSavedObject + ): EventAnnotationGroupContent => { + const groupConfig = mapSavedObjectToGroupConfig(savedObject); + + return { + id: savedObject.id, + references: savedObject.references, + type: savedObject.type, + updatedAt: savedObject.updatedAt ? savedObject.updatedAt : '', + attributes: { + title: groupConfig.title, + description: groupConfig.description, + indexPatternId: groupConfig.indexPatternId, + dataViewSpec: groupConfig.dataViewSpec, + }, + }; + }; + + const loadAnnotationGroup = async ( + savedObjectId: string + ): Promise => { + const savedObject = await client.get( + EVENT_ANNOTATION_GROUP_TYPE, + savedObjectId + ); + + if (savedObject.error) { + throw savedObject.error; + } + + return mapSavedObjectToGroupConfig(savedObject); + }; + + const findAnnotationGroupContent = async ( + searchTerm: string, + pageSize: number, + references?: SavedObjectsFindOptionsReference[], + referencesToExclude?: SavedObjectsFindOptionsReference[] + ): Promise<{ total: number; hits: EventAnnotationGroupContent[] }> => { + const searchOptions: SavedObjectsFindOptions = { + type: [EVENT_ANNOTATION_GROUP_TYPE], + searchFields: ['title^3', 'description'], + search: searchTerm ? `${searchTerm}*` : undefined, + perPage: pageSize, + page: 1, + defaultSearchOperator: 'AND' as const, + hasReference: references, + hasNoReference: referencesToExclude, + }; + + const { total, savedObjects } = await client.find( + searchOptions + ); + + return { + total, + hits: savedObjects.map(mapSavedObjectToGroupContent), + }; + }; + + const deleteAnnotationGroups = async (ids: string[]): Promise => { + await client.bulkDelete([...ids.map((id) => ({ type: EVENT_ANNOTATION_GROUP_TYPE, id }))]); + }; + const extractDataViewInformation = (group: EventAnnotationGroupConfig) => { let { dataViewSpec = null } = group; @@ -99,20 +163,35 @@ export function getEventAnnotationService( return { references, dataViewSpec }; }; - const createAnnotationGroup = async ( + const getAnnotationGroupAttributesAndReferences = ( group: EventAnnotationGroupConfig - ): Promise<{ id: string }> => { + ): { attributes: EventAnnotationGroupAttributes; references: SavedObjectReference[] } => { const { references, dataViewSpec } = extractDataViewInformation(group); const { title, description, tags, ignoreGlobalFilters, annotations } = group; + references.push( + ...tags.map((tag) => ({ + id: tag, + name: tag, + type: 'tag', + })) + ); + + return { + attributes: { title, description, ignoreGlobalFilters, annotations, dataViewSpec }, + references, + }; + }; + + const createAnnotationGroup = async ( + group: EventAnnotationGroupConfig + ): Promise<{ id: string }> => { + const { attributes, references } = getAnnotationGroupAttributesAndReferences(group); + const groupSavedObjectId = ( - await client.create( - EVENT_ANNOTATION_GROUP_TYPE, - { title, description, tags, ignoreGlobalFilters, annotations, dataViewSpec }, - { - references, - } - ) + await client.create(EVENT_ANNOTATION_GROUP_TYPE, attributes, { + references, + }) ).id; return { id: groupSavedObjectId }; @@ -122,17 +201,11 @@ export function getEventAnnotationService( group: EventAnnotationGroupConfig, annotationGroupId: string ): Promise => { - const { references, dataViewSpec } = extractDataViewInformation(group); - const { title, description, tags, ignoreGlobalFilters, annotations } = group; + const { attributes, references } = getAnnotationGroupAttributesAndReferences(group); - await client.update( - EVENT_ANNOTATION_GROUP_TYPE, - annotationGroupId, - { title, description, tags, ignoreGlobalFilters, annotations, dataViewSpec }, - { - references, - } - ); + await client.update(EVENT_ANNOTATION_GROUP_TYPE, annotationGroupId, attributes, { + references, + }); }; const checkHasAnnotationGroups = async (): Promise => { @@ -148,6 +221,8 @@ export function getEventAnnotationService( loadAnnotationGroup, updateAnnotationGroup, createAnnotationGroup, + deleteAnnotationGroups, + findAnnotationGroupContent, renderEventAnnotationGroupSavedObjectFinder: (props) => { return ( Promise; + findAnnotationGroupContent: ( + searchTerm: string, + pageSize: number, + references?: SavedObjectsFindOptionsReference[], + referencesToExclude?: SavedObjectsFindOptionsReference[] + ) => Promise<{ total: number; hits: EventAnnotationGroupContent[] }>; + deleteAnnotationGroups: (ids: string[]) => Promise; createAnnotationGroup: (group: EventAnnotationGroupConfig) => Promise<{ id: string }>; updateAnnotationGroup: ( group: EventAnnotationGroupConfig, diff --git a/src/plugins/event_annotation/public/get_table_list.tsx b/src/plugins/event_annotation/public/get_table_list.tsx new file mode 100644 index 0000000000000..5226d31894d15 --- /dev/null +++ b/src/plugins/event_annotation/public/get_table_list.tsx @@ -0,0 +1,61 @@ +/* + * 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, { FC } from 'react'; +import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { FormattedRelative } from '@kbn/i18n-react'; +import { TableListViewKibanaProvider } from '@kbn/content-management-table-list-view-table'; +import { type TableListTabParentProps } from '@kbn/content-management-tabbed-table-list-view'; +import type { CoreStart } from '@kbn/core-lifecycle-browser'; +import type { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; +import type { DataView, DataViewSpec } from '@kbn/data-views-plugin/common'; +import type { QueryInputServices } from '@kbn/visualization-ui-components/public'; +import { RootDragDropProvider } from '@kbn/dom-drag-drop'; +import type { EventAnnotationServiceType } from './event_annotation_service/types'; +import { EventAnnotationGroupTableList } from './components/table_list'; + +export interface EventAnnotationListingPageServices { + core: CoreStart; + savedObjectsTagging: SavedObjectsTaggingApi; + eventAnnotationService: EventAnnotationServiceType; + PresentationUtilContextProvider: FC; + dataViews: DataView[]; + createDataView: (spec: DataViewSpec) => Promise; + queryInputServices: QueryInputServices; +} + +export const getTableList = ( + parentProps: TableListTabParentProps, + services: EventAnnotationListingPageServices +) => { + return ( + + + services.core.application.navigateToApp('lens')} + /> + + + ); +}; diff --git a/src/plugins/event_annotation/public/index.ts b/src/plugins/event_annotation/public/index.ts index 58f6e2c7c9f22..1b96e39546bcb 100644 --- a/src/plugins/event_annotation/public/index.ts +++ b/src/plugins/event_annotation/public/index.ts @@ -21,3 +21,8 @@ export { isManualPointAnnotationConfig, isQueryAnnotationConfig, } from './event_annotation_service/helpers'; +export { + AnnotationEditorControls, + annotationsIconSet, +} from './components/annotation_editor_controls'; +export { getAnnotationAccessor } from './components/get_annotation_accessor'; diff --git a/src/plugins/event_annotation/public/plugin.ts b/src/plugins/event_annotation/public/plugin.ts index 4d390f308a474..576f8a3b2a8f0 100644 --- a/src/plugins/event_annotation/public/plugin.ts +++ b/src/plugins/event_annotation/public/plugin.ts @@ -6,10 +6,17 @@ * Side Public License, v 1. */ -import { Plugin, CoreSetup, CoreStart } from '@kbn/core/public'; -import { ExpressionsSetup } from '@kbn/expressions-plugin/public'; -import { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; -import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { Plugin, CoreSetup, CoreStart } from '@kbn/core/public'; +import type { PresentationUtilPluginStart } from '@kbn/presentation-util-plugin/public'; +import type { SavedObjectTaggingPluginStart } from '@kbn/saved-objects-tagging-plugin/public'; +import type { ExpressionsSetup } from '@kbn/expressions-plugin/public'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; +import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public/types'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { VisualizationsSetup } from '@kbn/visualizations-plugin/public'; +import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import { i18n } from '@kbn/i18n'; import { EventAnnotationService } from './event_annotation_service'; import { manualPointEventAnnotation, @@ -18,14 +25,21 @@ import { eventAnnotationGroup, } from '../common'; import { getFetchEventAnnotations } from './fetch_event_annotations'; +import type { EventAnnotationListingPageServices } from './get_table_list'; +import { ANNOTATIONS_LISTING_VIEW_ID } from '../common/constants'; export interface EventAnnotationStartDependencies { savedObjectsManagement: SavedObjectsManagementPluginStart; data: DataPublicPluginStart; + savedObjectsTagging: SavedObjectTaggingPluginStart; + presentationUtil: PresentationUtilPluginStart; + dataViews: DataViewsPublicPluginStart; + unifiedSearch: UnifiedSearchPublicPluginStart; } interface SetupDependencies { expressions: ExpressionsSetup; + visualizations: VisualizationsSetup; } /** @public */ @@ -47,6 +61,46 @@ export class EventAnnotationPlugin dependencies.expressions.registerFunction( getFetchEventAnnotations({ getStartServices: core.getStartServices }) ); + + dependencies.visualizations.listingViewRegistry.add({ + title: i18n.translate('eventAnnotation.listingViewTitle', { + defaultMessage: 'Annotation groups', + }), + id: ANNOTATIONS_LISTING_VIEW_ID, + getTableList: async (props) => { + const [coreStart, pluginsStart] = await core.getStartServices(); + + const eventAnnotationService = await new EventAnnotationService( + coreStart, + pluginsStart.savedObjectsManagement + ).getService(); + + const ids = await pluginsStart.dataViews.getIds(); + const dataViews = await Promise.all(ids.map((id) => pluginsStart.dataViews.get(id))); + + const services: EventAnnotationListingPageServices = { + core: coreStart, + savedObjectsTagging: pluginsStart.savedObjectsTagging, + eventAnnotationService, + PresentationUtilContextProvider: pluginsStart.presentationUtil.ContextProvider, + dataViews, + createDataView: pluginsStart.dataViews.create.bind(pluginsStart.dataViews), + queryInputServices: { + http: coreStart.http, + docLinks: coreStart.docLinks, + notifications: coreStart.notifications, + uiSettings: coreStart.uiSettings, + dataViews: pluginsStart.dataViews, + unifiedSearch: pluginsStart.unifiedSearch, + data: pluginsStart.data, + storage: new Storage(localStorage), + }, + }; + + const { getTableList } = await import('./get_table_list'); + return getTableList(props, services); + }, + }); } public start( diff --git a/src/plugins/event_annotation/server/plugin.ts b/src/plugins/event_annotation/server/plugin.ts index 0ae55744016e6..d5e2fee433230 100644 --- a/src/plugins/event_annotation/server/plugin.ts +++ b/src/plugins/event_annotation/server/plugin.ts @@ -16,7 +16,6 @@ import { queryPointEventAnnotation, } from '../common'; import { setupSavedObjects } from './saved_objects'; -// import { getFetchEventAnnotations } from './fetch_event_annotations'; interface SetupDependencies { expressions: ExpressionsServerSetup; diff --git a/src/plugins/event_annotation/server/saved_objects.ts b/src/plugins/event_annotation/server/saved_objects.ts index 768def6b27f79..ef357aae0c546 100644 --- a/src/plugins/event_annotation/server/saved_objects.ts +++ b/src/plugins/event_annotation/server/saved_objects.ts @@ -14,7 +14,8 @@ import { } from '@kbn/core/server'; import { DataViewPersistableStateService } from '@kbn/data-views-plugin/common'; -import { EVENT_ANNOTATION_GROUP_TYPE } from '../common/constants'; +import { VISUALIZE_APP_NAME } from '@kbn/visualizations-plugin/common/constants'; +import { ANNOTATIONS_LISTING_VIEW_ID, EVENT_ANNOTATION_GROUP_TYPE } from '../common/constants'; import { EventAnnotationGroupAttributes } from '../common/types'; export function setupSavedObjects(coreSetup: CoreSetup) { @@ -28,6 +29,11 @@ export function setupSavedObjects(coreSetup: CoreSetup) { defaultSearchField: 'title', importableAndExportable: true, getTitle: (obj: { attributes: EventAnnotationGroupAttributes }) => obj.attributes.title, + getInAppUrl: (obj: { id: string }) => ({ + // TODO link to specific object + path: `/app/${VISUALIZE_APP_NAME}#/${ANNOTATIONS_LISTING_VIEW_ID}`, + uiCapabilitiesPath: 'visualize.show', + }), }, migrations: () => { const dataViewMigrations = DataViewPersistableStateService.getAllMigrations(); diff --git a/src/plugins/event_annotation/tsconfig.json b/src/plugins/event_annotation/tsconfig.json index 562bf05259c44..d8d9d61af2ac3 100644 --- a/src/plugins/event_annotation/tsconfig.json +++ b/src/plugins/event_annotation/tsconfig.json @@ -21,8 +21,29 @@ "@kbn/ui-theme", "@kbn/saved-objects-finder-plugin", "@kbn/saved-objects-management-plugin", + "@kbn/saved-objects-tagging-plugin", + "@kbn/presentation-util-plugin", + "@kbn/content-management-table-list-view", + "@kbn/visualizations-plugin", + "@kbn/data-views-plugin", + "@kbn/visualization-ui-components", + "@kbn/chart-icons", + "@kbn/unified-field-list-plugin", + "@kbn/dom-drag-drop", "@kbn/i18n-react", - "@kbn/core-saved-objects-server" + "@kbn/core-saved-objects-server", + "@kbn/test-jest-helpers", + "@kbn/saved-objects-tagging-oss-plugin", + "@kbn/core-saved-objects-api-browser", + "@kbn/kibana-react-plugin", + "@kbn/core-lifecycle-browser", + "@kbn/kibana-utils-plugin", + "@kbn/unified-search-plugin", + "@kbn/content-management-table-list-view", + "@kbn/content-management-table-list-view-table", + "@kbn/content-management-tabbed-table-list-view", + "@kbn/core-notifications-browser", + "@kbn/core-notifications-browser-mocks", ], "exclude": [ "target/**/*", diff --git a/src/plugins/files_management/public/app.tsx b/src/plugins/files_management/public/app.tsx index 3ee4e5f52720c..08f942c644789 100644 --- a/src/plugins/files_management/public/app.tsx +++ b/src/plugins/files_management/public/app.tsx @@ -9,7 +9,7 @@ import type { FunctionComponent } from 'react'; import React, { useState } from 'react'; import { EuiButtonEmpty } from '@elastic/eui'; -import { TableListView, UserContentCommonSchema } from '@kbn/content-management-table-list'; +import { TableListView, UserContentCommonSchema } from '@kbn/content-management-table-list-view'; import numeral from '@elastic/numeral'; import type { FileJSON } from '@kbn/files-plugin/common'; @@ -42,8 +42,8 @@ export const App: FunctionComponent = () => { return (
- tableListTitle={i18nTexts.tableListTitle} - tableListDescription={i18nTexts.tableListDescription} + title={i18nTexts.tableListTitle} + description={i18nTexts.tableListDescription} titleColumnName={i18nTexts.titleColumnName} emptyPrompt={} entityName={i18nTexts.entityName} diff --git a/src/plugins/files_management/public/mount_management_section.tsx b/src/plugins/files_management/public/mount_management_section.tsx index 9c7091516d46e..229e1d2b306f6 100755 --- a/src/plugins/files_management/public/mount_management_section.tsx +++ b/src/plugins/files_management/public/mount_management_section.tsx @@ -17,7 +17,7 @@ import type { ManagementAppMountParams } from '@kbn/management-plugin/public'; import { TableListViewKibanaProvider, TableListViewKibanaDependencies, -} from '@kbn/content-management-table-list'; +} from '@kbn/content-management-table-list-view-table'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import type { StartDependencies } from './types'; import { App } from './app'; diff --git a/src/plugins/files_management/tsconfig.json b/src/plugins/files_management/tsconfig.json index d15175fae0470..28986030e75f8 100644 --- a/src/plugins/files_management/tsconfig.json +++ b/src/plugins/files_management/tsconfig.json @@ -9,7 +9,8 @@ "@kbn/files-plugin", "@kbn/management-plugin", "@kbn/i18n", - "@kbn/content-management-table-list", + "@kbn/content-management-table-list-view-table", + "@kbn/content-management-table-list-view", "@kbn/kibana-react-plugin", "@kbn/i18n-react", "@kbn/shared-ux-file-image", diff --git a/src/plugins/visualization_ui_components/common/index.ts b/src/plugins/visualization_ui_components/common/index.ts new file mode 100644 index 0000000000000..3f66f3b659d8a --- /dev/null +++ b/src/plugins/visualization_ui_components/common/index.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ + +export {}; diff --git a/src/plugins/visualization_ui_components/common/types.ts b/src/plugins/visualization_ui_components/common/types.ts new file mode 100644 index 0000000000000..7da9f13aced8d --- /dev/null +++ b/src/plugins/visualization_ui_components/common/types.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ + +export type LineStyle = 'solid' | 'dashed' | 'dotted'; diff --git a/src/plugins/visualization_ui_components/kibana.jsonc b/src/plugins/visualization_ui_components/kibana.jsonc index f7d42af513338..6a2ed84a93149 100644 --- a/src/plugins/visualization_ui_components/kibana.jsonc +++ b/src/plugins/visualization_ui_components/kibana.jsonc @@ -8,7 +8,11 @@ "browser": true, "requiredBundles": [ "unifiedSearch", - "unifiedFieldList" + "unifiedFieldList", + "dataViews" + ], + "extraPublicDirs": [ + "common" ] } } diff --git a/src/plugins/visualization_ui_components/public/components/dimension_buttons/dimension_button.tsx b/src/plugins/visualization_ui_components/public/components/dimension_buttons/dimension_button.tsx index 4a91d74ebe5f6..7c9cbb881c2f3 100644 --- a/src/plugins/visualization_ui_components/public/components/dimension_buttons/dimension_button.tsx +++ b/src/plugins/visualization_ui_components/public/components/dimension_buttons/dimension_button.tsx @@ -7,7 +7,14 @@ */ import React from 'react'; -import { EuiButtonIcon, EuiLink, EuiToolTip, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { + EuiButtonIcon, + EuiLink, + EuiToolTip, + EuiFlexGroup, + EuiFlexItem, + useEuiFontSize, +} from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; @@ -41,12 +48,38 @@ export function DimensionButton({ message?: Message; }) { return ( -
+
onClick(accessorConfig.columnId)} aria-label={triggerLinkA11yText(label)} @@ -82,7 +115,11 @@ export function DimensionButton({ })} onClick={() => onRemoveClick(accessorConfig.columnId)} css={css` + margin-right: ${euiThemeVars.euiSizeS}; + visibility: hidden; + opacity: 0; color: ${euiThemeVars.euiTextSubduedColor}; + &:hover { color: ${euiThemeVars.euiColorDangerText}; } diff --git a/src/plugins/visualization_ui_components/public/components/dimension_buttons/dimension_button_icon.tsx b/src/plugins/visualization_ui_components/public/components/dimension_buttons/dimension_button_icon.tsx index bcb3ddb1e44bb..6294c27254a56 100644 --- a/src/plugins/visualization_ui_components/public/components/dimension_buttons/dimension_button_icon.tsx +++ b/src/plugins/visualization_ui_components/public/components/dimension_buttons/dimension_button_icon.tsx @@ -9,10 +9,14 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; import type { AccessorConfig, Message } from './types'; const baseIconProps = { - className: 'lnsLayerPanel__colorIndicator', + css: css` + margin-left: ${euiThemeVars.euiSizeS}; + `, } as const; const getIconFromAccessorConfig = (accessorConfig: AccessorConfig) => ( diff --git a/src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.tsx b/src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.tsx new file mode 100644 index 0000000000000..e66d512e80f73 --- /dev/null +++ b/src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.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 { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { EuiButtonEmpty } from '@elastic/eui'; +import { DimensionTrigger } from './trigger'; + +export const EmptyDimensionButton = ({ + label, + ariaLabel, + onClick, + dataTestSubj, + iconType, + ...otherProps // from Drag&Drop integration +}: { + label: React.ReactNode; + ariaLabel: string; + onClick: () => void; + dataTestSubj?: string; + iconType?: string; +}) => { + return ( + { + onClick(); + }} + > + + + ); +}; diff --git a/src/plugins/visualization_ui_components/public/components/dimension_buttons/index.ts b/src/plugins/visualization_ui_components/public/components/dimension_buttons/index.ts index 54df2c7911488..b3037035fb57b 100644 --- a/src/plugins/visualization_ui_components/public/components/dimension_buttons/index.ts +++ b/src/plugins/visualization_ui_components/public/components/dimension_buttons/index.ts @@ -8,4 +8,8 @@ export * from './dimension_button'; +export * from './empty_button'; + +export * from './trigger'; + export type { AccessorConfig } from './types'; diff --git a/src/plugins/visualization_ui_components/public/components/dimension_buttons/palette_indicator.tsx b/src/plugins/visualization_ui_components/public/components/dimension_buttons/palette_indicator.tsx index 5838a7e5c5236..ae627c4a11b15 100644 --- a/src/plugins/visualization_ui_components/public/components/dimension_buttons/palette_indicator.tsx +++ b/src/plugins/visualization_ui_components/public/components/dimension_buttons/palette_indicator.tsx @@ -8,14 +8,32 @@ import React from 'react'; import { EuiColorPaletteDisplay } from '@elastic/eui'; +import { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; import type { AccessorConfig } from './types'; export function PaletteIndicator({ accessorConfig }: { accessorConfig: AccessorConfig }) { if (accessorConfig.triggerIconType !== 'colorBy' || !accessorConfig.palette) return null; return ( -
+
diff --git a/src/plugins/visualization_ui_components/public/components/dimension_buttons/trigger.tsx b/src/plugins/visualization_ui_components/public/components/dimension_buttons/trigger.tsx new file mode 100644 index 0000000000000..c050582332b05 --- /dev/null +++ b/src/plugins/visualization_ui_components/public/components/dimension_buttons/trigger.tsx @@ -0,0 +1,70 @@ +/* + * 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 { EuiText, EuiFlexItem } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; +import { EuiTextProps } from '@elastic/eui/src/components/text/text'; +import { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; + +export const defaultDimensionTriggerTooltip = ( +

+ {i18n.translate('visualizationUiComponents.configure.invalidConfigTooltip', { + defaultMessage: 'Invalid configuration.', + })} +
+ {i18n.translate('visualizationUiComponents.configure.invalidConfigTooltipClick', { + defaultMessage: 'Click for more details.', + })} +

+); + +export const DimensionTrigger = ({ + id, + label, + color, + dataTestSubj, +}: { + label: React.ReactNode; + id?: string; + color?: EuiTextProps['color']; + dataTestSubj?: string; +}) => { + return ( + + + + + {label} + + + + + ); +}; diff --git a/src/plugins/visualization_ui_components/public/components/index.ts b/src/plugins/visualization_ui_components/public/components/index.ts index 4de1805bc472a..e20879f9e9990 100644 --- a/src/plugins/visualization_ui_components/public/components/index.ts +++ b/src/plugins/visualization_ui_components/public/components/index.ts @@ -28,8 +28,14 @@ export * from './dimension_editor_section'; export * from './dimension_buttons'; +export * from './line_style_settings'; + +export * from './text_decoration_setting'; + export type { AccessorConfig } from './dimension_buttons'; export type { FieldOptionValue, FieldOption, DataType } from './field_picker'; export type { IconSet } from './icon_select'; + +export type { QueryInputServices } from './query_input'; diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/shared/line_style_settings.tsx b/src/plugins/visualization_ui_components/public/components/line_style_settings.tsx similarity index 83% rename from x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/shared/line_style_settings.tsx rename to src/plugins/visualization_ui_components/public/components/line_style_settings.tsx index a479daeb75919..0b7f09b6a7444 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/shared/line_style_settings.tsx +++ b/src/plugins/visualization_ui_components/public/components/line_style_settings.tsx @@ -1,8 +1,9 @@ /* * 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. + * 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, { useState } from 'react'; @@ -14,30 +15,28 @@ import { EuiFlexItem, EuiFormRow, } from '@elastic/eui'; -import { LineStyle } from '@kbn/expression-xy-plugin/common'; - -import { idPrefix } from '../dimension_editor'; +import { LineStyle } from '../../common/types'; interface LineStyleConfig { - lineStyle?: Exclude; + lineStyle?: LineStyle; lineWidth?: number; } export const LineStyleSettings = ({ currentConfig, setConfig, - isHorizontal, + idPrefix, }: { currentConfig?: LineStyleConfig; setConfig: (config: LineStyleConfig) => void; - isHorizontal: boolean; + idPrefix: string; }) => { return ( <> @@ -52,7 +51,7 @@ export const LineStyleSettings = ({ @@ -109,7 +110,7 @@ export function FilterQueryInput({ {/* Empty for spacing */} { setFilterPopoverOpen(!filterPopoverOpen); diff --git a/src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx b/src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx new file mode 100644 index 0000000000000..7f52fc1935e01 --- /dev/null +++ b/src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx @@ -0,0 +1,122 @@ +/* + * 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 { EuiButtonGroup, EuiFormRow } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React, { useState } from 'react'; + +interface TextDecorationConfig { + textVisibility?: boolean; + textField?: string; +} + +function getSelectedOption( + { textField, textVisibility }: TextDecorationConfig = {}, + isQueryBased?: boolean +) { + if (!textVisibility) { + return 'none'; + } + if (isQueryBased && textField) { + return 'field'; + } + return 'name'; +} + +export function TextDecorationSetting({ + idPrefix, + currentConfig, + setConfig, + isQueryBased, + children, +}: { + idPrefix: string; + currentConfig?: TextDecorationConfig; + setConfig: (config: TextDecorationConfig) => void; + isQueryBased?: boolean; + /** A children render function for custom sub fields on textDecoration change */ + children?: (textDecoration: 'none' | 'name' | 'field') => JSX.Element | null; +}) { + // To model the temporary state for label based on field when user didn't pick up the field yet, + // use a local state + const [selectedVisibleOption, setVisibleOption] = useState<'none' | 'name' | 'field'>( + getSelectedOption(currentConfig, isQueryBased) + ); + const options = [ + { + id: `${idPrefix}none`, + label: i18n.translate('visualizationUiComponents.xyChart.lineMarker.textVisibility.none', { + defaultMessage: 'None', + }), + 'data-test-subj': 'lnsXY_textVisibility_none', + }, + { + id: `${idPrefix}name`, + label: i18n.translate('visualizationUiComponents.xyChart.lineMarker.textVisibility.name', { + defaultMessage: 'Name', + }), + 'data-test-subj': 'lnsXY_textVisibility_name', + }, + ]; + if (isQueryBased) { + options.push({ + id: `${idPrefix}field`, + label: i18n.translate('visualizationUiComponents.xyChart.lineMarker.textVisibility.field', { + defaultMessage: 'Field', + }), + 'data-test-subj': 'lnsXY_textVisibility_field', + }); + } + + return ( + +
+ { + const chosenOption = id.replace(idPrefix, '') as 'none' | 'name' | 'field'; + if (chosenOption === 'none') { + setConfig({ + textVisibility: false, + textField: undefined, + }); + } else if (chosenOption === 'name') { + setConfig({ + textVisibility: true, + textField: undefined, + }); + } else if (chosenOption === 'field') { + setConfig({ + textVisibility: Boolean(currentConfig?.textField), + }); + } + + setVisibleOption(chosenOption); + }} + isFullWidth + /> + {children?.(selectedVisibleOption)} +
+
+ ); +} diff --git a/src/plugins/visualization_ui_components/public/index.ts b/src/plugins/visualization_ui_components/public/index.ts index d0495697dad01..b8be5d3afbd78 100644 --- a/src/plugins/visualization_ui_components/public/index.ts +++ b/src/plugins/visualization_ui_components/public/index.ts @@ -28,16 +28,25 @@ export { isQueryValid, DimensionEditorSection, DimensionButton, + DimensionTrigger, + EmptyDimensionButton, + LineStyleSettings, + TextDecorationSetting, } from './components'; +export { isFieldLensCompatible } from './util'; + export type { DataType, FieldOptionValue, FieldOption, IconSet, AccessorConfig, + QueryInputServices, } from './components'; +export type { FormatFactory } from './types'; + export function plugin() { return new VisualizationUiComponentsPlugin(); } diff --git a/src/plugins/visualization_ui_components/public/types.ts b/src/plugins/visualization_ui_components/public/types.ts new file mode 100644 index 0000000000000..8d259c3b90f90 --- /dev/null +++ b/src/plugins/visualization_ui_components/public/types.ts @@ -0,0 +1,11 @@ +/* + * 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 { IFieldFormat, SerializedFieldFormat } from '@kbn/field-formats-plugin/common'; + +export type FormatFactory = (mapping?: SerializedFieldFormat) => IFieldFormat; diff --git a/src/plugins/visualization_ui_components/public/util.ts b/src/plugins/visualization_ui_components/public/util.ts new file mode 100644 index 0000000000000..2eb71ee858759 --- /dev/null +++ b/src/plugins/visualization_ui_components/public/util.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { DataViewField, isNestedField } from '@kbn/data-views-plugin/common'; + +export const isFieldLensCompatible = (field: DataViewField) => + !isNestedField(field) && (!!field.aggregatable || !!field.scripted); diff --git a/src/plugins/visualization_ui_components/tsconfig.json b/src/plugins/visualization_ui_components/tsconfig.json index 7175696eef5f5..cbafd595ecc62 100644 --- a/src/plugins/visualization_ui_components/tsconfig.json +++ b/src/plugins/visualization_ui_components/tsconfig.json @@ -24,7 +24,8 @@ "@kbn/core-doc-links-browser", "@kbn/core", "@kbn/ui-theme", - "@kbn/coloring" + "@kbn/coloring", + "@kbn/field-formats-plugin" ], "exclude": [ "target/**/*", diff --git a/src/plugins/visualizations/common/constants.ts b/src/plugins/visualizations/common/constants.ts index f3e2fd30c4288..7b6e18708f3f9 100644 --- a/src/plugins/visualizations/common/constants.ts +++ b/src/plugins/visualizations/common/constants.ts @@ -20,6 +20,7 @@ export const VISUALIZE_APP_NAME = 'visualize'; export const VisualizeConstants = { VISUALIZE_BASE_PATH: '/app/visualize', LANDING_PAGE_PATH: '/', + LANDING_PAGE_PATH_WITH_TAB: '/:activeTab', WIZARD_STEP_1_PAGE_PATH: '/new', WIZARD_STEP_2_PAGE_PATH: '/new/configure', CREATE_PATH: '/create', diff --git a/src/plugins/visualizations/public/mocks.ts b/src/plugins/visualizations/public/mocks.ts index 4c9ea92d83739..9bc31adccd3ba 100644 --- a/src/plugins/visualizations/public/mocks.ts +++ b/src/plugins/visualizations/public/mocks.ts @@ -35,6 +35,7 @@ const createSetupContract = (): VisualizationsSetup => ({ createBaseVisualization: jest.fn(), registerAlias: jest.fn(), visEditorsRegistry: { registerDefault: jest.fn(), register: jest.fn(), get: jest.fn() }, + listingViewRegistry: { add: jest.fn() }, }); const createStartContract = (): VisualizationsStart => ({ diff --git a/src/plugins/visualizations/public/plugin.ts b/src/plugins/visualizations/public/plugin.ts index 4e6d3d429eb1d..2b906620e5f8b 100644 --- a/src/plugins/visualizations/public/plugin.ts +++ b/src/plugins/visualizations/public/plugin.ts @@ -110,6 +110,7 @@ import { } from './services'; import { VisualizeConstants } from '../common/constants'; import { EditInLensAction } from './actions/edit_in_lens_action'; +import { ListingViewRegistry } from './types'; import { LATEST_VERSION, CONTENT_ID } from '../common/content_management'; /** @@ -118,8 +119,10 @@ import { LATEST_VERSION, CONTENT_ID } from '../common/content_management'; * @public */ -export type VisualizationsSetup = TypesSetup & { visEditorsRegistry: VisEditorsRegistry }; - +export type VisualizationsSetup = TypesSetup & { + visEditorsRegistry: VisEditorsRegistry; + listingViewRegistry: ListingViewRegistry; +}; export interface VisualizationsStart extends TypesStart { showNewVisModal: typeof showNewVisModal; } @@ -246,6 +249,7 @@ export class VisualizationsPlugin }; const start = createStartServicesGetter(core.getStartServices); + const listingViewRegistry: ListingViewRegistry = new Set(); const visEditorsRegistry = createVisEditorsRegistry(); core.application.register({ @@ -321,6 +325,7 @@ export class VisualizationsPlugin getKibanaVersion: () => this.initializerContext.env.packageInfo.version, spaces: pluginsStart.spaces, visEditorsRegistry, + listingViewRegistry, unifiedSearch: pluginsStart.unifiedSearch, }; @@ -388,6 +393,7 @@ export class VisualizationsPlugin return { ...this.types.setup(), visEditorsRegistry, + listingViewRegistry, }; } diff --git a/src/plugins/visualizations/public/types.ts b/src/plugins/visualizations/public/types.ts index c69f7894fa326..c23f40dc85bae 100644 --- a/src/plugins/visualizations/public/types.ts +++ b/src/plugins/visualizations/public/types.ts @@ -16,6 +16,7 @@ import { import type { ISearchSource } from '@kbn/data-plugin/common'; import { ExpressionAstExpression } from '@kbn/expressions-plugin/public'; +import type { TableListTab } from '@kbn/content-management-tabbed-table-list-view'; import type { Vis } from './vis'; import type { PersistedState } from './persisted_state'; import type { VisParams, SerializedVis } from '../common'; @@ -94,3 +95,5 @@ export interface VisEditorOptionsProps { setValidity(isValid: boolean): void; setTouched(isTouched: boolean): void; } + +export type ListingViewRegistry = Pick, 'add'>; diff --git a/src/plugins/visualizations/public/visualize_app/app.tsx b/src/plugins/visualizations/public/visualize_app/app.tsx index 0a4e46288616f..625c0846221a5 100644 --- a/src/plugins/visualizations/public/visualize_app/app.tsx +++ b/src/plugins/visualizations/public/visualize_app/app.tsx @@ -139,7 +139,11 @@ export const VisualizeApp = ({ onAppLeave }: VisualizeAppProps) => { diff --git a/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx b/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx index 8dd9885ef5520..e169a7ebaa034 100644 --- a/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx +++ b/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx @@ -8,20 +8,34 @@ import './visualize_listing.scss'; -import React, { useCallback, useRef, useMemo, useEffect, MouseEvent } from 'react'; +import React, { + useCallback, + useRef, + useMemo, + useEffect, + MouseEvent, + MutableRefObject, +} from 'react'; import { EuiCallOut, EuiLink, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import useUnmount from 'react-use/lib/useUnmount'; import useMount from 'react-use/lib/useMount'; -import { useLocation } from 'react-router-dom'; +import { useLocation, useParams } from 'react-router-dom'; import type { SavedObjectReference } from '@kbn/core/public'; import { useKibana, useExecutionContext } from '@kbn/kibana-react-plugin/public'; -import { TableListView } from '@kbn/content-management-table-list'; +import { + TabbedTableListView, + type TableListTab, +} from '@kbn/content-management-tabbed-table-list-view'; import type { OpenContentEditorParams } from '@kbn/content-management-content-editor'; -import type { UserContentCommonSchema } from '@kbn/content-management-table-list'; +import { + type UserContentCommonSchema, + TableListViewProps, +} from '@kbn/content-management-table-list-view'; +import { TableListViewTable } from '@kbn/content-management-table-list-view-table'; import { findListItems } from '../../utils/saved_visualize_utils'; import { updateBasicSoAttributes } from '../../utils/saved_objects_utils/update_basic_attributes'; import { checkForDuplicateTitle } from '../../utils/saved_objects_utils/check_for_duplicate_title'; @@ -71,71 +85,38 @@ const toTableListViewSavedObject = (savedObject: Record): Visua }, }; }; +type CustomTableViewProps = Pick< + TableListViewProps, + | 'createItem' + | 'findItems' + | 'deleteItems' + | 'editItem' + | 'contentEditor' + | 'emptyPrompt' + | 'showEditActionForItem' +>; -export const VisualizeListing = () => { +const useTableListViewProps = ( + closeNewVisModal: MutableRefObject<() => void>, + listingLimit: number +): CustomTableViewProps => { const { services: { - core, application, - executionContext, - chrome, history, - toastNotifications, - stateTransferService, savedObjects, - uiSettings, - visualizeCapabilities, - dashboardCapabilities, - kbnUrlStateStorage, - overlays, savedObjectsTagging, + overlays, + toastNotifications, + visualizeCapabilities, }, } = useKibana(); - const { pathname } = useLocation(); - const closeNewVisModal = useRef(() => {}); - const visualizedUserContent = useRef(); - const listingLimit = uiSettings.get(SAVED_OBJECTS_LIMIT_SETTING); - const initialPageSize = uiSettings.get(SAVED_OBJECTS_PER_PAGE_SETTING); - - useExecutionContext(executionContext, { - type: 'application', - page: 'list', - }); - - useEffect(() => { - if (pathname === '/new') { - // In case the user navigated to the page via the /visualize/new URL we start the dialog immediately - closeNewVisModal.current = showNewVisModal({ - onClose: () => { - // In case the user came via a URL to this page, change the URL to the regular landing page URL after closing the modal - history.push(VisualizeConstants.LANDING_PAGE_PATH); - }, - }); - } else { - // close modal window if exists - closeNewVisModal.current(); - } - }, [history, pathname]); - useMount(() => { - // Reset editor state for all apps if the visualize listing page is loaded. - stateTransferService.clearEditorState(); - chrome.setBreadcrumbs([ - { - text: i18n.translate('visualizations.visualizeListingBreadcrumbsTitle', { - defaultMessage: 'Visualize Library', - }), - }, - ]); - chrome.docTitle.change( - i18n.translate('visualizations.listingPageTitle', { defaultMessage: 'Visualize Library' }) - ); - }); - useUnmount(() => closeNewVisModal.current()); + const visualizedUserContent = useRef(); const createNewVis = useCallback(() => { closeNewVisModal.current = showNewVisModal(); - }, []); + }, [closeNewVisModal]); const editItem = useCallback( ({ attributes: { editUrl, editApp } }: VisualizeUserContent) => { @@ -259,74 +240,172 @@ export const VisualizeListing = () => { [savedObjects.client, toastNotifications] ); - const calloutMessage = ( - { - event.preventDefault(); - application.navigateToUrl(application.getUrlForApp('dashboards')); - }} - > - -
- ), - }} - /> + const props: CustomTableViewProps = { + findItems: fetchItems, + deleteItems, + contentEditor: { + isReadonly: !visualizeCapabilities.save, + onSave: onContentEditorSave, + customValidators: contentEditorValidators, + }, + editItem, + emptyPrompt: noItemsFragment, + createItem: createNewVis, + showEditActionForItem: ({ attributes: { readOnly } }) => + visualizeCapabilities.save && !readOnly, + }; + + return props; +}; + +export const VisualizeListing = () => { + const { + services: { + application, + executionContext, + chrome, + history, + stateTransferService, + dashboardCapabilities, + uiSettings, + kbnUrlStateStorage, + listingViewRegistry, + }, + } = useKibana(); + const { pathname } = useLocation(); + const closeNewVisModal = useRef(() => {}); + + useExecutionContext(executionContext, { + type: 'application', + page: 'list', + }); + + useEffect(() => { + if (pathname === '/new') { + // In case the user navigated to the page via the /visualize/new URL we start the dialog immediately + closeNewVisModal.current = showNewVisModal({ + onClose: () => { + // In case the user came via a URL to this page, change the URL to the regular landing page URL after closing the modal + history.push(VisualizeConstants.LANDING_PAGE_PATH); + }, + }); + } else { + // close modal window if exists + closeNewVisModal.current(); + } + }, [history, pathname]); + + useMount(() => { + // Reset editor state for all apps if the visualize listing page is loaded. + stateTransferService.clearEditorState(); + chrome.setBreadcrumbs([ + { + text: i18n.translate('visualizations.visualizeListingBreadcrumbsTitle', { + defaultMessage: 'Visualize Library', + }), + }, + ]); + chrome.docTitle.change( + i18n.translate('visualizations.listingPageTitle', { defaultMessage: 'Visualize Library' }) + ); + }); + useUnmount(() => closeNewVisModal.current()); + + const listingLimit = uiSettings.get(SAVED_OBJECTS_LIMIT_SETTING); + const initialPageSize = uiSettings.get(SAVED_OBJECTS_PER_PAGE_SETTING); + + const tableViewProps = useTableListViewProps(closeNewVisModal, listingLimit); + + const visualizeLibraryTitle = i18n.translate('visualizations.listing.table.listTitle', { + defaultMessage: 'Visualize Library', + }); + + const visualizeTab: TableListTab = useMemo(() => { + const calloutMessage = ( + { + event.preventDefault(); + application.navigateToUrl(application.getUrlForApp('dashboards')); + }} + > + + + ), + }} + /> + ); + + return { + title: 'Visualizations', + id: 'visualizations', + getTableList: (propsFromParent) => ( + <> + {dashboardCapabilities.createNew && ( + <> + + + + )} + + id="vis" + // we allow users to create visualizations even if they can't save them + // for data exploration purposes + customTableColumn={getCustomColumn()} + listingLimit={listingLimit} + initialPageSize={initialPageSize} + initialFilter={''} + entityName={i18n.translate('visualizations.listing.table.entityName', { + defaultMessage: 'visualization', + })} + entityNamePlural={i18n.translate('visualizations.listing.table.entityNamePlural', { + defaultMessage: 'visualizations', + })} + getDetailViewLink={({ attributes: { editApp, editUrl, error } }) => + getVisualizeListItemLink(application, kbnUrlStateStorage, editApp, editUrl, error) + } + tableCaption={visualizeLibraryTitle} + {...tableViewProps} + {...propsFromParent} + /> + + ), + }; + }, [ + application, + dashboardCapabilities.createNew, + initialPageSize, + kbnUrlStateStorage, + listingLimit, + tableViewProps, + visualizeLibraryTitle, + ]); + + const tabs = useMemo( + () => [visualizeTab, ...Array.from(listingViewRegistry as Set)], + [listingViewRegistry, visualizeTab] ); + const { activeTab } = useParams<{ activeTab: string }>(); + return ( - - id="vis" + - visualizeCapabilities.save && !readOnly - } - customTableColumn={getCustomColumn()} - listingLimit={listingLimit} - initialPageSize={initialPageSize} - initialFilter={''} - contentEditor={{ - isReadonly: !visualizeCapabilities.save, - onSave: onContentEditorSave, - customValidators: contentEditorValidators, + title={visualizeLibraryTitle} + tabs={tabs} + activeTabId={activeTab} + changeActiveTab={(id) => { + application.navigateToUrl(`#/${id}`); }} - emptyPrompt={noItemsFragment} - entityName={i18n.translate('visualizations.listing.table.entityName', { - defaultMessage: 'visualization', - })} - entityNamePlural={i18n.translate('visualizations.listing.table.entityNamePlural', { - defaultMessage: 'visualizations', - })} - tableListTitle={i18n.translate('visualizations.listing.table.listTitle', { - defaultMessage: 'Visualize Library', - })} - getDetailViewLink={({ attributes: { editApp, editUrl, error, readOnly } }) => - readOnly - ? undefined - : getVisualizeListItemLink(core.application, kbnUrlStateStorage, editApp, editUrl, error) - } - > - {dashboardCapabilities.createNew && ( - <> - - - - )} - + /> ); }; diff --git a/src/plugins/visualizations/public/visualize_app/index.tsx b/src/plugins/visualizations/public/visualize_app/index.tsx index e432275c755e6..0dc41f8f35d07 100644 --- a/src/plugins/visualizations/public/visualize_app/index.tsx +++ b/src/plugins/visualizations/public/visualize_app/index.tsx @@ -17,7 +17,7 @@ import { toMountPoint, } from '@kbn/kibana-react-plugin/public'; import { FormattedRelative } from '@kbn/i18n-react'; -import { TableListViewKibanaProvider } from '@kbn/content-management-table-list'; +import { TableListViewKibanaProvider } from '@kbn/content-management-table-list-view-table'; import { VisualizeApp } from './app'; import { VisualizeServices } from './types'; import { addHelpMenuToAppChrome, addBadgeToAppChrome } from './utils'; diff --git a/src/plugins/visualizations/public/visualize_app/types.ts b/src/plugins/visualizations/public/visualize_app/types.ts index c340342dab8f0..8d86648e9d685 100644 --- a/src/plugins/visualizations/public/visualize_app/types.ts +++ b/src/plugins/visualizations/public/visualize_app/types.ts @@ -48,7 +48,7 @@ import type { VisParams, } from '..'; -import type { SavedVisState } from '../types'; +import type { ListingViewRegistry, SavedVisState } from '../types'; import type { createVisEmbeddableFromObject } from '../embeddable'; import type { VisEditorsRegistry } from '../vis_editors_registry'; @@ -113,6 +113,7 @@ export interface VisualizeServices extends CoreStart { spaces?: SpacesPluginStart; theme: ThemeServiceStart; visEditorsRegistry: VisEditorsRegistry; + listingViewRegistry: ListingViewRegistry; unifiedSearch: UnifiedSearchPublicPluginStart; } diff --git a/src/plugins/visualizations/tsconfig.json b/src/plugins/visualizations/tsconfig.json index dd5edc8961361..65e1053e4f7e1 100644 --- a/src/plugins/visualizations/tsconfig.json +++ b/src/plugins/visualizations/tsconfig.json @@ -42,7 +42,8 @@ "@kbn/i18n-react", "@kbn/safer-lodash-set", "@kbn/shared-ux-page-analytics-no-data", - "@kbn/content-management-table-list", + "@kbn/content-management-table-list-view", + "@kbn/content-management-tabbed-table-list-view", "@kbn/test-jest-helpers", "@kbn/analytics", "@kbn/content-management-content-editor", @@ -57,7 +58,10 @@ "@kbn/core-saved-objects-api-server", "@kbn/object-versioning", "@kbn/core-saved-objects-server", - "@kbn/core-saved-objects-utils-server" + "@kbn/core-saved-objects-utils-server", + "@kbn/content-management-table-list-view-table", + "@kbn/content-management-tabbed-table-list-view", + "@kbn/content-management-table-list-view" ], "exclude": [ "target/**/*", diff --git a/test/functional/page_objects/visualize_page.ts b/test/functional/page_objects/visualize_page.ts index bcfbc8caa9ce1..a08b950ce9853 100644 --- a/test/functional/page_objects/visualize_page.ts +++ b/test/functional/page_objects/visualize_page.ts @@ -69,6 +69,14 @@ export class VisualizePageObject extends FtrService { await this.common.navigateToApp('visualize'); } + public async selectVisualizationsTab() { + await this.listingTable.selectTab(1); + } + + public async selectAnnotationsTab() { + await this.listingTable.selectTab(2); + } + public async clickNewVisualization() { await this.listingTable.clickNewButton(); } diff --git a/test/functional/services/listing_table.ts b/test/functional/services/listing_table.ts index 96e9ba2e49d34..9bd2eb80132a8 100644 --- a/test/functional/services/listing_table.ts +++ b/test/functional/services/listing_table.ts @@ -204,6 +204,10 @@ export class ListingTableService extends FtrService { await this.testSubjects.click('deleteSelectedItems'); } + public async selectFirstItemInList() { + await this.find.clickByCssSelector('.euiTableCellContent .euiCheckbox__input'); + } + public async clickItemCheckbox(id: string) { await this.testSubjects.click(`checkboxSelectRow-${id}`); } @@ -213,9 +217,13 @@ export class ListingTableService extends FtrService { * @param name item name * @param id row id */ - public async deleteItem(name: string, id: string) { + public async deleteItem(name: string, id?: string) { await this.searchForItemWithName(name); - await this.clickItemCheckbox(id); + if (id) { + await this.clickItemCheckbox(id); + } else { + await this.selectFirstItemInList(); + } await this.clickDeleteSelected(); await this.common.clickConfirmOnModal(); } @@ -253,4 +261,8 @@ export class ListingTableService extends FtrService { timeout: 5000, }); } + + public async selectTab(which: number) { + await this.find.clickByCssSelector(`.euiTab:nth-child(${which})`); + } } diff --git a/tsconfig.base.json b/tsconfig.base.json index 5ab10d6e5de8e..6830598bf44a8 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -170,8 +170,12 @@ "@kbn/content-management-examples-plugin/*": ["examples/content_management_examples/*"], "@kbn/content-management-plugin": ["src/plugins/content_management"], "@kbn/content-management-plugin/*": ["src/plugins/content_management/*"], - "@kbn/content-management-table-list": ["packages/content-management/table_list"], - "@kbn/content-management-table-list/*": ["packages/content-management/table_list/*"], + "@kbn/content-management-tabbed-table-list-view": ["packages/content-management/tabbed_table_list_view"], + "@kbn/content-management-tabbed-table-list-view/*": ["packages/content-management/tabbed_table_list_view/*"], + "@kbn/content-management-table-list-view": ["packages/content-management/table_list_view"], + "@kbn/content-management-table-list-view/*": ["packages/content-management/table_list_view/*"], + "@kbn/content-management-table-list-view-table": ["packages/content-management/table_list_view_table"], + "@kbn/content-management-table-list-view-table/*": ["packages/content-management/table_list_view_table/*"], "@kbn/content-management-utils": ["packages/kbn-content-management-utils"], "@kbn/content-management-utils/*": ["packages/kbn-content-management-utils/*"], "@kbn/controls-example-plugin": ["examples/controls_example"], diff --git a/x-pack/plugins/graph/public/application.tsx b/x-pack/plugins/graph/public/application.tsx index 28b44b804373a..82e1a061c67c8 100644 --- a/x-pack/plugins/graph/public/application.tsx +++ b/x-pack/plugins/graph/public/application.tsx @@ -27,7 +27,7 @@ import { NavigationPublicPluginStart as NavigationStart } from '@kbn/navigation- import { Storage } from '@kbn/kibana-utils-plugin/public'; import { FormattedRelative } from '@kbn/i18n-react'; import { Start as InspectorPublicPluginStart } from '@kbn/inspector-plugin/public'; -import { TableListViewKibanaProvider } from '@kbn/content-management-table-list'; +import { TableListViewKibanaProvider } from '@kbn/content-management-table-list-view-table'; import './index.scss'; import('./font_awesome'); diff --git a/x-pack/plugins/graph/public/apps/listing_route.tsx b/x-pack/plugins/graph/public/apps/listing_route.tsx index a34a4bc5b591b..d5e7d2be00967 100644 --- a/x-pack/plugins/graph/public/apps/listing_route.tsx +++ b/x-pack/plugins/graph/public/apps/listing_route.tsx @@ -11,8 +11,8 @@ import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; import { EuiEmptyPrompt, EuiLink, EuiButton } from '@elastic/eui'; import { ApplicationStart } from '@kbn/core/public'; import { useHistory, useLocation } from 'react-router-dom'; -import { TableListView } from '@kbn/content-management-table-list'; -import type { UserContentCommonSchema } from '@kbn/content-management-table-list'; +import { TableListView } from '@kbn/content-management-table-list-view'; +import type { UserContentCommonSchema } from '@kbn/content-management-table-list-view'; import { deleteSavedWorkspace, findSavedWorkspace } from '../helpers/saved_workspace_utils'; import { getEditPath, getEditUrl, getNewPath, setBreadcrumbs } from '../services/url'; import { GraphWorkspaceSavedObject } from '../types'; @@ -111,7 +111,7 @@ export function ListingRoute({ entityNamePlural={i18n.translate('xpack.graph.listing.table.entityNamePlural', { defaultMessage: 'graphs', })} - tableListTitle={i18n.translate('xpack.graph.listing.graphsTitle', { + title={i18n.translate('xpack.graph.listing.graphsTitle', { defaultMessage: 'Graphs', })} getDetailViewLink={({ id }) => getEditUrl(addBasePath, { id })} diff --git a/x-pack/plugins/graph/tsconfig.json b/x-pack/plugins/graph/tsconfig.json index b91a6913f07ae..4ee1639a2d4f8 100644 --- a/x-pack/plugins/graph/tsconfig.json +++ b/x-pack/plugins/graph/tsconfig.json @@ -28,7 +28,6 @@ "@kbn/config-schema", "@kbn/i18n-react", "@kbn/inspector-plugin", - "@kbn/content-management-table-list", "@kbn/test-jest-helpers", "@kbn/data-views-plugin", "@kbn/es-query", @@ -44,6 +43,8 @@ "@kbn/content-management-plugin", "@kbn/core-saved-objects-api-server", "@kbn/object-versioning", + "@kbn/content-management-table-list-view-table", + "@kbn/content-management-table-list-view", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/lens/common/constants.ts b/x-pack/plugins/lens/common/constants.ts index 8838b974ac4dc..5909dbcb48f4b 100644 --- a/x-pack/plugins/lens/common/constants.ts +++ b/x-pack/plugins/lens/common/constants.ts @@ -8,10 +8,10 @@ import rison from '@kbn/rison'; import type { RefreshInterval, TimeRange } from '@kbn/data-plugin/common/query'; import type { Filter } from '@kbn/es-query'; -import { i18n } from '@kbn/i18n'; export const PLUGIN_ID = 'lens'; export const APP_ID = 'lens'; +export const LENS_APP_NAME = 'lens'; export const LENS_EMBEDDABLE_TYPE = 'lens'; export const DOC_TYPE = 'lens'; export const NOT_INTERNATIONALIZED_PRODUCT_NAME = 'Lens Visualizations'; @@ -89,7 +89,3 @@ export function getEditPath( export function getFullPath(id?: string) { return `/app/${PLUGIN_ID}${id ? getEditPath(id) : getBasePath()}`; } - -export const LENS_APP_NAME = i18n.translate('xpack.lens.queryInput.appName', { - defaultMessage: 'Lens', -}); diff --git a/x-pack/plugins/lens/common/types.ts b/x-pack/plugins/lens/common/types.ts index 3c6830ba50b0d..ee89551dfc36a 100644 --- a/x-pack/plugins/lens/common/types.ts +++ b/x-pack/plugins/lens/common/types.ts @@ -9,7 +9,6 @@ import type { Filter, FilterMeta } from '@kbn/es-query'; import type { Position } from '@elastic/charts'; import type { $Values } from '@kbn/utility-types'; import type { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; -import type { IFieldFormat, SerializedFieldFormat } from '@kbn/field-formats-plugin/common'; import type { ColorMode } from '@kbn/charts-plugin/common'; import type { LegendSize } from '@kbn/visualizations-plugin/common'; import { CategoryDisplay, LegendDisplay, NumberDisplay, PieChartTypes } from './constants'; @@ -21,8 +20,7 @@ export type { AllowedPartitionOverrides } from '@kbn/expression-partition-vis-pl export type { AllowedSettingsOverrides } from '@kbn/charts-plugin/common'; export type { AllowedGaugeOverrides } from '@kbn/expression-gauge-plugin/common'; export type { AllowedXYOverrides } from '@kbn/expression-xy-plugin/common'; - -export type FormatFactory = (mapping?: SerializedFieldFormat) => IFieldFormat; +export type { FormatFactory } from '@kbn/visualization-ui-components/public'; export interface DateRange { fromDate: string; diff --git a/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx b/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx index 41b0fa567d567..ca5efceaf48bd 100644 --- a/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx +++ b/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx @@ -17,7 +17,7 @@ import { useKibana } from '@kbn/kibana-react-plugin/public'; import { DataViewPickerProps } from '@kbn/unified-search-plugin/public'; import moment from 'moment'; import { LENS_APP_LOCATOR } from '../../common/locator/locator'; -import { ENABLE_SQL } from '../../common/constants'; +import { ENABLE_SQL, LENS_APP_NAME } from '../../common/constants'; import { LensAppServices, LensTopNavActions, LensTopNavMenuProps } from './types'; import { toggleSettingsMenuOpen } from './settings_menu'; import { @@ -1096,7 +1096,7 @@ export const LensTopNavMenu = ({ showFilterBar={true} data-test-subj="lnsApp_topNav" screenTitle={'lens'} - appName={'lens'} + appName={LENS_APP_NAME} displayStyle="detached" className="hide-for-sharing" /> diff --git a/x-pack/plugins/lens/public/data_views_service/loader.ts b/x-pack/plugins/lens/public/data_views_service/loader.ts index abd8a48815122..ef48761d39a6e 100644 --- a/x-pack/plugins/lens/public/data_views_service/loader.ts +++ b/x-pack/plugins/lens/public/data_views_service/loader.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { isNestedField } from '@kbn/data-views-plugin/common'; +import { isFieldLensCompatible } from '@kbn/visualization-ui-components/public'; import type { DataViewsContract, DataView, DataViewSpec } from '@kbn/data-views-plugin/public'; import { keyBy } from 'lodash'; import { IndexPattern, IndexPatternField, IndexPatternMap, IndexPatternRef } from '../types'; @@ -30,7 +30,7 @@ export function convertDataViewIntoLensIndexPattern( restrictionRemapper: (name: string) => string = onRestrictionMapping ): IndexPattern { const newFields = dataView.fields - .filter((field) => !isNestedField(field) && (!!field.aggregatable || !!field.scripted)) + .filter(isFieldLensCompatible) .map((field): IndexPatternField => { // Convert the getters on the index pattern service into plain JSON const base = { diff --git a/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_panel.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_panel.test.tsx index 234bc93e4798b..e13fc22464649 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_panel.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_panel.test.tsx @@ -669,7 +669,7 @@ describe('FormBasedDimensionEditor', () => { act(() => { wrapper - .find('input[data-test-subj="column-label-edit"]') + .find('input[data-test-subj="name-input"]') .simulate('change', { target: { value: 'New Label' } }); }); @@ -773,7 +773,7 @@ describe('FormBasedDimensionEditor', () => { act(() => { wrapper - .find('input[data-test-subj="column-label-edit"]') + .find('input[data-test-subj="name-input"]') .simulate('change', { target: { value: 'Sum of bytes' } }); }); diff --git a/x-pack/plugins/lens/public/datasources/form_based/form_based.tsx b/x-pack/plugins/lens/public/datasources/form_based/form_based.tsx index 59c8096c7d269..d5779ef4ac81a 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/form_based.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/form_based.tsx @@ -26,6 +26,7 @@ import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/ import { EuiButton } from '@elastic/eui'; import type { SharePluginStart } from '@kbn/share-plugin/public'; import type { DraggingIdentifier } from '@kbn/dom-drag-drop'; +import { DimensionTrigger } from '@kbn/visualization-ui-components/public'; import type { DatasourceDimensionEditorProps, DatasourceDimensionTriggerProps, @@ -99,7 +100,6 @@ import { DOCUMENT_FIELD_NAME } from '../../../common/constants'; import { isColumnOfType } from './operations/definitions/helpers'; import { LayerSettingsPanel } from './layer_settings'; import { FormBasedLayer } from '../..'; -import { DimensionTrigger } from '../../shared_components/dimension_trigger'; import { filterAndSortUserMessages } from '../../app_plugin/get_application_user_messages'; export type { OperationType, GenericIndexPatternColumn } from './operations'; export { deleteColumn } from './operations'; diff --git a/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx index dab66cac44fa5..90ce505b06700 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx @@ -19,6 +19,7 @@ import type { ExpressionsStart, DatatableColumnType } from '@kbn/expressions-plu import type { DataViewsPublicPluginStart, DataView } from '@kbn/data-views-plugin/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { euiThemeVars } from '@kbn/ui-theme'; +import { DimensionTrigger } from '@kbn/visualization-ui-components/public'; import { DatasourceDimensionEditorProps, DatasourceDataPanelProps, @@ -42,7 +43,6 @@ import type { import { FieldSelect } from './field_select'; import type { Datasource, IndexPatternMap } from '../../types'; import { LayerPanel } from './layerpanel'; -import { DimensionTrigger } from '../../shared_components/dimension_trigger'; function getLayerReferenceName(layerId: string) { return `textBasedLanguages-datasource-layer-${layerId}`; diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/empty_dimension_button.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/empty_dimension_button.tsx index f0ef1508c5076..1e2b3ff4b4c05 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/empty_dimension_button.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/empty_dimension_button.tsx @@ -6,7 +6,6 @@ */ import React, { useMemo, useState, useEffect, useContext } from 'react'; -import { EuiButtonEmpty } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { @@ -16,6 +15,9 @@ import { DropType, DropTargetSwapDuplicateCombine, } from '@kbn/dom-drag-drop'; +import { EmptyDimensionButton as EmptyDimensionButtonInner } from '@kbn/visualization-ui-components/public'; +import { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; import { isDraggedField } from '../../../../utils'; import { generateId } from '../../../../id_generator'; @@ -56,49 +58,32 @@ const defaultButtonLabels = { const DefaultEmptyButton = ({ columnId, group, onClick }: EmptyButtonProps) => { const { buttonAriaLabel, buttonLabel } = group.labels || {}; return ( - { - onClick(columnId); - }} - > - {buttonLabel || defaultButtonLabels.label} - + onClick(columnId)} + /> ); }; const SuggestedValueButton = ({ columnId, group, onClick }: EmptyButtonProps) => ( - + } + ariaLabel={i18n.translate('xpack.lens.indexPattern.suggestedValueAriaLabel', { defaultMessage: 'Suggested value: {value} for {groupLabel}', values: { value: group.suggestedValue?.(), groupLabel: group.groupLabel }, })} - data-test-subj="lns-empty-dimension-suggested-value" - onClick={() => { - onClick(columnId); - }} - > - - + dataTestSubj="lns-empty-dimension-suggested-value" + iconType="plusInCircleFilled" + onClick={() => onClick(columnId)} + /> ); export function EmptyDimensionButton({ @@ -205,7 +190,11 @@ export function EmptyDimensionButton({ onDrop={handleOnDrop} dropTypes={dropTypes} > -
+
{typeof group.suggestedValue?.() === 'number' ? ( ) : ( diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.scss b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.scss index 0efd82bc31063..3afcc0173ca2e 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.scss +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.scss @@ -41,19 +41,19 @@ } // Add border to the top of the next same panel - & + & { + &+& { border-top: $euiBorderThin; margin-top: 0; } - & > * { + &>* { margin-bottom: 0; } // Targeting EUI class as we are unable to apply a class to this element in component &, .euiFormRow__fieldWrapper { - & > * + * { + &>*+* { margin-top: $euiSizeS; } } @@ -64,121 +64,31 @@ padding: $euiSizeS $euiSize; } -.lnsLayerPanel__dimensionRemove { - margin-right: $euiSizeS; - opacity: 0; - - &:focus { - opacity: 1; - } -} - -.lnsLayerPanel__dimension { - @include euiFontSizeS; - border-radius: $euiBorderRadius; - display: flex; - align-items: center; - overflow: hidden; - min-height: $euiSizeXL; - position: relative; - - // NativeRenderer is messing this up - > div { - flex-grow: 1; - } - - &:hover, - &:focus { - .lnsLayerPanel__dimensionRemove { - visibility: visible; - opacity: 1; - transition: opacity $euiAnimSpeedFast ease-in-out; - } - } +.lnsLayerPanel__styleEditor { + padding: $euiSize; } -.lnsLayerPanel__dimension--empty { - border: $euiBorderWidthThin dashed $euiBorderColor !important; - - &:focus, - &:focus-within { - @include euiFocusRing; - } -} +// Start dimension style overrides .lnsLayerPanel__dimensionContainer { position: relative; - & + & { + &+& { margin-top: $euiSizeS; } } -.lnsLayerPanel__triggerText { - width: 100%; - padding: $euiSizeXS $euiSizeS; - word-break: break-word; - font-weight: $euiFontWeightRegular; -} - -.lnsLayerPanel__dimensionLink { - &:hover { - text-decoration: none; - } -} - -.lnsLayerPanel__triggerTextLabel { - transition: background-color $euiAnimSpeedFast ease-in-out; - - &:hover { - text-decoration: underline; - } -} - .domDragDrop-isReplacing { - .lnsLayerPanel__triggerText { + .dimensionTrigger__textLabel { text-decoration: line-through; } } -.lnsLayerPanel__triggerTextContent { - // Make EUI button content not centered - justify-content: flex-start; - padding: 0 !important; // sass-lint:disable-line no-important - color: $euiTextSubduedColor; -} - -.lnsLayerPanel__styleEditor { - padding: $euiSize; -} - -.lnsLayerPanel__colorIndicator { - margin-left: $euiSizeS; -} - -.lnsLayerPanel__paletteContainer { - position: absolute; - bottom: 0; - left: 0; - right: 0; -} - -.lnsLayerPanel__palette { - height: $euiSizeXS / 2; - border-radius: 0 0 ($euiBorderRadius - 1px) ($euiBorderRadius - 1px); - - &::after { - border: none; - } -} - // Added .lnsLayerPanel__dimension specificity required for animation style override .lnsLayerPanel__dimension .lnsLayerPanel__dimensionLink { - width: 100%; - &:focus { - @include passDownFocusRing('.lnsLayerPanel__triggerTextLabel'); + @include passDownFocusRing('.dimensionTrigger__textLabel'); background-color: transparent; text-decoration-thickness: $euiBorderWidthThin !important; } -} +} \ No newline at end of file diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx index 18b5acd160aaf..eae473567922d 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx @@ -21,6 +21,7 @@ import { mountWithProvider, } from '../../../mocks'; import { createIndexPatternServiceMock } from '../../../mocks/data_views_service_mock'; +import { DimensionButton } from '@kbn/visualization-ui-components/public'; jest.mock('../../../id_generator'); @@ -714,9 +715,7 @@ describe('LayerPanel', () => { expect(instance.exists('[data-test-subj="lns-fakeDimension"]')).toBeTruthy(); expect( - instance - .find('[data-test-subj="lns-fakeDimension"] .lnsLayerPanel__triggerTextLabel') - .text() + instance.find('[data-test-subj="lns-fakeDimension"] .dimensionTrigger__textLabel').text() ).toBe(fakeAccessorLabel); }); @@ -826,7 +825,7 @@ describe('LayerPanel', () => { const dragDropElement = instance .find('[data-test-subj="lnsGroup"] DragDrop') .first() - .find('.lnsLayerPanel__dimension') + .find(DimensionButton) .first(); dragDropElement.simulate('dragOver'); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx index a7314f2c1b6b4..736a46a38630f 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; import { DragDropIdentifier, ReorderProvider, DropType } from '@kbn/dom-drag-drop'; -import { DimensionButton } from '@kbn/visualization-ui-components/public'; +import { DimensionButton, DimensionTrigger } from '@kbn/visualization-ui-components/public'; import { LayerActions } from './layer_actions'; import { IndexPatternServiceAPI } from '../../../data_views_service/service'; import { NativeRenderer } from '../../../native_renderer'; @@ -572,7 +572,6 @@ export function LayerPanel( indexPatterns={dataViews.indexPatterns} > - - - {group.fakeFinalAccessor.label} - - + />
)} diff --git a/x-pack/plugins/lens/public/shared_components/dimension_trigger/index.tsx b/x-pack/plugins/lens/public/shared_components/dimension_trigger/index.tsx deleted file mode 100644 index d705c50017a8d..0000000000000 --- a/x-pack/plugins/lens/public/shared_components/dimension_trigger/index.tsx +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { EuiText, EuiFlexItem } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import React from 'react'; -import { EuiTextProps } from '@elastic/eui/src/components/text/text'; - -export const defaultDimensionTriggerTooltip = ( -

- {i18n.translate('xpack.lens.configure.invalidConfigTooltip', { - defaultMessage: 'Invalid configuration.', - })} -
- {i18n.translate('xpack.lens.configure.invalidConfigTooltipClick', { - defaultMessage: 'Click for more details.', - })} -

-); - -export const DimensionTrigger = ({ - id, - label, - color, - dataTestSubj, -}: { - label: string; - id: string; - color?: EuiTextProps['color']; - dataTestSubj?: string; -}) => { - return ( - - - - {label} - - - - ); -}; diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/index.ts b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/index.ts index b7bc603fae05f..b6e3f9e82d785 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/index.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/index.ts @@ -9,6 +9,8 @@ import type { CoreStart } from '@kbn/core/public'; import { EventAnnotationServiceType } from '@kbn/event-annotation-plugin/public'; import { SavedObjectTaggingPluginStart } from '@kbn/saved-objects-tagging-plugin/public'; import { DataViewsContract } from '@kbn/data-views-plugin/public'; +import { VISUALIZE_APP_NAME } from '@kbn/visualizations-plugin/common/constants'; +import { ANNOTATIONS_LISTING_VIEW_ID } from '@kbn/event-annotation-plugin/common'; import type { LayerAction, StateSetter } from '../../../../types'; import { XYState, XYAnnotationLayerConfig } from '../../types'; import { getUnlinkLayerAction } from './unlink_action'; @@ -51,6 +53,10 @@ export const createAnnotationActions = ({ toasts: core.notifications.toasts, savedObjectsTagging, dataViews, + goToAnnotationLibrary: () => + core.application.navigateToApp(VISUALIZE_APP_NAME, { + path: `#/${ANNOTATIONS_LISTING_VIEW_ID}`, + }), }) ); } diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.test.tsx b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.test.tsx index e5256ec49b78a..8505f9811749a 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.test.tsx @@ -153,7 +153,7 @@ describe('annotation group save action', () => { toExpression: jest.fn(), toFetchExpression: jest.fn(), renderEventAnnotationGroupSavedObjectFinder: jest.fn(), - } as EventAnnotationServiceType, + } as Partial as EventAnnotationServiceType, toasts: toastsServiceMock.createStartContract(), modalOnSaveProps: { newTitle: 'my title', @@ -165,6 +165,7 @@ describe('annotation group save action', () => { onTitleDuplicate: () => {}, }, dataViews, + goToAnnotationLibrary: () => Promise.resolve(), }; }; diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx index 0e66654af48c1..1b4ae5fd4958d 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx @@ -17,7 +17,7 @@ import { SavedObjectSaveModal, } from '@kbn/saved-objects-plugin/public'; import { EventAnnotationGroupConfig } from '@kbn/event-annotation-plugin/common'; -import { EuiIcon } from '@elastic/eui'; +import { EuiIcon, EuiLink } from '@elastic/eui'; import { type SavedObjectTaggingPluginStart } from '@kbn/saved-objects-tagging-plugin/public'; import { DataViewsContract } from '@kbn/data-views-plugin/public'; import type { LayerAction, StateSetter } from '../../../../types'; @@ -116,7 +116,7 @@ const saveAnnotationGroupToLibrary = async ( title: newTitle, description: newDescription, tags: newTags, - dataViewSpec: dataView.isPersisted() ? undefined : dataView.toSpec(), + dataViewSpec: dataView.isPersisted() ? undefined : dataView.toSpec(false), }; if (saveAsNew) { @@ -140,6 +140,7 @@ export const onSave = async ({ toasts, modalOnSaveProps: { newTitle, newDescription, newTags, closeModal, newCopyOnSave }, dataViews, + goToAnnotationLibrary, }: { state: XYState; layer: XYAnnotationLayerConfig; @@ -148,6 +149,7 @@ export const onSave = async ({ toasts: ToastsStart; modalOnSaveProps: ModalOnSaveProps; dataViews: DataViewsContract; + goToAnnotationLibrary: () => Promise; }) => { let savedInfo: Awaited>; try { @@ -203,9 +205,21 @@ export const onSave = async ({

annotation library, + link: ( + goToAnnotationLibrary()} + > + {i18n.translate( + 'xpack.lens.xyChart.annotations.saveAnnotationGroupToLibrary.annotationLibrary', + { + defaultMessage: 'annotation library', + } + )} + + ), }} />

, @@ -222,6 +236,7 @@ export const getSaveLayerAction = ({ toasts, savedObjectsTagging, dataViews, + goToAnnotationLibrary, }: { state: XYState; layer: XYAnnotationLayerConfig; @@ -230,6 +245,7 @@ export const getSaveLayerAction = ({ toasts: ToastsStart; savedObjectsTagging?: SavedObjectTaggingPluginStart; dataViews: DataViewsContract; + goToAnnotationLibrary: () => Promise; }): LayerAction => { const neverSaved = !isByReferenceAnnotationsLayer(layer); @@ -261,6 +277,7 @@ export const getSaveLayerAction = ({ toasts, modalOnSaveProps: props, dataViews, + goToAnnotationLibrary, }); }} title={neverSaved ? '' : layer.__lastSaved.title} diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.tsx b/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.tsx index 6174017f3054b..3bf619cc76129 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/helpers.tsx @@ -8,19 +8,19 @@ import { i18n } from '@kbn/i18n'; import moment from 'moment'; import { - defaultAnnotationColor, - defaultAnnotationRangeColor, + getAnnotationAccessor, isQueryAnnotationConfig, - isRangeAnnotationConfig, } from '@kbn/event-annotation-plugin/public'; -import { EventAnnotationConfig } from '@kbn/event-annotation-plugin/common'; +import { + createCopiedAnnotation, + EventAnnotationConfig, + getDefaultQueryAnnotation, +} from '@kbn/event-annotation-plugin/common'; import { IconChartBarAnnotations } from '@kbn/chart-icons'; import { LayerTypes } from '@kbn/expression-xy-plugin/public'; -import type { AccessorConfig } from '@kbn/visualization-ui-components/public'; import { isDraggedDataViewField } from '../../../utils'; import type { FramePublicAPI, Visualization } from '../../../types'; import { isHorizontalChart } from '../state_helpers'; -import { annotationsIconSet } from '../xy_config_panel/annotations_config_panel/icon_set'; import type { XYState, XYDataLayerConfig, XYAnnotationLayerConfig, XYLayerConfig } from '../types'; import { checkScaleOperation, @@ -129,50 +129,6 @@ export const getAnnotationsSupportedLayer = ( }; }; -const getDefaultManualAnnotation = (id: string, timestamp: string): EventAnnotationConfig => ({ - label: defaultAnnotationLabel, - type: 'manual', - key: { - type: 'point_in_time', - timestamp, - }, - icon: 'triangle', - id, -}); - -const getDefaultQueryAnnotation = ( - id: string, - fieldName: string, - timeField: string -): EventAnnotationConfig => ({ - filter: { - type: 'kibana_query', - query: `${fieldName}: *`, - language: 'kuery', - }, - timeField, - type: 'query', - key: { - type: 'point_in_time', - }, - id, - label: `${fieldName}: *`, -}); - -const createCopiedAnnotation = ( - newId: string, - timestamp: string, - source?: EventAnnotationConfig -): EventAnnotationConfig => { - if (!source) { - return getDefaultManualAnnotation(newId, timestamp); - } - return { - ...source, - id: newId, - }; -}; - export const onAnnotationDrop: Visualization['onDrop'] = ({ prevState, frame, @@ -446,26 +402,8 @@ export const setAnnotationsDimension: Visualization['setDimension'] = ( }; }; -export const getSingleColorAnnotationConfig = ( - annotation: EventAnnotationConfig -): AccessorConfig => { - const annotationIcon = !isRangeAnnotationConfig(annotation) - ? annotationsIconSet.find((option) => option.value === annotation?.icon) || - annotationsIconSet.find((option) => option.value === 'triangle') - : undefined; - const icon = annotationIcon?.icon ?? annotationIcon?.value; - return { - columnId: annotation.id, - triggerIconType: annotation.isHidden ? 'invisible' : icon ? 'custom' : 'color', - customIcon: icon, - color: - annotation?.color || - (isRangeAnnotationConfig(annotation) ? defaultAnnotationRangeColor : defaultAnnotationColor), - }; -}; - export const getAnnotationsAccessorColorConfig = (layer: XYAnnotationLayerConfig) => - layer.annotations.map((annotation) => getSingleColorAnnotationConfig(annotation)); + layer.annotations.map((annotation) => getAnnotationAccessor(annotation)); export const getAnnotationsConfiguration = ({ state, diff --git a/x-pack/plugins/lens/public/visualizations/xy/index.ts b/x-pack/plugins/lens/public/visualizations/xy/index.ts index 244d47cd5b114..6f590000d512a 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/index.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/index.ts @@ -30,7 +30,15 @@ export class XyVisualization { const { getXyVisualization } = await import('../../async_services'); const [ coreStart, - { charts, data, fieldFormats, eventAnnotation, unifiedSearch, savedObjectsTagging }, + { + charts, + data, + fieldFormats, + eventAnnotation, + unifiedSearch, + savedObjectsTagging, + dataViews, + }, ] = await core.getStartServices(); const [palettes, eventAnnotationService] = await Promise.all([ charts.palettes.getPalettes(), @@ -47,6 +55,7 @@ export class XyVisualization { useLegacyTimeAxis, kibanaTheme: core.theme, unifiedSearch, + dataViewsService: dataViews, savedObjectsTagging, }); }); diff --git a/x-pack/plugins/lens/public/visualizations/xy/to_expression.test.ts b/x-pack/plugins/lens/public/visualizations/xy/to_expression.test.ts index a1378a1442698..9cdf33c134c8c 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/to_expression.test.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/to_expression.test.ts @@ -20,6 +20,7 @@ import { LegendSize } from '@kbn/visualizations-plugin/common'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; +import { DataViewsServicePublic } from '@kbn/data-views-plugin/public'; describe('#toExpression', () => { const xyVisualization = getXyVisualization({ @@ -32,6 +33,7 @@ describe('#toExpression', () => { storage: {} as IStorageWrapper, data: dataPluginMock.createStartContract(), unifiedSearch: unifiedSearchPluginMock.createStartContract(), + dataViewsService: {} as DataViewsServicePublic, }); let mockDatasource: ReturnType; let frame: ReturnType; diff --git a/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx b/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx index 6f720f0e21f2f..bcd5ed68aa38c 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx @@ -52,6 +52,7 @@ import { set } from '@kbn/safer-lodash-set'; import { SavedObjectReference } from '@kbn/core-saved-objects-api-server'; import { getAnnotationsLayers } from './visualization_helpers'; import { cloneDeep } from 'lodash'; +import { DataViewsServicePublic } from '@kbn/data-views-plugin/public'; const DATE_HISTORGRAM_COLUMN_ID = 'date_histogram_column'; const exampleAnnotation: EventAnnotationConfig = { @@ -108,6 +109,7 @@ const xyVisualization = getXyVisualization({ storage: {} as IStorageWrapper, data: dataPluginMock.createStartContract(), unifiedSearch: unifiedSearchPluginMock.createStartContract(), + dataViewsService: {} as DataViewsServicePublic, }); describe('xy_visualization', () => { diff --git a/x-pack/plugins/lens/public/visualizations/xy/visualization.tsx b/x-pack/plugins/lens/public/visualizations/xy/visualization.tsx index d4f6d4411b5a7..cdbd189790e07 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/visualization.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/visualization.tsx @@ -14,7 +14,10 @@ import type { PaletteRegistry } from '@kbn/coloring'; import { IconChartBarReferenceLine, IconChartBarAnnotations } from '@kbn/chart-icons'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import { CoreStart, SavedObjectReference, ThemeServiceStart } from '@kbn/core/public'; -import type { EventAnnotationServiceType } from '@kbn/event-annotation-plugin/public'; +import { + EventAnnotationServiceType, + getAnnotationAccessor, +} from '@kbn/event-annotation-plugin/public'; import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import { VIS_EVENT_TO_TRIGGER } from '@kbn/visualizations-plugin/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; @@ -24,7 +27,8 @@ import { LayerTypes } from '@kbn/expression-xy-plugin/public'; import { SavedObjectTaggingPluginStart } from '@kbn/saved-objects-tagging-plugin/public'; import { EventAnnotationGroupConfig } from '@kbn/event-annotation-plugin/common'; import { isEqual } from 'lodash'; -import type { AccessorConfig } from '@kbn/visualization-ui-components/public'; +import { type AccessorConfig, DimensionTrigger } from '@kbn/visualization-ui-components/public'; +import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { generateId } from '../../id_generator'; import { isDraggedDataViewField, @@ -36,8 +40,8 @@ import { import { getSuggestions } from './xy_suggestions'; import { XyToolbar } from './xy_config_panel'; import { + DataDimensionEditor, DataDimensionEditorDataSectionExtra, - DimensionEditor, } from './xy_config_panel/dimension_editor'; import { LayerHeader, LayerHeaderContent } from './xy_config_panel/layer_header'; import type { @@ -79,7 +83,6 @@ import { getUniqueLabels, onAnnotationDrop, isDateHistogram, - getSingleColorAnnotationConfig, } from './annotations/helpers'; import { checkXAccessorCompatibility, @@ -105,7 +108,6 @@ import { groupAxesByType } from './axes_configuration'; import type { XYState } from './types'; import { ReferenceLinePanel } from './xy_config_panel/reference_line_config_panel'; import { AnnotationsPanel } from './xy_config_panel/annotations_config_panel'; -import { DimensionTrigger } from '../../shared_components/dimension_trigger'; import { defaultAnnotationLabel } from './annotations/helpers'; import { onDropForVisualization } from '../../editor_frame_service/editor_frame/config_panel/buttons/drop_targets_utils'; import { createAnnotationActions } from './annotations/actions'; @@ -127,6 +129,7 @@ export const getXyVisualization = ({ kibanaTheme, eventAnnotationService, unifiedSearch, + dataViewsService, savedObjectsTagging, }: { core: CoreStart; @@ -138,6 +141,7 @@ export const getXyVisualization = ({ useLegacyTimeAxis: boolean; kibanaTheme: ThemeServiceStart; unifiedSearch: UnifiedSearchPublicPluginStart; + dataViewsService: DataViewsPublicPluginStart; savedObjectsTagging?: SavedObjectTaggingPluginStart; }): Visualization => ({ id: XY_ID, @@ -651,9 +655,9 @@ export const getXyVisualization = ({ const dimensionEditor = isReferenceLayer(layer) ? ( ) : isAnnotationsLayer(layer) ? ( - + ) : ( - + ); render( @@ -1142,7 +1146,7 @@ function getVisualizationInfo( palette.push( ...layer.annotations .filter(({ isHidden }) => !isHidden) - .map((annotation) => getSingleColorAnnotationConfig(annotation).color) + .map((annotation) => getAnnotationAccessor(annotation).color) ); } diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/annotations_panel.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/annotations_panel.tsx index 9cb5f4d64079e..19bbcc7f4bfc8 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/annotations_panel.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/annotations_panel.tsx @@ -5,59 +5,30 @@ * 2.0. */ -import './index.scss'; -import React, { useCallback, useEffect } from 'react'; -import { i18n } from '@kbn/i18n'; -import { EuiFormRow, EuiSwitch, EuiSwitchEvent, EuiButtonGroup, EuiSpacer } from '@elastic/eui'; -import type { PaletteRegistry } from '@kbn/coloring'; +import React, { useCallback, useEffect, useState } from 'react'; import type { DatatableUtilitiesService } from '@kbn/data-plugin/common'; -import { - defaultAnnotationColor, - defaultAnnotationRangeColor, - isQueryAnnotationConfig, - isRangeAnnotationConfig, -} from '@kbn/event-annotation-plugin/public'; -import { - EventAnnotationConfig, - PointInTimeEventAnnotationConfig, - QueryPointEventAnnotationConfig, -} from '@kbn/event-annotation-plugin/common'; +import { AnnotationEditorControls } from '@kbn/event-annotation-plugin/public'; +import { EventAnnotationConfig } from '@kbn/event-annotation-plugin/common'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { useDebouncedValue } from '@kbn/visualization-ui-components/public'; +import { DataViewsPublicPluginStart, DataView } from '@kbn/data-views-plugin/public'; import moment from 'moment'; -import { useExistingFieldsReader } from '@kbn/unified-field-list-plugin/public'; -import { - IconSelectSetting, - FieldOption, - FieldOptionValue, - FieldPicker, - NameInput, - useDebouncedValue, - DimensionEditorSection, - ColorPicker, -} from '@kbn/visualization-ui-components/public'; -import { FormatFactory } from '../../../../../common/types'; -import { isHorizontalChart } from '../../state_helpers'; -import { defaultAnnotationLabel, defaultRangeAnnotationLabel } from '../../annotations/helpers'; -import { TextDecorationSetting } from '../shared/marker_decoration_settings'; -import { LineStyleSettings } from '../shared/line_style_settings'; +import { search } from '@kbn/data-plugin/public'; +import { LENS_APP_NAME } from '../../../../../common/constants'; +import { DONT_CLOSE_DIMENSION_CONTAINER_ON_CLICK_CLASS } from '../../../../utils'; +import { LensAppServices } from '../../../../app_plugin/types'; import { updateLayer } from '..'; -import { annotationsIconSet } from './icon_set'; -import type { VisualizationDimensionEditorProps } from '../../../../types'; -import type { State, XYState, XYAnnotationLayerConfig } from '../../types'; -import { ConfigPanelManualAnnotation } from './manual_annotation_panel'; -import { ConfigPanelQueryAnnotation } from './query_annotation_panel'; -import { TooltipSection } from './tooltip_annotation_panel'; -import { sanitizeProperties, toLineAnnotationColor } from './helpers'; +import type { FramePublicAPI, VisualizationDimensionEditorProps } from '../../../../types'; +import type { State, XYState, XYAnnotationLayerConfig, XYDataLayerConfig } from '../../types'; +import { isDataLayer } from '../../visualization_helpers'; export const AnnotationsPanel = ( props: VisualizationDimensionEditorProps & { datatableUtilities: DatatableUtilitiesService; - formatFactory: FormatFactory; - paletteService: PaletteRegistry; + dataViewsService: DataViewsPublicPluginStart; } ) => { const { state, setState, layerId, accessor, frame } = props; - const isHorizontal = isHorizontalChart(state.layers); - const { hasFieldData } = useExistingFieldsReader(); const { inputValue: localState, handleInputChange: setLocalState } = useDebouncedValue({ value: state, @@ -71,26 +42,15 @@ export const AnnotationsPanel = ( const currentAnnotation = localLayer.annotations?.find((c) => c.id === accessor); - const isQueryBased = isQueryAnnotationConfig(currentAnnotation); - const isRange = isRangeAnnotationConfig(currentAnnotation); - const [queryInputShouldOpen, setQueryInputShouldOpen] = React.useState(false); - useEffect(() => { - setQueryInputShouldOpen(!isQueryBased); - }, [isQueryBased]); - - const setAnnotations = useCallback( - (annotation: Partial | undefined) => { + const setAnnotation = useCallback( + (annotation: EventAnnotationConfig) => { if (annotation == null) { return; } const newConfigs = [...(localLayer.annotations || [])]; const existingIndex = newConfigs.findIndex((c) => c.id === accessor); if (existingIndex !== -1) { - const existingConfig = newConfigs[existingIndex]; - newConfigs[existingIndex] = sanitizeProperties({ - ...existingConfig, - ...annotation, - }); + newConfigs[existingIndex] = annotation; } else { throw new Error( 'should never happen because annotation is created before config panel is opened' @@ -101,305 +61,81 @@ export const AnnotationsPanel = ( [accessor, index, localState, localLayer, setLocalState] ); - return ( - <> - - - { - const typeFromId = id.replace( - 'lens_xyChart_annotation_', - '' - ) as EventAnnotationConfig['type']; - if (currentAnnotation?.type === typeFromId) { - return; - } - if (typeFromId === 'query') { - const currentIndexPattern = - frame.dataViews.indexPatterns[localLayer.indexPatternId]; - // If coming from a range type, it requires some additional resets - const additionalRangeResets = isRangeAnnotationConfig(currentAnnotation) - ? { - label: - currentAnnotation.label === defaultRangeAnnotationLabel - ? defaultAnnotationLabel - : currentAnnotation.label, - color: toLineAnnotationColor(currentAnnotation.color), - } - : {}; - return setAnnotations({ - type: typeFromId, - timeField: - (currentIndexPattern.timeFieldName || - // fallback to the first avaiable date field in the dataView - currentIndexPattern.fields.find(({ type: fieldType }) => fieldType === 'date') - ?.displayName) ?? - '', - key: { type: 'point_in_time' }, - ...additionalRangeResets, - }); - } - // From query to manual annotation - return setAnnotations({ - type: typeFromId, - key: { type: 'point_in_time', timestamp: moment().toISOString() }, - }); - }} - isFullWidth - /> - - {isQueryBased ? ( - - ) : ( - - )} - - - { - setAnnotations({ label: value }); - }} - /> - {!isRange && ( - <> - setAnnotations({ icon })} - defaultIcon="triangle" - currentIcon={currentAnnotation?.icon} - customIconSet={annotationsIconSet} - /> - - {(textDecorationSelected) => { - if (textDecorationSelected !== 'field') { - return null; - } - const currentIndexPattern = - frame.dataViews.indexPatterns[localLayer.indexPatternId]; - const options = currentIndexPattern.fields - .filter(({ displayName, type }) => displayName && type !== 'document') - .map( - (field) => - ({ - label: field.displayName, - value: { - type: 'field', - field: field.name, - dataType: field.type, - }, - exists: hasFieldData(currentIndexPattern.id, field.name), - compatible: true, - 'data-test-subj': `lnsXY-annotation-fieldOption-${field.name}`, - } as FieldOption) - ); - const selectedField = (currentAnnotation as QueryPointEventAnnotationConfig) - .textField; + const [currentDataView, setCurrentDataView] = useState(); + + useEffect(() => { + const updateDataView = async () => { + let dataView: DataView; + const availableIds = await props.dataViewsService.getIds(); + if (availableIds.includes(localLayer.indexPatternId)) { + dataView = await props.dataViewsService.get(localLayer.indexPatternId); + } else { + dataView = await props.dataViewsService.create( + frame.dataViews.indexPatterns[localLayer.indexPatternId].spec + ); + } + setCurrentDataView(dataView); + }; + + updateDataView(); + }, [frame.dataViews.indexPatterns, localLayer.indexPatternId, props.dataViewsService]); - const fieldIsValid = selectedField - ? Boolean(currentIndexPattern.getFieldByName(selectedField)) - : true; - return ( - <> - - - - ); - }} - - - - )} - {isRange && ( - - { - setAnnotations({ - outside: id === `lens_xyChart_fillStyle_outside`, - }); - }} - isFullWidth - /> - - )} + const queryInputServices = useKibana().services; - - setAnnotations({ isHidden: ev.target.checked })} - /> - - {isQueryBased && currentAnnotation && ( - - - - - - )} - - ); -}; + if (!currentAnnotation) { + throw new Error('Annotation not found... this should never happen!'); + } -const ConfigPanelGenericSwitch = ({ - label, - ['data-test-subj']: dataTestSubj, - value, - onChange, -}: { - label: string; - 'data-test-subj': string; - value: boolean; - onChange: (event: EuiSwitchEvent) => void; -}) => ( - - setAnnotation(newAnnotation)} + dataView={currentDataView} + getDefaultRangeEnd={(rangeStart) => + getEndTimestamp( + props.datatableUtilities, + rangeStart, + frame, + localState.layers.filter(isDataLayer) + ) + } + queryInputServices={queryInputServices} + calendarClassName={DONT_CLOSE_DIMENSION_CONTAINER_ON_CLICK_CLASS} + appName={LENS_APP_NAME} /> - -); + ) : null; +}; + +const getEndTimestamp = ( + datatableUtilities: DatatableUtilitiesService, + startTime: string, + { activeData, dateRange }: FramePublicAPI, + dataLayers: XYDataLayerConfig[] +) => { + const startTimeNumber = moment(startTime).valueOf(); + const dateRangeFraction = + (moment(dateRange.toDate).valueOf() - moment(dateRange.fromDate).valueOf()) * 0.1; + const fallbackValue = moment(startTimeNumber + dateRangeFraction).toISOString(); + const dataLayersId = dataLayers.map(({ layerId }) => layerId); + if ( + !dataLayersId.length || + !activeData || + Object.entries(activeData) + .filter(([key]) => dataLayersId.includes(key)) + .every(([, { rows }]) => !rows || !rows.length) + ) { + return fallbackValue; + } + const xColumn = activeData?.[dataLayersId[0]].columns.find( + (column) => column.id === dataLayers[0].xAccessor + ); + if (!xColumn) { + return fallbackValue; + } + + const dateInterval = datatableUtilities.getDateHistogramMeta(xColumn)?.interval; + if (!dateInterval) return fallbackValue; + const intervalDuration = search.aggs.parseInterval(dateInterval); + if (!intervalDuration) return fallbackValue; + return moment(startTimeNumber + 3 * intervalDuration.as('milliseconds')).toISOString(); +}; diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/helpers.ts b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/helpers.ts deleted file mode 100644 index 0eb80c1018dc2..0000000000000 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/helpers.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { search } from '@kbn/data-plugin/public'; -import { transparentize } from '@elastic/eui'; -import type { DatatableUtilitiesService } from '@kbn/data-plugin/common'; -import type { - EventAnnotationConfig, - RangeEventAnnotationConfig, - PointInTimeEventAnnotationConfig, - QueryPointEventAnnotationConfig, -} from '@kbn/event-annotation-plugin/common'; -import { - defaultAnnotationColor, - defaultAnnotationRangeColor, - isQueryAnnotationConfig, - isRangeAnnotationConfig, -} from '@kbn/event-annotation-plugin/public'; -import chroma from 'chroma-js'; -import { pick } from 'lodash'; -import moment from 'moment'; -import type { FramePublicAPI } from '../../../../types'; -import type { XYDataLayerConfig } from '../../types'; - -export const toRangeAnnotationColor = (color = defaultAnnotationColor) => { - return chroma(transparentize(color, 0.1)).hex().toUpperCase(); -}; - -export const toLineAnnotationColor = (color = defaultAnnotationRangeColor) => { - return chroma(transparentize(color, 1)).hex().toUpperCase(); -}; - -export const getEndTimestamp = ( - datatableUtilities: DatatableUtilitiesService, - startTime: string, - { activeData, dateRange }: FramePublicAPI, - dataLayers: XYDataLayerConfig[] -) => { - const startTimeNumber = moment(startTime).valueOf(); - const dateRangeFraction = - (moment(dateRange.toDate).valueOf() - moment(dateRange.fromDate).valueOf()) * 0.1; - const fallbackValue = moment(startTimeNumber + dateRangeFraction).toISOString(); - const dataLayersId = dataLayers.map(({ layerId }) => layerId); - if ( - !dataLayersId.length || - !activeData || - Object.entries(activeData) - .filter(([key]) => dataLayersId.includes(key)) - .every(([, { rows }]) => !rows || !rows.length) - ) { - return fallbackValue; - } - const xColumn = activeData?.[dataLayersId[0]].columns.find( - (column) => column.id === dataLayers[0].xAccessor - ); - if (!xColumn) { - return fallbackValue; - } - - const dateInterval = datatableUtilities.getDateHistogramMeta(xColumn)?.interval; - if (!dateInterval) return fallbackValue; - const intervalDuration = search.aggs.parseInterval(dateInterval); - if (!intervalDuration) return fallbackValue; - return moment(startTimeNumber + 3 * intervalDuration.as('milliseconds')).toISOString(); -}; - -export const sanitizeProperties = (annotation: EventAnnotationConfig) => { - if (isRangeAnnotationConfig(annotation)) { - const rangeAnnotation: RangeEventAnnotationConfig = pick(annotation, [ - 'type', - 'label', - 'key', - 'id', - 'isHidden', - 'color', - 'outside', - ]); - return rangeAnnotation; - } - if (isQueryAnnotationConfig(annotation)) { - const lineAnnotation: QueryPointEventAnnotationConfig = pick(annotation, [ - 'type', - 'id', - 'label', - 'key', - 'timeField', - 'isHidden', - 'lineStyle', - 'lineWidth', - 'color', - 'icon', - 'textVisibility', - 'textField', - 'filter', - 'extraFields', - ]); - return lineAnnotation; - } - const lineAnnotation: PointInTimeEventAnnotationConfig = pick(annotation, [ - 'type', - 'id', - 'label', - 'key', - 'isHidden', - 'lineStyle', - 'lineWidth', - 'color', - 'icon', - 'textVisibility', - ]); - return lineAnnotation; -}; diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/icon_set.ts b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/icon_set.ts deleted file mode 100644 index 3e67cd8e5c14e..0000000000000 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/icon_set.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; -import { AvailableAnnotationIcon } from '@kbn/event-annotation-plugin/common'; -import { IconTriangle, IconCircle } from '@kbn/chart-icons'; -import { type IconSet } from '@kbn/visualization-ui-components/public'; - -export const annotationsIconSet: IconSet = [ - { - value: 'asterisk', - label: i18n.translate('xpack.lens.xyChart.iconSelect.asteriskIconLabel', { - defaultMessage: 'Asterisk', - }), - }, - { - value: 'alert', - label: i18n.translate('xpack.lens.xyChart.iconSelect.alertIconLabel', { - defaultMessage: 'Alert', - }), - }, - { - value: 'bell', - label: i18n.translate('xpack.lens.xyChart.iconSelect.bellIconLabel', { - defaultMessage: 'Bell', - }), - }, - { - value: 'bolt', - label: i18n.translate('xpack.lens.xyChart.iconSelect.boltIconLabel', { - defaultMessage: 'Bolt', - }), - }, - { - value: 'bug', - label: i18n.translate('xpack.lens.xyChart.iconSelect.bugIconLabel', { - defaultMessage: 'Bug', - }), - }, - { - value: 'circle', - label: i18n.translate('xpack.lens.xyChart.iconSelect.circleIconLabel', { - defaultMessage: 'Circle', - }), - icon: IconCircle, - canFill: true, - }, - - { - value: 'editorComment', - label: i18n.translate('xpack.lens.xyChart.iconSelect.commentIconLabel', { - defaultMessage: 'Comment', - }), - }, - { - value: 'flag', - label: i18n.translate('xpack.lens.xyChart.iconSelect.flagIconLabel', { - defaultMessage: 'Flag', - }), - }, - { - value: 'heart', - label: i18n.translate('xpack.lens.xyChart.iconSelect.heartLabel', { defaultMessage: 'Heart' }), - }, - { - value: 'mapMarker', - label: i18n.translate('xpack.lens.xyChart.iconSelect.mapMarkerLabel', { - defaultMessage: 'Map Marker', - }), - }, - { - value: 'pinFilled', - label: i18n.translate('xpack.lens.xyChart.iconSelect.mapPinLabel', { - defaultMessage: 'Map Pin', - }), - }, - { - value: 'starEmpty', - label: i18n.translate('xpack.lens.xyChart.iconSelect.starLabel', { defaultMessage: 'Star' }), - }, - { - value: 'starFilled', - label: i18n.translate('xpack.lens.xyChart.iconSelect.starFilledLabel', { - defaultMessage: 'Star filled', - }), - }, - { - value: 'tag', - label: i18n.translate('xpack.lens.xyChart.iconSelect.tagIconLabel', { - defaultMessage: 'Tag', - }), - }, - { - value: 'triangle', - label: i18n.translate('xpack.lens.xyChart.iconSelect.triangleIconLabel', { - defaultMessage: 'Triangle', - }), - icon: IconTriangle, - shouldRotate: true, - canFill: true, - }, -]; diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.test.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.test.tsx deleted file mode 100644 index 92fa248979fc3..0000000000000 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.test.tsx +++ /dev/null @@ -1,668 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { mountWithIntl as mount } from '@kbn/test-jest-helpers'; -import { createDatatableUtilitiesMock } from '@kbn/data-plugin/common/mocks'; -import { LayerTypes } from '@kbn/expression-xy-plugin/public'; -import { AnnotationsPanel } from '.'; -import { FramePublicAPI } from '../../../../types'; -import { DatasourcePublicAPI } from '../../../..'; -import { createMockFramePublicAPI } from '../../../../mocks'; -import { State, XYState } from '../../types'; -import { Position } from '@elastic/charts'; -import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; -import moment from 'moment'; -import { EventAnnotationConfig } from '@kbn/event-annotation-plugin/common'; -import { createMockDataViewsState } from '../../../../data_views_service/mocks'; -import { createMockedIndexPattern } from '../../../../datasources/form_based/mocks'; -import { act } from 'react-dom/test-utils'; -import { EuiButtonGroup } from '@elastic/eui'; - -jest.mock('lodash', () => { - const original = jest.requireActual('lodash'); - - return { - ...original, - debounce: (fn: unknown) => fn, - }; -}); - -jest.mock('@kbn/unified-search-plugin/public', () => ({ - QueryStringInput: () => { - return 'QueryStringInput'; - }, -})); - -const customLineStaticAnnotation: EventAnnotationConfig = { - id: 'ann1', - type: 'manual', - key: { type: 'point_in_time' as const, timestamp: '2022-03-18T08:25:00.000Z' }, - label: 'Event', - icon: 'triangle' as const, - color: 'red', - lineStyle: 'dashed' as const, - lineWidth: 3, -}; - -describe('AnnotationsPanel', () => { - const datatableUtilities = createDatatableUtilitiesMock(); - let frame: FramePublicAPI; - - function testState(): State { - return { - legend: { isVisible: true, position: Position.Right }, - valueLabels: 'hide', - preferredSeriesType: 'bar', - layers: [ - { - layerType: LayerTypes.ANNOTATIONS, - layerId: 'annotation', - indexPatternId: 'indexPattern1', - annotations: [customLineStaticAnnotation], - ignoreGlobalFilters: true, - }, - ], - }; - } - - beforeEach(() => { - frame = createMockFramePublicAPI({ datasourceLayers: {} }); - }); - - describe('Dimension Editor', () => { - test('shows correct options for line annotations', () => { - const state = testState(); - const component = mount( - - ); - - expect( - component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-time"]').prop('selected') - ).toEqual(moment('2022-03-18T08:25:00.000Z')); - expect( - component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-fromTime"]').exists() - ).toBeFalsy(); - expect( - component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-toTime"]').exists() - ).toBeFalsy(); - expect( - component.find('EuiSwitch[data-test-subj="lns-xyAnnotation-rangeSwitch"]').prop('checked') - ).toEqual(false); - expect( - component.find('EuiFieldText[data-test-subj="column-label-edit"]').prop('value') - ).toEqual('Event'); - expect( - component.find('EuiComboBox[data-test-subj="lns-icon-select"]').prop('selectedOptions') - ).toEqual([{ label: 'Triangle', value: 'triangle' }]); - expect(component.find('TextDecorationSetting').exists()).toBeTruthy(); - expect(component.find('LineStyleSettings').exists()).toBeTruthy(); - expect( - component.find('EuiButtonGroup[data-test-subj="lns-xyAnnotation-fillStyle"]').exists() - ).toBeFalsy(); - }); - test('shows correct options for range annotations', () => { - const state = testState(); - state.layers[0] = { - annotations: [ - { - color: 'red', - icon: 'triangle', - id: 'ann1', - type: 'manual', - isHidden: undefined, - key: { - endTimestamp: '2022-03-21T10:49:00.000Z', - timestamp: '2022-03-18T08:25:00.000Z', - type: 'range', - }, - label: 'Event range', - lineStyle: 'dashed', - lineWidth: 3, - }, - ], - layerId: 'annotation', - layerType: 'annotations', - indexPatternId: 'indexPattern1', - ignoreGlobalFilters: true, - }; - const component = mount( - - ); - - expect( - component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-fromTime"]').prop('selected') - ).toEqual(moment('2022-03-18T08:25:00.000Z')); - expect( - component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-toTime"]').prop('selected') - ).toEqual(moment('2022-03-21T10:49:00.000Z')); - expect( - component.find('EuiDatePicker[data-test-subj="lns-xyAnnotation-time"]').exists() - ).toBeFalsy(); - expect( - component.find('EuiSwitch[data-test-subj="lns-xyAnnotation-rangeSwitch"]').prop('checked') - ).toEqual(true); - expect( - component.find('EuiFieldText[data-test-subj="column-label-edit"]').prop('value') - ).toEqual('Event range'); - expect(component.find('EuiComboBox[data-test-subj="lns-icon-select"]').exists()).toBeFalsy(); - expect(component.find('TextDecorationSetting').exists()).toBeFalsy(); - expect(component.find('LineStyleSettings').exists()).toBeFalsy(); - expect(component.find('[data-test-subj="lns-xyAnnotation-fillStyle"]').exists()).toBeTruthy(); - }); - - test('calculates correct endTimstamp and transparent color when switching for range annotation and back', () => { - const state = testState(); - const setState = jest.fn(); - const component = mount( - - ); - - component.find('button[data-test-subj="lns-xyAnnotation-rangeSwitch"]').simulate('click'); - - expect(setState).toBeCalledWith({ - ...state, - layers: [ - { - annotations: [ - { - color: '#FF00001A', - id: 'ann1', - isHidden: undefined, - label: 'Event range', - type: 'manual', - key: { - endTimestamp: '2022-03-21T10:49:00.000Z', - timestamp: '2022-03-18T08:25:00.000Z', - type: 'range', - }, - }, - ], - indexPatternId: 'indexPattern1', - layerId: 'annotation', - layerType: 'annotations', - ignoreGlobalFilters: true, - }, - ], - }); - component.find('button[data-test-subj="lns-xyAnnotation-rangeSwitch"]').simulate('click'); - expect(setState).toBeCalledWith({ - ...state, - layers: [ - { - annotations: [ - { - color: '#FF0000', - id: 'ann1', - isHidden: undefined, - key: { - timestamp: '2022-03-18T08:25:00.000Z', - type: 'point_in_time', - }, - label: 'Event', - type: 'manual', - }, - ], - indexPatternId: 'indexPattern1', - layerId: 'annotation', - layerType: 'annotations', - ignoreGlobalFilters: true, - }, - ], - }); - }); - - test('shows correct options for query based', () => { - const state = testState(); - const indexPattern = createMockedIndexPattern(); - state.layers[0] = { - annotations: [ - { - color: 'red', - icon: 'triangle', - id: 'ann1', - type: 'query', - isHidden: undefined, - timeField: 'timestamp', - key: { - type: 'point_in_time', - }, - label: 'Query based event', - lineStyle: 'dashed', - lineWidth: 3, - filter: { type: 'kibana_query', query: '', language: 'kuery' }, - }, - ], - layerId: 'annotation', - layerType: 'annotations', - indexPatternId: indexPattern.id, - ignoreGlobalFilters: true, - }; - const frameMock = createMockFramePublicAPI({ - datasourceLayers: {}, - dataViews: createMockDataViewsState({ - indexPatterns: { [indexPattern.id]: indexPattern }, - }), - }); - - const component = mount( - - ); - - expect( - component.find('[data-test-subj="lnsXY-annotation-query-based-field-picker"]').exists() - ).toBeTruthy(); - expect( - component.find('[data-test-subj="lnsXY-annotation-query-based-query-input"]').exists() - ).toBeTruthy(); - - // The provided indexPattern has 2 date fields - expect( - component - .find('[data-test-subj="lnsXY-annotation-query-based-field-picker"]') - .at(0) - .prop('options') - ).toHaveLength(2); - // When in query mode a new "field" option is added to the previous 2 ones - expect( - component.find('[data-test-subj="lns-lineMarker-text-visibility"]').at(0).prop('options') - ).toHaveLength(3); - expect( - component.find('[data-test-subj="lnsXY-annotation-tooltip-add_field"]').exists() - ).toBeTruthy(); - }); - - test('should prefill timeField with the default time field when switching to query based annotations', () => { - const state = testState(); - const indexPattern = createMockedIndexPattern(); - state.layers[0] = { - annotations: [customLineStaticAnnotation], - layerId: 'annotation', - layerType: 'annotations', - ignoreGlobalFilters: true, - indexPatternId: indexPattern.id, - }; - const frameMock = createMockFramePublicAPI({ - datasourceLayers: {}, - dataViews: createMockDataViewsState({ - indexPatterns: { [indexPattern.id]: indexPattern }, - }), - }); - - const setState = jest.fn(); - - const component = mount( - - ); - - act(() => { - component - .find(`[data-test-subj="lns-xyAnnotation-placementType"]`) - .find(EuiButtonGroup) - .prop('onChange')!('lens_xyChart_annotation_query'); - }); - component.update(); - - expect(setState).toHaveBeenCalledWith( - expect.objectContaining({ - layers: [ - expect.objectContaining({ - annotations: [expect.objectContaining({ timeField: 'timestamp' })], - }), - ], - }) - ); - }); - - test('should avoid to retain specific manual configurations when switching to query based annotations', () => { - const state = testState(); - const indexPattern = createMockedIndexPattern(); - state.layers[0] = { - annotations: [customLineStaticAnnotation], - layerId: 'annotation', - layerType: 'annotations', - ignoreGlobalFilters: true, - indexPatternId: indexPattern.id, - }; - const frameMock = createMockFramePublicAPI({ - datasourceLayers: {}, - dataViews: createMockDataViewsState({ - indexPatterns: { [indexPattern.id]: indexPattern }, - }), - }); - - const setState = jest.fn(); - - const component = mount( - - ); - - act(() => { - component - .find(`[data-test-subj="lns-xyAnnotation-placementType"]`) - .find(EuiButtonGroup) - .prop('onChange')!('lens_xyChart_annotation_query'); - }); - component.update(); - - expect(setState).toHaveBeenCalledWith( - expect.objectContaining({ - layers: [ - expect.objectContaining({ - annotations: [ - expect.objectContaining({ - key: expect.not.objectContaining({ timestamp: expect.any('string') }), - }), - ], - }), - ], - }) - ); - }); - - test('should avoid to retain range manual configurations when switching to query based annotations', () => { - const state = testState(); - const indexPattern = createMockedIndexPattern(); - state.layers[0] = { - annotations: [ - { - color: 'red', - icon: 'triangle', - id: 'ann1', - type: 'manual', - isHidden: undefined, - key: { - endTimestamp: '2022-03-21T10:49:00.000Z', - timestamp: '2022-03-18T08:25:00.000Z', - type: 'range', - }, - label: 'Event range', - lineStyle: 'dashed', - lineWidth: 3, - }, - ], - layerId: 'annotation', - layerType: 'annotations', - ignoreGlobalFilters: true, - indexPatternId: indexPattern.id, - }; - const frameMock = createMockFramePublicAPI({ - datasourceLayers: {}, - dataViews: createMockDataViewsState({ - indexPatterns: { [indexPattern.id]: indexPattern }, - }), - }); - - const setState = jest.fn(); - - const component = mount( - - ); - - act(() => { - component - .find(`[data-test-subj="lns-xyAnnotation-placementType"]`) - .find(EuiButtonGroup) - .prop('onChange')!('lens_xyChart_annotation_query'); - }); - component.update(); - - expect(setState).toHaveBeenCalledWith( - expect.objectContaining({ - layers: [ - expect.objectContaining({ - annotations: [ - expect.objectContaining({ label: expect.not.stringContaining('Event range') }), - ], - }), - ], - }) - ); - }); - - test('should set a default tiemstamp when switching from query based to manual annotations', () => { - const state = testState(); - const indexPattern = createMockedIndexPattern(); - state.layers[0] = { - annotations: [ - { - color: 'red', - icon: 'triangle', - id: 'ann1', - type: 'query', - isHidden: undefined, - timeField: 'timestamp', - key: { - type: 'point_in_time', - }, - label: 'Query based event', - lineStyle: 'dashed', - lineWidth: 3, - filter: { type: 'kibana_query', query: '', language: 'kuery' }, - }, - ], - layerId: 'annotation', - layerType: 'annotations', - indexPatternId: indexPattern.id, - ignoreGlobalFilters: true, - }; - const frameMock = createMockFramePublicAPI({ - datasourceLayers: {}, - dataViews: createMockDataViewsState({ - indexPatterns: { [indexPattern.id]: indexPattern }, - }), - }); - - const setState = jest.fn(); - - const component = mount( - - ); - - act(() => { - component - .find(`[data-test-subj="lns-xyAnnotation-placementType"]`) - .find(EuiButtonGroup) - .prop('onChange')!('lens_xyChart_annotation_manual'); - }); - component.update(); - - expect(setState).toHaveBeenCalledWith( - expect.objectContaining({ - layers: [ - expect.objectContaining({ - annotations: [ - expect.objectContaining({ - key: { type: 'point_in_time', timestamp: expect.any(String) }, - }), - ], - }), - ], - }) - ); - - // also check query specific props are not carried over - expect(setState).toHaveBeenCalledWith( - expect.objectContaining({ - layers: [ - expect.objectContaining({ - annotations: [expect.not.objectContaining({ timeField: 'timestamp' })], - }), - ], - }) - ); - }); - - test('should fallback to the first date field available in the dataView if not time-based', () => { - const state = testState(); - const indexPattern = createMockedIndexPattern({ timeFieldName: '' }); - state.layers[0] = { - annotations: [customLineStaticAnnotation], - layerId: 'annotation', - layerType: 'annotations', - ignoreGlobalFilters: true, - indexPatternId: indexPattern.id, - }; - const frameMock = createMockFramePublicAPI({ - datasourceLayers: {}, - dataViews: createMockDataViewsState({ - indexPatterns: { [indexPattern.id]: indexPattern }, - }), - }); - - const setState = jest.fn(); - - const component = mount( - - ); - - act(() => { - component - .find(`[data-test-subj="lns-xyAnnotation-placementType"]`) - .find(EuiButtonGroup) - .prop('onChange')!('lens_xyChart_annotation_query'); - }); - component.update(); - - expect(setState).toHaveBeenCalledWith( - expect.objectContaining({ - layers: [ - expect.objectContaining({ - annotations: [expect.objectContaining({ timeField: 'timestampLabel' })], - }), - ], - }) - ); - }); - }); -}); diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/types.ts b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/types.ts deleted file mode 100644 index f446afb6be265..0000000000000 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/types.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { - PointInTimeEventAnnotationConfig, - RangeEventAnnotationConfig, -} from '@kbn/event-annotation-plugin/common'; - -export type ManualEventAnnotationType = - | PointInTimeEventAnnotationConfig - | RangeEventAnnotationConfig; diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/dimension_editor.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/dimension_editor.tsx index f5d19edd81c5e..4ce681eedbd51 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/dimension_editor.tsx @@ -9,7 +9,6 @@ import React, { useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiButtonGroup, EuiFormRow, htmlIdGenerator } from '@elastic/eui'; import type { PaletteRegistry } from '@kbn/coloring'; -import type { DatatableUtilitiesService } from '@kbn/data-plugin/common'; import { useDebouncedValue } from '@kbn/visualization-ui-components/public'; import { ColorPicker } from '@kbn/visualization-ui-components/public'; import type { VisualizationDimensionEditorProps } from '../../../types'; @@ -17,9 +16,7 @@ import { State, XYState, XYDataLayerConfig, YConfig, YAxisMode } from '../types' import { FormatFactory } from '../../../../common/types'; import { getSeriesColor, isHorizontalChart } from '../state_helpers'; import { PalettePicker } from '../../../shared_components'; -import { getDataLayers, isAnnotationsLayer, isReferenceLayer } from '../visualization_helpers'; -import { ReferenceLinePanel } from './reference_line_config_panel'; -import { AnnotationsPanel } from './annotations_config_panel'; +import { getDataLayers } from '../visualization_helpers'; import { CollapseSetting } from '../../../shared_components/collapse_setting'; import { getSortedAccessors } from '../to_expression'; import { getColorAssignments, getAssignedColorConfig } from '../color_assignment'; @@ -42,26 +39,6 @@ export function updateLayer( export const idPrefix = htmlIdGenerator()(); -export function DimensionEditor( - props: VisualizationDimensionEditorProps & { - datatableUtilities: DatatableUtilitiesService; - formatFactory: FormatFactory; - paletteService: PaletteRegistry; - } -) { - const { state, layerId } = props; - const index = state.layers.findIndex((l) => l.layerId === layerId); - const layer = state.layers[index]; - if (isAnnotationsLayer(layer)) { - return ; - } - - if (isReferenceLayer(layer)) { - return ; - } - return ; -} - export function DataDimensionEditor( props: VisualizationDimensionEditorProps & { formatFactory: FormatFactory; diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/reference_line_config_panel/reference_line_panel.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/reference_line_config_panel/reference_line_panel.tsx index d160777eeaa4d..6f6b4807b6f96 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/reference_line_config_panel/reference_line_panel.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/reference_line_config_panel/reference_line_panel.tsx @@ -14,6 +14,8 @@ import { useDebouncedValue, IconSelectSetting, ColorPicker, + LineStyleSettings, + TextDecorationSetting, } from '@kbn/visualization-ui-components/public'; import type { VisualizationDimensionEditorProps } from '../../../../types'; import { State, XYState, XYReferenceLineLayerConfig, YConfig } from '../../types'; @@ -22,11 +24,7 @@ import { FormatFactory } from '../../../../../common/types'; import { updateLayer } from '..'; import { idPrefix } from '../dimension_editor'; import { isHorizontalChart } from '../../state_helpers'; -import { - MarkerDecorationPosition, - TextDecorationSetting, -} from '../shared/marker_decoration_settings'; -import { LineStyleSettings } from '../shared/line_style_settings'; +import { MarkerDecorationPosition } from '../shared/marker_decoration_settings'; import { referenceLineIconsSet } from './icon_set'; import { defaultReferenceLineColor } from '../../color_assignment'; @@ -77,7 +75,11 @@ export const ReferenceLinePanel = ( return ( <> - + setConfig({ icon })} currentIcon={localConfig?.icon} @@ -88,11 +90,7 @@ export const ReferenceLinePanel = ( setConfig={setConfig} currentConfig={localConfig} /> - + { textField?: string; } -function getSelectedOption( - { textField, textVisibility }: MarkerDecorationConfig = {}, - isQueryBased?: boolean -) { - if (!textVisibility) { - return 'none'; - } - if (isQueryBased && textField) { - return 'field'; - } - return 'name'; -} - -export function TextDecorationSetting({ - currentConfig, - setConfig, - isQueryBased, - children, -}: { - currentConfig?: MarkerDecorationConfig; - setConfig: (config: MarkerDecorationConfig) => void; - isQueryBased?: boolean; - /** A children render function for custom sub fields on textDecoration change */ - children?: (textDecoration: 'none' | 'name' | 'field') => JSX.Element | null; -}) { - // To model the temporary state for label based on field when user didn't pick up the field yet, - // use a local state - const [selectedVisibleOption, setVisibleOption] = useState<'none' | 'name' | 'field'>( - getSelectedOption(currentConfig, isQueryBased) - ); - const options = [ - { - id: `${idPrefix}none`, - label: i18n.translate('xpack.lens.xyChart.lineMarker.textVisibility.none', { - defaultMessage: 'None', - }), - 'data-test-subj': 'lnsXY_textVisibility_none', - }, - { - id: `${idPrefix}name`, - label: i18n.translate('xpack.lens.xyChart.lineMarker.textVisibility.name', { - defaultMessage: 'Name', - }), - 'data-test-subj': 'lnsXY_textVisibility_name', - }, - ]; - if (isQueryBased) { - options.push({ - id: `${idPrefix}field`, - label: i18n.translate('xpack.lens.xyChart.lineMarker.textVisibility.field', { - defaultMessage: 'Field', - }), - 'data-test-subj': 'lnsXY_textVisibility_field', - }); - } - - return ( - -
- { - const chosenOption = id.replace(idPrefix, '') as 'none' | 'name' | 'field'; - if (chosenOption === 'none') { - setConfig({ - textVisibility: false, - textField: undefined, - }); - } else if (chosenOption === 'name') { - setConfig({ - textVisibility: true, - textField: undefined, - }); - } else if (chosenOption === 'field') { - setConfig({ - textVisibility: Boolean(currentConfig?.textField), - }); - } - - setVisibleOption(chosenOption); - }} - isFullWidth - /> - {children?.(selectedVisibleOption)} -
-
- ); -} - export function MarkerDecorationPosition({ currentConfig, setConfig, diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/xy_config_panel.test.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/xy_config_panel.test.tsx index 6caa8238808e9..252c3de6b8e57 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/xy_config_panel.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/xy_config_panel.test.tsx @@ -8,9 +8,8 @@ import React from 'react'; import { mountWithIntl as mount, shallowWithIntl as shallow } from '@kbn/test-jest-helpers'; import { EuiButtonGroupProps, EuiButtonGroup } from '@elastic/eui'; -import { createDatatableUtilitiesMock } from '@kbn/data-plugin/common/mocks'; import { XyToolbar } from '.'; -import { DimensionEditor } from './dimension_editor'; +import { DataDimensionEditor } from './dimension_editor'; import { AxisSettingsPopover } from './axis_settings_popover'; import { FramePublicAPI, DatasourcePublicAPI } from '../../../types'; import { State, XYState, XYDataLayerConfig } from '../types'; @@ -254,12 +253,10 @@ describe('XY Config panels', () => { }); describe('Dimension Editor', () => { - const datatableUtilities = createDatatableUtilitiesMock(); - test('shows the correct axis side options when in horizontal mode', () => { const state = testState(); const component = mount( - { ...state, layers: [{ ...state.layers[0], seriesType: 'bar_horizontal' } as XYDataLayerConfig], }} - datatableUtilities={datatableUtilities} formatFactory={jest.fn()} paletteService={chartPluginMock.createPaletteRegistry()} panelRef={React.createRef()} @@ -290,14 +286,13 @@ describe('XY Config panels', () => { test('shows the default axis side options when not in horizontal mode', () => { const state = testState(); const component = mount( - { ], } as XYState; const component = mount( - { accessor="bar" groupId="left" state={state} - datatableUtilities={datatableUtilities} formatFactory={jest.fn()} paletteService={chartPluginMock.createPaletteRegistry()} panelRef={React.createRef()} @@ -376,7 +370,7 @@ describe('XY Config panels', () => { } as XYState; const component = mount( - { accessor="bar" groupId="left" state={state} - datatableUtilities={datatableUtilities} formatFactory={jest.fn()} paletteService={chartPluginMock.createPaletteRegistry()} panelRef={React.createRef()} @@ -422,7 +415,7 @@ describe('XY Config panels', () => { } as XYState; const component = mount( - { accessor="bar" groupId="left" state={state} - datatableUtilities={datatableUtilities} formatFactory={jest.fn()} paletteService={chartPluginMock.createPaletteRegistry()} panelRef={React.createRef()} diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.test.ts b/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.test.ts index 0007493f3b8eb..8417d02d79995 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.test.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.test.ts @@ -25,6 +25,7 @@ import { coreMock, themeServiceMock } from '@kbn/core/public/mocks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; +import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; jest.mock('../../id_generator'); @@ -38,6 +39,7 @@ const xyVisualization = getXyVisualization({ storage: {} as IStorageWrapper, data: dataPluginMock.createStartContract(), unifiedSearch: unifiedSearchPluginMock.createStartContract(), + dataViewsService: {} as DataViewsPublicPluginStart, }); describe('xy_suggestions', () => { diff --git a/x-pack/plugins/maps/public/render_app.tsx b/x-pack/plugins/maps/public/render_app.tsx index c4bddf5a71541..3897e38222eef 100644 --- a/x-pack/plugins/maps/public/render_app.tsx +++ b/x-pack/plugins/maps/public/render_app.tsx @@ -15,7 +15,7 @@ import { ExitFullScreenButtonKibanaProvider } from '@kbn/shared-ux-button-exit-f import { KibanaThemeProvider, toMountPoint } from '@kbn/kibana-react-plugin/public'; import { FormattedRelative } from '@kbn/i18n-react'; import type { SavedObjectTaggingPluginStart } from '@kbn/saved-objects-tagging-plugin/public'; -import { TableListViewKibanaProvider } from '@kbn/content-management-table-list'; +import { TableListViewKibanaProvider } from '@kbn/content-management-table-list-view-table'; import { getCoreChrome, getCoreI18n, diff --git a/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx b/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx index d98444057097d..93fc858f1c9d8 100644 --- a/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx +++ b/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx @@ -9,8 +9,8 @@ import React, { useCallback, memo, useEffect } from 'react'; import type { SavedObjectsFindOptionsReference, ScopedHistory } from '@kbn/core/public'; import { METRIC_TYPE } from '@kbn/analytics'; import { i18n } from '@kbn/i18n'; -import { TableListView } from '@kbn/content-management-table-list'; -import type { UserContentCommonSchema } from '@kbn/content-management-table-list'; +import { TableListView } from '@kbn/content-management-table-list-view'; +import type { UserContentCommonSchema } from '@kbn/content-management-table-list-view'; import type { MapItem } from '../../../common/content_management'; import { APP_ID, APP_NAME, getEditPath, MAP_PATH } from '../../../common/constants'; @@ -133,7 +133,7 @@ function MapsListViewComp({ history }: Props) { entityNamePlural={i18n.translate('xpack.maps.mapListing.entityNamePlural', { defaultMessage: 'maps', })} - tableListTitle={APP_NAME} + title={APP_NAME} onClickTitle={({ id }) => history.push(getEditPath(id))} /> ); diff --git a/x-pack/plugins/maps/tsconfig.json b/x-pack/plugins/maps/tsconfig.json index 6f24d4d7d3c5e..b0e27ee323dba 100644 --- a/x-pack/plugins/maps/tsconfig.json +++ b/x-pack/plugins/maps/tsconfig.json @@ -50,7 +50,6 @@ "@kbn/field-formats-plugin", "@kbn/shared-ux-button-exit-full-screen", "@kbn/i18n-react", - "@kbn/content-management-table-list", "@kbn/react-field", "@kbn/analytics", "@kbn/mapbox-gl", @@ -71,6 +70,8 @@ "@kbn/core-saved-objects-server", "@kbn/maps-vector-tile-utils", "@kbn/core-http-common", + "@kbn/content-management-table-list-view-table", + "@kbn/content-management-table-list-view", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 009cb044b4c3e..65e1cae7b8ec6 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -20922,7 +20922,6 @@ "xpack.lens.legacyUrlConflict.objectNoun": "Visualisation Lens", "xpack.lens.lensSavedObjectLabel": "Visualisation Lens", "xpack.lens.lineMarker.positionRequirementTooltip": "Vous devez sélectionner une icône ou afficher le nom pour pouvoir en modifier la position.", - "xpack.lens.lineMarker.textVisibility": "Décoration du texte", "xpack.lens.metric.addLayer": "Visualisation", "xpack.lens.metric.breakdownBy": "Répartir par", "xpack.lens.metric.color": "Couleur", @@ -21041,7 +21040,6 @@ "xpack.lens.pieChart.visualOptionsLabel": "Options visuelles", "xpack.lens.primaryMetric.headingLabel": "Valeur", "xpack.lens.primaryMetric.label": "Indicateur principal", - "xpack.lens.queryInput.appName": "Lens", "xpack.lens.reporting.shareContextMenu.csvReportsButtonLabel": "Téléchargement CSV", "xpack.lens.resetLayerAriaLabel": "Effacer le calque", "xpack.lens.saveDuplicateRejectedDescription": "La confirmation d'enregistrement avec un doublon de titre a été rejetée.", @@ -21157,22 +21155,7 @@ "xpack.lens.xyChart.addDataLayerLabel": "Visualisation", "xpack.lens.xyChart.addReferenceLineLayerLabel": "Lignes de référence", "xpack.lens.xyChart.addReferenceLineLayerLabelDisabledHelp": "Ajouter des données pour activer le calque de référence", - "xpack.lens.xyChart.annotation.hide": "Masquer l’annotation", - "xpack.lens.xyChart.annotation.manual": "Date statique", - "xpack.lens.xyChart.annotation.query": "Requête personnalisée", - "xpack.lens.xyChart.annotation.queryField": "Champ de date cible", - "xpack.lens.xyChart.annotation.queryInput": "Requête sur les annotations", - "xpack.lens.xyChart.annotation.tooltip": "Afficher les champs supplémentaires", - "xpack.lens.xyChart.annotation.tooltip.addField": "Ajouter un champ", - "xpack.lens.xyChart.annotation.tooltip.deleteButtonLabel": "Supprimer", - "xpack.lens.xyChart.annotation.tooltip.noFields": "Aucune sélection", - "xpack.lens.xyChart.annotationDate": "Date de l’annotation", - "xpack.lens.xyChart.annotationDate.from": "De", - "xpack.lens.xyChart.annotationDate.placementType": "Type de placement", - "xpack.lens.xyChart.annotationDate.to": "À", "xpack.lens.xyChart.annotationError.timeFieldEmpty": "Le champ temporel est manquant", - "xpack.lens.xyChart.appearance": "Apparence", - "xpack.lens.xyChart.applyAsRange": "Appliquer en tant que plage", "xpack.lens.xyChart.axisOrientation.angled": "En angle", "xpack.lens.xyChart.axisOrientation.horizontal": "Horizontal", "xpack.lens.xyChart.axisOrientation.label": "Orientation", @@ -21195,9 +21178,6 @@ "xpack.lens.xyChart.fill.label": "Remplir", "xpack.lens.xyChart.fill.none": "Aucun", "xpack.lens.xyChart.fillOpacityLabel": "Opacité de remplissage", - "xpack.lens.xyChart.fillStyle": "Remplir", - "xpack.lens.xyChart.fillStyle.inside": "Intérieur", - "xpack.lens.xyChart.fillStyle.outside": "Extérieur", "xpack.lens.xyChart.Gridlines": "Quadrillage", "xpack.lens.xyChart.horizontalAxisLabel": "Axe horizontal", "xpack.lens.xyChart.horizontalLeftAxisLabel": "Axe supérieur horizontal", @@ -21207,17 +21187,10 @@ "xpack.lens.xyChart.iconSelect.bellIconLabel": "Cloche", "xpack.lens.xyChart.iconSelect.boltIconLabel": "Éclair", "xpack.lens.xyChart.iconSelect.bugIconLabel": "Bug", - "xpack.lens.xyChart.iconSelect.circleIconLabel": "Cercle", "xpack.lens.xyChart.iconSelect.commentIconLabel": "Commentaire", "xpack.lens.xyChart.iconSelect.flagIconLabel": "Drapeau", - "xpack.lens.xyChart.iconSelect.heartLabel": "Cœur", - "xpack.lens.xyChart.iconSelect.mapMarkerLabel": "Repère", - "xpack.lens.xyChart.iconSelect.mapPinLabel": "Punaise", "xpack.lens.xyChart.iconSelect.noIconLabel": "Aucun", - "xpack.lens.xyChart.iconSelect.starFilledLabel": "Étoile remplie", - "xpack.lens.xyChart.iconSelect.starLabel": "Étoile", "xpack.lens.xyChart.iconSelect.tagIconLabel": "Balise", - "xpack.lens.xyChart.iconSelect.triangleIconLabel": "Triangle", "xpack.lens.xyChart.layerAnnotation": "Annotation", "xpack.lens.xyChart.layerAnnotationsIgnoreTitle": "Calques ignorant les filtres globaux", "xpack.lens.xyChart.layerAnnotationsLabel": "Annotations", @@ -21233,13 +21206,6 @@ "xpack.lens.xyChart.lineColor.label": "Couleur", "xpack.lens.xyChart.lineMarker.auto": "Auto", "xpack.lens.xyChart.lineMarker.position": "Position de la décoration", - "xpack.lens.xyChart.lineMarker.textVisibility.field": "Champ", - "xpack.lens.xyChart.lineMarker.textVisibility.name": "Nom", - "xpack.lens.xyChart.lineMarker.textVisibility.none": "Aucun", - "xpack.lens.xyChart.lineStyle.dashed": "Tirets", - "xpack.lens.xyChart.lineStyle.dotted": "Pointillé", - "xpack.lens.xyChart.lineStyle.label": "Ligne", - "xpack.lens.xyChart.lineStyle.solid": "Uni", "xpack.lens.xyChart.markerPosition.above": "Haut", "xpack.lens.xyChart.markerPosition.below": "Bas", "xpack.lens.xyChart.markerPosition.left": "Gauche", @@ -21248,7 +21214,6 @@ "xpack.lens.xyChart.missingValuesLabelHelpText": "Par défaut, les graphiques en aires et en courbes masquent les blancs entre les données. Pour remplir le blanc, effectuez une sélection.", "xpack.lens.xyChart.missingValuesStyle": "Afficher sous la forme d’une ligne pointillée", "xpack.lens.xyChart.nestUnderRoot": "Ensemble de données entier", - "xpack.lens.xyChart.placement": "Placement", "xpack.lens.xyChart.rightAxisDisabledHelpText": "Ce paramètre s'applique uniquement lorsque l'axe de droite est activé.", "xpack.lens.xyChart.rightAxisLabel": "Axe de droite", "xpack.lens.xyChart.scaleLinear": "Linéaire", @@ -21258,7 +21223,6 @@ "xpack.lens.xyChart.showCurrenTimeMarker": "Afficher le repère de temps actuel", "xpack.lens.xyChart.showEnzones": "Afficher les marqueurs de données partielles", "xpack.lens.xyChart.splitSeries": "Répartition", - "xpack.lens.xyChart.tooltip": "Infobulle", "xpack.lens.xyChart.topAxisDisabledHelpText": "Ce paramètre s'applique uniquement lorsque l'axe du haut est activé.", "xpack.lens.xyChart.topAxisLabel": "Axe du haut", "xpack.lens.xyChart.valuesHistogramDisabledHelpText": "Ce paramètre ne peut pas être modifié dans les histogrammes.", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 44eebedd74528..30ca83889d63f 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -20922,7 +20922,6 @@ "xpack.lens.legacyUrlConflict.objectNoun": "レンズビジュアライゼーション", "xpack.lens.lensSavedObjectLabel": "レンズビジュアライゼーション", "xpack.lens.lineMarker.positionRequirementTooltip": "位置を変更するには、アイコンを選択するか、名前を表示する必要があります", - "xpack.lens.lineMarker.textVisibility": "テキスト装飾", "xpack.lens.metric.addLayer": "ビジュアライゼーション", "xpack.lens.metric.breakdownBy": "内訳の基準", "xpack.lens.metric.color": "色", @@ -21041,7 +21040,6 @@ "xpack.lens.pieChart.visualOptionsLabel": "視覚オプション", "xpack.lens.primaryMetric.headingLabel": "値", "xpack.lens.primaryMetric.label": "主メトリック", - "xpack.lens.queryInput.appName": "レンズ", "xpack.lens.reporting.shareContextMenu.csvReportsButtonLabel": "CSVダウンロード", "xpack.lens.resetLayerAriaLabel": "レイヤーをクリア", "xpack.lens.saveDuplicateRejectedDescription": "重複ファイルの保存確認が拒否されました", @@ -21157,22 +21155,7 @@ "xpack.lens.xyChart.addDataLayerLabel": "ビジュアライゼーション", "xpack.lens.xyChart.addReferenceLineLayerLabel": "基準線", "xpack.lens.xyChart.addReferenceLineLayerLabelDisabledHelp": "一部のデータを追加して、基準レイヤーを有効にする", - "xpack.lens.xyChart.annotation.hide": "注釈を非表示", - "xpack.lens.xyChart.annotation.manual": "固定日付", - "xpack.lens.xyChart.annotation.query": "カスタムクエリ", - "xpack.lens.xyChart.annotation.queryField": "ターゲット日付フィールド", - "xpack.lens.xyChart.annotation.queryInput": "注釈クエリ", - "xpack.lens.xyChart.annotation.tooltip": "追加フィールドを表示", - "xpack.lens.xyChart.annotation.tooltip.addField": "フィールドの追加", - "xpack.lens.xyChart.annotation.tooltip.deleteButtonLabel": "削除", - "xpack.lens.xyChart.annotation.tooltip.noFields": "選択されていません", - "xpack.lens.xyChart.annotationDate": "注釈日", - "xpack.lens.xyChart.annotationDate.from": "開始:", - "xpack.lens.xyChart.annotationDate.placementType": "配置タイプ", - "xpack.lens.xyChart.annotationDate.to": "終了:", "xpack.lens.xyChart.annotationError.timeFieldEmpty": "時刻フィールドがありません", - "xpack.lens.xyChart.appearance": "見た目", - "xpack.lens.xyChart.applyAsRange": "範囲として適用", "xpack.lens.xyChart.axisOrientation.angled": "傾斜", "xpack.lens.xyChart.axisOrientation.horizontal": "横", "xpack.lens.xyChart.axisOrientation.label": "向き", @@ -21195,9 +21178,6 @@ "xpack.lens.xyChart.fill.label": "塗りつぶし", "xpack.lens.xyChart.fill.none": "なし", "xpack.lens.xyChart.fillOpacityLabel": "塗りつぶしの透明度", - "xpack.lens.xyChart.fillStyle": "塗りつぶし", - "xpack.lens.xyChart.fillStyle.inside": "内部", - "xpack.lens.xyChart.fillStyle.outside": "外側", "xpack.lens.xyChart.Gridlines": "グリッド線", "xpack.lens.xyChart.horizontalAxisLabel": "横軸", "xpack.lens.xyChart.horizontalLeftAxisLabel": "横上軸", @@ -21207,17 +21187,10 @@ "xpack.lens.xyChart.iconSelect.bellIconLabel": "ベル", "xpack.lens.xyChart.iconSelect.boltIconLabel": "ボルト", "xpack.lens.xyChart.iconSelect.bugIconLabel": "バグ", - "xpack.lens.xyChart.iconSelect.circleIconLabel": "円", "xpack.lens.xyChart.iconSelect.commentIconLabel": "コメント", "xpack.lens.xyChart.iconSelect.flagIconLabel": "旗", - "xpack.lens.xyChart.iconSelect.heartLabel": "ハート", - "xpack.lens.xyChart.iconSelect.mapMarkerLabel": "マップマーカー", - "xpack.lens.xyChart.iconSelect.mapPinLabel": "マップピン", "xpack.lens.xyChart.iconSelect.noIconLabel": "なし", - "xpack.lens.xyChart.iconSelect.starFilledLabel": "塗りつぶされた星", - "xpack.lens.xyChart.iconSelect.starLabel": "星", "xpack.lens.xyChart.iconSelect.tagIconLabel": "タグ", - "xpack.lens.xyChart.iconSelect.triangleIconLabel": "三角形", "xpack.lens.xyChart.layerAnnotation": "注釈", "xpack.lens.xyChart.layerAnnotationsIgnoreTitle": "グローバルフィルターを無視するレイヤー", "xpack.lens.xyChart.layerAnnotationsLabel": "注釈", @@ -21233,13 +21206,6 @@ "xpack.lens.xyChart.lineColor.label": "色", "xpack.lens.xyChart.lineMarker.auto": "自動", "xpack.lens.xyChart.lineMarker.position": "装飾位置", - "xpack.lens.xyChart.lineMarker.textVisibility.field": "フィールド", - "xpack.lens.xyChart.lineMarker.textVisibility.name": "名前", - "xpack.lens.xyChart.lineMarker.textVisibility.none": "なし", - "xpack.lens.xyChart.lineStyle.dashed": "鎖線", - "xpack.lens.xyChart.lineStyle.dotted": "点線", - "xpack.lens.xyChart.lineStyle.label": "折れ線", - "xpack.lens.xyChart.lineStyle.solid": "塗りつぶし", "xpack.lens.xyChart.markerPosition.above": "トップ", "xpack.lens.xyChart.markerPosition.below": "一番下", "xpack.lens.xyChart.markerPosition.left": "左", @@ -21248,7 +21214,6 @@ "xpack.lens.xyChart.missingValuesLabelHelpText": "デフォルトでは、面グラフと折れ線グラフはデータのギャップが非表示になります。ギャップを埋めるには、選択します。", "xpack.lens.xyChart.missingValuesStyle": "点線として表示", "xpack.lens.xyChart.nestUnderRoot": "データセット全体", - "xpack.lens.xyChart.placement": "配置", "xpack.lens.xyChart.rightAxisDisabledHelpText": "この設定は、右の軸が有効であるときにのみ適用されます。", "xpack.lens.xyChart.rightAxisLabel": "右の軸", "xpack.lens.xyChart.scaleLinear": "線形", @@ -21258,7 +21223,6 @@ "xpack.lens.xyChart.showCurrenTimeMarker": "現在時刻マーカーを表示", "xpack.lens.xyChart.showEnzones": "部分データマーカーを表示", "xpack.lens.xyChart.splitSeries": "内訳", - "xpack.lens.xyChart.tooltip": "ツールチップ", "xpack.lens.xyChart.topAxisDisabledHelpText": "この設定は、上の軸が有効であるときにのみ適用されます。", "xpack.lens.xyChart.topAxisLabel": "上の軸", "xpack.lens.xyChart.valuesHistogramDisabledHelpText": "この設定はヒストグラムで変更できません。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 73eb81fb3bc38..212f1bed8ff47 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -20922,7 +20922,6 @@ "xpack.lens.legacyUrlConflict.objectNoun": "Lens 可视化", "xpack.lens.lensSavedObjectLabel": "Lens 可视化", "xpack.lens.lineMarker.positionRequirementTooltip": "必须选择图标或显示名称才能更改其位置", - "xpack.lens.lineMarker.textVisibility": "文本装饰", "xpack.lens.metric.addLayer": "可视化", "xpack.lens.metric.breakdownBy": "细分方式", "xpack.lens.metric.color": "颜色", @@ -21041,7 +21040,6 @@ "xpack.lens.pieChart.visualOptionsLabel": "视觉选项", "xpack.lens.primaryMetric.headingLabel": "值", "xpack.lens.primaryMetric.label": "主要指标", - "xpack.lens.queryInput.appName": "Lens", "xpack.lens.reporting.shareContextMenu.csvReportsButtonLabel": "CSV 下载", "xpack.lens.resetLayerAriaLabel": "清除图层", "xpack.lens.saveDuplicateRejectedDescription": "已拒绝使用重复标题保存确认", @@ -21157,22 +21155,7 @@ "xpack.lens.xyChart.addDataLayerLabel": "可视化", "xpack.lens.xyChart.addReferenceLineLayerLabel": "参考线", "xpack.lens.xyChart.addReferenceLineLayerLabelDisabledHelp": "添加一些数据以启用参考图层", - "xpack.lens.xyChart.annotation.hide": "隐藏标注", - "xpack.lens.xyChart.annotation.manual": "静态日期", - "xpack.lens.xyChart.annotation.query": "定制查询", - "xpack.lens.xyChart.annotation.queryField": "目标日期字段", - "xpack.lens.xyChart.annotation.queryInput": "标注查询", - "xpack.lens.xyChart.annotation.tooltip": "显示其他字段", - "xpack.lens.xyChart.annotation.tooltip.addField": "添加字段", - "xpack.lens.xyChart.annotation.tooltip.deleteButtonLabel": "删除", - "xpack.lens.xyChart.annotation.tooltip.noFields": "未选择任何内容", - "xpack.lens.xyChart.annotationDate": "标注日期", - "xpack.lens.xyChart.annotationDate.from": "自", - "xpack.lens.xyChart.annotationDate.placementType": "位置类型", - "xpack.lens.xyChart.annotationDate.to": "至", "xpack.lens.xyChart.annotationError.timeFieldEmpty": "缺少时间字段", - "xpack.lens.xyChart.appearance": "外观", - "xpack.lens.xyChart.applyAsRange": "应用为范围", "xpack.lens.xyChart.axisOrientation.angled": "带角度", "xpack.lens.xyChart.axisOrientation.horizontal": "水平", "xpack.lens.xyChart.axisOrientation.label": "方向", @@ -21195,9 +21178,6 @@ "xpack.lens.xyChart.fill.label": "填充", "xpack.lens.xyChart.fill.none": "无", "xpack.lens.xyChart.fillOpacityLabel": "填充透明度", - "xpack.lens.xyChart.fillStyle": "填充", - "xpack.lens.xyChart.fillStyle.inside": "内部", - "xpack.lens.xyChart.fillStyle.outside": "外部", "xpack.lens.xyChart.Gridlines": "网格线", "xpack.lens.xyChart.horizontalAxisLabel": "水平轴", "xpack.lens.xyChart.horizontalLeftAxisLabel": "水平顶轴", @@ -21207,17 +21187,10 @@ "xpack.lens.xyChart.iconSelect.bellIconLabel": "钟铃", "xpack.lens.xyChart.iconSelect.boltIconLabel": "闪电", "xpack.lens.xyChart.iconSelect.bugIconLabel": "昆虫", - "xpack.lens.xyChart.iconSelect.circleIconLabel": "圆形", "xpack.lens.xyChart.iconSelect.commentIconLabel": "注释", "xpack.lens.xyChart.iconSelect.flagIconLabel": "旗帜", - "xpack.lens.xyChart.iconSelect.heartLabel": "心形", - "xpack.lens.xyChart.iconSelect.mapMarkerLabel": "地图标记", - "xpack.lens.xyChart.iconSelect.mapPinLabel": "地图图钉", "xpack.lens.xyChart.iconSelect.noIconLabel": "无", - "xpack.lens.xyChart.iconSelect.starFilledLabel": "星形填充", - "xpack.lens.xyChart.iconSelect.starLabel": "五角星", "xpack.lens.xyChart.iconSelect.tagIconLabel": "标签", - "xpack.lens.xyChart.iconSelect.triangleIconLabel": "三角形", "xpack.lens.xyChart.layerAnnotation": "标注", "xpack.lens.xyChart.layerAnnotationsIgnoreTitle": "忽略全局筛选的图层", "xpack.lens.xyChart.layerAnnotationsLabel": "标注", @@ -21233,13 +21206,6 @@ "xpack.lens.xyChart.lineColor.label": "颜色", "xpack.lens.xyChart.lineMarker.auto": "自动", "xpack.lens.xyChart.lineMarker.position": "装饰位置", - "xpack.lens.xyChart.lineMarker.textVisibility.field": "字段", - "xpack.lens.xyChart.lineMarker.textVisibility.name": "名称", - "xpack.lens.xyChart.lineMarker.textVisibility.none": "无", - "xpack.lens.xyChart.lineStyle.dashed": "虚线", - "xpack.lens.xyChart.lineStyle.dotted": "点线", - "xpack.lens.xyChart.lineStyle.label": "折线图", - "xpack.lens.xyChart.lineStyle.solid": "纯色", "xpack.lens.xyChart.markerPosition.above": "顶部", "xpack.lens.xyChart.markerPosition.below": "底部", "xpack.lens.xyChart.markerPosition.left": "左", @@ -21248,7 +21214,6 @@ "xpack.lens.xyChart.missingValuesLabelHelpText": "默认情况下,面积图和折线图会隐藏数据中的缺口。要填充缺口,请进行选择。", "xpack.lens.xyChart.missingValuesStyle": "显示为虚线", "xpack.lens.xyChart.nestUnderRoot": "整个数据集", - "xpack.lens.xyChart.placement": "位置", "xpack.lens.xyChart.rightAxisDisabledHelpText": "此设置仅在启用右轴时应用。", "xpack.lens.xyChart.rightAxisLabel": "右轴", "xpack.lens.xyChart.scaleLinear": "线性", @@ -21258,7 +21223,6 @@ "xpack.lens.xyChart.showCurrenTimeMarker": "显示当前时间标记", "xpack.lens.xyChart.showEnzones": "显示部分数据标记", "xpack.lens.xyChart.splitSeries": "细目", - "xpack.lens.xyChart.tooltip": "工具提示", "xpack.lens.xyChart.topAxisDisabledHelpText": "此设置仅在启用顶轴时应用。", "xpack.lens.xyChart.topAxisLabel": "顶轴", "xpack.lens.xyChart.valuesHistogramDisabledHelpText": "不能在直方图上更改此设置。", diff --git a/x-pack/test/functional/apps/lens/group6/annotations.ts b/x-pack/test/functional/apps/lens/group6/annotations.ts index 4bec636f52625..aa3b409d21fb0 100644 --- a/x-pack/test/functional/apps/lens/group6/annotations.ts +++ b/x-pack/test/functional/apps/lens/group6/annotations.ts @@ -22,6 +22,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const toastsService = getService('toasts'); const testSubjects = getService('testSubjects'); + const listingTable = getService('listingTable'); const from = 'Sep 19, 2015 @ 06:31:44.000'; const to = 'Sep 23, 2015 @ 18:31:44.000'; @@ -156,7 +157,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const toastContents = await toastsService.getToastContent(1); expect(toastContents).to.be( - `Saved "${ANNOTATION_GROUP_TITLE}"\nView or manage in the annotation library` + `Saved "${ANNOTATION_GROUP_TITLE}"\nView or manage in the annotation library.` ); await PageObjects.lens.save(FIRST_VIS_TITLE); @@ -181,15 +182,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should remove layer for deleted annotation group', async () => { - // TODO - delete from listing page instead - - await PageObjects.settings.navigateTo(); - await PageObjects.settings.clickKibanaSavedObjects(); - await PageObjects.savedObjects.searchForObject(ANNOTATION_GROUP_TITLE); - await PageObjects.savedObjects.clickCheckboxByTitle(ANNOTATION_GROUP_TITLE); - await PageObjects.savedObjects.clickDelete({ confirmDelete: true }); - await PageObjects.visualize.gotoVisualizationLandingPage(); + await PageObjects.visualize.selectAnnotationsTab(); + await listingTable.deleteItem(ANNOTATION_GROUP_TITLE); + await PageObjects.visualize.selectVisualizationsTab(); await PageObjects.visualize.loadSavedVisualization(FIRST_VIS_TITLE, { navigateToVisualize: false, }); diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index 7bbcc5dc73321..4370e7d143779 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -128,7 +128,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont extraFields?: string[]; }) { // type * in the query editor - const queryInput = await testSubjects.find('lnsXY-annotation-query-based-query-input'); + const queryInput = await testSubjects.find('annotation-query-based-query-input'); await queryInput.type(opts.queryString); await testSubjects.click('indexPattern-filters-existingFilterTrigger'); await this.selectOptionFromComboBox( @@ -773,7 +773,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont }, async editDimensionLabel(label: string) { - await testSubjects.setValue('column-label-edit', label, { clearWithKeyboard: true }); + await testSubjects.setValue('name-input', label, { clearWithKeyboard: true }); }, async editDimensionFormat(format: string, options?: { decimals?: number; prefix?: string }) { await this.selectOptionFromComboBox('indexPattern-dimension-format', format); diff --git a/yarn.lock b/yarn.lock index 365d7ef74d20e..0d175c93031de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3180,7 +3180,15 @@ version "0.0.0" uid "" -"@kbn/content-management-table-list@link:packages/content-management/table_list": +"@kbn/content-management-tabbed-table-list-view@link:packages/content-management/tabbed_table_list_view": + version "0.0.0" + uid "" + +"@kbn/content-management-table-list-view-table@link:packages/content-management/table_list_view_table": + version "0.0.0" + uid "" + +"@kbn/content-management-table-list-view@link:packages/content-management/table_list_view": version "0.0.0" uid "" From cabfebe5a55cdb1efa774f857993541074802152 Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Tue, 13 Jun 2023 19:24:58 -0700 Subject: [PATCH 05/89] [Serverless Chrome] Polish of home logo and project switcher (#158523) Closes https://github.com/elastic/kibana/issues/157810 Closes https://github.com/elastic/kibana/issues/158879 ## Summary 1. Moves the Logo icon out of the side nav and to the left of the breadcrumbs 1. Moves the project switcher from the right of the header to the just to the right of the logo 1. Removes the link to cloud from the side nav. Design is still TBD. 1. Adds new `serverless.setProjectHome` API since the home link is no longer in the side nav 1. Removes the `linkToCloud` prop from the Navigation component since design is still TBD. 1. Exposes the Global Search bar ### Checklist Delete any items that are not applicable to this PR. - [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 ### Screenshots **Default** Screenshot 2023-06-06 at 11 46 52 AM **Global search (not yet collapsed by default)** Screenshot 2023-06-06 at 11 46 37 AM **Collapsed side nav** image --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../src/chrome_service.tsx | 31 ++-- .../project_navigation_service.ts | 7 + .../core-chrome-browser-internal/src/types.ts | 22 ++- .../src/ui/project/header.tsx | 171 +++++++++++++++--- .../src/chrome_service.mock.ts | 1 + .../src/project_navigation.ts | 4 - packages/shared-ux/chrome/navigation/index.ts | 1 - .../chrome/navigation/mocks/src/jest.ts | 2 - .../chrome/navigation/mocks/src/storybook.ts | 4 - .../chrome/navigation/src/services.tsx | 1 - .../src/ui/components/cloud_link.tsx | 64 ------- .../navigation/src/ui/components/index.ts | 1 - .../src/ui/components/navigation.test.tsx | 67 ++----- .../src/ui/components/navigation.tsx | 18 +- .../src/ui/components/navigation_header.tsx | 61 ------- .../src/ui/components/navigation_ui.tsx | 18 +- .../src/ui/default_navigation.test.tsx | 84 +-------- .../navigation/src/ui/default_navigation.tsx | 18 +- .../chrome/navigation/src/ui/i18n_strings.ts | 18 -- .../chrome/navigation/src/ui/index.ts | 1 - .../navigation/src/ui/navigation.stories.tsx | 26 +-- .../chrome/navigation/src/ui/types.ts | 17 +- .../chrome/navigation/types/index.ts | 17 +- x-pack/plugins/serverless/public/mocks.ts | 3 +- x-pack/plugins/serverless/public/plugin.tsx | 26 +-- x-pack/plugins/serverless/public/types.ts | 11 +- x-pack/plugins/serverless/tsconfig.json | 1 + .../components/side_navigation/index.tsx | 7 +- .../serverless_observability/public/plugin.ts | 1 + .../serverless_search/public/layout/nav.tsx | 7 +- .../serverless_search/public/plugin.ts | 1 + .../serverless_security/public/plugin.ts | 1 + 32 files changed, 252 insertions(+), 460 deletions(-) delete mode 100644 packages/shared-ux/chrome/navigation/src/ui/components/cloud_link.tsx delete mode 100644 packages/shared-ux/chrome/navigation/src/ui/components/navigation_header.tsx diff --git a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx index 22f32f7960a37..ede90c7098b5f 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { BehaviorSubject, combineLatest, merge, type Observable, of, ReplaySubject } from 'rxjs'; -import { flatMap, map, takeUntil } from 'rxjs/operators'; +import { mergeMap, map, takeUntil } from 'rxjs/operators'; import { parse } from 'url'; import { EuiLink } from '@elastic/eui'; import useObservable from 'react-use/lib/useObservable'; @@ -89,7 +89,7 @@ export class ChromeService { // in the sense that the chrome UI should not be displayed until a non-chromeless app is mounting or mounted of(true), application.currentAppId$.pipe( - flatMap((appId) => + mergeMap((appId) => application.applications$.pipe( map((applications) => { return !!appId && applications.has(appId) && !!applications.get(appId)!.chromeless; @@ -177,25 +177,23 @@ export class ChromeService { chromeStyle$.next(style); }; - const setProjectSideNavComponent = (component: ISideNavComponent | null) => { + const validateChromeStyle = () => { const chromeStyle = chromeStyle$.getValue(); if (chromeStyle !== 'project') { // Helps ensure callers go through the serverless plugin to get here. throw new Error( - `Invalid ChromeStyle value of "${chromeStyle}". setProjectSideNavComponent requires ChromeStyle set to "project".` + `Invalid ChromeStyle value of "${chromeStyle}". This method requires ChromeStyle set to "project".` ); } + }; + + const setProjectSideNavComponent = (component: ISideNavComponent | null) => { + validateChromeStyle(); projectNavigation.setProjectSideNavComponent(component); }; const setProjectNavigation = (config: ChromeProjectNavigation) => { - const chromeStyle = chromeStyle$.getValue(); - if (chromeStyle !== 'project') { - // Helps ensure callers go through the serverless plugin to get here. - throw new Error( - `Invalid ChromeStyle value of "${chromeStyle}". setProjectNavigation requires ChromeStyle set to "project".` - ); - } + validateChromeStyle(); projectNavigation.setProjectNavigation(config); }; @@ -206,6 +204,11 @@ export class ChromeService { projectNavigation.setProjectBreadcrumbs(breadcrumbs, params); }; + const setProjectHome = (homeHref: string) => { + validateChromeStyle(); + projectNavigation.setProjectHome(homeHref); + }; + const isIE = () => { const ua = window.navigator.userAgent; const msie = ua.indexOf('MSIE '); // IE 10 or older @@ -288,9 +291,14 @@ export class ChromeService { breadcrumbs$={projectBreadcrumbs$.pipe(takeUntil(this.stop$))} helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))} helpSupportUrl$={helpSupportUrl$.pipe(takeUntil(this.stop$))} + navControlsLeft$={navControls.getLeft$()} + navControlsCenter$={navControls.getCenter$()} navControlsRight$={navControls.getRight$()} + loadingCount$={http.getLoadingCount$()} + homeHref$={projectNavigation.getProjectHome$()} kibanaDocLink={docLinks.links.kibana.guide} kibanaVersion={injectedMetadata.getKibanaVersion()} + prependBasePath={http.basePath.prepend} > {/* TODO: pass down the SideNavCompProps once they are defined */} @@ -405,6 +413,7 @@ export class ChromeService { setChromeStyle, getChromeStyle$: () => chromeStyle$.pipe(takeUntil(this.stop$)), project: { + setHome: setProjectHome, setNavigation: setProjectNavigation, setSideNavComponent: setProjectSideNavComponent, setBreadcrumbs: setProjectBreadcrumbs, diff --git a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts index 5398d09d132f3..ac6bf79e0ead9 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts @@ -26,6 +26,7 @@ export class ProjectNavigationService { private customProjectSideNavComponent$ = new BehaviorSubject<{ current: SideNavComponent | null; }>({ current: null }); + private projectHome$ = new BehaviorSubject(undefined); private projectNavigation$ = new BehaviorSubject(undefined); private projectBreadcrumbs$ = new BehaviorSubject<{ @@ -40,6 +41,12 @@ export class ProjectNavigationService { // 3. keep track of currently active link / path (path will be used to highlight the link in the sidenav and display part of the breadcrumbs) return { + setProjectHome: (homeHref: string) => { + this.projectHome$.next(homeHref); + }, + getProjectHome$: () => { + return this.projectHome$.asObservable(); + }, setProjectNavigation: (projectNavigation: ChromeProjectNavigation) => { this.projectNavigation$.next(projectNavigation); }, diff --git a/packages/core/chrome/core-chrome-browser-internal/src/types.ts b/packages/core/chrome/core-chrome-browser-internal/src/types.ts index 98f5ab672df94..427fb2c90d7e0 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/types.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/types.ts @@ -32,34 +32,42 @@ export interface InternalChromeStart extends ChromeStart { /** * Used only by the serverless plugin to customize project-style chrome. - * Use {@link ServerlessPluginStart.setSideNavComponent} to set serverless navigation. + * @internal */ project: { + /** + * Sets the project home href string. + * @param homeHref + * + * Use {@link ServerlessPluginStart.setProjectHome} to set project home. + */ + setHome(homeHref: string): void; + /** * Sets the project navigation config to be used for rendering project navigation. * It is used for default project sidenav, project breadcrumbs, tracking active deep link. * @param projectNavigation The project navigation config * - * @remarks Has no effect if the chrome style is not `project`. + * Use {@link ServerlessPluginStart.setNavigation} to set project navigation config. */ setNavigation(projectNavigation: ChromeProjectNavigation): void; /** * Set custom project sidenav component to be used instead of the default project sidenav. - * @param getter A function returning a CustomNavigationComponent. - * This component will receive Chrome navigation state as props (not yet implemented) + * @param component A getter function returning a CustomNavigationComponent. + * + * @remarks This component will receive Chrome navigation state as props (not yet implemented) * - * @remarks Has no effect if the chrome style is not `project`. + * Use {@link ServerlessPluginStart.setSideNavComponent} to set custom project navigation. */ setSideNavComponent(component: SideNavComponent | null): void; /** * Set project breadcrumbs - * * @param breadcrumbs * @param params.absolute If true, If true, the breadcrumbs will replace the defaults, otherwise they will be appended to the default ones. false by default. * - * @remarks Has no effect if the chrome style is not `project` or if setNavigation was not called + * Use {@link ServerlessPluginStart.setBreadcrumbs} to set project breadcrumbs. */ setBreadcrumbs( breadcrumbs: ChromeProjectBreadcrumb[] | ChromeProjectBreadcrumb, diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx index 9b7ad144055e7..195222cfbcbd6 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx @@ -6,76 +6,170 @@ * Side Public License, v 1. */ -import React, { createRef, useState } from 'react'; -import { Router } from 'react-router-dom'; import { EuiHeader, + EuiHeaderLink, EuiHeaderLogo, EuiHeaderSection, EuiHeaderSectionItem, EuiHeaderSectionItemButton, EuiIcon, + EuiLoadingSpinner, htmlIdGenerator, } from '@elastic/eui'; +import { css } from '@emotion/react'; +import type { InternalApplicationStart } from '@kbn/core-application-browser-internal'; import { ChromeBreadcrumb, ChromeGlobalHelpExtensionMenuLink, ChromeHelpExtension, ChromeNavControl, } from '@kbn/core-chrome-browser/src'; -import useLocalStorage from 'react-use/lib/useLocalStorage'; -import { i18n } from '@kbn/i18n'; -import { Observable } from 'rxjs'; +import type { HttpStart } from '@kbn/core-http-browser'; import { MountPoint } from '@kbn/core-mount-utils-browser'; -import { InternalApplicationStart } from '@kbn/core-application-browser-internal'; -import { HeaderBreadcrumbs } from '../header/header_breadcrumbs'; +import { i18n } from '@kbn/i18n'; +import React, { createRef, useState } from 'react'; +import { Router } from 'react-router-dom'; +import useLocalStorage from 'react-use/lib/useLocalStorage'; +import useObservable from 'react-use/lib/useObservable'; +import { Observable, debounceTime } from 'rxjs'; import { HeaderActionMenu, useHeaderActionMenuMounter } from '../header/header_action_menu'; +import { HeaderBreadcrumbs } from '../header/header_breadcrumbs'; import { HeaderHelpMenu } from '../header/header_help_menu'; import { HeaderNavControls } from '../header/header_nav_controls'; import { ProjectNavigation } from './navigation'; +const headerCss = { + logo: { + container: css` + display: inline-block; + min-width: 56px; /* 56 = 40 + 8 + 8 */ + padding: 0 8px; + cursor: pointer; + `, + logo: css` + min-width: 0; /* overrides min-width: 40px */ + padding: 0; + `, + spinner: css` + position: relative; + left: 4px; + top: 2px; + `, + }, + nav: { + toggleNavButton: css` + border-right: 1px solid #d3dae6; + margin-left: -1px; + `, + }, +}; + +const headerStrings = { + logo: { + ariaLabel: i18n.translate('core.ui.primaryNav.goToHome.ariaLabel', { + defaultMessage: 'Go to home page', + }), + }, + cloud: { + linkToDeployments: i18n.translate('core.ui.primaryNav.cloud.linkToDeployments', { + defaultMessage: 'My deployments', + }), + }, + nav: { + closeNavAriaLabel: i18n.translate('core.ui.primaryNav.toggleNavAriaLabel', { + defaultMessage: 'Toggle primary navigation', + }), + }, +}; + interface Props { breadcrumbs$: Observable; actionMenu$: Observable; kibanaDocLink: string; + children: React.ReactNode; globalHelpExtensionMenuLinks$: Observable; helpExtension$: Observable; helpSupportUrl$: Observable; + homeHref$: Observable; kibanaVersion: string; application: InternalApplicationStart; + loadingCount$: ReturnType; + navControlsLeft$: Observable; + navControlsCenter$: Observable; navControlsRight$: Observable; - children: React.ReactNode; + prependBasePath: (url: string) => string; } const LOCAL_STORAGE_IS_OPEN_KEY = 'PROJECT_NAVIGATION_OPEN' as const; +const LOADING_DEBOUNCE_TIME = 80; + +const Logo = ( + props: Pick +) => { + const loadingCount = useObservable( + props.loadingCount$.pipe(debounceTime(LOADING_DEBOUNCE_TIME)), + 0 + ); + + const homeHref = useObservable(props.homeHref$, '/app/home'); + const { logo } = headerCss; + + let fullHref: string | undefined; + if (homeHref) { + fullHref = props.prependBasePath(homeHref); + } + + const navigateHome = (event: React.MouseEvent) => { + if (fullHref) { + props.application.navigateToUrl(fullHref); + } + event.preventDefault(); + }; + + return ( + + {loadingCount === 0 ? ( + + ) : ( + + + + )} + + ); +}; export const ProjectHeader = ({ application, kibanaDocLink, kibanaVersion, children, + prependBasePath, ...observables }: Props) => { const [navId] = useState(htmlIdGenerator()()); const [isOpen, setIsOpen] = useLocalStorage(LOCAL_STORAGE_IS_OPEN_KEY, true); const toggleCollapsibleNavRef = createRef void }>(); - - const renderLogo = () => ( - e.preventDefault()} - aria-label="Go to home page" - /> - ); - const headerActionMenuMounter = useHeaderActionMenuMounter(observables.actionMenu$); return ( <> - + setIsOpen(!isOpen)} aria-expanded={isOpen!} aria-pressed={isOpen!} @@ -105,12 +197,37 @@ export const ProjectHeader = ({ - {renderLogo()} + + + + + + + + + + + + {headerStrings.cloud.linkToDeployments} + + + + + + + + + - - - - + {headerActionMenuMounter.mount && ( - {/* TODO: This puts a group of nav menu items on the right edge of the screen, - but it should be possible for apps customize the layout in a grid and use spacers between items. - https://github.com/elastic/kibana/issues/158034 */} diff --git a/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts b/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts index 4c2461510c669..68554c646cd99 100644 --- a/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts +++ b/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts @@ -64,6 +64,7 @@ const createStartContractMock = () => { getChromeStyle$: jest.fn(), setChromeStyle: jest.fn(), project: { + setHome: jest.fn(), setNavigation: jest.fn(), setSideNavComponent: jest.fn(), setBreadcrumbs: jest.fn(), diff --git a/packages/core/chrome/core-chrome-browser/src/project_navigation.ts b/packages/core/chrome/core-chrome-browser/src/project_navigation.ts index 64a95f565431c..00bdc67629b74 100644 --- a/packages/core/chrome/core-chrome-browser/src/project_navigation.ts +++ b/packages/core/chrome/core-chrome-browser/src/project_navigation.ts @@ -67,10 +67,6 @@ export interface ChromeProjectNavigationNode { /** @public */ export interface ChromeProjectNavigation { - /** - * The URL href for the home link - */ - homeRef: string; /** * The navigation tree representation of the side bar navigation. */ diff --git a/packages/shared-ux/chrome/navigation/index.ts b/packages/shared-ux/chrome/navigation/index.ts index 83c6a19688029..1bbb6c33a1482 100644 --- a/packages/shared-ux/chrome/navigation/index.ts +++ b/packages/shared-ux/chrome/navigation/index.ts @@ -11,7 +11,6 @@ export { NavigationKibanaProvider, NavigationProvider } from './src/services'; export { DefaultNavigation, getPresets, Navigation } from './src/ui'; export type { - CloudLinkDefinition, GroupDefinition, NavigationGroupPreset, NavigationTreeDefinition, diff --git a/packages/shared-ux/chrome/navigation/mocks/src/jest.ts b/packages/shared-ux/chrome/navigation/mocks/src/jest.ts index afaacdaeda62e..b41d324ab5b46 100644 --- a/packages/shared-ux/chrome/navigation/mocks/src/jest.ts +++ b/packages/shared-ux/chrome/navigation/mocks/src/jest.ts @@ -16,13 +16,11 @@ export const getServicesMock = ({ }: { navLinks?: ChromeNavLink[] } = {}): NavigationServices => { const navigateToUrl = jest.fn().mockResolvedValue(undefined); const basePath = { prepend: jest.fn((path: string) => `/base${path}`) }; - const loadingCount$ = new BehaviorSubject(0); const recentlyAccessed$ = new BehaviorSubject([]); const navLinks$ = new BehaviorSubject(navLinks); return { basePath, - loadingCount$, recentlyAccessed$, navLinks$, navIsOpen: true, diff --git a/packages/shared-ux/chrome/navigation/mocks/src/storybook.ts b/packages/shared-ux/chrome/navigation/mocks/src/storybook.ts index 9d660d923033b..28be60ca54538 100644 --- a/packages/shared-ux/chrome/navigation/mocks/src/storybook.ts +++ b/packages/shared-ux/chrome/navigation/mocks/src/storybook.ts @@ -15,7 +15,6 @@ type Arguments = ChromeNavigationViewModel & NavigationServices; export type Params = Pick< Arguments, | 'activeNavItemId' - | 'loadingCount$' | 'navIsOpen' | 'navigationTree' | 'platformConfig' @@ -51,7 +50,6 @@ export class StorybookMock extends AbstractStorybookMock< ...params, basePath: { prepend: (suffix: string) => `/basepath${suffix}` }, navigateToUrl, - loadingCount$: params.loadingCount$ ?? new BehaviorSubject(0), recentlyAccessed$: params.recentlyAccessed$ ?? new BehaviorSubject([]), navLinks$: params.navLinks$ ?? new BehaviorSubject([]), onProjectNavigationChange: params.onProjectNavigationChange ?? (() => undefined), @@ -61,8 +59,6 @@ export class StorybookMock extends AbstractStorybookMock< getProps(params: Params): ChromeNavigationViewModel { return { ...params, - homeHref: '#', - linkToCloud: 'projects', recentlyAccessedFilter: params.recentlyAccessedFilter, }; } diff --git a/packages/shared-ux/chrome/navigation/src/services.tsx b/packages/shared-ux/chrome/navigation/src/services.tsx index cd20965f6e3c8..655d37fc63c2c 100644 --- a/packages/shared-ux/chrome/navigation/src/services.tsx +++ b/packages/shared-ux/chrome/navigation/src/services.tsx @@ -32,7 +32,6 @@ export const NavigationKibanaProvider: FC = ({ const value: NavigationServices = { basePath, - loadingCount$: http.getLoadingCount$(), recentlyAccessed$: chrome.recentlyAccessed.get$(), navLinks$: chrome.navLinks.getNavLinks$(), navigateToUrl, diff --git a/packages/shared-ux/chrome/navigation/src/ui/components/cloud_link.tsx b/packages/shared-ux/chrome/navigation/src/ui/components/cloud_link.tsx deleted file mode 100644 index b71b949e47603..0000000000000 --- a/packages/shared-ux/chrome/navigation/src/ui/components/cloud_link.tsx +++ /dev/null @@ -1,64 +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 { EuiCollapsibleNavGroup, EuiLink } from '@elastic/eui'; -import React, { FC } from 'react'; -import { getI18nStrings } from '../i18n_strings'; - -const i18nTexts = getI18nStrings(); - -const presets = { - projects: { - href: 'https://cloud.elastic.co/projects', - icon: 'spaces', - title: i18nTexts.linkToCloudProjects, - dataTestSubj: 'nav-header-link-to-projects', - }, - deployments: { - href: 'https://cloud.elastic.co/deployments', - icon: 'spaces', - title: i18nTexts.linkToCloudDeployments, - dataTestSubj: 'nav-header-link-to-deployments', - }, -}; - -export interface Props { - /** Use one of the cloud link presets */ - preset?: 'projects' | 'deployments' | null; - /** Optional. If "preset" is not provided it is required */ - href?: string; - /** Optional. If "preset" is not provided it is required */ - icon?: string; - /** Optional. If "preset" is not provided it is required */ - title?: string; -} - -export const CloudLink: FC = ({ preset, href: _href, icon: _icon, title: _title }) => { - if (preset === null) { - return null; - } - - if (!preset && (!_href || !_icon || !_title)) { - throw new Error(`Navigation.CloudLink requires href, icon, and title`); - } - - const { href, icon, title, dataTestSubj } = - preset && presets[preset] - ? presets[preset]! - : { - href: _href, - icon: _icon, - title: _title, - dataTestSubj: 'nav-header-link-to-cloud', - }; - - return ( - - - - ); -}; diff --git a/packages/shared-ux/chrome/navigation/src/ui/components/index.ts b/packages/shared-ux/chrome/navigation/src/ui/components/index.ts index bb7aeacdfabb7..2174b35603525 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/components/index.ts +++ b/packages/shared-ux/chrome/navigation/src/ui/components/index.ts @@ -6,6 +6,5 @@ * Side Public License, v 1. */ -export type { Props as CloudLinkProps } from './cloud_link'; export { Navigation } from './navigation'; export type { Props as RecentlyAccessedProps } from './recently_accessed'; diff --git a/packages/shared-ux/chrome/navigation/src/ui/components/navigation.test.tsx b/packages/shared-ux/chrome/navigation/src/ui/components/navigation.test.tsx index 46a56dc4cc363..9860b8b231289 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/components/navigation.test.tsx +++ b/packages/shared-ux/chrome/navigation/src/ui/components/navigation.test.tsx @@ -6,11 +6,10 @@ * Side Public License, v 1. */ -import React from 'react'; -import { render } from '@testing-library/react'; -import { type Observable, of } from 'rxjs'; import type { ChromeNavLink } from '@kbn/core-chrome-browser'; - +import { render } from '@testing-library/react'; +import React from 'react'; +import { of, type Observable } from 'rxjs'; import { defaultAnalyticsNavGroup, defaultDevtoolsNavGroup, @@ -30,7 +29,7 @@ describe('', () => { const { findByTestId } = render( - + @@ -62,7 +61,6 @@ describe('', () => { const [navTree] = lastCall; expect(navTree).toEqual({ - homeRef: 'https://elastic.co', navigationTree: [ { id: 'group1', @@ -132,7 +130,7 @@ describe('', () => { navLinks$={navLinks$} onProjectNavigationChange={onProjectNavigationChange} > - + {/* Title from deeplink */} @@ -152,7 +150,6 @@ describe('', () => { const [navTree] = lastCall; expect(navTree).toEqual({ - homeRef: 'https://elastic.co', navigationTree: [ { id: 'root', @@ -225,7 +222,7 @@ describe('', () => { navLinks$={navLinks$} onProjectNavigationChange={onProjectNavigationChange} > - + {/* Title from deeplink */} @@ -247,7 +244,6 @@ describe('', () => { const [navTree] = lastCall; expect(navTree).toEqual({ - homeRef: 'https://elastic.co', navigationTree: [ { id: 'root', @@ -297,7 +293,7 @@ describe('', () => { navLinks$={navLinks$} onProjectNavigationChange={onProjectNavigationChange} > - + id="item1" link="notRegistered" /> @@ -310,8 +306,8 @@ describe('', () => { ); - expect(await queryByTestId('nav-group-root.group1')).toBeNull(); - expect(await queryByTestId('nav-item-root.group2.item1')).toBeVisible(); + expect(queryByTestId('nav-group-root.group1')).toBeNull(); + expect(queryByTestId('nav-item-root.group2.item1')).toBeVisible(); expect(onProjectNavigationChange).toHaveBeenCalled(); const lastCall = @@ -319,7 +315,6 @@ describe('', () => { const [navTree] = lastCall; expect(navTree).toEqual({ - homeRef: 'https://elastic.co', navigationTree: [ { id: 'root', @@ -375,7 +370,7 @@ describe('', () => { navLinks$={navLinks$} onProjectNavigationChange={onProjectNavigationChange} > - + link="item1"> @@ -392,9 +387,7 @@ describe('', () => { expect(await findByTestId('my-custom-element')).toBeVisible(); expect(await findByTestId('my-other-custom-element')).toBeVisible(); - expect(await (await findByTestId('my-other-custom-element')).textContent).toBe( - 'Children prop' - ); + expect((await findByTestId('my-other-custom-element')).textContent).toBe('Children prop'); expect(onProjectNavigationChange).toHaveBeenCalled(); const lastCall = @@ -402,7 +395,6 @@ describe('', () => { const [navTree] = lastCall; expect(navTree).toEqual({ - homeRef: 'https://elastic.co', navigationTree: [ { id: 'root', @@ -447,7 +439,7 @@ describe('', () => { render( - + @@ -462,7 +454,6 @@ describe('', () => { const [navTreeGenerated] = lastCall; expect(navTreeGenerated).toEqual({ - homeRef: 'https://elastic.co', navigationTree: expect.any(Array), }); @@ -479,31 +470,6 @@ describe('', () => { expect(navTreeGenerated.navigationTree[3]).toEqual(defaultManagementNavGroup); }); - test('should render cloud link', async () => { - const onProjectNavigationChange = jest.fn(); - - const { findByTestId } = render( - - - - - - - - - - - - ); - - expect(await findByTestId('nav-header-link-to-projects')).toBeVisible(); - expect(await findByTestId('nav-header-link-to-deployments')).toBeVisible(); - expect(await findByTestId('nav-header-link-to-cloud')).toBeVisible(); - expect(await (await findByTestId('nav-header-link-to-cloud')).textContent).toBe( - 'Custom link' - ); - }); - test('should render recently accessed items', async () => { const recentlyAccessed$ = of([ { label: 'This is an example', link: '/app/example/39859', id: '39850' }, @@ -512,7 +478,7 @@ describe('', () => { const { findByTestId } = render( - + @@ -523,7 +489,7 @@ describe('', () => { ); expect(await findByTestId('nav-bucket-recentlyAccessed')).toBeVisible(); - expect(await (await findByTestId('nav-bucket-recentlyAccessed')).textContent).toBe( + expect((await findByTestId('nav-bucket-recentlyAccessed')).textContent).toBe( 'RecentThis is an exampleAnother example' ); }); @@ -533,7 +499,7 @@ describe('', () => { render( - + @@ -547,7 +513,6 @@ describe('', () => { const [navTreeGenerated] = lastCall; expect(navTreeGenerated).toEqual({ - homeRef: 'https://elastic.co', navigationTree: [ { id: 'group1', @@ -579,7 +544,7 @@ describe('', () => { const expectToThrow = () => { render( - + diff --git a/packages/shared-ux/chrome/navigation/src/ui/components/navigation.tsx b/packages/shared-ux/chrome/navigation/src/ui/components/navigation.tsx index 6825c8a8084bf..073318df6f838 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/components/navigation.tsx +++ b/packages/shared-ux/chrome/navigation/src/ui/components/navigation.tsx @@ -20,7 +20,6 @@ import type { ChromeProjectNavigationNode } from '@kbn/core-chrome-browser'; import { useNavigation as useNavigationServices } from '../../services'; import { RegisterFunction, UnRegisterFunction } from '../types'; -import { CloudLink } from './cloud_link'; import { NavigationFooter } from './navigation_footer'; import { NavigationGroup } from './navigation_group'; import { NavigationItem } from './navigation_item'; @@ -44,10 +43,6 @@ const NavigationContext = createContext({ interface Props { children: ReactNode; - /** - * Href to the home page - */ - homeRef: string; /** * Flag to indicate if the Navigation should not be styled with EUI components. * If set to true, the children will be rendered as is. @@ -56,7 +51,7 @@ interface Props { dataTestSubj?: string; } -export function Navigation({ children, homeRef, unstyled = false, dataTestSubj }: Props) { +export function Navigation({ children, unstyled = false, dataTestSubj }: Props) { const { onProjectNavigationChange } = useNavigationServices(); // We keep a reference of the order of the children that register themselves when mounting. @@ -109,23 +104,17 @@ export function Navigation({ children, homeRef, unstyled = false, dataTestSubj } useEffect(() => { // This will update the navigation tree in the Chrome service (calling the serverless.setNavigation()) onProjectNavigationChange({ - homeRef, navigationTree: Object.values(navigationItems).sort((a, b) => { const aOrder = orderChildrenRef.current[a.id]; const bOrder = orderChildrenRef.current[b.id]; return aOrder - bOrder; }), }); - }, [navigationItems, onProjectNavigationChange, homeRef]); + }, [navigationItems, onProjectNavigationChange]); return ( - + {children} @@ -143,5 +132,4 @@ export function useNavigation() { Navigation.Group = NavigationGroup; Navigation.Item = NavigationItem; Navigation.Footer = NavigationFooter; -Navigation.CloudLink = CloudLink; Navigation.RecentlyAccessed = RecentlyAccessed; diff --git a/packages/shared-ux/chrome/navigation/src/ui/components/navigation_header.tsx b/packages/shared-ux/chrome/navigation/src/ui/components/navigation_header.tsx deleted file mode 100644 index 7895ca62e7a4b..0000000000000 --- a/packages/shared-ux/chrome/navigation/src/ui/components/navigation_header.tsx +++ /dev/null @@ -1,61 +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, { FC } from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiHeaderLogo, EuiLoadingSpinner } from '@elastic/eui'; -import useObservable from 'react-use/lib/useObservable'; -import { useNavigation as useServices } from '../../services'; -import { ElasticMark } from '../elastic_mark'; -import { getI18nStrings } from '../i18n_strings'; - -import '../header_logo.scss'; - -interface Props { - homeHref: string; -} - -export const NavHeader: FC = ({ homeHref }) => { - const strings = getI18nStrings(); - const { basePath, navigateToUrl, loadingCount$ } = useServices(); - const loadingCount = useObservable(loadingCount$, 0); - const homeUrl = basePath.prepend(homeHref); - - const navigateHome = (event: React.MouseEvent) => { - event.preventDefault(); - navigateToUrl(homeUrl); - }; - - const logo = - loadingCount === 0 ? ( - - ) : ( - - - - ); - - return ( - - {logo} - - - - - ); -}; diff --git a/packages/shared-ux/chrome/navigation/src/ui/components/navigation_ui.tsx b/packages/shared-ux/chrome/navigation/src/ui/components/navigation_ui.tsx index a0f48aef8a112..898a3b6829821 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/components/navigation_ui.tsx +++ b/packages/shared-ux/chrome/navigation/src/ui/components/navigation_ui.tsx @@ -6,32 +6,18 @@ * Side Public License, v 1. */ -import { EuiCollapsibleNavGroup, EuiFlexGroup, EuiFlexItem, useEuiTheme } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React, { FC } from 'react'; -import { NavHeader } from './navigation_header'; interface Props { - homeRef: string; unstyled?: boolean; footerChildren?: React.ReactNode; dataTestSubj?: string; } -export const NavigationUI: FC = ({ - children, - unstyled, - footerChildren, - homeRef, - dataTestSubj, -}) => { - const { euiTheme } = useEuiTheme(); - +export const NavigationUI: FC = ({ children, unstyled, footerChildren, dataTestSubj }) => { return ( <> - - - - {unstyled ? ( <>{children} ) : ( diff --git a/packages/shared-ux/chrome/navigation/src/ui/default_navigation.test.tsx b/packages/shared-ux/chrome/navigation/src/ui/default_navigation.test.tsx index 91e3ed5ca28e3..4ad3dc75a9d93 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/default_navigation.test.tsx +++ b/packages/shared-ux/chrome/navigation/src/ui/default_navigation.test.tsx @@ -23,10 +23,6 @@ import { } from '../../mocks/src/default_navigation.test.helpers'; import { navLinksMock } from '../../mocks/src/navlinks'; -const defaultProps = { - homeRef: 'https://elastic.co', -}; - describe('', () => { const services = getServicesMock(); @@ -77,12 +73,7 @@ describe('', () => { const { findByTestId } = render( - + ); @@ -103,7 +94,6 @@ describe('', () => { const [navTreeGenerated] = lastCall; expect(navTreeGenerated).toEqual({ - homeRef: 'https://elastic.co', navigationTree: [ { id: 'group1', @@ -202,12 +192,7 @@ describe('', () => { navLinks$={navLinks$} onProjectNavigationChange={onProjectNavigationChange} > - + ); @@ -217,7 +202,6 @@ describe('', () => { const [navTreeGenerated] = lastCall; expect(navTreeGenerated).toEqual({ - homeRef: 'https://elastic.co', navigationTree: [ { id: 'root', @@ -285,12 +269,7 @@ describe('', () => { render( - + ); @@ -300,7 +279,6 @@ describe('', () => { const [navTreeGenerated] = lastCall; expect(navTreeGenerated).toEqual({ - homeRef: 'https://elastic.co', navigationTree: [ { id: 'root', @@ -358,12 +336,7 @@ describe('', () => { const expectToThrow = () => { render( - + ); }; @@ -374,43 +347,6 @@ describe('', () => { console.error.mockRestore(); }); - test('should render cloud link', async () => { - const navigationBody: RootNavigationItemDefinition[] = [ - { - type: 'cloudLink', - preset: 'deployments', - }, - { - type: 'cloudLink', - preset: 'projects', - }, - { - type: 'cloudLink', - href: 'https://foo.com', - icon: 'myIcon', - title: 'Custom link', - }, - ]; - - const { findByTestId } = render( - - - - ); - - expect(await findByTestId('nav-header-link-to-projects')).toBeVisible(); - expect(await findByTestId('nav-header-link-to-deployments')).toBeVisible(); - expect(await findByTestId('nav-header-link-to-cloud')).toBeVisible(); - expect(await (await findByTestId('nav-header-link-to-cloud')).textContent).toBe( - 'Custom link' - ); - }); - test('should render recently accessed items', async () => { const recentlyAccessed$ = of([ { label: 'This is an example', link: '/app/example/39859', id: '39850' }, @@ -425,17 +361,12 @@ describe('', () => { const { findByTestId } = render( - + ); expect(await findByTestId('nav-bucket-recentlyAccessed')).toBeVisible(); - expect(await (await findByTestId('nav-bucket-recentlyAccessed')).textContent).toBe( + expect((await findByTestId('nav-bucket-recentlyAccessed')).textContent).toBe( 'RecentThis is an exampleAnother example' ); }); @@ -489,7 +420,7 @@ describe('', () => { navLinks$={navLinks$} onProjectNavigationChange={onProjectNavigationChange} > - + ); @@ -499,7 +430,6 @@ describe('', () => { const [navTreeGenerated] = lastCall; expect(navTreeGenerated).toEqual({ - homeRef: 'https://elastic.co', navigationTree: expect.any(Array), }); diff --git a/packages/shared-ux/chrome/navigation/src/ui/default_navigation.tsx b/packages/shared-ux/chrome/navigation/src/ui/default_navigation.tsx index 6f179c9ff821d..a42ef5b802e6c 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/default_navigation.tsx +++ b/packages/shared-ux/chrome/navigation/src/ui/default_navigation.tsx @@ -18,7 +18,6 @@ import type { ProjectNavigationTreeDefinition, RootNavigationItemDefinition, } from './types'; -import { CloudLink } from './components/cloud_link'; import { RecentlyAccessed } from './components/recently_accessed'; import { NavigationFooter } from './components/navigation_footer'; import { getPresets } from './nav_tree_presets'; @@ -39,10 +38,6 @@ const getDefaultNavigationTree = ( ): NavigationTreeDefinition => { return { body: [ - { - type: 'cloudLink', - preset: 'deployments', - }, { type: 'recentlyAccessed', }, @@ -72,7 +67,6 @@ const getDefaultNavigationTree = ( let idCounter = 0; export const DefaultNavigation: FC = ({ - homeRef, projectNavigationTree, navigationTree, dataTestSubj, @@ -92,14 +86,8 @@ export const DefaultNavigation: FC { return items.map((item) => { const isRootNavigationItem = isRootNavigationItemDefinition(item); - if (isRootNavigationItem) { - if (item.type === 'cloudLink') { - return ; - } - - if (item.type === 'recentlyAccessed') { - return ; - } + if (isRootNavigationItem && item.type === 'recentlyAccessed') { + return ; } if (item.preset) { @@ -134,7 +122,7 @@ export const DefaultNavigation: FC + <> {renderItems(navigationDefinition.body)} {navigationDefinition.footer && ( diff --git a/packages/shared-ux/chrome/navigation/src/ui/i18n_strings.ts b/packages/shared-ux/chrome/navigation/src/ui/i18n_strings.ts index c268e7a42de10..0167ffd0ea7ee 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/i18n_strings.ts +++ b/packages/shared-ux/chrome/navigation/src/ui/i18n_strings.ts @@ -9,24 +9,6 @@ import { i18n } from '@kbn/i18n'; export const getI18nStrings = () => ({ - headerLogoAriaLabel: i18n.translate( - 'sharedUXPackages.chrome.sideNavigation.headerLogo.ariaLabel', - { - defaultMessage: 'Go to home page', - } - ), - linkToCloudProjects: i18n.translate( - 'sharedUXPackages.chrome.sideNavigation.linkToCloud.projects', - { - defaultMessage: 'My projects', - } - ), - linkToCloudDeployments: i18n.translate( - 'sharedUXPackages.chrome.sideNavigation.linkToCloud.deployments', - { - defaultMessage: 'My deployments', - } - ), recentlyAccessed: i18n.translate( 'sharedUXPackages.chrome.sideNavigation.recentlyAccessed.title', { diff --git a/packages/shared-ux/chrome/navigation/src/ui/index.ts b/packages/shared-ux/chrome/navigation/src/ui/index.ts index 7bb534a32a8c0..1335a1844f45c 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/index.ts +++ b/packages/shared-ux/chrome/navigation/src/ui/index.ts @@ -13,7 +13,6 @@ export { DefaultNavigation } from './default_navigation'; export { getPresets } from './nav_tree_presets'; export type { - CloudLinkDefinition, GroupDefinition, NavigationGroupPreset, NavigationTreeDefinition, diff --git a/packages/shared-ux/chrome/navigation/src/ui/navigation.stories.tsx b/packages/shared-ux/chrome/navigation/src/ui/navigation.stories.tsx index 21b59cf7521f6..1de6bb828c138 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/navigation.stories.tsx +++ b/packages/shared-ux/chrome/navigation/src/ui/navigation.stories.tsx @@ -115,7 +115,6 @@ const deepLinks: ChromeNavLink[] = [ ]; const simpleNavigationDefinition: ProjectNavigationDefinition = { - homeRef: 'https://elastic.co', projectNavigationTree: [ { id: 'example_projet', @@ -195,13 +194,8 @@ export const SimpleObjectDefinition = (args: ChromeNavigationViewModel & Navigat }; const navigationDefinition: ProjectNavigationDefinition = { - homeRef: 'https://elastic.co', navigationTree: { body: [ - { - type: 'cloudLink', - preset: 'deployments', - }, // My custom project { type: 'navGroup', @@ -330,9 +324,7 @@ export const WithUIComponents = (args: ChromeNavigationViewModel & NavigationSer return ( - - - + { +export const MinimalUI = (args: ChromeNavigationViewModel & NavigationServices) => { const services = storybookMock.getServices({ ...args, navLinks$: of([...navLinksMock, ...deepLinks]), @@ -398,13 +388,7 @@ export const MinimalUIAndCustomCloudLink = ( return ( - - - + - + - - diff --git a/packages/shared-ux/chrome/navigation/src/ui/types.ts b/packages/shared-ux/chrome/navigation/src/ui/types.ts index 1d479bfafd43d..91f37e8d3c63d 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/types.ts +++ b/packages/shared-ux/chrome/navigation/src/ui/types.ts @@ -13,7 +13,7 @@ import type { NodeDefinition, } from '@kbn/core-chrome-browser'; -import type { CloudLinkProps, RecentlyAccessedProps } from './components'; +import type { RecentlyAccessedProps } from './components'; export type NonEmptyArray = [T, ...T[]]; @@ -75,15 +75,6 @@ export interface RecentlyAccessedDefinition extends RecentlyAccessedProps { type: 'recentlyAccessed'; } -/** - * @public - * - * A cloud link root item definition. Use it to add one or more links to the Cloud console - */ -export interface CloudLinkDefinition extends CloudLinkProps { - type: 'cloudLink'; -} - /** * @public * @@ -109,7 +100,7 @@ export type RootNavigationItemDefinition< LinkId extends AppDeepLinkId = AppDeepLinkId, Id extends string = string, ChildrenId extends string = Id -> = RecentlyAccessedDefinition | CloudLinkDefinition | GroupDefinition; +> = RecentlyAccessedDefinition | GroupDefinition; export type ProjectNavigationTreeDefinition< LinkId extends AppDeepLinkId = AppDeepLinkId, @@ -142,10 +133,6 @@ export interface NavigationTreeDefinition { * or when calling `setNavigation()` on the serverless plugin. */ export interface ProjectNavigationDefinition { - /** - * The URL href for the home link - */ - homeRef: string; /** * A navigation tree structure with object items containing labels, links, and sub-items * for a project. Use it if you only need to configure your project navigation and leave diff --git a/packages/shared-ux/chrome/navigation/types/index.ts b/packages/shared-ux/chrome/navigation/types/index.ts index 0a850121430d0..e262b61d13622 100644 --- a/packages/shared-ux/chrome/navigation/types/index.ts +++ b/packages/shared-ux/chrome/navigation/types/index.ts @@ -19,7 +19,6 @@ import type { BasePathService, NavigateToUrlFn, RecentItem } from './internal'; export interface NavigationServices { activeNavItemId?: string; basePath: BasePathService; - loadingCount$: Observable; recentlyAccessed$: Observable; navLinks$: Observable>; navIsOpen: boolean; @@ -55,7 +54,7 @@ export interface NavigationKibanaDependencies { export type ChromeNavigationLink = string; /** - * Chrome navigatioin node definition. + * Chrome navigation node definition. * * @public */ @@ -97,14 +96,6 @@ export interface ChromeNavigationNodeViewModel extends Omit { - /** - * Target for the logo icon - */ - homeHref: string; + extends Pick { /** * The navigation tree definition */ diff --git a/x-pack/plugins/serverless/public/mocks.ts b/x-pack/plugins/serverless/public/mocks.ts index d23bc823c0182..ffe61c833e6dc 100644 --- a/x-pack/plugins/serverless/public/mocks.ts +++ b/x-pack/plugins/serverless/public/mocks.ts @@ -8,9 +8,10 @@ import { ServerlessPluginStart } from './types'; const startMock = (): ServerlessPluginStart => ({ - setSideNavComponent: jest.fn(), setNavigation: jest.fn(), setBreadcrumbs: jest.fn(), + setProjectHome: jest.fn(), + setSideNavComponent: jest.fn(), }); export const serverlessMock = { diff --git a/x-pack/plugins/serverless/public/plugin.tsx b/x-pack/plugins/serverless/public/plugin.tsx index e015633a2f99e..73f199eb3c468 100644 --- a/x-pack/plugins/serverless/public/plugin.tsx +++ b/x-pack/plugins/serverless/public/plugin.tsx @@ -7,6 +7,7 @@ import { InternalChromeStart } from '@kbn/core-chrome-browser-internal'; import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/public'; +import { I18nProvider } from '@kbn/i18n-react'; import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import { ProjectSwitcher, ProjectSwitcherKibanaProvider } from '@kbn/serverless-project-switcher'; import { ProjectType } from '@kbn/serverless-types'; @@ -61,14 +62,15 @@ export class ServerlessPlugin core.chrome.setChromeStyle('project'); management.setIsSidebarEnabled(false); + // Casting the "chrome.projects" service to an "internal" type: this is intentional to obscure the property from Typescript. + const { project } = core.chrome as InternalChromeStart; + return { - // Casting the "chrome.projects" service to an "internal" type: this is intentional to obscure the property from Typescript. setSideNavComponent: (sideNavigationComponent) => - (core.chrome as InternalChromeStart).project.setSideNavComponent(sideNavigationComponent), - setNavigation: (projectNavigation) => - (core.chrome as InternalChromeStart).project.setNavigation(projectNavigation), - setBreadcrumbs: (breadcrumbs, params) => - (core.chrome as InternalChromeStart).project.setBreadcrumbs(breadcrumbs, params), + project.setSideNavComponent(sideNavigationComponent), + setNavigation: (projectNavigation) => project.setNavigation(projectNavigation), + setBreadcrumbs: (breadcrumbs, params) => project.setBreadcrumbs(breadcrumbs, params), + setProjectHome: (homeHref: string) => project.setHome(homeHref), }; } @@ -80,11 +82,13 @@ export class ServerlessPlugin currentProjectType: ProjectType ) { ReactDOM.render( - - - - - , + + + + + + + , targetDomElement ); diff --git a/x-pack/plugins/serverless/public/types.ts b/x-pack/plugins/serverless/public/types.ts index 8efad28215d49..8e9e8672f7e69 100644 --- a/x-pack/plugins/serverless/public/types.ts +++ b/x-pack/plugins/serverless/public/types.ts @@ -5,24 +5,25 @@ * 2.0. */ -import type { ManagementSetup, ManagementStart } from '@kbn/management-plugin/public'; import type { - SideNavComponent, - ChromeProjectNavigation, ChromeProjectBreadcrumb, + ChromeProjectNavigation, ChromeSetProjectBreadcrumbsParams, + SideNavComponent, } from '@kbn/core-chrome-browser'; +import type { ManagementSetup, ManagementStart } from '@kbn/management-plugin/public'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface ServerlessPluginSetup {} export interface ServerlessPluginStart { - setSideNavComponent: (navigation: SideNavComponent) => void; - setNavigation(projectNavigation: ChromeProjectNavigation): void; setBreadcrumbs: ( breadcrumbs: ChromeProjectBreadcrumb | ChromeProjectBreadcrumb[], params?: Partial ) => void; + setNavigation(projectNavigation: ChromeProjectNavigation): void; + setProjectHome(homeHref: string): void; + setSideNavComponent: (navigation: SideNavComponent) => void; } export interface ServerlessPluginSetupDependencies { diff --git a/x-pack/plugins/serverless/tsconfig.json b/x-pack/plugins/serverless/tsconfig.json index 52919a26a652f..c4cf602f928c7 100644 --- a/x-pack/plugins/serverless/tsconfig.json +++ b/x-pack/plugins/serverless/tsconfig.json @@ -23,5 +23,6 @@ "@kbn/utils", "@kbn/core-chrome-browser", "@kbn/core-chrome-browser-internal", + "@kbn/i18n-react", ] } diff --git a/x-pack/plugins/serverless_observability/public/components/side_navigation/index.tsx b/x-pack/plugins/serverless_observability/public/components/side_navigation/index.tsx index 6f577fa904e7a..ea24b44cbd960 100644 --- a/x-pack/plugins/serverless_observability/public/components/side_navigation/index.tsx +++ b/x-pack/plugins/serverless_observability/public/components/side_navigation/index.tsx @@ -18,7 +18,6 @@ import { i18n } from '@kbn/i18n'; const navigationTree: NavigationTreeDefinition = { body: [ - { type: 'cloudLink', preset: 'projects' }, { type: 'recentlyAccessed' }, { type: 'navGroup', @@ -119,11 +118,7 @@ export const getObservabilitySideNavComponent = () => { return ( - + ); }; diff --git a/x-pack/plugins/serverless_observability/public/plugin.ts b/x-pack/plugins/serverless_observability/public/plugin.ts index 56304cfdb623d..ee774980f7c29 100644 --- a/x-pack/plugins/serverless_observability/public/plugin.ts +++ b/x-pack/plugins/serverless_observability/public/plugin.ts @@ -30,6 +30,7 @@ export class ServerlessObservabilityPlugin ): ServerlessObservabilityPluginStart { const { observabilityShared, serverless } = setupDeps; observabilityShared.setIsSidebarEnabled(false); + serverless.setProjectHome('/app/observability/landing'); serverless.setSideNavComponent(getObservabilitySideNavComponent(core, { serverless })); return {}; } diff --git a/x-pack/plugins/serverless_search/public/layout/nav.tsx b/x-pack/plugins/serverless_search/public/layout/nav.tsx index adbb0e0e5a414..aa114e609152e 100644 --- a/x-pack/plugins/serverless_search/public/layout/nav.tsx +++ b/x-pack/plugins/serverless_search/public/layout/nav.tsx @@ -18,7 +18,6 @@ import { ServerlessPluginStart } from '@kbn/serverless/public'; const navigationTree: NavigationTreeDefinition = { body: [ - { type: 'cloudLink', preset: 'projects' }, { type: 'recentlyAccessed' }, { type: 'navGroup', @@ -109,11 +108,7 @@ export const createServerlessSearchSideNavComponent = () => { return ( - + ); }; diff --git a/x-pack/plugins/serverless_search/public/plugin.ts b/x-pack/plugins/serverless_search/public/plugin.ts index 18644b72f426c..69de4a01ecbdd 100644 --- a/x-pack/plugins/serverless_search/public/plugin.ts +++ b/x-pack/plugins/serverless_search/public/plugin.ts @@ -50,6 +50,7 @@ export class ServerlessSearchPlugin core: CoreStart, { serverless }: ServerlessSearchPluginStartDependencies ): ServerlessSearchPluginStart { + serverless.setProjectHome('/app/elasticsearch'); serverless.setSideNavComponent(createComponent(core, { serverless })); return {}; } diff --git a/x-pack/plugins/serverless_security/public/plugin.ts b/x-pack/plugins/serverless_security/public/plugin.ts index 2c181a2fe3354..f0729330de4af 100644 --- a/x-pack/plugins/serverless_security/public/plugin.ts +++ b/x-pack/plugins/serverless_security/public/plugin.ts @@ -49,6 +49,7 @@ export class ServerlessSecurityPlugin securitySolution.setIsSidebarEnabled(false); securitySolution.setGetStartedPage(getSecurityGetStartedComponent(core, startDeps)); + serverless.setProjectHome('/app/security'); serverless.setSideNavComponent(getSecuritySideNavComponent(core, startDeps)); return {}; From 73a540ffd3c37a61bc59b295a0bab5c89a9f85ab Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 14 Jun 2023 00:52:59 -0400 Subject: [PATCH 06/89] [api-docs] 2023-06-14 Daily api_docs build (#159643) Generated by https://buildkite.com/elastic/kibana-api-docs-daily/builds/368 --- api_docs/actions.mdx | 2 +- api_docs/advanced_settings.mdx | 2 +- api_docs/aiops.devdocs.json | 56 + api_docs/aiops.mdx | 4 +- api_docs/alerting.devdocs.json | 108 ++ api_docs/alerting.mdx | 4 +- 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.devdocs.json | 6 +- api_docs/cases.mdx | 2 +- api_docs/charts.mdx | 2 +- api_docs/cloud.devdocs.json | 216 +++- api_docs/cloud.mdx | 4 +- api_docs/cloud_chat.devdocs.json | 31 +- api_docs/cloud_chat.mdx | 7 +- api_docs/cloud_chat_provider.devdocs.json | 103 ++ api_docs/cloud_chat_provider.mdx | 33 + api_docs/cloud_data_migration.mdx | 2 +- api_docs/cloud_defend.devdocs.json | 249 +++- api_docs/cloud_defend.mdx | 15 +- 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.devdocs.json | 32 +- 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.devdocs.json | 48 +- api_docs/data_views.mdx | 2 +- api_docs/data_visualizer.mdx | 2 +- api_docs/deprecations_by_api.mdx | 21 +- api_docs/deprecations_by_plugin.mdx | 37 +- 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/ess_security.mdx | 2 +- api_docs/event_annotation.devdocs.json | 496 +++++++- api_docs/event_annotation.mdx | 4 +- api_docs/event_log.mdx | 2 +- api_docs/exploratory_view.devdocs.json | 14 +- 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.devdocs.json | 46 +- api_docs/fleet.mdx | 4 +- 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_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 +- ...gement_tabbed_table_list_view.devdocs.json | 247 ++++ ...tent_management_tabbed_table_list_view.mdx | 36 + ...content_management_table_list.devdocs.json | 438 ------- ...nt_management_table_list_view.devdocs.json | 185 +++ ...bn_content_management_table_list_view.mdx} | 22 +- ...agement_table_list_view_table.devdocs.json | 1050 +++++++++++++++++ ...ntent_management_table_list_view_table.mdx | 36 + 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 +- .../kbn_core_application_browser.devdocs.json | 12 +- 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.devdocs.json | 263 ++++- api_docs/kbn_core_chrome_browser.mdx | 4 +- 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 | 104 +- api_docs/kbn_core_http_server.mdx | 2 +- ...kbn_core_http_server_internal.devdocs.json | 16 +- api_docs/kbn_core_http_server_internal.mdx | 4 +- .../kbn_core_http_server_mocks.devdocs.json | 72 ++ api_docs/kbn_core_http_server_mocks.mdx | 4 +- 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 +- .../kbn_core_lifecycle_browser.devdocs.json | 16 +- 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 +- ...ore_saved_objects_api_browser.devdocs.json | 48 + .../kbn_core_saved_objects_api_browser.mdx | 2 +- .../kbn_core_saved_objects_api_server.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 +- ...kbn_core_saved_objects_common.devdocs.json | 64 +- 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_deeplinks_analytics.devdocs.json | 103 ++ api_docs/kbn_deeplinks_analytics.mdx | 30 + api_docs/kbn_deeplinks_devtools.devdocs.json | 110 ++ api_docs/kbn_deeplinks_devtools.mdx | 30 + .../kbn_deeplinks_management.devdocs.json | 90 ++ api_docs/kbn_deeplinks_management.mdx | 30 + api_docs/kbn_deeplinks_ml.devdocs.json | 73 ++ api_docs/kbn_deeplinks_ml.mdx | 30 + .../kbn_deeplinks_observability.devdocs.json | 80 ++ api_docs/kbn_deeplinks_observability.mdx | 30 + api_docs/kbn_deeplinks_search.devdocs.json | 73 ++ api_docs/kbn_deeplinks_search.mdx | 30 + .../kbn_default_nav_analytics.devdocs.json | 189 +++ api_docs/kbn_default_nav_analytics.mdx | 33 + .../kbn_default_nav_devtools.devdocs.json | 189 +++ api_docs/kbn_default_nav_devtools.mdx | 33 + .../kbn_default_nav_management.devdocs.json | 189 +++ api_docs/kbn_default_nav_management.mdx | 33 + api_docs/kbn_default_nav_ml.devdocs.json | 189 +++ api_docs/kbn_default_nav_ml.mdx | 33 + 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_elastic_assistant.devdocs.json | 117 +- api_docs/kbn_elastic_assistant.mdx | 4 +- 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_infra_forge.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_maps_vector_tile_utils.mdx | 2 +- api_docs/kbn_ml_agg_utils.mdx | 2 +- api_docs/kbn_ml_anomaly_utils.mdx | 2 +- .../kbn_ml_data_frame_analytics_utils.mdx | 2 +- api_docs/kbn_ml_data_grid.mdx | 2 +- api_docs/kbn_ml_date_picker.mdx | 2 +- api_docs/kbn_ml_date_utils.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_kibana_theme.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_runtime_field_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 +- ...n_shared_ux_chrome_navigation.devdocs.json | 511 +++----- api_docs/kbn_shared_ux_chrome_navigation.mdx | 4 +- 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.devdocs.json | 30 +- api_docs/kbn_test_jest_helpers.mdx | 4 +- api_docs/kbn_test_subj_selector.mdx | 2 +- api_docs/kbn_text_based_editor.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.devdocs.json | 15 + api_docs/kibana_react.mdx | 4 +- 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.devdocs.json | 4 +- 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.devdocs.json | 159 ++- api_docs/observability.mdx | 4 +- api_docs/observability_onboarding.mdx | 2 +- api_docs/observability_shared.devdocs.json | 28 +- api_docs/observability_shared.mdx | 2 +- api_docs/osquery.mdx | 2 +- api_docs/plugin_directory.mdx | 61 +- api_docs/presentation_util.mdx | 2 +- api_docs/profiling.mdx | 2 +- api_docs/remote_clusters.mdx | 2 +- api_docs/reporting.mdx | 2 +- api_docs/reporting_export_types.mdx | 2 +- api_docs/rollup.mdx | 2 +- api_docs/rule_registry.devdocs.json | 57 +- api_docs/rule_registry.mdx | 4 +- 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 | 8 +- api_docs/security_solution.mdx | 4 +- api_docs/serverless.devdocs.json | 118 +- api_docs/serverless.mdx | 4 +- api_docs/serverless_observability.mdx | 2 +- api_docs/serverless_search.mdx | 2 +- api_docs/serverless_security.mdx | 2 +- api_docs/session_view.mdx | 2 +- api_docs/share.mdx | 2 +- api_docs/snapshot_restore.mdx | 2 +- api_docs/spaces.mdx | 2 +- api_docs/stack_alerts.mdx | 2 +- api_docs/stack_connectors.mdx | 2 +- api_docs/task_manager.mdx | 2 +- api_docs/telemetry.mdx | 2 +- api_docs/telemetry_collection_manager.mdx | 2 +- api_docs/telemetry_collection_xpack.mdx | 2 +- api_docs/telemetry_management_section.mdx | 2 +- api_docs/text_based_languages.mdx | 2 +- api_docs/threat_intelligence.mdx | 2 +- api_docs/timelines.devdocs.json | 8 + api_docs/timelines.mdx | 2 +- api_docs/transform.mdx | 2 +- api_docs/triggers_actions_ui.devdocs.json | 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.devdocs.json | 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 +- .../visualization_ui_components.devdocs.json | 847 ++++++++++++- api_docs/visualization_ui_components.mdx | 4 +- api_docs/visualizations.devdocs.json | 4 +- api_docs/visualizations.mdx | 4 +- 587 files changed, 7022 insertions(+), 1747 deletions(-) create mode 100644 api_docs/cloud_chat_provider.devdocs.json create mode 100644 api_docs/cloud_chat_provider.mdx create mode 100644 api_docs/kbn_content_management_tabbed_table_list_view.devdocs.json create mode 100644 api_docs/kbn_content_management_tabbed_table_list_view.mdx delete mode 100644 api_docs/kbn_content_management_table_list.devdocs.json create mode 100644 api_docs/kbn_content_management_table_list_view.devdocs.json rename api_docs/{kbn_content_management_table_list.mdx => kbn_content_management_table_list_view.mdx} (55%) create mode 100644 api_docs/kbn_content_management_table_list_view_table.devdocs.json create mode 100644 api_docs/kbn_content_management_table_list_view_table.mdx create mode 100644 api_docs/kbn_deeplinks_analytics.devdocs.json create mode 100644 api_docs/kbn_deeplinks_analytics.mdx create mode 100644 api_docs/kbn_deeplinks_devtools.devdocs.json create mode 100644 api_docs/kbn_deeplinks_devtools.mdx create mode 100644 api_docs/kbn_deeplinks_management.devdocs.json create mode 100644 api_docs/kbn_deeplinks_management.mdx create mode 100644 api_docs/kbn_deeplinks_ml.devdocs.json create mode 100644 api_docs/kbn_deeplinks_ml.mdx create mode 100644 api_docs/kbn_deeplinks_observability.devdocs.json create mode 100644 api_docs/kbn_deeplinks_observability.mdx create mode 100644 api_docs/kbn_deeplinks_search.devdocs.json create mode 100644 api_docs/kbn_deeplinks_search.mdx create mode 100644 api_docs/kbn_default_nav_analytics.devdocs.json create mode 100644 api_docs/kbn_default_nav_analytics.mdx create mode 100644 api_docs/kbn_default_nav_devtools.devdocs.json create mode 100644 api_docs/kbn_default_nav_devtools.mdx create mode 100644 api_docs/kbn_default_nav_management.devdocs.json create mode 100644 api_docs/kbn_default_nav_management.mdx create mode 100644 api_docs/kbn_default_nav_ml.devdocs.json create mode 100644 api_docs/kbn_default_nav_ml.mdx diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 61f6e1ea3de43..f872b9b5b23de 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index ce99cb849d9c5..57be15427df74 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/aiops.devdocs.json b/api_docs/aiops.devdocs.json index fde414ff98768..54386d8071c45 100644 --- a/api_docs/aiops.devdocs.json +++ b/api_docs/aiops.devdocs.json @@ -628,6 +628,62 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "aiops", + "id": "def-public.ExplainLogRateSpikesAnalysisResults", + "type": "Interface", + "tags": [], + "label": "ExplainLogRateSpikesAnalysisResults", + "description": [], + "path": "x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "aiops", + "id": "def-public.ExplainLogRateSpikesAnalysisResults.significantTerms", + "type": "Array", + "tags": [], + "label": "significantTerms", + "description": [], + "signature": [ + { + "pluginId": "@kbn/ml-agg-utils", + "scope": "common", + "docId": "kibKbnMlAggUtilsPluginApi", + "section": "def-common.SignificantTerm", + "text": "SignificantTerm" + }, + "[]" + ], + "path": "x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "aiops", + "id": "def-public.ExplainLogRateSpikesAnalysisResults.significantTermsGroups", + "type": "Array", + "tags": [], + "label": "significantTermsGroups", + "description": [], + "signature": [ + { + "pluginId": "@kbn/ml-agg-utils", + "scope": "common", + "docId": "kibKbnMlAggUtilsPluginApi", + "section": "def-common.SignificantTermGroup", + "text": "SignificantTermGroup" + }, + "[]" + ], + "path": "x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "aiops", "id": "def-public.ExplainLogRateSpikesAppStateProps", diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 60ebe657d6c1d..59280fe7d0497 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 41 | 0 | 24 | 1 | +| 44 | 0 | 27 | 1 | ## Client diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index bdbab72297feb..52339fd97115d 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -2172,6 +2172,100 @@ "returnComment": [], "children": [] }, + { + "parentPluginId": "alerting", + "id": "def-server.PluginStartContract.getType", + "type": "Function", + "tags": [], + "label": "getType", + "description": [], + "signature": [ + "(id: string) => ", + "NormalizedRuleType", + "" + ], + "path": "x-pack/plugins/alerting/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.PluginStartContract.getType.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "x-pack/plugins/alerting/server/rule_type_registry.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, { "parentPluginId": "alerting", "id": "def-server.PluginStartContract.getRulesClientWithRequest", @@ -3576,6 +3670,20 @@ "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.RuleType.fieldsForAAD", + "type": "Array", + "tags": [], + "label": "fieldsForAAD", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 7758c535eb861..1454801140b8e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 619 | 1 | 595 | 45 | +| 622 | 1 | 598 | 46 | ## Client diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 6e33aac2b94b1..afea00fec2980 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-06-13 +date: 2023-06-14 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 5dff9b09b946d..26b1a6e5cdb27 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-06-13 +date: 2023-06-14 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 7811ef902cbff..ec9b438080793 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 836ec9e8434ae..c65800e814c39 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 7a3d913e60e9b..dedc3cc3b29db 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.devdocs.json b/api_docs/cases.devdocs.json index 5600b57de4817..d8038f8cf266b 100644 --- a/api_docs/cases.devdocs.json +++ b/api_docs/cases.devdocs.json @@ -54,7 +54,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - " = ", + " = ", { "pluginId": "@kbn/core-application-browser", "scope": "common", @@ -62,7 +62,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - ">({ basePath, extend, }: { basePath?: string | undefined; extend?: Partial>({ basePath, extend, }: { basePath?: string | undefined; extend?: Partial Promise<", + " | undefined; assignees?: string | string[] | undefined; reporters?: string | string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; from?: string | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: \"description\" | \"title\" | \"closed_by.username\" | \"closed_by.full_name\" | \"closed_by.email\" | \"closed_by.profile_uid\" | \"created_by.username\" | \"created_by.full_name\" | \"created_by.email\" | \"created_by.profile_uid\" | \"connector.name\" | \"connector.type\" | \"external_service.pushed_by.username\" | \"external_service.pushed_by.full_name\" | \"external_service.pushed_by.email\" | \"external_service.pushed_by.profile_uid\" | \"external_service.connector_name\" | \"external_service.external_id\" | \"external_service.external_title\" | \"external_service.external_url\" | \"title.keyword\" | \"updated_by.username\" | \"updated_by.full_name\" | \"updated_by.email\" | \"updated_by.profile_uid\" | (\"description\" | \"title\" | \"closed_by.username\" | \"closed_by.full_name\" | \"closed_by.email\" | \"closed_by.profile_uid\" | \"created_by.username\" | \"created_by.full_name\" | \"created_by.email\" | \"created_by.profile_uid\" | \"connector.name\" | \"connector.type\" | \"external_service.pushed_by.username\" | \"external_service.pushed_by.full_name\" | \"external_service.pushed_by.email\" | \"external_service.pushed_by.profile_uid\" | \"external_service.connector_name\" | \"external_service.external_id\" | \"external_service.external_title\" | \"external_service.external_url\" | \"title.keyword\" | \"updated_by.username\" | \"updated_by.full_name\" | \"updated_by.email\" | \"updated_by.profile_uid\")[] | undefined; rootSearchFields?: string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; to?: string | undefined; owner?: string | string[] | undefined; category?: string | string[] | undefined; }, signal?: AbortSignal | undefined) => Promise<", { "pluginId": "cases", "scope": "common", diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 29236ebbc6bf5..d8b2c37a5b46e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 8d8d53d240167..8cec9e255333b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.devdocs.json b/api_docs/cloud.devdocs.json index 6be7a82d3d31c..3d9e7dd03898f 100644 --- a/api_docs/cloud.devdocs.json +++ b/api_docs/cloud.devdocs.json @@ -137,7 +137,7 @@ "tags": [], "label": "CloudStart", "description": [], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -153,7 +153,7 @@ "signature": [ "React.FunctionComponent<{}>" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false, "returnComment": [], @@ -197,7 +197,7 @@ "description": [ "\n`true` when Kibana is running on Elastic Cloud." ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -213,7 +213,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -229,7 +229,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -245,7 +245,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -261,7 +261,39 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloud", + "id": "def-public.CloudStart.elasticsearchUrl", + "type": "string", + "tags": [], + "label": "elasticsearchUrl", + "description": [ + "\nThe full URL to the elasticsearch cluster." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloud", + "id": "def-public.CloudStart.kibanaUrl", + "type": "string", + "tags": [], + "label": "kibanaUrl", + "description": [ + "\nThe full URL to the Kibana deployment." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false } @@ -279,7 +311,7 @@ "tags": [], "label": "CloudSetup", "description": [], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -295,7 +327,23 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloud", + "id": "def-public.CloudSetup.deploymentId", + "type": "string", + "tags": [], + "label": "deploymentId", + "description": [ + "\nThe deployment's ID. Only available when running on Elastic Cloud." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -311,7 +359,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -327,7 +375,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -343,7 +391,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -359,7 +407,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -375,7 +423,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -391,7 +439,71 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloud", + "id": "def-public.CloudSetup.elasticsearchUrl", + "type": "string", + "tags": [], + "label": "elasticsearchUrl", + "description": [ + "\nThe full URL to the elasticsearch cluster." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloud", + "id": "def-public.CloudSetup.kibanaUrl", + "type": "string", + "tags": [], + "label": "kibanaUrl", + "description": [ + "\nThe full URL to the Kibana deployment." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloud", + "id": "def-public.CloudSetup.cloudHost", + "type": "string", + "tags": [], + "label": "cloudHost", + "description": [ + "\n{host} from the deployment url https://.." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloud", + "id": "def-public.CloudSetup.cloudDefaultPort", + "type": "string", + "tags": [], + "label": "cloudDefaultPort", + "description": [ + "\n{port} from the deployment url https://.." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -404,7 +516,7 @@ "description": [ "\n`true` when Kibana is running on Elastic Cloud." ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -420,7 +532,7 @@ "signature": [ "Date | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -436,7 +548,7 @@ "signature": [ "boolean | undefined" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false }, @@ -452,7 +564,7 @@ "signature": [ "(contextProvider: React.FC<{}>) => void" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -468,7 +580,7 @@ "signature": [ "React.FC<{}>" ], - "path": "x-pack/plugins/cloud/public/plugin.tsx", + "path": "x-pack/plugins/cloud/public/types.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -533,6 +645,70 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "cloud", + "id": "def-server.CloudSetup.elasticsearchUrl", + "type": "string", + "tags": [], + "label": "elasticsearchUrl", + "description": [ + "\nThe full URL to the elasticsearch cluster." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/server/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloud", + "id": "def-server.CloudSetup.kibanaUrl", + "type": "string", + "tags": [], + "label": "kibanaUrl", + "description": [ + "\nThe full URL to the Kibana deployment." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/server/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloud", + "id": "def-server.CloudSetup.cloudHost", + "type": "string", + "tags": [], + "label": "cloudHost", + "description": [ + "\n{host} from the deployment url https://.." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/server/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloud", + "id": "def-server.CloudSetup.cloudDefaultPort", + "type": "string", + "tags": [], + "label": "cloudDefaultPort", + "description": [ + "\n{port} from the deployment url https://.." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/server/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "cloud", "id": "def-server.CloudSetup.isCloudEnabled", diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index edae6b3952256..011d43b747188 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 41 | 0 | 11 | 0 | +| 52 | 0 | 11 | 0 | ## Client diff --git a/api_docs/cloud_chat.devdocs.json b/api_docs/cloud_chat.devdocs.json index a5c0e8eb90ccd..2d74ab2f55521 100644 --- a/api_docs/cloud_chat.devdocs.json +++ b/api_docs/cloud_chat.devdocs.json @@ -26,7 +26,36 @@ "interfaces": [], "enums": [], "misc": [], - "objects": [] + "objects": [], + "start": { + "parentPluginId": "cloudChat", + "id": "def-public.CloudChatPluginStart", + "type": "Interface", + "tags": [], + "label": "CloudChatPluginStart", + "description": [], + "path": "x-pack/plugins/cloud_integrations/cloud_chat/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "cloudChat", + "id": "def-public.CloudChatPluginStart.Chat", + "type": "CompoundType", + "tags": [], + "label": "Chat", + "description": [], + "signature": [ + "React.ComponentClass<{}, any> | React.FunctionComponent<{}>" + ], + "path": "x-pack/plugins/cloud_integrations/cloud_chat/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "lifecycle": "start", + "initialIsOpen": true + } }, "server": { "classes": [], diff --git a/api_docs/cloud_chat.mdx b/api_docs/cloud_chat.mdx index 794185912771d..e1882ecf15931 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat'] --- import cloudChatObj from './cloud_chat.devdocs.json'; @@ -21,10 +21,13 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1 | 0 | 0 | 0 | +| 3 | 0 | 2 | 0 | ## Client +### Start + + ### Functions diff --git a/api_docs/cloud_chat_provider.devdocs.json b/api_docs/cloud_chat_provider.devdocs.json new file mode 100644 index 0000000000000..df5b60814be2e --- /dev/null +++ b/api_docs/cloud_chat_provider.devdocs.json @@ -0,0 +1,103 @@ +{ + "id": "cloudChatProvider", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [], + "setup": { + "parentPluginId": "cloudChatProvider", + "id": "def-public.CloudChatProviderPluginSetup", + "type": "Interface", + "tags": [], + "label": "CloudChatProviderPluginSetup", + "description": [], + "path": "x-pack/plugins/cloud_integrations/cloud_chat_provider/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "cloudChatProvider", + "id": "def-public.CloudChatProviderPluginSetup.registerChatProvider", + "type": "Function", + "tags": [], + "label": "registerChatProvider", + "description": [], + "signature": [ + "(getChat: () => React.ComponentType<{}> | undefined) => void" + ], + "path": "x-pack/plugins/cloud_integrations/cloud_chat_provider/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "cloudChatProvider", + "id": "def-public.CloudChatProviderPluginSetup.registerChatProvider.$1", + "type": "Function", + "tags": [], + "label": "getChat", + "description": [], + "signature": [ + "() => React.ComponentType<{}> | undefined" + ], + "path": "x-pack/plugins/cloud_integrations/cloud_chat_provider/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "cloudChatProvider", + "id": "def-public.CloudChatProviderPluginStart", + "type": "Interface", + "tags": [], + "label": "CloudChatProviderPluginStart", + "description": [], + "path": "x-pack/plugins/cloud_integrations/cloud_chat_provider/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "cloudChatProvider", + "id": "def-public.CloudChatProviderPluginStart.Chat", + "type": "CompoundType", + "tags": [], + "label": "Chat", + "description": [], + "signature": [ + "React.ComponentType<{}> | undefined" + ], + "path": "x-pack/plugins/cloud_integrations/cloud_chat_provider/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/cloud_chat_provider.mdx b/api_docs/cloud_chat_provider.mdx new file mode 100644 index 0000000000000..503dc8f64c3d1 --- /dev/null +++ b/api_docs/cloud_chat_provider.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibCloudChatProviderPluginApi +slug: /kibana-dev-docs/api/cloudChatProvider +title: "cloudChatProvider" +image: https://source.unsplash.com/400x175/?github +description: API docs for the cloudChatProvider plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChatProvider'] +--- +import cloudChatProviderObj from './cloud_chat_provider.devdocs.json'; + +This plugin exists as a workaround for using `cloudChat` plugin in plugins which can't have a direct dependency on security plugin. + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 5 | 0 | 5 | 0 | + +## Client + +### Setup + + +### Start + + diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index 117b1f4d6e26d..12ff9f6c51beb 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.devdocs.json b/api_docs/cloud_defend.devdocs.json index 88ea58e59eb72..a2aa026ef923c 100644 --- a/api_docs/cloud_defend.devdocs.json +++ b/api_docs/cloud_defend.devdocs.json @@ -240,9 +240,252 @@ "common": { "classes": [], "functions": [], - "interfaces": [], + "interfaces": [ + { + "parentPluginId": "cloudDefend", + "id": "def-common.CloudDefendPolicy", + "type": "Interface", + "tags": [], + "label": "CloudDefendPolicy", + "description": [], + "path": "x-pack/plugins/cloud_defend/common/v1.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "cloudDefend", + "id": "def-common.CloudDefendPolicy.package_policy", + "type": "Object", + "tags": [], + "label": "package_policy", + "description": [], + "signature": [ + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.PackagePolicy", + "text": "PackagePolicy" + } + ], + "path": "x-pack/plugins/cloud_defend/common/v1.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloudDefend", + "id": "def-common.CloudDefendPolicy.agent_policy", + "type": "CompoundType", + "tags": [], + "label": "agent_policy", + "description": [], + "signature": [ + "Pick<", + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.AgentPolicy", + "text": "AgentPolicy" + }, + ", \"id\" | \"name\"> & { agents: number; }" + ], + "path": "x-pack/plugins/cloud_defend/common/v1.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "cloudDefend", + "id": "def-common.IndexDetails", + "type": "Interface", + "tags": [], + "label": "IndexDetails", + "description": [], + "path": "x-pack/plugins/cloud_defend/common/v1.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "cloudDefend", + "id": "def-common.IndexDetails.index", + "type": "string", + "tags": [], + "label": "index", + "description": [], + "path": "x-pack/plugins/cloud_defend/common/v1.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloudDefend", + "id": "def-common.IndexDetails.status", + "type": "CompoundType", + "tags": [], + "label": "status", + "description": [], + "signature": [ + "\"empty\" | \"not-empty\" | \"unprivileged\"" + ], + "path": "x-pack/plugins/cloud_defend/common/v1.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], "enums": [], - "misc": [], - "objects": [] + "misc": [ + { + "parentPluginId": "cloudDefend", + "id": "def-common.AgentPolicyStatus", + "type": "Type", + "tags": [], + "label": "AgentPolicyStatus", + "description": [], + "signature": [ + "Pick<", + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.AgentPolicy", + "text": "AgentPolicy" + }, + ", \"id\" | \"name\"> & { agents: number; }" + ], + "path": "x-pack/plugins/cloud_defend/common/v1.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cloudDefend", + "id": "def-common.CloudDefendSetupStatus", + "type": "Type", + "tags": [], + "label": "CloudDefendSetupStatus", + "description": [], + "signature": [ + "CloudDefendSetupInstalledStatus | CloudDefendSetupNotInstalledStatus" + ], + "path": "x-pack/plugins/cloud_defend/common/v1.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cloudDefend", + "id": "def-common.CloudDefendStatusCode", + "type": "Type", + "tags": [], + "label": "CloudDefendStatusCode", + "description": [], + "signature": [ + "\"unprivileged\" | \"indexed\" | \"indexing\" | \"index-timeout\" | \"not-deployed\" | \"not-installed\"" + ], + "path": "x-pack/plugins/cloud_defend/common/v1.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cloudDefend", + "id": "def-common.IndexStatus", + "type": "Type", + "tags": [], + "label": "IndexStatus", + "description": [], + "signature": [ + "\"empty\" | \"not-empty\" | \"unprivileged\"" + ], + "path": "x-pack/plugins/cloud_defend/common/v1.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cloudDefend", + "id": "def-common.PoliciesQueryParams", + "type": "Type", + "tags": [], + "label": "PoliciesQueryParams", + "description": [], + "signature": [ + "{ readonly policy_name?: string | undefined; readonly per_page: number; readonly page: number; readonly sort_field: \"package_policy.id\" | \"package_policy.name\" | \"package_policy.policy_id\" | \"package_policy.namespace\" | \"package_policy.updated_at\" | \"package_policy.updated_by\" | \"package_policy.created_at\" | \"package_policy.created_by\" | \"package_policy.package.name\" | \"package_policy.package.title\"; readonly sort_order: \"asc\" | \"desc\"; }" + ], + "path": "x-pack/plugins/cloud_defend/common/schemas/v1.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "cloudDefend", + "id": "def-common.policiesQueryParamsSchema", + "type": "Object", + "tags": [], + "label": "policiesQueryParamsSchema", + "description": [], + "signature": [ + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.ObjectType", + "text": "ObjectType" + }, + "<{ page: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.Type", + "text": "Type" + }, + "; per_page: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.Type", + "text": "Type" + }, + "; sort_field: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.Type", + "text": "Type" + }, + "<\"package_policy.id\" | \"package_policy.name\" | \"package_policy.policy_id\" | \"package_policy.namespace\" | \"package_policy.updated_at\" | \"package_policy.updated_by\" | \"package_policy.created_at\" | \"package_policy.created_by\" | \"package_policy.package.name\" | \"package_policy.package.title\">; sort_order: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.Type", + "text": "Type" + }, + "<\"asc\" | \"desc\">; policy_name: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.Type", + "text": "Type" + }, + "; }>" + ], + "path": "x-pack/plugins/cloud_defend/common/schemas/v1.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ] } } \ No newline at end of file diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index 7e41648834a2a..0968dbbaa7fc8 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/sec-cloudnative-integrations](https://github.com/orgs/elastic/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 12 | 0 | 4 | 2 | +| 24 | 0 | 16 | 2 | ## Client @@ -48,3 +48,14 @@ Contact [@elastic/sec-cloudnative-integrations](https://github.com/orgs/elastic/ ### Start +## Common + +### Objects + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index f94aec5d1e7b2..0163f13a46027 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 97c323dc701d4..67848e99ab66b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index c8b92b4a54991..56c5de61d8cec 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-06-13 +date: 2023-06-14 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 88440d880f2b8..a6fcec9c87583 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-06-13 +date: 2023-06-14 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 7db6d429c4e54..d1d0699a6cb9c 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-06-13 +date: 2023-06-14 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 11f2dfafb3a6f..b605fd4dc7ca7 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index b7b18bec63e21..0d1595a779232 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 42a3e05e800f8..24c6d331b57fd 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index 04f2c474fd72e..4eee724e78dfe 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -13329,12 +13329,12 @@ "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "threatIntelligence", - "path": "x-pack/plugins/threat_intelligence/public/mocks/mock_security_context.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.test.ts" }, { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.test.ts" + "plugin": "threatIntelligence", + "path": "x-pack/plugins/threat_intelligence/public/mocks/mock_security_context.tsx" }, { "plugin": "securitySolution", @@ -13500,6 +13500,14 @@ "plugin": "unifiedFieldList", "path": "src/plugins/unified_field_list/public/hooks/use_existing_fields.ts" }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/components/table_list.tsx" + }, { "plugin": "lens", "path": "x-pack/plugins/lens/public/data_views_service/loader.ts" @@ -20951,12 +20959,12 @@ "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "threatIntelligence", - "path": "x-pack/plugins/threat_intelligence/public/mocks/mock_security_context.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.test.ts" }, { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.test.ts" + "plugin": "threatIntelligence", + "path": "x-pack/plugins/threat_intelligence/public/mocks/mock_security_context.tsx" }, { "plugin": "securitySolution", @@ -21122,6 +21130,14 @@ "plugin": "unifiedFieldList", "path": "src/plugins/unified_field_list/public/hooks/use_existing_fields.ts" }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/components/table_list.tsx" + }, { "plugin": "lens", "path": "x-pack/plugins/lens/public/data_views_service/loader.ts" diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 4609cb4a394b2..b37b702416b5d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 6c3684a196b97..a66b195377ce1 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 34cf2393b33f2..4d4ecedec275b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index de45ae193beef..5760b0e4410d9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 70b686e5b9dd4..24297c093ced3 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 4cd0df1c6d9a1..a882398dab090 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json index 82aecca163353..2fa3467df26ef 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -152,12 +152,12 @@ "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "threatIntelligence", - "path": "x-pack/plugins/threat_intelligence/public/mocks/mock_security_context.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.test.ts" }, { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.test.ts" + "plugin": "threatIntelligence", + "path": "x-pack/plugins/threat_intelligence/public/mocks/mock_security_context.tsx" }, { "plugin": "securitySolution", @@ -339,6 +339,14 @@ "plugin": "unifiedFieldList", "path": "src/plugins/unified_field_list/public/hooks/use_existing_fields.ts" }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/components/table_list.tsx" + }, { "plugin": "lens", "path": "x-pack/plugins/lens/public/data_views_service/loader.ts" @@ -8420,12 +8428,12 @@ "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "threatIntelligence", - "path": "x-pack/plugins/threat_intelligence/public/mocks/mock_security_context.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.test.ts" }, { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.test.ts" + "plugin": "threatIntelligence", + "path": "x-pack/plugins/threat_intelligence/public/mocks/mock_security_context.tsx" }, { "plugin": "securitySolution", @@ -8607,6 +8615,14 @@ "plugin": "unifiedFieldList", "path": "src/plugins/unified_field_list/public/hooks/use_existing_fields.ts" }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/components/table_list.tsx" + }, { "plugin": "lens", "path": "x-pack/plugins/lens/public/data_views_service/loader.ts" @@ -15745,12 +15761,12 @@ "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "threatIntelligence", - "path": "x-pack/plugins/threat_intelligence/public/mocks/mock_security_context.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/left/hooks/use_threat_intelligence_details.test.ts" }, { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/flyout/left/components/hooks/use_threat_intelligence_details.test.ts" + "plugin": "threatIntelligence", + "path": "x-pack/plugins/threat_intelligence/public/mocks/mock_security_context.tsx" }, { "plugin": "securitySolution", @@ -15932,6 +15948,14 @@ "plugin": "unifiedFieldList", "path": "src/plugins/unified_field_list/public/hooks/use_existing_fields.ts" }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/components/table_list.tsx" + }, { "plugin": "lens", "path": "x-pack/plugins/lens/public/data_views_service/loader.ts" diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 79ef572b78eb6..adfd492de786f 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index 615057bdeb7fc..7b709bd6bdbd9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 4e99cea632855..218c164a8d278 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -18,17 +18,17 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | ml, stackAlerts | - | | | ruleRegistry, observability, ml, infra, securitySolution, monitoring, stackAlerts, synthetics, transform | - | -| | @kbn/es-query, visualizationUiComponents, securitySolution, timelines, lists, threatIntelligence, dataViews, savedObjectsManagement, unifiedSearch, controls, unifiedFieldList, lens, aiops, ml, infra, visTypeTimeseries, apm, triggersActionsUi, exploratoryView, dataVisualizer, fleet, canvas, enterpriseSearch, graph, stackAlerts, synthetics, transform, upgradeAssistant, ux, maps, dataViewManagement, inputControlVis, visDefaultEditor, presentationUtil, visTypeTimelion, visTypeVega, data | - | -| | @kbn/es-query, visualizationUiComponents, securitySolution, timelines, lists, threatIntelligence, dataViews, savedObjectsManagement, unifiedSearch, controls, unifiedFieldList, lens, aiops, ml, infra, visTypeTimeseries, apm, triggersActionsUi, exploratoryView, dataVisualizer, fleet, canvas, enterpriseSearch, graph, stackAlerts, synthetics, transform, upgradeAssistant, ux, maps, dataViewManagement, inputControlVis, visDefaultEditor, presentationUtil, visTypeTimelion, visTypeVega, data | - | -| | @kbn/es-query, visualizationUiComponents, securitySolution, timelines, lists, threatIntelligence, data, savedObjectsManagement, unifiedSearch, controls, unifiedFieldList, lens, aiops, ml, infra, visTypeTimeseries, apm, triggersActionsUi, exploratoryView, dataVisualizer, fleet, canvas, enterpriseSearch, graph, stackAlerts, synthetics, transform, upgradeAssistant, ux, maps, dataViewManagement, inputControlVis, visDefaultEditor, presentationUtil, visTypeTimelion, visTypeVega | - | +| | @kbn/es-query, visualizationUiComponents, securitySolution, timelines, lists, threatIntelligence, dataViews, savedObjectsManagement, unifiedSearch, controls, unifiedFieldList, eventAnnotation, lens, aiops, ml, infra, visTypeTimeseries, apm, triggersActionsUi, exploratoryView, dataVisualizer, fleet, canvas, enterpriseSearch, graph, stackAlerts, synthetics, transform, upgradeAssistant, ux, maps, dataViewManagement, inputControlVis, visDefaultEditor, presentationUtil, visTypeTimelion, visTypeVega, data | - | +| | @kbn/es-query, visualizationUiComponents, securitySolution, timelines, lists, threatIntelligence, dataViews, savedObjectsManagement, unifiedSearch, controls, unifiedFieldList, eventAnnotation, lens, aiops, ml, infra, visTypeTimeseries, apm, triggersActionsUi, exploratoryView, dataVisualizer, fleet, canvas, enterpriseSearch, graph, stackAlerts, synthetics, transform, upgradeAssistant, ux, maps, dataViewManagement, inputControlVis, visDefaultEditor, presentationUtil, visTypeTimelion, visTypeVega, data | - | +| | @kbn/es-query, visualizationUiComponents, securitySolution, timelines, lists, threatIntelligence, data, savedObjectsManagement, unifiedSearch, controls, unifiedFieldList, eventAnnotation, lens, aiops, ml, infra, visTypeTimeseries, apm, triggersActionsUi, exploratoryView, dataVisualizer, fleet, canvas, enterpriseSearch, graph, stackAlerts, synthetics, transform, upgradeAssistant, ux, maps, dataViewManagement, inputControlVis, visDefaultEditor, presentationUtil, visTypeTimelion, visTypeVega | - | | | home, data, esUiShared, savedObjectsManagement, exploratoryView, fleet, observability, ml, apm, indexLifecycleManagement, observabilityOnboarding, synthetics, upgradeAssistant, ux, kibanaOverview | - | | | encryptedSavedObjects, actions, data, ml, securitySolution, logstash, cloudChat | - | | | actions, ml, savedObjectsTagging, enterpriseSearch | - | -| | @kbn/core-plugins-browser-internal, @kbn/core-root-browser-internal, dataViews, home, data, savedObjects, unifiedSearch, presentationUtil, visualizations, dashboard, eventAnnotation, lens, fileUpload, ml, canvas, dashboardEnhanced, monitoring, synthetics, transform, discover, dataVisualizer | - | +| | @kbn/core-plugins-browser-internal, @kbn/core-root-browser-internal, dataViews, home, data, savedObjects, unifiedSearch, presentationUtil, visualizations, dashboard, eventAnnotation, lens, fileUpload, ml, canvas, dashboardEnhanced, monitoring, transform, discover, dataVisualizer | - | | | @kbn/core-saved-objects-browser, @kbn/core-saved-objects-browser-internal, @kbn/core, dataViews, home, savedObjects, visualizations, eventAnnotation, ml, canvas, lens, visTypeTimeseries, @kbn/core-saved-objects-browser-mocks | - | | | @kbn/core-saved-objects-browser-mocks, savedObjects, presentationUtil, dashboard, eventAnnotation, ml, dashboardEnhanced, @kbn/core-saved-objects-browser-internal | - | | | @kbn/core-saved-objects-browser-mocks, dataViews, savedObjects, dashboard, eventAnnotation, ml, dashboardEnhanced, monitoring, @kbn/core-saved-objects-browser-internal | - | -| | @kbn/core-saved-objects-browser-internal, @kbn/core, savedObjects, embeddable, presentationUtil, visualizations, aiops, ml, dataVisualizer, dashboardEnhanced, graph, synthetics, lens, securitySolution, eventAnnotation, @kbn/core-saved-objects-browser-mocks | - | +| | @kbn/core-saved-objects-browser-internal, @kbn/core, savedObjects, embeddable, presentationUtil, visualizations, eventAnnotation, aiops, ml, dataVisualizer, dashboardEnhanced, graph, synthetics, lens, securitySolution, @kbn/core-saved-objects-browser-mocks | - | | | @kbn/core-lifecycle-browser-mocks, @kbn/core, ml, dataViews, @kbn/core-plugins-browser-internal | - | | | @kbn/core, savedObjects, embeddable, visualizations, canvas, graph, ml, @kbn/core-saved-objects-common, @kbn/core-saved-objects-server, actions, alerting, savedSearch, enterpriseSearch, securitySolution, taskManager, @kbn/core-saved-objects-server-internal, @kbn/core-saved-objects-api-server | - | | | stackAlerts, alerting, securitySolution, inputControlVis | - | @@ -36,7 +36,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | dashboard, dataVisualizer, stackAlerts, expressionPartitionVis | - | | | stackAlerts, alerting, securitySolution, inputControlVis | - | | | observability, @kbn/securitysolution-data-table, securitySolution | - | -| | @kbn/core-saved-objects-api-browser, @kbn/core, savedObjects, savedObjectsManagement, visualizations, eventAnnotation, savedObjectsTagging, lens, graph, dashboard, savedObjectsTaggingOss, kibanaUtils, expressions, dataViews, data, embeddable, controls, uiActionsEnhanced, cases, maps, canvas, dashboardEnhanced, globalSearchProviders, infra | - | +| | @kbn/core-saved-objects-api-browser, @kbn/core, savedObjects, savedObjectsManagement, visualizations, savedObjectsTagging, eventAnnotation, lens, graph, dashboard, savedObjectsTaggingOss, kibanaUtils, expressions, dataViews, data, embeddable, controls, uiActionsEnhanced, cases, maps, canvas, dashboardEnhanced, globalSearchProviders, infra | - | | | alerting, discover, securitySolution | - | | | @kbn/core-saved-objects-api-browser, @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-api-server-internal, @kbn/core-saved-objects-import-export-server-internal, @kbn/core-saved-objects-server-internal, home, fleet, securitySolution, graph, lists, alerting | - | | | @kbn/core-saved-objects-api-browser, @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-api-server-internal, @kbn/core-saved-objects-import-export-server-internal, @kbn/core-saved-objects-server-internal, home, fleet, securitySolution, graph, lists, alerting | - | @@ -73,7 +73,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, savedObjects, dashboard, eventAnnotation | - | | | @kbn/core-saved-objects-browser-mocks, home, eventAnnotation, @kbn/core-saved-objects-browser-internal | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, savedObjects, visualizations | - | -| | @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-browser-internal | - | +| | @kbn/core-saved-objects-browser-mocks, eventAnnotation, @kbn/core-saved-objects-browser-internal | - | | | @kbn/core-saved-objects-browser-mocks, savedObjects, @kbn/core-saved-objects-browser-internal | - | | | @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-browser-internal | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, eventAnnotation, savedObjects | - | @@ -85,11 +85,11 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-api-server-internal, canvas | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core | - | -| | @kbn/core-saved-objects-browser-internal, @kbn/core | - | +| | @kbn/core-saved-objects-browser-internal, @kbn/core, eventAnnotation | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core, spaces, savedSearch, visualizations, lens, cases, maps, canvas, graph | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core | - | -| | @kbn/core-saved-objects-browser-internal, @kbn/core | - | +| | @kbn/core-saved-objects-browser-internal, @kbn/core, eventAnnotation | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core | - | | | @kbn/core-saved-objects-browser-internal | - | @@ -130,6 +130,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | visTypePie | - | | | visTypePie | - | | | encryptedSavedObjects | - | +| | @kbn/content-management-table-list-view, filesManagement | - | | | @kbn/core | - | | | @kbn/core | - | | | @kbn/core | - | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 40f463b583a07..da5afdc42be92 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,11 +7,19 @@ 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- +## @kbn/content-management-table-list-view + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [table_list_view.tsx](https://github.com/elastic/kibana/tree/main/packages/content-management/table_list_view/src/table_list_view.tsx#:~:text=withoutPageTemplateWrapper), [table_list_view.tsx](https://github.com/elastic/kibana/tree/main/packages/content-management/table_list_view/src/table_list_view.tsx#:~:text=withoutPageTemplateWrapper) | - | + + + ## @kbn/core | Deprecated API | Reference location(s) | Remove By | @@ -638,15 +646,21 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects) | - | +| | [group_editor_controls.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx#:~:text=title), [table_list.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/components/table_list.tsx#:~:text=title), [group_editor_controls.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx#:~:text=title), [table_list.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/components/table_list.tsx#:~:text=title) | - | +| | [group_editor_controls.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx#:~:text=title), [table_list.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/components/table_list.tsx#:~:text=title), [group_editor_controls.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx#:~:text=title), [table_list.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/components/table_list.tsx#:~:text=title) | - | +| | [group_editor_controls.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/components/group_editor_controls/group_editor_controls.tsx#:~:text=title), [table_list.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/components/table_list.tsx#:~:text=title) | - | +| | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=savedObjects) | - | | | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SavedObjectsClientContract), [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SavedObjectsClientContract) | - | | | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=create), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=create), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=create) | - | | | [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=bulkCreate) | - | -| | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=find) | - | +| | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=bulkDelete), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=bulkDelete) | - | +| | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=find), [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=find), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=find), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=find) | - | | | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=get), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=get) | - | | | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=update), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=update) | - | -| | [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=SimpleSavedObject), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=SimpleSavedObject) | - | -| | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SavedObjectReference), [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SavedObjectReference) | - | +| | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SimpleSavedObject), [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SimpleSavedObject), [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SimpleSavedObject), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=SimpleSavedObject), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=SimpleSavedObject) | - | +| | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SavedObjectsFindOptions), [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SavedObjectsFindOptions) | - | +| | [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=SavedObjectsFindResponse), [service.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.test.ts#:~:text=SavedObjectsFindResponse) | - | +| | [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SavedObjectReference), [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SavedObjectReference), [service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/event_annotation/public/event_annotation_service/service.tsx#:~:text=SavedObjectReference) | - | @@ -687,6 +701,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] +## filesManagement + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [app.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/files_management/public/app.tsx#:~:text=withoutPageTemplateWrapper) | - | + + + ## fleet | Deprecated API | Reference location(s) | Remove By | @@ -823,7 +845,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=SimpleSavedObject), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=SimpleSavedObject) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/types.ts#:~:text=ResolvedSimpleSavedObject) | - | | | [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=simpleSavedObjectMock), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=simpleSavedObjectMock) | - | -| | [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference)+ 48 more | - | +| | [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [selectors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/state_management/selectors.ts#:~:text=SavedObjectReference), [selectors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/state_management/selectors.ts#:~:text=SavedObjectReference), [selectors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/state_management/selectors.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference)+ 48 more | - | | | [saved_objects.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/server/saved_objects.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | @@ -1137,7 +1159,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedRowRenderer), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedRowRenderer) | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BeatFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=BeatFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=BeatFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=BeatFields) | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [enrichment_summary.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx#:~:text=BrowserField), [enrichment_summary.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx#:~:text=BrowserField), [use_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx#:~:text=BrowserField)+ 31 more | - | -| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields)+ 102 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields)+ 104 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyRequest), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyRequest) | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyResponse), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyResponse) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/types.ts#:~:text=SimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/types.ts#:~:text=SimpleSavedObject) | - | @@ -1204,7 +1226,6 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title) | - | | | [stderr_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/stderr_logs.tsx#:~:text=indexPatternId) | - | | | [alert_messages.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/lib/alert_types/alert_messages.tsx#:~:text=RedirectAppLinks), [alert_messages.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/lib/alert_types/alert_messages.tsx#:~:text=RedirectAppLinks), [alert_messages.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/lib/alert_types/alert_messages.tsx#:~:text=RedirectAppLinks), [uptime_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_app.tsx#:~:text=RedirectAppLinks), [uptime_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_app.tsx#:~:text=RedirectAppLinks), [uptime_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_app.tsx#:~:text=RedirectAppLinks), [synthetics_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/synthetics_app.tsx#:~:text=RedirectAppLinks), [synthetics_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/synthetics_app.tsx#:~:text=RedirectAppLinks), [synthetics_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/synthetics_app.tsx#:~:text=RedirectAppLinks) | - | -| | [delete_param.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx#:~:text=savedObjects), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/plugin.ts#:~:text=savedObjects) | - | | | [synthetics_monitor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts#:~:text=SimpleSavedObject), [synthetics_monitor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts#:~:text=SimpleSavedObject) | - | | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/monitor_details/api.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/monitor_details/api.ts#:~:text=SavedObject), [actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/actions.ts#:~:text=SavedObject), [actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/actions.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/api.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/api.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/api.ts#:~:text=SavedObject), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/index.ts#:~:text=SavedObject), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/global_params/index.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/monitor_list/api.ts#:~:text=SavedObject)+ 6 more | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 3b0c3507ca09e..e21166d214e52 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 7b180bfccce2c..fbbf7e4251652 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 529ee5faefd88..1438a654b504d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 9ca6e9ee1ea1e..f6bb45ffd5003 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-06-13 +date: 2023-06-14 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 03009e3bc056c..07a69256bee09 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-06-13 +date: 2023-06-14 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 a219d4c80fab7..3f6dcbb0d59ee 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index bc6de5e8372ac..892e4d0c2d154 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 44a6449dce998..3391ccba26b11 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 0554ee3b5869a..b302dd4637326 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 28091621f6352..5c915c846d50b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/ess_security.mdx b/api_docs/ess_security.mdx index 3bdacd6f69a88..4789f41d955ea 100644 --- a/api_docs/ess_security.mdx +++ b/api_docs/ess_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/essSecurity title: "essSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the essSecurity plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'essSecurity'] --- import essSecurityObj from './ess_security.devdocs.json'; diff --git a/api_docs/event_annotation.devdocs.json b/api_docs/event_annotation.devdocs.json index 0af88a4d3a6c1..b2c232453a2ea 100644 --- a/api_docs/event_annotation.devdocs.json +++ b/api_docs/event_annotation.devdocs.json @@ -3,6 +3,95 @@ "client": { "classes": [], "functions": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-public.AnnotationEditorControls", + "type": "Function", + "tags": [], + "label": "AnnotationEditorControls", + "description": [], + "signature": [ + "(props: ", + "Props", + ") => JSX.Element" + ], + "path": "src/plugins/event_annotation/public/components/annotation_editor_controls/index.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-public.AnnotationEditorControls.$1", + "type": "Object", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "Props" + ], + "path": "src/plugins/event_annotation/public/components/annotation_editor_controls/index.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-public.getAnnotationAccessor", + "type": "Function", + "tags": [], + "label": "getAnnotationAccessor", + "description": [], + "signature": [ + "(annotation: ", + { + "pluginId": "eventAnnotation", + "scope": "common", + "docId": "kibEventAnnotationPluginApi", + "section": "def-common.EventAnnotationConfig", + "text": "EventAnnotationConfig" + }, + ") => ", + { + "pluginId": "visualizationUiComponents", + "scope": "public", + "docId": "kibVisualizationUiComponentsPluginApi", + "section": "def-public.AccessorConfig", + "text": "AccessorConfig" + } + ], + "path": "src/plugins/event_annotation/public/components/get_annotation_accessor.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-public.getAnnotationAccessor.$1", + "type": "CompoundType", + "tags": [], + "label": "annotation", + "description": [], + "signature": [ + { + "pluginId": "eventAnnotation", + "scope": "common", + "docId": "kibEventAnnotationPluginApi", + "section": "def-common.EventAnnotationConfig", + "text": "EventAnnotationConfig" + } + ], + "path": "src/plugins/event_annotation/public/components/get_annotation_accessor.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "eventAnnotation", "id": "def-public.isManualPointAnnotationConfig", @@ -221,6 +310,147 @@ ], "returnComment": [] }, + { + "parentPluginId": "eventAnnotation", + "id": "def-public.EventAnnotationServiceType.findAnnotationGroupContent", + "type": "Function", + "tags": [], + "label": "findAnnotationGroupContent", + "description": [], + "signature": [ + "(searchTerm: string, pageSize: number, references?: ", + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "common", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-common.SavedObjectsFindOptionsReference", + "text": "SavedObjectsFindOptionsReference" + }, + "[] | undefined, referencesToExclude?: ", + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "common", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-common.SavedObjectsFindOptionsReference", + "text": "SavedObjectsFindOptionsReference" + }, + "[] | undefined) => Promise<{ total: number; hits: ", + "EventAnnotationGroupContent", + "[]; }>" + ], + "path": "src/plugins/event_annotation/public/event_annotation_service/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-public.EventAnnotationServiceType.findAnnotationGroupContent.$1", + "type": "string", + "tags": [], + "label": "searchTerm", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/event_annotation/public/event_annotation_service/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-public.EventAnnotationServiceType.findAnnotationGroupContent.$2", + "type": "number", + "tags": [], + "label": "pageSize", + "description": [], + "signature": [ + "number" + ], + "path": "src/plugins/event_annotation/public/event_annotation_service/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-public.EventAnnotationServiceType.findAnnotationGroupContent.$3", + "type": "Array", + "tags": [], + "label": "references", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "common", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-common.SavedObjectsFindOptionsReference", + "text": "SavedObjectsFindOptionsReference" + }, + "[] | undefined" + ], + "path": "src/plugins/event_annotation/public/event_annotation_service/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-public.EventAnnotationServiceType.findAnnotationGroupContent.$4", + "type": "Array", + "tags": [], + "label": "referencesToExclude", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "common", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-common.SavedObjectsFindOptionsReference", + "text": "SavedObjectsFindOptionsReference" + }, + "[] | undefined" + ], + "path": "src/plugins/event_annotation/public/event_annotation_service/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-public.EventAnnotationServiceType.deleteAnnotationGroups", + "type": "Function", + "tags": [], + "label": "deleteAnnotationGroups", + "description": [], + "signature": [ + "(ids: string[]) => Promise" + ], + "path": "src/plugins/event_annotation/public/event_annotation_service/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-public.EventAnnotationServiceType.deleteAnnotationGroups.$1", + "type": "Array", + "tags": [], + "label": "ids", + "description": [], + "signature": [ + "string[]" + ], + "path": "src/plugins/event_annotation/public/event_annotation_service/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "eventAnnotation", "id": "def-public.EventAnnotationServiceType.createAnnotationGroup", @@ -628,6 +858,29 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-public.annotationsIconSet", + "type": "Array", + "tags": [], + "label": "annotationsIconSet", + "description": [], + "signature": [ + "{ value: ", + { + "pluginId": "eventAnnotation", + "scope": "common", + "docId": "kibEventAnnotationPluginApi", + "section": "def-common.AvailableAnnotationIcon", + "text": "AvailableAnnotationIcon" + }, + "; label: string; icon?: string | React.ComponentClass<{}, any> | React.FunctionComponent<{}> | undefined; shouldRotate?: boolean | undefined; canFill?: boolean | undefined; }[]" + ], + "path": "src/plugins/event_annotation/public/components/annotation_editor_controls/icon_set.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "eventAnnotation", "id": "def-public.defaultAnnotationColor", @@ -783,6 +1036,91 @@ "common": { "classes": [], "functions": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-common.createCopiedAnnotation", + "type": "Function", + "tags": [], + "label": "createCopiedAnnotation", + "description": [], + "signature": [ + "(newId: string, timestamp: string, source?: ", + { + "pluginId": "eventAnnotation", + "scope": "common", + "docId": "kibEventAnnotationPluginApi", + "section": "def-common.EventAnnotationConfig", + "text": "EventAnnotationConfig" + }, + " | undefined) => ", + { + "pluginId": "eventAnnotation", + "scope": "common", + "docId": "kibEventAnnotationPluginApi", + "section": "def-common.EventAnnotationConfig", + "text": "EventAnnotationConfig" + } + ], + "path": "src/plugins/event_annotation/common/create_copied_annotation.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-common.createCopiedAnnotation.$1", + "type": "string", + "tags": [], + "label": "newId", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/event_annotation/common/create_copied_annotation.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.createCopiedAnnotation.$2", + "type": "string", + "tags": [], + "label": "timestamp", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/event_annotation/common/create_copied_annotation.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.createCopiedAnnotation.$3", + "type": "CompoundType", + "tags": [], + "label": "source", + "description": [], + "signature": [ + { + "pluginId": "eventAnnotation", + "scope": "common", + "docId": "kibEventAnnotationPluginApi", + "section": "def-common.EventAnnotationConfig", + "text": "EventAnnotationConfig" + }, + " | undefined" + ], + "path": "src/plugins/event_annotation/common/create_copied_annotation.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "eventAnnotation", "id": "def-common.eventAnnotationGroup", @@ -841,6 +1179,131 @@ "children": [], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.getDefaultManualAnnotation", + "type": "Function", + "tags": [], + "label": "getDefaultManualAnnotation", + "description": [], + "signature": [ + "(id: string, timestamp: string) => ", + { + "pluginId": "eventAnnotation", + "scope": "common", + "docId": "kibEventAnnotationPluginApi", + "section": "def-common.EventAnnotationConfig", + "text": "EventAnnotationConfig" + } + ], + "path": "src/plugins/event_annotation/common/manual_event_annotation/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-common.getDefaultManualAnnotation.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/event_annotation/common/manual_event_annotation/index.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.getDefaultManualAnnotation.$2", + "type": "string", + "tags": [], + "label": "timestamp", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/event_annotation/common/manual_event_annotation/index.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.getDefaultQueryAnnotation", + "type": "Function", + "tags": [], + "label": "getDefaultQueryAnnotation", + "description": [], + "signature": [ + "(id: string, fieldName: string, timeField: string) => ", + { + "pluginId": "eventAnnotation", + "scope": "common", + "docId": "kibEventAnnotationPluginApi", + "section": "def-common.EventAnnotationConfig", + "text": "EventAnnotationConfig" + } + ], + "path": "src/plugins/event_annotation/common/query_point_event_annotation/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-common.getDefaultQueryAnnotation.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/event_annotation/common/query_point_event_annotation/index.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.getDefaultQueryAnnotation.$2", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/event_annotation/common/query_point_event_annotation/index.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.getDefaultQueryAnnotation.$3", + "type": "string", + "tags": [], + "label": "timeField", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/event_annotation/common/query_point_event_annotation/index.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false } ], "interfaces": [ @@ -943,20 +1406,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "eventAnnotation", - "id": "def-common.EventAnnotationGroupAttributes.tags", - "type": "Array", - "tags": [], - "label": "tags", - "description": [], - "signature": [ - "string[]" - ], - "path": "src/plugins/event_annotation/common/types.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "eventAnnotation", "id": "def-common.EventAnnotationGroupAttributes.ignoreGlobalFilters", @@ -992,7 +1441,7 @@ { "parentPluginId": "eventAnnotation", "id": "def-common.EventAnnotationGroupAttributes.dataViewSpec", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "dataViewSpec", "description": [], @@ -1004,7 +1453,7 @@ "section": "def-common.DataViewSpec", "text": "DataViewSpec" }, - " | undefined" + " | null | undefined" ], "path": "src/plugins/event_annotation/common/types.ts", "deprecated": false, @@ -1170,6 +1619,21 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-common.ANNOTATIONS_LISTING_VIEW_ID", + "type": "string", + "tags": [], + "label": "ANNOTATIONS_LISTING_VIEW_ID", + "description": [], + "signature": [ + "\"annotations\"" + ], + "path": "src/plugins/event_annotation/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "eventAnnotation", "id": "def-common.AvailableAnnotationIcon", diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 57501050bd494..e54822367496d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 204 | 30 | 204 | 3 | +| 227 | 30 | 227 | 4 | ## Client diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 5cc306c39d2ba..768ef7fa8451a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.devdocs.json b/api_docs/exploratory_view.devdocs.json index b2b91bc14d83c..d057f52840ecc 100644 --- a/api_docs/exploratory_view.devdocs.json +++ b/api_docs/exploratory_view.devdocs.json @@ -1237,7 +1237,17 @@ "signature": [ "{ navigation: { PageTemplate: (pageTemplateProps: ", "WrappedPageTemplateProps", - ") => JSX.Element; }; updateGlobalNavigation: ({ capabilities, deepLinks, updater$, }: { capabilities: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean | Readonly<{ [x: string]: boolean; }>; }>; navLinks: Readonly<{ [x: string]: boolean; }>; management: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean; }>; }>; catalogue: Readonly<{ [x: string]: boolean; }>; }>; deepLinks: ", + ") => JSX.Element; registerSections: (sections$: ", + "Observable", + "<", + { + "pluginId": "observabilityShared", + "scope": "public", + "docId": "kibObservabilitySharedPluginApi", + "section": "def-public.NavigationSection", + "text": "NavigationSection" + }, + "[]>) => void; }; updateGlobalNavigation: ({ capabilities, deepLinks, updater$, }: { capabilities: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean | Readonly<{ [x: string]: boolean; }>; }>; navLinks: Readonly<{ [x: string]: boolean; }>; management: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean; }>; }>; catalogue: Readonly<{ [x: string]: boolean; }>; }>; deepLinks: ", { "pluginId": "@kbn/core-application-browser", "scope": "common", @@ -1245,7 +1255,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - "[]; updater$: ", + "[]; updater$: ", "Subject", "<", { diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index 52b23e3bc55dd..7ba3cde7f5f8f 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-06-13 +date: 2023-06-14 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 ed551ae111618..5a656652cddc4 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index b07a5ee1b6160..6397c5f1e8263 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 7981c77072957..c381b5e21935e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 3cff3cba3d9bd..fcf048f84e6d6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index fb1555c0a3c26..c7a205d5f524d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index c0d17532dd466..1b07b76d4ac7f 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index a200732da9480..7e3bc365dfbd5 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 711490ba1ea81..d5eef9a023cd6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 6e2c7beec3ee8..8f25fc835e4e7 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index 9f9ac3da0ea26..d78990beac9e1 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 90f4c28fd808e..fadc32f08315d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index 526d7fc7797f3..3d937a4574bce 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index ab5d3812d234b..44ca373d74909 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 0f7aac4dd2ff2..c41caf30ff581 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 458791c870af5..d001629d5d6e0 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 29e3e236c048c..7f7d88ef16165 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index ab237a6006fed..8d57d0a6e2495 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index ff1b86928ed79..04c8715b8ef3f 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-06-13 +date: 2023-06-14 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 ddc2d0ed58156..12f9934a1c0d2 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 26e4b61987c70..f60ff61c4676c 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -17016,39 +17016,6 @@ "common": { "classes": [], "functions": [ - { - "parentPluginId": "fleet", - "id": "def-common.decodeCloudId", - "type": "Function", - "tags": [], - "label": "decodeCloudId", - "description": [], - "signature": [ - "(cid: string) => { host: string; defaultPort: string; elasticsearchUrl: string; kibanaUrl: string; } | undefined" - ], - "path": "x-pack/plugins/fleet/common/services/decode_cloud_id.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "fleet", - "id": "def-common.decodeCloudId.$1", - "type": "string", - "tags": [], - "label": "cid", - "description": [], - "signature": [ - "string" - ], - "path": "x-pack/plugins/fleet/common/services/decode_cloud_id.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "fleet", "id": "def-common.getFileDataIndexName", @@ -20247,9 +20214,8 @@ "label": "experimental_data_stream_features", "description": [], "signature": [ - "{ data_stream: string; features: Partial>; }[] | undefined" + "ExperimentalDataStreamFeature", + "[] | undefined" ], "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false, @@ -24514,6 +24480,8 @@ "signature": [ "T & { status: \"installed\"; savedObject?: ", "InstallableSavedObject", + " | undefined; installationInfo?: ", + "InstallationInfo", " | undefined; }" ], "path": "x-pack/plugins/fleet/common/types/models/epm.ts", @@ -24546,6 +24514,8 @@ "signature": [ "T & { status: \"installing\"; savedObject?: ", "InstallableSavedObject", + " | undefined; installationInfo?: ", + "InstallationInfo", " | undefined; }" ], "path": "x-pack/plugins/fleet/common/types/models/epm.ts", @@ -24925,7 +24895,9 @@ "section": "def-common.RegistrySearchResult", "text": "RegistrySearchResult" }, - "> & { id: string; integration?: string | undefined; savedObject?: ", + "> & { id: string; integration?: string | undefined; installationInfo?: ", + "InstallationInfo", + " | undefined; savedObject?: ", "InstallableSavedObject", " | undefined; }" ], diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index efdba5ae74114..8cb2b1702530c 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1184 | 3 | 1068 | 33 | +| 1182 | 3 | 1066 | 33 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 171fffbb86ef1..3bd7135f75701 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-06-13 +date: 2023-06-14 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 7bed3c647cf01..8ed005c96a62d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 1fb2fa1aa330f..6356f38a6b061 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-06-13 +date: 2023-06-14 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 c0c08090fc451..1059694f1a5bc 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-06-13 +date: 2023-06-14 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 3b62eef4a2e83..fe370ff34c6df 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index b2089c0dbab26..44c69717f9732 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index 4fccc873facf0..db227d2f35290 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index c44cdcc521c7c..efd93a3fb5212 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 17568dfc9e9e6..11c9ead610f1a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index db348a3f3f746..29af2d675dcd3 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 7b9a3a65a888e..971ce990202c6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index 2291ce2526b35..0a7a2927e2f45 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-06-13 +date: 2023-06-14 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 67ef8df4f6f21..207440aa3e8c3 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-06-13 +date: 2023-06-14 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_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index cf9ea0536c5cd..a2eb8358c450f 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-06-13 +date: 2023-06-14 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 826301ccfe6a2..652671d675254 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-06-13 +date: 2023-06-14 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 6cf4a175c65f9..224a6706e67fc 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index 736132f824ae9..2a51611eecc53 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index e6619b7aceec8..e105e4d01d1d0 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index a325c89c174a7..74bd209165067 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 0b58184a9980f..5b83613d475e9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index 3a0d36f5f0e44..38ef598bfa6bc 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_gainsight.mdx b/api_docs/kbn_analytics_shippers_gainsight.mdx index 5b8523afd7889..a9f10150eb928 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-06-13 +date: 2023-06-14 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 0e071adba0b51..7451d45333d7b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 7396c5bef8b41..e46073624f165 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-06-13 +date: 2023-06-14 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 8a55cb3539d7c..960c55cd7acfc 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-06-13 +date: 2023-06-14 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 bf18647905c26..bfc08bd327e43 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index addedc6139af1..bb4fa3fd865c0 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index f3d6c02738b94..60e1d1bfcd2e5 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-06-13 +date: 2023-06-14 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 bad2ce03f9f4c..2576ba2c96d8c 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-06-13 +date: 2023-06-14 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 815838035a73b..7e733133effa8 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-06-13 +date: 2023-06-14 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 3f84f0e206205..20e17da8bebad 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index d9da309bdb4b1..0fbca1647b6e9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 0e94f53450caf..0910615ea9d36 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index fb178d5b93214..c5e97d15e3abc 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index f4eec253c69cf..c510c57e814de 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 795fb3f8b36c7..20db66a97e63b 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-06-13 +date: 2023-06-14 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 af977ac890a28..f411155529969 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-06-13 +date: 2023-06-14 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 dfedc0722df9a..6c4ee594c64c0 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 7ff03a7846139..1ac3a1b600a94 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 6cf9b0608cd39..287ae66409c1e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index add1842138778..892ac40254c25 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index d83a44f9cfed7..d969c486af49e 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-06-13 +date: 2023-06-14 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_tabbed_table_list_view.devdocs.json b/api_docs/kbn_content_management_tabbed_table_list_view.devdocs.json new file mode 100644 index 0000000000000..b39adaf02cf09 --- /dev/null +++ b/api_docs/kbn_content_management_tabbed_table_list_view.devdocs.json @@ -0,0 +1,247 @@ +{ + "id": "@kbn/content-management-tabbed-table-list-view", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.TabbedTableListView", + "type": "Function", + "tags": [], + "label": "TabbedTableListView", + "description": [], + "signature": [ + "({ title, description, headingId, children, tabs, activeTabId, changeActiveTab, }: TabbedTableListViewProps) => JSX.Element" + ], + "path": "packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.TabbedTableListView.$1", + "type": "CompoundType", + "tags": [], + "label": "{\n title,\n description,\n headingId,\n children,\n tabs,\n activeTabId,\n changeActiveTab,\n}", + "description": [], + "signature": [ + "TabbedTableListViewProps" + ], + "path": "packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.TableListTab", + "type": "Interface", + "tags": [], + "label": "TableListTab", + "description": [], + "signature": [ + { + "pluginId": "@kbn/content-management-tabbed-table-list-view", + "scope": "common", + "docId": "kibKbnContentManagementTabbedTableListViewPluginApi", + "section": "def-common.TableListTab", + "text": "TableListTab" + }, + "" + ], + "path": "packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.TableListTab.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "path": "packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.TableListTab.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.TableListTab.getTableList", + "type": "Function", + "tags": [], + "label": "getTableList", + "description": [], + "signature": [ + "(propsFromParent: ", + { + "pluginId": "@kbn/content-management-tabbed-table-list-view", + "scope": "common", + "docId": "kibKbnContentManagementTabbedTableListViewPluginApi", + "section": "def-common.TableListTabParentProps", + "text": "TableListTabParentProps" + }, + ") => React.ReactNode | Promise" + ], + "path": "packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.TableListTab.getTableList.$1", + "type": "Object", + "tags": [], + "label": "propsFromParent", + "description": [], + "signature": [ + { + "pluginId": "@kbn/content-management-tabbed-table-list-view", + "scope": "common", + "docId": "kibKbnContentManagementTabbedTableListViewPluginApi", + "section": "def-common.TableListTabParentProps", + "text": "TableListTabParentProps" + }, + "" + ], + "path": "packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.UserContentCommonSchema", + "type": "Interface", + "tags": [], + "label": "UserContentCommonSchema", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.UserContentCommonSchema.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.UserContentCommonSchema.updatedAt", + "type": "string", + "tags": [], + "label": "updatedAt", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.UserContentCommonSchema.references", + "type": "Array", + "tags": [], + "label": "references", + "description": [], + "signature": [ + "SavedObjectsReference", + "[]" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.UserContentCommonSchema.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.UserContentCommonSchema.attributes", + "type": "Object", + "tags": [], + "label": "attributes", + "description": [], + "signature": [ + "{ title: string; description?: string | undefined; }" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/content-management-tabbed-table-list-view", + "id": "def-common.TableListTabParentProps", + "type": "Type", + "tags": [], + "label": "TableListTabParentProps", + "description": [], + "signature": [ + "{ onFetchSuccess: () => void; setPageDataTestSubject: (subject: string) => void; }" + ], + "path": "packages/content-management/tabbed_table_list_view/src/tabbed_table_list_view.tsx", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx new file mode 100644 index 0000000000000..12856bcc427f1 --- /dev/null +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -0,0 +1,36 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnContentManagementTabbedTableListViewPluginApi +slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view +title: "@kbn/content-management-tabbed-table-list-view" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/content-management-tabbed-table-list-view plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] +--- +import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; + + + +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 14 | 0 | 14 | 0 | + +## Common + +### Functions + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_content_management_table_list.devdocs.json b/api_docs/kbn_content_management_table_list.devdocs.json deleted file mode 100644 index 37faef836498b..0000000000000 --- a/api_docs/kbn_content_management_table_list.devdocs.json +++ /dev/null @@ -1,438 +0,0 @@ -{ - "id": "@kbn/content-management-table-list", - "client": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { - "classes": [], - "functions": [ - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListView", - "type": "Function", - "tags": [], - "label": "TableListView", - "description": [], - "signature": [ - "({ tableListTitle, tableListDescription, entityName, entityNamePlural, initialFilter: initialQuery, headingId, initialPageSize, listingLimit, urlStateEnabled, customTableColumn, emptyPrompt, rowItemActions, findItems, createItem, editItem, showEditActionForItem, deleteItems, getDetailViewLink, onClickTitle, id: listingId, contentEditor, children, titleColumnName, additionalRightSideActions, withoutPageTemplateWrapper, }: ", - "Props", - ") => JSX.Element | null" - ], - "path": "packages/content-management/table_list/src/table_list_view.tsx", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListView.$1", - "type": "Object", - "tags": [], - "label": "__0", - "description": [], - "signature": [ - "Props", - "" - ], - "path": "packages/content-management/table_list/src/table_list_view.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewKibanaProvider", - "type": "Function", - "tags": [], - "label": "TableListViewKibanaProvider", - "description": [ - "\nKibana-specific Provider that maps to known dependency types." - ], - "signature": [ - "({ children, ...services }: React.PropsWithChildren<", - { - "pluginId": "@kbn/content-management-table-list", - "scope": "common", - "docId": "kibKbnContentManagementTableListPluginApi", - "section": "def-common.TableListViewKibanaDependencies", - "text": "TableListViewKibanaDependencies" - }, - ">) => JSX.Element" - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewKibanaProvider.$1", - "type": "CompoundType", - "tags": [], - "label": "{\n children,\n ...services\n}", - "description": [], - "signature": [ - "React.PropsWithChildren<", - { - "pluginId": "@kbn/content-management-table-list", - "scope": "common", - "docId": "kibKbnContentManagementTableListPluginApi", - "section": "def-common.TableListViewKibanaDependencies", - "text": "TableListViewKibanaDependencies" - }, - ">" - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewProvider", - "type": "Function", - "tags": [], - "label": "TableListViewProvider", - "description": [ - "\nAbstract external service Provider." - ], - "signature": [ - "({ children, ...services }: React.PropsWithChildren<", - "Services", - ">) => JSX.Element" - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewProvider.$1", - "type": "CompoundType", - "tags": [], - "label": "{ children, ...services }", - "description": [], - "signature": [ - "React.PropsWithChildren<", - "Services", - ">" - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - } - ], - "interfaces": [ - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewKibanaDependencies", - "type": "Interface", - "tags": [], - "label": "TableListViewKibanaDependencies", - "description": [ - "\nKibana-specific service types." - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewKibanaDependencies.core", - "type": "Object", - "tags": [], - "label": "core", - "description": [ - "CoreStart contract" - ], - "signature": [ - "{ application: { capabilities: { [key: string]: Readonly>>; }; getUrlForApp: (app: string, options: { path: string; }) => string; currentAppId$: ", - "Observable", - "; navigateToUrl: (url: string) => void | Promise; }; notifications: { toasts: { addDanger: (notifyArgs: { title: ", - { - "pluginId": "@kbn/core-mount-utils-browser", - "scope": "common", - "docId": "kibKbnCoreMountUtilsBrowserPluginApi", - "section": "def-common.MountPoint", - "text": "MountPoint" - }, - "; text?: string | undefined; }) => void; }; }; http: { basePath: { prepend: (path: string) => string; }; }; overlays: { openFlyout(mount: ", - { - "pluginId": "@kbn/core-mount-utils-browser", - "scope": "common", - "docId": "kibKbnCoreMountUtilsBrowserPluginApi", - "section": "def-common.MountPoint", - "text": "MountPoint" - }, - ", options?: ", - { - "pluginId": "@kbn/core-overlays-browser", - "scope": "common", - "docId": "kibKbnCoreOverlaysBrowserPluginApi", - "section": "def-common.OverlayFlyoutOpenOptions", - "text": "OverlayFlyoutOpenOptions" - }, - " | undefined): ", - { - "pluginId": "@kbn/core-mount-utils-browser", - "scope": "common", - "docId": "kibKbnCoreMountUtilsBrowserPluginApi", - "section": "def-common.OverlayRef", - "text": "OverlayRef" - }, - "; }; }" - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewKibanaDependencies.toMountPoint", - "type": "Function", - "tags": [], - "label": "toMountPoint", - "description": [ - "\nHandler from the '@kbn/kibana-react-plugin/public' Plugin\n\n```\nimport { toMountPoint } from '@kbn/kibana-react-plugin/public';\n```" - ], - "signature": [ - "(node: React.ReactNode, options?: { theme$: ", - "Observable", - "<{ readonly darkMode: boolean; }>; } | undefined) => ", - { - "pluginId": "@kbn/core-mount-utils-browser", - "scope": "common", - "docId": "kibKbnCoreMountUtilsBrowserPluginApi", - "section": "def-common.MountPoint", - "text": "MountPoint" - }, - "" - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewKibanaDependencies.toMountPoint.$1", - "type": "CompoundType", - "tags": [], - "label": "node", - "description": [], - "signature": [ - "React.ReactNode" - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewKibanaDependencies.toMountPoint.$2", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewKibanaDependencies.toMountPoint.$2.theme$", - "type": "Object", - "tags": [], - "label": "theme$", - "description": [], - "signature": [ - "Observable", - "<{ readonly darkMode: boolean; }>" - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewKibanaDependencies.savedObjectsTagging", - "type": "Object", - "tags": [], - "label": "savedObjectsTagging", - "description": [ - "\nThe public API from the savedObjectsTaggingOss plugin.\nIt is returned by calling `getTaggingApi()` from the SavedObjectTaggingOssPluginStart\n\n```js\nconst savedObjectsTagging = savedObjectsTaggingOss?.getTaggingApi()\n```" - ], - "signature": [ - "{ ui: { components: { TagList: React.FC<{ object: { references: ", - "SavedObjectsReference", - "[]; }; onClick?: ((tag: ", - "Tag", - ") => void) | undefined; tagRender?: ((tag: ", - "Tag", - ") => JSX.Element) | undefined; }>; SavedObjectSaveModalTagSelector: React.FC<{ initialSelection: string[]; onTagsSelected: (ids: string[]) => void; }>; }; parseSearchQuery: (query: string, options?: { useName?: boolean | undefined; tagField?: string | undefined; } | undefined) => Promise<{ searchTerm: string; tagReferences: ", - "SavedObjectsFindOptionsReference", - "[]; tagReferencesToExclude: ", - "SavedObjectsFindOptionsReference", - "[]; valid: boolean; }>; getTagList: () => ", - "Tag", - "[]; getTagIdsFromReferences: (references: ", - "SavedObjectsReference", - "[]) => string[]; }; } | undefined" - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.TableListViewKibanaDependencies.FormattedRelative", - "type": "Object", - "tags": [], - "label": "FormattedRelative", - "description": [ - "The component from the @kbn/i18n-react package" - ], - "signature": [ - "typeof ReactIntl.FormattedRelative" - ], - "path": "packages/content-management/table_list/src/services.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.UserContentCommonSchema", - "type": "Interface", - "tags": [], - "label": "UserContentCommonSchema", - "description": [], - "path": "packages/content-management/table_list/src/table_list_view.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.UserContentCommonSchema.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "packages/content-management/table_list/src/table_list_view.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.UserContentCommonSchema.updatedAt", - "type": "string", - "tags": [], - "label": "updatedAt", - "description": [], - "path": "packages/content-management/table_list/src/table_list_view.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.UserContentCommonSchema.references", - "type": "Array", - "tags": [], - "label": "references", - "description": [], - "signature": [ - "SavedObjectsReference", - "[]" - ], - "path": "packages/content-management/table_list/src/table_list_view.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.UserContentCommonSchema.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "path": "packages/content-management/table_list/src/table_list_view.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.UserContentCommonSchema.attributes", - "type": "Object", - "tags": [], - "label": "attributes", - "description": [], - "signature": [ - "{ title: string; description?: string | undefined; }" - ], - "path": "packages/content-management/table_list/src/table_list_view.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - } - ], - "enums": [], - "misc": [ - { - "parentPluginId": "@kbn/content-management-table-list", - "id": "def-common.RowActions", - "type": "Type", - "tags": [], - "label": "RowActions", - "description": [], - "signature": [ - "{ delete?: { enabled: boolean; reason?: string | undefined; } | undefined; }" - ], - "path": "packages/content-management/table_list/src/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - } - ], - "objects": [] - } -} \ No newline at end of file diff --git a/api_docs/kbn_content_management_table_list_view.devdocs.json b/api_docs/kbn_content_management_table_list_view.devdocs.json new file mode 100644 index 0000000000000..479945668d6c3 --- /dev/null +++ b/api_docs/kbn_content_management_table_list_view.devdocs.json @@ -0,0 +1,185 @@ +{ + "id": "@kbn/content-management-table-list-view", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/content-management-table-list-view", + "id": "def-common.TableListView", + "type": "Function", + "tags": [], + "label": "TableListView", + "description": [], + "signature": [ + "({ title, description, entityName, entityNamePlural, initialFilter, headingId, initialPageSize, listingLimit, urlStateEnabled, customTableColumn, emptyPrompt, findItems, createItem, editItem, deleteItems, getDetailViewLink, onClickTitle, rowItemActions, id: listingId, contentEditor, children, titleColumnName, additionalRightSideActions, withoutPageTemplateWrapper, }: ", + { + "pluginId": "@kbn/content-management-table-list-view", + "scope": "common", + "docId": "kibKbnContentManagementTableListViewPluginApi", + "section": "def-common.TableListViewProps", + "text": "TableListViewProps" + }, + ") => JSX.Element" + ], + "path": "packages/content-management/table_list_view/src/table_list_view.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view", + "id": "def-common.TableListView.$1", + "type": "CompoundType", + "tags": [], + "label": "{\n title,\n description,\n entityName,\n entityNamePlural,\n initialFilter,\n headingId,\n initialPageSize,\n listingLimit,\n urlStateEnabled = true,\n customTableColumn,\n emptyPrompt,\n findItems,\n createItem,\n editItem,\n deleteItems,\n getDetailViewLink,\n onClickTitle,\n rowItemActions,\n id: listingId,\n contentEditor,\n children,\n titleColumnName,\n additionalRightSideActions,\n withoutPageTemplateWrapper,\n}", + "description": [], + "signature": [ + { + "pluginId": "@kbn/content-management-table-list-view", + "scope": "common", + "docId": "kibKbnContentManagementTableListViewPluginApi", + "section": "def-common.TableListViewProps", + "text": "TableListViewProps" + }, + "" + ], + "path": "packages/content-management/table_list_view/src/table_list_view.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/content-management-table-list-view", + "id": "def-common.UserContentCommonSchema", + "type": "Interface", + "tags": [], + "label": "UserContentCommonSchema", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view", + "id": "def-common.UserContentCommonSchema.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view", + "id": "def-common.UserContentCommonSchema.updatedAt", + "type": "string", + "tags": [], + "label": "updatedAt", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view", + "id": "def-common.UserContentCommonSchema.references", + "type": "Array", + "tags": [], + "label": "references", + "description": [], + "signature": [ + "SavedObjectsReference", + "[]" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view", + "id": "def-common.UserContentCommonSchema.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view", + "id": "def-common.UserContentCommonSchema.attributes", + "type": "Object", + "tags": [], + "label": "attributes", + "description": [], + "signature": [ + "{ title: string; description?: string | undefined; }" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/content-management-table-list-view", + "id": "def-common.TableListViewProps", + "type": "Type", + "tags": [], + "label": "TableListViewProps", + "description": [], + "signature": [ + "Pick<", + { + "pluginId": "@kbn/content-management-table-list-view-table", + "scope": "common", + "docId": "kibKbnContentManagementTableListViewTablePluginApi", + "section": "def-common.TableListViewTableProps", + "text": "TableListViewTableProps" + }, + ", \"id\" | \"entityName\" | \"entityNamePlural\" | \"initialFilter\" | \"headingId\" | \"initialPageSize\" | \"listingLimit\" | \"urlStateEnabled\" | \"customTableColumn\" | \"emptyPrompt\" | \"findItems\" | \"createItem\" | \"editItem\" | \"deleteItems\" | \"getDetailViewLink\" | \"onClickTitle\" | \"rowItemActions\" | \"contentEditor\" | \"titleColumnName\" | \"withoutPageTemplateWrapper\" | \"showEditActionForItem\"> & { title: string; description?: string | undefined; additionalRightSideActions?: React.ReactNode[] | undefined; children?: React.ReactNode; }" + ], + "path": "packages/content-management/table_list_view/src/table_list_view.tsx", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list_view.mdx similarity index 55% rename from api_docs/kbn_content_management_table_list.mdx rename to api_docs/kbn_content_management_table_list_view.mdx index 28801df62705a..0250d6e335812 100644 --- a/api_docs/kbn_content_management_table_list.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -3,15 +3,15 @@ #### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. #### Reach out in #docs-engineering for more info. #### -id: kibKbnContentManagementTableListPluginApi -slug: /kibana-dev-docs/api/kbn-content-management-table-list -title: "@kbn/content-management-table-list" +id: kibKbnContentManagementTableListViewPluginApi +slug: /kibana-dev-docs/api/kbn-content-management-table-list-view +title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github -description: API docs for the @kbn/content-management-table-list plugin -date: 2023-06-13 -tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list'] +description: API docs for the @kbn/content-management-table-list-view plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- -import kbnContentManagementTableListObj from './kbn_content_management_table_list.devdocs.json'; +import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; @@ -21,16 +21,16 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 21 | 0 | 14 | 5 | +| 9 | 0 | 9 | 0 | ## Common ### Functions - + ### Interfaces - + ### Consts, variables and types - + diff --git a/api_docs/kbn_content_management_table_list_view_table.devdocs.json b/api_docs/kbn_content_management_table_list_view_table.devdocs.json new file mode 100644 index 0000000000000..246c8321c04a3 --- /dev/null +++ b/api_docs/kbn_content_management_table_list_view_table.devdocs.json @@ -0,0 +1,1050 @@ +{ + "id": "@kbn/content-management-table-list-view-table", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewKibanaProvider", + "type": "Function", + "tags": [], + "label": "TableListViewKibanaProvider", + "description": [ + "\nKibana-specific Provider that maps to known dependency types." + ], + "signature": [ + "({ children, ...services }: React.PropsWithChildren<", + { + "pluginId": "@kbn/content-management-table-list-view-table", + "scope": "common", + "docId": "kibKbnContentManagementTableListViewTablePluginApi", + "section": "def-common.TableListViewKibanaDependencies", + "text": "TableListViewKibanaDependencies" + }, + ">) => JSX.Element" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewKibanaProvider.$1", + "type": "CompoundType", + "tags": [], + "label": "{\n children,\n ...services\n}", + "description": [], + "signature": [ + "React.PropsWithChildren<", + { + "pluginId": "@kbn/content-management-table-list-view-table", + "scope": "common", + "docId": "kibKbnContentManagementTableListViewTablePluginApi", + "section": "def-common.TableListViewKibanaDependencies", + "text": "TableListViewKibanaDependencies" + }, + ">" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewProvider", + "type": "Function", + "tags": [], + "label": "TableListViewProvider", + "description": [ + "\nAbstract external service Provider." + ], + "signature": [ + "({ children, ...services }: React.PropsWithChildren<", + "Services", + ">) => JSX.Element" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewProvider.$1", + "type": "CompoundType", + "tags": [], + "label": "{ children, ...services }", + "description": [], + "signature": [ + "React.PropsWithChildren<", + "Services", + ">" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTable", + "type": "Function", + "tags": [], + "label": "TableListViewTable", + "description": [], + "signature": [ + "({ tableCaption, entityName, entityNamePlural, initialFilter: initialQuery, headingId, initialPageSize, listingLimit, urlStateEnabled, customTableColumn, emptyPrompt, rowItemActions, findItems, createItem, editItem, showEditActionForItem, deleteItems, getDetailViewLink, onClickTitle, id: listingId, contentEditor, titleColumnName, withoutPageTemplateWrapper, onFetchSuccess, refreshListBouncer, setPageDataTestSubject, }: ", + { + "pluginId": "@kbn/content-management-table-list-view-table", + "scope": "common", + "docId": "kibKbnContentManagementTableListViewTablePluginApi", + "section": "def-common.TableListViewTableProps", + "text": "TableListViewTableProps" + }, + ") => JSX.Element | null" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTable.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + { + "pluginId": "@kbn/content-management-table-list-view-table", + "scope": "common", + "docId": "kibKbnContentManagementTableListViewTablePluginApi", + "section": "def-common.TableListViewTableProps", + "text": "TableListViewTableProps" + }, + "" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewKibanaDependencies", + "type": "Interface", + "tags": [], + "label": "TableListViewKibanaDependencies", + "description": [ + "\nKibana-specific service types." + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewKibanaDependencies.core", + "type": "Object", + "tags": [], + "label": "core", + "description": [ + "CoreStart contract" + ], + "signature": [ + "{ application: { capabilities: { [key: string]: Readonly>>; }; getUrlForApp: (app: string, options: { path: string; }) => string; currentAppId$: ", + "Observable", + "; navigateToUrl: (url: string) => void | Promise; }; notifications: { toasts: { addDanger: (notifyArgs: { title: ", + { + "pluginId": "@kbn/core-mount-utils-browser", + "scope": "common", + "docId": "kibKbnCoreMountUtilsBrowserPluginApi", + "section": "def-common.MountPoint", + "text": "MountPoint" + }, + "; text?: string | undefined; }) => void; }; }; http: { basePath: { prepend: (path: string) => string; }; }; overlays: { openFlyout(mount: ", + { + "pluginId": "@kbn/core-mount-utils-browser", + "scope": "common", + "docId": "kibKbnCoreMountUtilsBrowserPluginApi", + "section": "def-common.MountPoint", + "text": "MountPoint" + }, + ", options?: ", + { + "pluginId": "@kbn/core-overlays-browser", + "scope": "common", + "docId": "kibKbnCoreOverlaysBrowserPluginApi", + "section": "def-common.OverlayFlyoutOpenOptions", + "text": "OverlayFlyoutOpenOptions" + }, + " | undefined): ", + { + "pluginId": "@kbn/core-mount-utils-browser", + "scope": "common", + "docId": "kibKbnCoreMountUtilsBrowserPluginApi", + "section": "def-common.OverlayRef", + "text": "OverlayRef" + }, + "; }; }" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewKibanaDependencies.toMountPoint", + "type": "Function", + "tags": [], + "label": "toMountPoint", + "description": [ + "\nHandler from the '@kbn/kibana-react-plugin/public' Plugin\n\n```\nimport { toMountPoint } from '@kbn/kibana-react-plugin/public';\n```" + ], + "signature": [ + "(node: React.ReactNode, options?: { theme$: ", + "Observable", + "<{ readonly darkMode: boolean; }>; } | undefined) => ", + { + "pluginId": "@kbn/core-mount-utils-browser", + "scope": "common", + "docId": "kibKbnCoreMountUtilsBrowserPluginApi", + "section": "def-common.MountPoint", + "text": "MountPoint" + }, + "" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewKibanaDependencies.toMountPoint.$1", + "type": "CompoundType", + "tags": [], + "label": "node", + "description": [], + "signature": [ + "React.ReactNode" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewKibanaDependencies.toMountPoint.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewKibanaDependencies.toMountPoint.$2.theme$", + "type": "Object", + "tags": [], + "label": "theme$", + "description": [], + "signature": [ + "Observable", + "<{ readonly darkMode: boolean; }>" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewKibanaDependencies.savedObjectsTagging", + "type": "Object", + "tags": [], + "label": "savedObjectsTagging", + "description": [ + "\nThe public API from the savedObjectsTaggingOss plugin.\nIt is returned by calling `getTaggingApi()` from the SavedObjectTaggingOssPluginStart\n\n```js\nconst savedObjectsTagging = savedObjectsTaggingOss?.getTaggingApi()\n```" + ], + "signature": [ + "{ ui: { components: { TagList: React.FC<{ object: { references: ", + "SavedObjectsReference", + "[]; }; onClick?: ((tag: ", + "Tag", + ") => void) | undefined; tagRender?: ((tag: ", + "Tag", + ") => JSX.Element) | undefined; }>; SavedObjectSaveModalTagSelector: React.FC<{ initialSelection: string[]; onTagsSelected: (ids: string[]) => void; }>; }; parseSearchQuery: (query: string, options?: { useName?: boolean | undefined; tagField?: string | undefined; } | undefined) => Promise<{ searchTerm: string; tagReferences: ", + "SavedObjectsFindOptionsReference", + "[]; tagReferencesToExclude: ", + "SavedObjectsFindOptionsReference", + "[]; valid: boolean; }>; getTagList: () => ", + "Tag", + "[]; getTagIdsFromReferences: (references: ", + "SavedObjectsReference", + "[]) => string[]; }; } | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewKibanaDependencies.FormattedRelative", + "type": "Object", + "tags": [], + "label": "FormattedRelative", + "description": [ + "The component from the @kbn/i18n-react package" + ], + "signature": [ + "typeof ReactIntl.FormattedRelative" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps", + "type": "Interface", + "tags": [], + "label": "TableListViewTableProps", + "description": [], + "signature": [ + { + "pluginId": "@kbn/content-management-table-list-view-table", + "scope": "common", + "docId": "kibKbnContentManagementTableListViewTablePluginApi", + "section": "def-common.TableListViewTableProps", + "text": "TableListViewTableProps" + }, + "" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.entityName", + "type": "string", + "tags": [], + "label": "entityName", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.entityNamePlural", + "type": "string", + "tags": [], + "label": "entityNamePlural", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.listingLimit", + "type": "number", + "tags": [], + "label": "listingLimit", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.initialFilter", + "type": "string", + "tags": [], + "label": "initialFilter", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.initialPageSize", + "type": "number", + "tags": [], + "label": "initialPageSize", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.emptyPrompt", + "type": "Object", + "tags": [], + "label": "emptyPrompt", + "description": [], + "signature": [ + "JSX.Element | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.customTableColumn", + "type": "CompoundType", + "tags": [], + "label": "customTableColumn", + "description": [ + "Add an additional custom column" + ], + "signature": [ + "EuiBasicTableColumn", + " | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.urlStateEnabled", + "type": "CompoundType", + "tags": [], + "label": "urlStateEnabled", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.headingId", + "type": "string", + "tags": [], + "label": "headingId", + "description": [ + "\nId of the heading element describing the table. This id will be used as `aria-labelledby` of the wrapper element.\nIf the table is not empty, this component renders its own h1 element using the same id." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.id", + "type": "string", + "tags": [], + "label": "id", + "description": [ + "An optional id for the listing. Used to generate unique data-test-subj. Default: \"userContent\"" + ], + "signature": [ + "string | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.rowItemActions", + "type": "Function", + "tags": [], + "label": "rowItemActions", + "description": [ + "\nConfiguration of the table row item actions. Disable specific action for a table row item.\nCurrently only the \"delete\" ite action can be disabled." + ], + "signature": [ + "((obj: T) => ", + { + "pluginId": "@kbn/content-management-table-list-view-table", + "scope": "common", + "docId": "kibKbnContentManagementTableListViewTablePluginApi", + "section": "def-common.RowActions", + "text": "RowActions" + }, + " | undefined) | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.rowItemActions.$1", + "type": "Uncategorized", + "tags": [], + "label": "obj", + "description": [], + "signature": [ + "T" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.findItems", + "type": "Function", + "tags": [], + "label": "findItems", + "description": [], + "signature": [ + "(searchQuery: string, refs?: { references?: ", + "SavedObjectsFindOptionsReference", + "[] | undefined; referencesToExclude?: ", + "SavedObjectsFindOptionsReference", + "[] | undefined; } | undefined) => Promise<{ total: number; hits: T[]; }>" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.findItems.$1", + "type": "string", + "tags": [], + "label": "searchQuery", + "description": [], + "signature": [ + "string" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.findItems.$2", + "type": "Object", + "tags": [], + "label": "refs", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.findItems.$2.references", + "type": "Array", + "tags": [], + "label": "references", + "description": [], + "signature": [ + "SavedObjectsFindOptionsReference", + "[] | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.findItems.$2.referencesToExclude", + "type": "Array", + "tags": [], + "label": "referencesToExclude", + "description": [], + "signature": [ + "SavedObjectsFindOptionsReference", + "[] | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.getDetailViewLink", + "type": "Function", + "tags": [], + "label": "getDetailViewLink", + "description": [ + "Handler to set the item title \"href\" value. If it returns undefined there won't be a link for this item." + ], + "signature": [ + "((entity: T) => string | undefined) | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.getDetailViewLink.$1", + "type": "Uncategorized", + "tags": [], + "label": "entity", + "description": [], + "signature": [ + "T" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.onClickTitle", + "type": "Function", + "tags": [], + "label": "onClickTitle", + "description": [ + "Handler to execute when clicking the item title" + ], + "signature": [ + "((item: T) => void) | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.onClickTitle.$1", + "type": "Uncategorized", + "tags": [], + "label": "item", + "description": [], + "signature": [ + "T" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.createItem", + "type": "Function", + "tags": [], + "label": "createItem", + "description": [], + "signature": [ + "(() => void) | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.deleteItems", + "type": "Function", + "tags": [], + "label": "deleteItems", + "description": [], + "signature": [ + "((items: T[]) => Promise) | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.deleteItems.$1", + "type": "Array", + "tags": [], + "label": "items", + "description": [], + "signature": [ + "T[]" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.editItem", + "type": "Function", + "tags": [], + "label": "editItem", + "description": [ + "\nEdit action onClick handler. Edit action not provided when property is not provided" + ], + "signature": [ + "((item: T) => void) | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.editItem.$1", + "type": "Uncategorized", + "tags": [], + "label": "item", + "description": [], + "signature": [ + "T" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.showEditActionForItem", + "type": "Function", + "tags": [], + "label": "showEditActionForItem", + "description": [ + "\nHandler to set edit action visiblity per item." + ], + "signature": [ + "((item: T) => boolean) | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.showEditActionForItem.$1", + "type": "Uncategorized", + "tags": [], + "label": "item", + "description": [], + "signature": [ + "T" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.titleColumnName", + "type": "string", + "tags": [], + "label": "titleColumnName", + "description": [ + "\nName for the column containing the \"title\" value." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.withoutPageTemplateWrapper", + "type": "CompoundType", + "tags": [ + "note", + "deprecated" + ], + "label": "withoutPageTemplateWrapper", + "description": [ + "\nThis assumes the content is already wrapped in an outer PageTemplate component." + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "@kbn/content-management-table-list-view", + "path": "packages/content-management/table_list_view/src/table_list_view.tsx" + }, + { + "plugin": "@kbn/content-management-table-list-view", + "path": "packages/content-management/table_list_view/src/table_list_view.tsx" + }, + { + "plugin": "filesManagement", + "path": "src/plugins/files_management/public/app.tsx" + } + ] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.contentEditor", + "type": "Object", + "tags": [], + "label": "contentEditor", + "description": [], + "signature": [ + "ContentEditorConfig | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.tableCaption", + "type": "string", + "tags": [], + "label": "tableCaption", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.refreshListBouncer", + "type": "CompoundType", + "tags": [], + "label": "refreshListBouncer", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.onFetchSuccess", + "type": "Function", + "tags": [], + "label": "onFetchSuccess", + "description": [], + "signature": [ + "() => void" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.setPageDataTestSubject", + "type": "Function", + "tags": [], + "label": "setPageDataTestSubject", + "description": [], + "signature": [ + "(subject: string) => void" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.TableListViewTableProps.setPageDataTestSubject.$1", + "type": "string", + "tags": [], + "label": "subject", + "description": [], + "signature": [ + "string" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.UserContentCommonSchema", + "type": "Interface", + "tags": [], + "label": "UserContentCommonSchema", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.UserContentCommonSchema.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.UserContentCommonSchema.updatedAt", + "type": "string", + "tags": [], + "label": "updatedAt", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.UserContentCommonSchema.references", + "type": "Array", + "tags": [], + "label": "references", + "description": [], + "signature": [ + "SavedObjectsReference", + "[]" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.UserContentCommonSchema.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.UserContentCommonSchema.attributes", + "type": "Object", + "tags": [], + "label": "attributes", + "description": [], + "signature": [ + "{ title: string; description?: string | undefined; }" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-common.RowActions", + "type": "Type", + "tags": [], + "label": "RowActions", + "description": [], + "signature": [ + "{ delete?: { enabled: boolean; reason?: string | undefined; } | undefined; }" + ], + "path": "packages/content-management/table_list_view_table/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx new file mode 100644 index 0000000000000..8e291284e7d18 --- /dev/null +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -0,0 +1,36 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnContentManagementTableListViewTablePluginApi +slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table +title: "@kbn/content-management-table-list-view-table" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/content-management-table-list-view-table plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] +--- +import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; + + + +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 58 | 0 | 41 | 4 | + +## Common + +### Functions + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index 0957783cf61d6..e9f20785e901d 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-06-13 +date: 2023-06-14 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 dcf3a33bea59f..cf4d6ef543f54 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index e3afc2c27e43a..899ee869ab0da 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 116da00fb3cc9..ae59e774d891b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 1a51ebfce7cd8..10137e5007bd0 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 8d353429cdac3..a5e9c941f08e6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index ff6e8196b3a06..4c76730791935 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.devdocs.json b/api_docs/kbn_core_application_browser.devdocs.json index cb8d6d567771d..662fd133880ed 100644 --- a/api_docs/kbn_core_application_browser.devdocs.json +++ b/api_docs/kbn_core_application_browser.devdocs.json @@ -369,7 +369,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - "[] | undefined" + "[] | undefined" ], "path": "packages/core/application/core-application-browser/src/application.ts", "deprecated": false, @@ -1769,7 +1769,7 @@ "\nInput type for registering secondary in-app locations for an application.\n\nDeep links must include at least one of `path` or `deepLinks`. A deep link that does not have a `path`\nrepresents a topological level in the application's hierarchy, but does not have a destination URL that is\nuser-accessible." ], "signature": [ - "{ id: string; title: string; keywords?: string[] | undefined; navLinkStatus?: ", + "{ id: Id; title: string; keywords?: string[] | undefined; navLinkStatus?: ", { "pluginId": "@kbn/core-application-browser", "scope": "common", @@ -1793,7 +1793,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - "[] | undefined; } | { path?: string | undefined; deepLinks: ", + "[] | undefined; } | { path?: string | undefined; deepLinks: ", { "pluginId": "@kbn/core-application-browser", "scope": "common", @@ -1801,7 +1801,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - "[]; })" + "[]; })" ], "path": "packages/core/application/core-application-browser/src/application.ts", "deprecated": false, @@ -2030,7 +2030,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - "[] | undefined; defaultPath?: string | undefined; }" + "[] | undefined; defaultPath?: string | undefined; }" ], "path": "packages/core/application/core-application-browser/src/application.ts", "deprecated": false, @@ -2112,7 +2112,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - ", \"keywords\" | \"navLinkStatus\" | \"searchable\" | \"deepLinks\"> & { deepLinks: ", + ", \"keywords\" | \"navLinkStatus\" | \"searchable\" | \"deepLinks\"> & { deepLinks: ", { "pluginId": "@kbn/core-application-browser", "scope": "common", diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 3053656547bda..dad335073adca 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index 553936effe72b..bf5b8a3cad7a9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index 388e965421f09..e3df822e15bd2 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index 351492de49d03..dedd0c5bc3822 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index 8e1a5cee3d653..241fc95d98972 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index b04f00fb1ab82..2b2f0b7aed839 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index cf4f4aeae9c93..e6ac8d1f36b53 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-06-13 +date: 2023-06-14 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 5e1603615feea..e8423b6a53ee7 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 3b4ef14f060ec..6e9f440d3495d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index e29b49b4c189d..8fbdfe8b055a2 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index d2dbc4f4af268..50e793fe4bf92 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 4152261c5baf2..a51939fa79fb7 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index b3f0fb81f1f0d..dec70d916eb39 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index d6316a7935ae6..ae5129105c110 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 5ce4f8114e7e0..ca9c1a619c412 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.devdocs.json b/api_docs/kbn_core_chrome_browser.devdocs.json index b8ba56345d069..ad5ec15543607 100644 --- a/api_docs/kbn_core_chrome_browser.devdocs.json +++ b/api_docs/kbn_core_chrome_browser.devdocs.json @@ -1338,19 +1338,6 @@ "deprecated": false, "trackAdoption": false, "children": [ - { - "parentPluginId": "@kbn/core-chrome-browser", - "id": "def-common.ChromeProjectNavigation.homeRef", - "type": "string", - "tags": [], - "label": "homeRef", - "description": [ - "\nThe URL href for the home link" - ], - "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "@kbn/core-chrome-browser", "id": "def-common.ChromeProjectNavigation.navigationTree", @@ -2580,6 +2567,134 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.NodeDefinition", + "type": "Interface", + "tags": [], + "label": "NodeDefinition", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + "" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.NodeDefinition.id", + "type": "Uncategorized", + "tags": [], + "label": "id", + "description": [ + "Optional id, if not passed a \"link\" must be provided." + ], + "signature": [ + "Id | undefined" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.NodeDefinition.title", + "type": "string", + "tags": [], + "label": "title", + "description": [ + "Optional title. If not provided and a \"link\" is provided the title will be the Deep link title" + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.NodeDefinition.link", + "type": "Uncategorized", + "tags": [], + "label": "link", + "description": [ + "App id or deeplink id" + ], + "signature": [ + "LinkId | undefined" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.NodeDefinition.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [ + "Optional icon for the navigation node. Note: not all navigation depth will render the icon" + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.NodeDefinition.children", + "type": "Object", + "tags": [], + "label": "children", + "description": [ + "Optional children of the navigation node" + ], + "signature": [ + "NonEmptyArray<", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + "> | undefined" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.NodeDefinition.href", + "type": "string", + "tags": [], + "label": "href", + "description": [ + "\nUse href for absolute links only. Internal links should use \"link\"." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/core-chrome-browser", "id": "def-common.SideNavCompProps", @@ -2596,6 +2711,97 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.AppDeepLinkId", + "type": "Type", + "tags": [], + "label": "AppDeepLinkId", + "description": [], + "signature": [ + { + "pluginId": "@kbn/deeplinks-analytics", + "scope": "common", + "docId": "kibKbnDeeplinksAnalyticsPluginApi", + "section": "def-common.AppId", + "text": "AppId" + }, + " | ", + { + "pluginId": "@kbn/deeplinks-devtools", + "scope": "common", + "docId": "kibKbnDeeplinksDevtoolsPluginApi", + "section": "def-common.DeepLinkId", + "text": "DeepLinkId" + }, + " | ", + { + "pluginId": "@kbn/deeplinks-ml", + "scope": "common", + "docId": "kibKbnDeeplinksMlPluginApi", + "section": "def-common.DeepLinkId", + "text": "DeepLinkId" + }, + " | ", + { + "pluginId": "@kbn/deeplinks-management", + "scope": "common", + "docId": "kibKbnDeeplinksManagementPluginApi", + "section": "def-common.DeepLinkId", + "text": "DeepLinkId" + }, + " | \"serverlessElasticsearch\" | ", + { + "pluginId": "@kbn/deeplinks-observability", + "scope": "common", + "docId": "kibKbnDeeplinksObservabilityPluginApi", + "section": "def-common.DeepLinkId", + "text": "DeepLinkId" + } + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.AppId", + "type": "Type", + "tags": [], + "label": "AppId", + "description": [], + "signature": [ + "\"ml\" | \"dev_tools\" | ", + { + "pluginId": "@kbn/deeplinks-analytics", + "scope": "common", + "docId": "kibKbnDeeplinksAnalyticsPluginApi", + "section": "def-common.AppId", + "text": "AppId" + }, + " | \"serverlessElasticsearch\" | ", + { + "pluginId": "@kbn/deeplinks-observability", + "scope": "common", + "docId": "kibKbnDeeplinksObservabilityPluginApi", + "section": "def-common.AppId", + "text": "AppId" + }, + " | ", + { + "pluginId": "@kbn/deeplinks-management", + "scope": "common", + "docId": "kibKbnDeeplinksManagementPluginApi", + "section": "def-common.AppId", + "text": "AppId" + } + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/core-chrome-browser", "id": "def-common.ChromeBreadcrumb", @@ -2694,30 +2900,45 @@ }, { "parentPluginId": "@kbn/core-chrome-browser", - "id": "def-common.ChromeProjectNavigationLink", + "id": "def-common.ChromeStyle", "type": "Type", "tags": [], - "label": "ChromeProjectNavigationLink", + "label": "ChromeStyle", "description": [], "signature": [ - "string" + "\"project\" | \"classic\"" ], - "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "path": "packages/core/chrome/core-chrome-browser/src/types.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/core-chrome-browser", - "id": "def-common.ChromeStyle", + "id": "def-common.NodeDefinitionWithChildren", "type": "Type", "tags": [], - "label": "ChromeStyle", + "label": "NodeDefinitionWithChildren", "description": [], "signature": [ - "\"project\" | \"classic\"" + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + " & { children: NonEmptyArray<", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + ">; }" ], - "path": "packages/core/chrome/core-chrome-browser/src/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index e43b7f8c4790b..34d248f0605fd 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.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 | |-------------------|-----------|------------------------|-----------------| -| 141 | 0 | 55 | 0 | +| 149 | 0 | 58 | 0 | ## Common diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 148dd4ce34047..6c1cafda4ec49 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 8ceb2ddaf54aa..bd6e963d2ff67 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index 40654768f0196..25e15e9cd90a9 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-06-13 +date: 2023-06-14 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 836a6553188aa..02bc547c6c74b 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-06-13 +date: 2023-06-14 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 66559cac885f7..0688b10ae7e81 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-06-13 +date: 2023-06-14 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 dcc5c37842c81..ffe9865554a78 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-06-13 +date: 2023-06-14 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 fece319b67f05..4fa8343476499 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-06-13 +date: 2023-06-14 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 3c18fe47fe20f..cb3e65e00518d 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-06-13 +date: 2023-06-14 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 346676cf89699..3398e1b6966bc 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-06-13 +date: 2023-06-14 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 09f855b329726..acf647ab1236f 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index ddb597432873d..b2779e5656e17 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 5321068153fa4..85b42ff18e9a9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index 8b252b44d83db..185b662231d28 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 4ba32863ee3a7..a440a5a1d7815 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index e7e32b341b197..102820a780758 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 9635f8751f069..2a79755505c0b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 02aa221a08ab3..2fb6cb0dd8d0c 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 69465f5eb2729..dd6aa44477d18 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index e756fca3060b5..ad095a9bb0f12 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index 8afacdb2b98cc..e1f21a6df7771 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index 48e59ffce4374..a4dac7cc391fc 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index d2d1380bac178..a86412bb8226e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index b56a7d50d5e47..214b7b18da4b8 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index d242b509726c0..8d5cb3d428a8d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index c2d7a5bfe98a8..83dbee6934e1b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index a79c23875402a..e639105ae3435 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index a7dbce38c04dc..0c67b869e44da 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 4a765e322e7e7..a4ef7865d79c8 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index cb7109086a8d6..37aa90b549539 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index fd4c067e84a87..31f1d621c9bf5 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index 73cc476e7b50c..4804a87f75a11 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 1351f263b6de4..64f4f44af18eb 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index d53532ecb84ac..8e4b6569bdf96 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index 2e57f786f298c..8d9f661b8a0e1 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index fca3eceb4759f..d32e209972728 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 2eee1ab86b198..813ae28df3933 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index 88fc7147412d5..9137274dc6894 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index 00e7816323d92..a444d18bd6f20 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 3f3da0f9f3017..7085c546db87a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 8fc239ead189a..cbec813eee081 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 4e538ea4e76f0..de87251ebab59 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index 3826609ea8a25..0e21f60f2a75b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index cd445b95233cc..2eb26c17178f2 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index e875fa83c7854..fc7a93bea36c1 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index d8c6201d826f0..68a053c8febe7 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 07a57ff2eddaf..898c4a42853fc 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index a0256b83c6ee8..8919eef53e9ae 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index 2ac0a7df55d4d..e2c9413c6ac29 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -3631,6 +3631,10 @@ "plugin": "ruleRegistry", "path": "x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_feature_id.ts" }, + { + "plugin": "ruleRegistry", + "path": "x-pack/plugins/rule_registry/server/routes/get_aad_fields_by_rule_type.ts" + }, { "plugin": "guidedOnboarding", "path": "src/plugins/guided_onboarding/server/routes/guide_state_routes.ts" @@ -3771,14 +3775,6 @@ "plugin": "canvas", "path": "x-pack/plugins/canvas/server/routes/functions/functions.ts" }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/policies/policies.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/status/status.ts" - }, { "plugin": "cloudSecurityPosture", "path": "x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.ts" @@ -4571,22 +4567,6 @@ "plugin": "ingestPipelines", "path": "x-pack/plugins/ingest_pipelines/server/routes/api/documents.ts" }, - { - "plugin": "kubernetesSecurity", - "path": "x-pack/plugins/kubernetes_security/server/routes/agent_id.ts" - }, - { - "plugin": "kubernetesSecurity", - "path": "x-pack/plugins/kubernetes_security/server/routes/aggregate.ts" - }, - { - "plugin": "kubernetesSecurity", - "path": "x-pack/plugins/kubernetes_security/server/routes/count.ts" - }, - { - "plugin": "kubernetesSecurity", - "path": "x-pack/plugins/kubernetes_security/server/routes/multi_terms_aggregate.ts" - }, { "plugin": "licenseManagement", "path": "x-pack/plugins/license_management/server/routes/api/license/register_start_trial_routes.ts" @@ -5595,54 +5575,6 @@ "plugin": "canvas", "path": "x-pack/plugins/canvas/server/routes/workpad/resolve.test.ts" }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/policies/policies.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/policies/policies.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/policies/policies.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/status/status.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/status/status.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/status/status.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/status/status.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/status/status.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/status/status.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/status/status.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/status/status.test.ts" - }, - { - "plugin": "cloudDefend", - "path": "x-pack/plugins/cloud_defend/server/routes/status/status.test.ts" - }, { "plugin": "cloudChat", "path": "x-pack/plugins/cloud_integrations/cloud_chat/server/routes/chat.test.ts" @@ -14442,6 +14374,14 @@ "plugin": "infra", "path": "x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts" }, + { + "plugin": "cloudDefend", + "path": "x-pack/plugins/cloud_defend/server/routes/policies/policies.ts" + }, + { + "plugin": "cloudDefend", + "path": "x-pack/plugins/cloud_defend/server/routes/status/status.ts" + }, { "plugin": "cloudSecurityPosture", "path": "x-pack/plugins/cloud_security_posture/server/routes/csp_rule_template/get_csp_rule_template.ts" @@ -14450,6 +14390,18 @@ "plugin": "fileUpload", "path": "x-pack/plugins/file_upload/server/routes.ts" }, + { + "plugin": "kubernetesSecurity", + "path": "x-pack/plugins/kubernetes_security/server/routes/aggregate.ts" + }, + { + "plugin": "kubernetesSecurity", + "path": "x-pack/plugins/kubernetes_security/server/routes/count.ts" + }, + { + "plugin": "kubernetesSecurity", + "path": "x-pack/plugins/kubernetes_security/server/routes/multi_terms_aggregate.ts" + }, { "plugin": "maps", "path": "x-pack/plugins/maps/server/mvt/mvt_routes.ts" @@ -14522,6 +14474,14 @@ "plugin": "transform", "path": "x-pack/plugins/transform/server/routes/api/transforms.ts" }, + { + "plugin": "cloudDefend", + "path": "x-pack/plugins/cloud_defend/server/routes/policies/policies.test.ts" + }, + { + "plugin": "cloudDefend", + "path": "x-pack/plugins/cloud_defend/server/routes/status/status.test.ts" + }, { "plugin": "controls", "path": "src/plugins/controls/server/options_list/options_list_cluster_settings_route.ts" diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index bffb2c52c2685..b43f7bfa811f1 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.devdocs.json b/api_docs/kbn_core_http_server_internal.devdocs.json index 5ab81378db238..7978ebec5add0 100644 --- a/api_docs/kbn_core_http_server_internal.devdocs.json +++ b/api_docs/kbn_core_http_server_internal.devdocs.json @@ -511,6 +511,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-common.HttpConfig.versioned", + "type": "Object", + "tags": [], + "label": "versioned", + "description": [], + "signature": [ + "{ versionResolution: \"newest\" | \"oldest\"; strictClientVersionCheck: boolean; }" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-http-server-internal", "id": "def-common.HttpConfig.shutdownTimeout", @@ -893,7 +907,7 @@ "label": "HttpConfigType", "description": [], "signature": [ - "{ readonly uuid?: string | undefined; readonly basePath?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; readonly host: string; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; readonly port: number; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", + "{ readonly uuid?: string | undefined; readonly basePath?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; readonly host: string; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; readonly port: number; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly versioned: Readonly<{} & { versionResolution: \"newest\" | \"oldest\"; strictClientVersionCheck: boolean; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "common", diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 78100afd929ed..637cb7f3bae9e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 57 | 0 | 51 | 6 | +| 58 | 0 | 52 | 6 | ## Common diff --git a/api_docs/kbn_core_http_server_mocks.devdocs.json b/api_docs/kbn_core_http_server_mocks.devdocs.json index e865f39eefd7e..f2b8a3844fa2d 100644 --- a/api_docs/kbn_core_http_server_mocks.devdocs.json +++ b/api_docs/kbn_core_http_server_mocks.devdocs.json @@ -19,6 +19,78 @@ "common": { "classes": [], "functions": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-common.createConfigService", + "type": "Function", + "tags": [], + "label": "createConfigService", + "description": [], + "signature": [ + "({ server, externalUrl, csp, }?: Partial<{ server: Partial; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; port: number; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { versionResolution: \"newest\" | \"oldest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.ByteSizeValue", + "text": "ByteSizeValue" + }, + "; rewriteBasePath: boolean; keepaliveTimeout: number; socketTimeout: number; xsrf: Readonly<{} & { disableProtection: boolean; allowlist: string[]; }>; eluMonitor: Readonly<{} & { enabled: boolean; logging: Readonly<{} & { enabled: boolean; threshold: Readonly<{} & { elu: number; ela: number; }>; }>; }>; requestId: Readonly<{} & { allowFromAnyIp: boolean; ipAllowlist: string[]; }>; restrictInternalApis: boolean; }>>; externalUrl: Partial>; csp: Partial>; }>) => ", + { + "pluginId": "@kbn/config-mocks", + "scope": "common", + "docId": "kibKbnConfigMocksPluginApi", + "section": "def-common.IConfigServiceMock", + "text": "IConfigServiceMock" + } + ], + "path": "packages/core/http/core-http-server-mocks/src/test_utils.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-common.createConfigService.$1", + "type": "Object", + "tags": [], + "label": "{\n server,\n externalUrl,\n csp,\n}", + "description": [], + "signature": [ + "Partial<{ server: Partial; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; port: number; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { versionResolution: \"newest\" | \"oldest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.ByteSizeValue", + "text": "ByteSizeValue" + }, + "; rewriteBasePath: boolean; keepaliveTimeout: number; socketTimeout: number; xsrf: Readonly<{} & { disableProtection: boolean; allowlist: string[]; }>; eluMonitor: Readonly<{} & { enabled: boolean; logging: Readonly<{} & { enabled: boolean; threshold: Readonly<{} & { elu: number; ela: number; }>; }>; }>; requestId: Readonly<{} & { allowFromAnyIp: boolean; ipAllowlist: string[]; }>; restrictInternalApis: boolean; }>>; externalUrl: Partial>; csp: Partial>; }>" + ], + "path": "packages/core/http/core-http-server-mocks/src/test_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/core-http-server-mocks", "id": "def-common.createCoreContext", diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 04da8473ce017..0be97a1c8dd1a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 41 | 0 | 40 | 0 | +| 43 | 0 | 42 | 0 | ## Common diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index dc72320c1744a..7c5031684ebdd 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index c1cc9d97d6ab7..641035d1a216c 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index e1f33e3488edc..87fb4e3922182 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 1b0ef69cb6f7b..cf011393beee5 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 253715f621ec3..6e5fd6d6effb1 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 8d54db5c2c11d..09f09b01572e1 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index 3ba26a1ba66a0..26ed4ee5bdd09 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index af877b51c2cce..3d3f8de8c2857 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.devdocs.json b/api_docs/kbn_core_lifecycle_browser.devdocs.json index d74633c2b4415..b9ca527e96f1d 100644 --- a/api_docs/kbn_core_lifecycle_browser.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser.devdocs.json @@ -646,16 +646,20 @@ "path": "x-pack/plugins/monitoring/public/application/pages/elasticsearch/ingest_pipeline_modal.tsx" }, { - "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx" + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/mount_management_section.ts" }, { - "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/plugin.ts" + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.test.ts" }, { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/mount_management_section.ts" + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.test.ts" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.test.ts" }, { "plugin": "eventAnnotation", diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 6e27e55d757c9..1ffe09965d1f2 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 1f631ee1d52f0..0e95f9d39afb9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index d12916d727245..b13d8c7f16d0c 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-06-13 +date: 2023-06-14 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 078bcf7babd47..c68f12e6db3cb 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-06-13 +date: 2023-06-14 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 3a1586befa853..2d392a3efa1d2 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-06-13 +date: 2023-06-14 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 378e892c5da94..d7b8592fb297f 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-06-13 +date: 2023-06-14 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 ae20f43ccee3b..877dcef3a3da3 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index 9d8d93239d5e5..f5c37d6842233 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index e109f2406906b..f3752349054ca 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index c0fee6aef4a74..85ef76f9c7bf1 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index 1805dbab55664..9aea297297852 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index 360b915db0707..9dfa81bf93d98 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index 0f64a73198f54..9945a37f83b66 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index c923738ef29bd..f410087cd7625 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index 1733bd7537f3c..9b2533f326331 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 1c1e02e289568..3aea027eb07db 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 537e47e9cbfb1..8fed558e0a506 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 7679787527442..d04a0e678f158 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 25b416220bd93..669fa2369bee6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 2e96770b78131..f9b64b6ad09f5 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index b966ccd7d1cfd..2dd4bca7b77c6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index e20d3b4577992..ac9f504fee1e5 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index fdb9386ae6a8e..347b03bb52f13 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index 07cd0adcbcee8..70f03f2237c46 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index 7083e9adc7136..7251db98ef269 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 60298db109ffe..3a8c33ce3978d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index 8d8842b705085..5028d6885fa39 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-06-13 +date: 2023-06-14 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 f058834f2c77f..a06cc43f91772 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-06-13 +date: 2023-06-14 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 9522dbd9ae554..15b63e71b8f5b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 6a1dbf4e21f46..7e7a2720fa38d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index b0276af4d369a..a8bb835d2de9b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index c4c16a68e5266..2cdc36e3290da 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index fea9636a9eff7..eaf0e8f070e06 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index a78255d8006f6..25794842694be 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-06-13 +date: 2023-06-14 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.devdocs.json b/api_docs/kbn_core_saved_objects_api_browser.devdocs.json index ed3fff499e972..47fbd03f53736 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.devdocs.json +++ b/api_docs/kbn_core_saved_objects_api_browser.devdocs.json @@ -1583,6 +1583,14 @@ "plugin": "@kbn/core-saved-objects-browser-mocks", "path": "packages/core/saved-objects/core-saved-objects-browser-mocks/src/saved_objects_service.mock.ts" }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.test.ts" + }, { "plugin": "@kbn/core-saved-objects-browser-internal", "path": "packages/core/saved-objects/core-saved-objects-browser-internal/src/saved_objects_client.ts" @@ -1711,6 +1719,10 @@ "plugin": "eventAnnotation", "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" + }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/resolvers.ts" @@ -1727,6 +1739,14 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/services/dashboard_service.test.ts" }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.test.ts" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.test.ts" + }, { "plugin": "savedObjects", "path": "src/plugins/saved_objects/public/saved_object/saved_object.test.ts" @@ -2876,6 +2896,14 @@ { "plugin": "@kbn/core", "path": "src/core/public/index.ts" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.test.ts" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.test.ts" } ], "children": [ @@ -3143,6 +3171,18 @@ "plugin": "visualizations", "path": "src/plugins/visualizations/public/vis_types/vis_type_alias_registry.ts" }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" + }, { "plugin": "aiops", "path": "x-pack/plugins/aiops/public/application/utils/search_utils.ts" @@ -3824,6 +3864,14 @@ { "plugin": "@kbn/core", "path": "src/core/public/index.ts" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" + }, + { + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index bfead432b9df4..a075ece0b47a8 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index 9ab48fd4777b6..16118449310e3 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 068a3184b7afb..efcc6933ab099 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index 36a2ec7937fa7..0878ecf0c7e52 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index 21c7a12a4498a..9b1adeee541a2 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index 2bb6f5d6eb176..9519d863a6e78 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index ab76b276c61b2..48c3fa3a9df92 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index f29a6e54e494e..530da616e803c 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.devdocs.json b/api_docs/kbn_core_saved_objects_common.devdocs.json index 49d4c60580fc4..ac15848be7b16 100644 --- a/api_docs/kbn_core_saved_objects_common.devdocs.json +++ b/api_docs/kbn_core_saved_objects_common.devdocs.json @@ -2047,20 +2047,24 @@ "path": "src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx" }, { - "plugin": "eventAnnotation", - "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" + "plugin": "savedObjectsTagging", + "path": "x-pack/plugins/saved_objects_tagging/public/ui_api/get_table_column_definition.tsx" + }, + { + "plugin": "savedObjectsTagging", + "path": "x-pack/plugins/saved_objects_tagging/public/ui_api/get_table_column_definition.tsx" }, { "plugin": "eventAnnotation", "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" }, { - "plugin": "savedObjectsTagging", - "path": "x-pack/plugins/saved_objects_tagging/public/ui_api/get_table_column_definition.tsx" + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" }, { - "plugin": "savedObjectsTagging", - "path": "x-pack/plugins/saved_objects_tagging/public/ui_api/get_table_column_definition.tsx" + "plugin": "eventAnnotation", + "path": "src/plugins/event_annotation/public/event_annotation_service/service.tsx" }, { "plugin": "lens", @@ -2076,15 +2080,15 @@ }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts" + "path": "x-pack/plugins/lens/public/state_management/selectors.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts" + "path": "x-pack/plugins/lens/public/state_management/selectors.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts" + "path": "x-pack/plugins/lens/public/state_management/selectors.ts" }, { "plugin": "lens", @@ -2104,15 +2108,15 @@ }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/state_management/selectors.ts" + "path": "x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/state_management/selectors.ts" + "path": "x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/state_management/selectors.ts" + "path": "x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts" }, { "plugin": "lens", @@ -2132,39 +2136,39 @@ }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/loader.ts" + "path": "x-pack/plugins/lens/public/types.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/loader.ts" + "path": "x-pack/plugins/lens/public/types.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/loader.ts" + "path": "x-pack/plugins/lens/public/types.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/loader.ts" + "path": "x-pack/plugins/lens/public/types.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/loader.ts" + "path": "x-pack/plugins/lens/public/types.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/form_based.tsx" + "path": "x-pack/plugins/lens/public/types.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/form_based.tsx" + "path": "x-pack/plugins/lens/public/types.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/form_based.tsx" + "path": "x-pack/plugins/lens/public/types.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/form_based.tsx" + "path": "x-pack/plugins/lens/public/types.ts" }, { "plugin": "lens", @@ -2172,39 +2176,39 @@ }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/types.ts" + "path": "x-pack/plugins/lens/public/datasources/form_based/loader.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/types.ts" + "path": "x-pack/plugins/lens/public/datasources/form_based/loader.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/types.ts" + "path": "x-pack/plugins/lens/public/datasources/form_based/loader.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/types.ts" + "path": "x-pack/plugins/lens/public/datasources/form_based/loader.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/types.ts" + "path": "x-pack/plugins/lens/public/datasources/form_based/loader.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/types.ts" + "path": "x-pack/plugins/lens/public/datasources/form_based/form_based.tsx" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/types.ts" + "path": "x-pack/plugins/lens/public/datasources/form_based/form_based.tsx" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/types.ts" + "path": "x-pack/plugins/lens/public/datasources/form_based/form_based.tsx" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/types.ts" + "path": "x-pack/plugins/lens/public/datasources/form_based/form_based.tsx" }, { "plugin": "lens", diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 3d4fe1fbd789c..9dc1c1012dc10 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index ac0b868268432..bc909d550ea8e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index c56eca5805e78..30aea9adedfbb 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 3e5b3e2cd35e0..88a28b0bd12f4 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index 1c58905ef4324..2efe6147d8a45 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 437aa99de6511..1939c775d477f 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index f13098cb258a4..51f0c360247b8 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 769d332b5317d..a222abf7c5aa9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index 8d03abb2c9262..e3470b93efeed 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 4e5a18f421ab2..06a4e3fd1b045 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index ebdaf50c48071..12212c49e13fe 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 655018eacfeea..4402dc36d03e6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 09f6571ef6b10..8402c2d4f19c0 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 892bfd3b5a0da..6badaec7d3511 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 053ce705247ba..a6bf0901a642c 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index 076b4e9b1b88f..8367d9211318e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index c47812f48df26..8def4c0b73ecb 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-06-13 +date: 2023-06-14 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 16247bc4139c4..f337ff2de06c4 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index a0391c0de4fb8..593aa39e594de 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-06-13 +date: 2023-06-14 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 b64479b06e0ad..9ef02e7db9805 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx index bd0b0ef5bcc44..af6f3e90a7a13 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal'] --- import kbnCoreThemeBrowserInternalObj from './kbn_core_theme_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 3fb2d70df0c97..eb8d615e75efa 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index ce31cb2fd7d92..f0e73e6564e63 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 9da84f2bb0f61..43ede3d98132a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 9da7135b09c70..e68fe74b56af3 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 267bae8f6e00e..7ba60a620e447 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index da53345eb9daf..924c5914fe255 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index dd276a30fa430..6714becd29bac 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index 35f590e9203d1..986c19ea7a83a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index ca4e690a71577..81e50328aed36 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 713f550c34fd4..ec61d16ea6660 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index 704867dd1f28a..3201d05510ab5 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 934acc2fe4b03..d42ab9d230207 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-06-13 +date: 2023-06-14 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 98b22d142d12a..97ad52e88fbe5 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-06-13 +date: 2023-06-14 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 2553844f64d87..6b3e5dcff2694 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-06-13 +date: 2023-06-14 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 83b04d642c2a0..1bab2e809092e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index aa7d97aeb46c0..0f0866b0fb04d 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-06-13 +date: 2023-06-14 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 09fc6b86dc703..9b0d4e0c22feb 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-06-13 +date: 2023-06-14 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 ee7f0f7cb0f1c..3a5821c37c95a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.devdocs.json b/api_docs/kbn_deeplinks_analytics.devdocs.json new file mode 100644 index 0000000000000..ad3d96c20ec0c --- /dev/null +++ b/api_docs/kbn_deeplinks_analytics.devdocs.json @@ -0,0 +1,103 @@ +{ + "id": "@kbn/deeplinks-analytics", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/deeplinks-analytics", + "id": "def-common.AppId", + "type": "Type", + "tags": [], + "label": "AppId", + "description": [], + "signature": [ + "\"dashboards\" | \"discover\" | \"visualize\"" + ], + "path": "packages/deeplinks/analytics/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-analytics", + "id": "def-common.DASHBOARD_APP_ID", + "type": "string", + "tags": [], + "label": "DASHBOARD_APP_ID", + "description": [], + "signature": [ + "\"dashboards\"" + ], + "path": "packages/deeplinks/analytics/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-analytics", + "id": "def-common.DeepLinkId", + "type": "Type", + "tags": [], + "label": "DeepLinkId", + "description": [], + "signature": [ + "\"dashboards\" | \"discover\" | \"visualize\"" + ], + "path": "packages/deeplinks/analytics/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-analytics", + "id": "def-common.DISCOVER_APP_ID", + "type": "string", + "tags": [], + "label": "DISCOVER_APP_ID", + "description": [], + "signature": [ + "\"discover\"" + ], + "path": "packages/deeplinks/analytics/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-analytics", + "id": "def-common.VISUALIZE_APP_ID", + "type": "string", + "tags": [], + "label": "VISUALIZE_APP_ID", + "description": [], + "signature": [ + "\"visualize\"" + ], + "path": "packages/deeplinks/analytics/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx new file mode 100644 index 0000000000000..a99b83c653d6c --- /dev/null +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -0,0 +1,30 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDeeplinksAnalyticsPluginApi +slug: /kibana-dev-docs/api/kbn-deeplinks-analytics +title: "@kbn/deeplinks-analytics" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/deeplinks-analytics plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] +--- +import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; + + + +Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 5 | 0 | 5 | 0 | + +## Common + +### Consts, variables and types + + diff --git a/api_docs/kbn_deeplinks_devtools.devdocs.json b/api_docs/kbn_deeplinks_devtools.devdocs.json new file mode 100644 index 0000000000000..afefcb2c8d084 --- /dev/null +++ b/api_docs/kbn_deeplinks_devtools.devdocs.json @@ -0,0 +1,110 @@ +{ + "id": "@kbn/deeplinks-devtools", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/deeplinks-devtools", + "id": "def-common.AppId", + "type": "Type", + "tags": [], + "label": "AppId", + "description": [], + "signature": [ + "\"dev_tools\"" + ], + "path": "packages/deeplinks/devtools/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-devtools", + "id": "def-common.DeepLinkId", + "type": "Type", + "tags": [], + "label": "DeepLinkId", + "description": [], + "signature": [ + "\"dev_tools\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\"" + ], + "path": "packages/deeplinks/devtools/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-devtools", + "id": "def-common.deepLinkIds", + "type": "Array", + "tags": [], + "label": "deepLinkIds", + "description": [], + "signature": [ + { + "pluginId": "@kbn/deeplinks-devtools", + "scope": "common", + "docId": "kibKbnDeeplinksDevtoolsPluginApi", + "section": "def-common.LinkId", + "text": "LinkId" + }, + "[]" + ], + "path": "packages/deeplinks/devtools/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-devtools", + "id": "def-common.DEV_TOOLS_APP_ID", + "type": "string", + "tags": [], + "label": "DEV_TOOLS_APP_ID", + "description": [], + "signature": [ + "\"dev_tools\"" + ], + "path": "packages/deeplinks/devtools/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-devtools", + "id": "def-common.LinkId", + "type": "Type", + "tags": [], + "label": "LinkId", + "description": [], + "signature": [ + "\"console\" | \"searchprofiler\" | \"painless_lab\" | \"grokdebugger\"" + ], + "path": "packages/deeplinks/devtools/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx new file mode 100644 index 0000000000000..c9a55ea91f93f --- /dev/null +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -0,0 +1,30 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDeeplinksDevtoolsPluginApi +slug: /kibana-dev-docs/api/kbn-deeplinks-devtools +title: "@kbn/deeplinks-devtools" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/deeplinks-devtools plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] +--- +import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; + + + +Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 5 | 0 | 5 | 0 | + +## Common + +### Consts, variables and types + + diff --git a/api_docs/kbn_deeplinks_management.devdocs.json b/api_docs/kbn_deeplinks_management.devdocs.json new file mode 100644 index 0000000000000..ccecd354f4460 --- /dev/null +++ b/api_docs/kbn_deeplinks_management.devdocs.json @@ -0,0 +1,90 @@ +{ + "id": "@kbn/deeplinks-management", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/deeplinks-management", + "id": "def-common.AppId", + "type": "Type", + "tags": [], + "label": "AppId", + "description": [], + "signature": [ + "\"monitoring\" | \"management\" | \"integrations\"" + ], + "path": "packages/deeplinks/management/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-management", + "id": "def-common.DeepLinkId", + "type": "Type", + "tags": [], + "label": "DeepLinkId", + "description": [], + "signature": [ + "IntegrationsDeepLinkId", + " | ", + "ManagementDeepLinkId" + ], + "path": "packages/deeplinks/management/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-management", + "id": "def-common.LinkId", + "type": "Type", + "tags": [], + "label": "LinkId", + "description": [], + "signature": [ + "\"cases\" | \"tags\" | \"transform\" | \"watcher\" | \"settings\" | \"dataViews\" | \"spaces\" | \"reporting\" | \"rollup_jobs\" | \"snapshot_restore\" | \"api_keys\" | \"cross_cluster_replication\" | \"index_lifecycle_management\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"remote_clusters\" | \"triggersActions\" | \"triggersActionsConnectors\"" + ], + "path": "packages/deeplinks/management/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-management", + "id": "def-common.MONITORING_APP_ID", + "type": "string", + "tags": [], + "label": "MONITORING_APP_ID", + "description": [], + "signature": [ + "\"monitoring\"" + ], + "path": "packages/deeplinks/management/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx new file mode 100644 index 0000000000000..4f0ee51e4e883 --- /dev/null +++ b/api_docs/kbn_deeplinks_management.mdx @@ -0,0 +1,30 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDeeplinksManagementPluginApi +slug: /kibana-dev-docs/api/kbn-deeplinks-management +title: "@kbn/deeplinks-management" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/deeplinks-management plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] +--- +import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; + + + +Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 4 | 0 | 4 | 2 | + +## Common + +### Consts, variables and types + + diff --git a/api_docs/kbn_deeplinks_ml.devdocs.json b/api_docs/kbn_deeplinks_ml.devdocs.json new file mode 100644 index 0000000000000..1d51f97ddb14e --- /dev/null +++ b/api_docs/kbn_deeplinks_ml.devdocs.json @@ -0,0 +1,73 @@ +{ + "id": "@kbn/deeplinks-ml", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/deeplinks-ml", + "id": "def-common.AppId", + "type": "Type", + "tags": [], + "label": "AppId", + "description": [], + "signature": [ + "\"ml\"" + ], + "path": "packages/deeplinks/ml/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-ml", + "id": "def-common.DeepLinkId", + "type": "Type", + "tags": [], + "label": "DeepLinkId", + "description": [], + "signature": [ + "\"ml\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:singleMetricViewer\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:explainLogRateSpikes\" | \"ml:logPatternAnalysis\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:memoryUsage\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\"" + ], + "path": "packages/deeplinks/ml/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-ml", + "id": "def-common.LinkId", + "type": "Type", + "tags": [], + "label": "LinkId", + "description": [], + "signature": [ + "\"notifications\" | \"nodes\" | \"overview\" | \"settings\" | \"dataVisualizer\" | \"anomalyDetection\" | \"anomalyExplorer\" | \"singleMetricViewer\" | \"dataFrameAnalytics\" | \"resultExplorer\" | \"analyticsMap\" | \"aiOps\" | \"explainLogRateSpikes\" | \"logPatternAnalysis\" | \"changePointDetections\" | \"modelManagement\" | \"nodesOverview\" | \"memoryUsage\" | \"fileUpload\" | \"indexDataVisualizer\" | \"calendarSettings\" | \"filterListsSettings\"" + ], + "path": "packages/deeplinks/ml/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx new file mode 100644 index 0000000000000..577fd50da1b05 --- /dev/null +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -0,0 +1,30 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDeeplinksMlPluginApi +slug: /kibana-dev-docs/api/kbn-deeplinks-ml +title: "@kbn/deeplinks-ml" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/deeplinks-ml plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] +--- +import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; + + + +Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3 | 0 | 3 | 0 | + +## Common + +### Consts, variables and types + + diff --git a/api_docs/kbn_deeplinks_observability.devdocs.json b/api_docs/kbn_deeplinks_observability.devdocs.json new file mode 100644 index 0000000000000..fbb81a96f0d22 --- /dev/null +++ b/api_docs/kbn_deeplinks_observability.devdocs.json @@ -0,0 +1,80 @@ +{ + "id": "@kbn/deeplinks-observability", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.AppId", + "type": "Type", + "tags": [], + "label": "AppId", + "description": [], + "signature": [ + "\"apm\" | \"metrics\" | \"logs\" | \"observability-overview\" | \"observabilityOnboarding\"" + ], + "path": "packages/deeplinks/observability/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.DeepLinkId", + "type": "Type", + "tags": [], + "label": "DeepLinkId", + "description": [], + "signature": [ + { + "pluginId": "@kbn/deeplinks-observability", + "scope": "common", + "docId": "kibKbnDeeplinksObservabilityPluginApi", + "section": "def-common.AppId", + "text": "AppId" + }, + " | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:rules\" | \"observability-overview:alerts\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"observability-overview:slos\" | \"metrics:settings\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:metrics-hosts\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:services\" | \"apm:service-groups-list\" | \"apm:storage-explorer\"" + ], + "path": "packages/deeplinks/observability/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.OBSERVABILITY_ONBOARDING_APP_ID", + "type": "string", + "tags": [], + "label": "OBSERVABILITY_ONBOARDING_APP_ID", + "description": [], + "signature": [ + "\"observabilityOnboarding\"" + ], + "path": "packages/deeplinks/observability/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx new file mode 100644 index 0000000000000..818540350b5cc --- /dev/null +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -0,0 +1,30 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDeeplinksObservabilityPluginApi +slug: /kibana-dev-docs/api/kbn-deeplinks-observability +title: "@kbn/deeplinks-observability" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/deeplinks-observability plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] +--- +import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; + + + +Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3 | 0 | 3 | 0 | + +## Common + +### Consts, variables and types + + diff --git a/api_docs/kbn_deeplinks_search.devdocs.json b/api_docs/kbn_deeplinks_search.devdocs.json new file mode 100644 index 0000000000000..7f5c5b926e4ff --- /dev/null +++ b/api_docs/kbn_deeplinks_search.devdocs.json @@ -0,0 +1,73 @@ +{ + "id": "@kbn/deeplinks-search", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/deeplinks-search", + "id": "def-common.AppId", + "type": "Type", + "tags": [], + "label": "AppId", + "description": [], + "signature": [ + "\"serverlessElasticsearch\"" + ], + "path": "packages/deeplinks/search/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-search", + "id": "def-common.DeepLinkId", + "type": "Type", + "tags": [], + "label": "DeepLinkId", + "description": [], + "signature": [ + "\"serverlessElasticsearch\"" + ], + "path": "packages/deeplinks/search/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-search", + "id": "def-common.SERVERLESS_ES_APP_ID", + "type": "string", + "tags": [], + "label": "SERVERLESS_ES_APP_ID", + "description": [], + "signature": [ + "\"serverlessElasticsearch\"" + ], + "path": "packages/deeplinks/search/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx new file mode 100644 index 0000000000000..fe3ca13a840db --- /dev/null +++ b/api_docs/kbn_deeplinks_search.mdx @@ -0,0 +1,30 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDeeplinksSearchPluginApi +slug: /kibana-dev-docs/api/kbn-deeplinks-search +title: "@kbn/deeplinks-search" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/deeplinks-search plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] +--- +import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; + + + +Contact [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3 | 0 | 3 | 0 | + +## Common + +### Consts, variables and types + + diff --git a/api_docs/kbn_default_nav_analytics.devdocs.json b/api_docs/kbn_default_nav_analytics.devdocs.json new file mode 100644 index 0000000000000..82c562b654726 --- /dev/null +++ b/api_docs/kbn_default_nav_analytics.devdocs.json @@ -0,0 +1,189 @@ +{ + "id": "@kbn/default-nav-analytics", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/default-nav-analytics", + "id": "def-common.AnalyticsNodeDefinition", + "type": "Type", + "tags": [], + "label": "AnalyticsNodeDefinition", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + "<", + { + "pluginId": "@kbn/deeplinks-analytics", + "scope": "common", + "docId": "kibKbnDeeplinksAnalyticsPluginApi", + "section": "def-common.AppId", + "text": "AppId" + }, + ", ", + { + "pluginId": "@kbn/default-nav-analytics", + "scope": "common", + "docId": "kibKbnDefaultNavAnalyticsPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ", ", + { + "pluginId": "@kbn/default-nav-analytics", + "scope": "common", + "docId": "kibKbnDefaultNavAnalyticsPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + "> & { children: NonEmptyArray<", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + "<", + { + "pluginId": "@kbn/deeplinks-analytics", + "scope": "common", + "docId": "kibKbnDeeplinksAnalyticsPluginApi", + "section": "def-common.AppId", + "text": "AppId" + }, + ", ", + { + "pluginId": "@kbn/default-nav-analytics", + "scope": "common", + "docId": "kibKbnDefaultNavAnalyticsPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ", ", + { + "pluginId": "@kbn/default-nav-analytics", + "scope": "common", + "docId": "kibKbnDefaultNavAnalyticsPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ">>; }" + ], + "path": "packages/default-nav/analytics/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/default-nav-analytics", + "id": "def-common.NavigationID", + "type": "Type", + "tags": [], + "label": "NavigationID", + "description": [], + "signature": [ + "\"root\" | \"rootNav:analytics\"" + ], + "path": "packages/default-nav/analytics/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/default-nav-analytics", + "id": "def-common.defaultNavigation", + "type": "Object", + "tags": [], + "label": "defaultNavigation", + "description": [], + "path": "packages/default-nav/analytics/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/default-nav-analytics", + "id": "def-common.defaultNavigation.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "\"rootNav:analytics\"" + ], + "path": "packages/default-nav/analytics/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-analytics", + "id": "def-common.defaultNavigation.title", + "type": "Any", + "tags": [], + "label": "title", + "description": [], + "signature": [ + "any" + ], + "path": "packages/default-nav/analytics/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-analytics", + "id": "def-common.defaultNavigation.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [], + "path": "packages/default-nav/analytics/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-analytics", + "id": "def-common.defaultNavigation.children", + "type": "Object", + "tags": [], + "label": "children", + "description": [], + "signature": [ + "[{ id: \"root\"; children: [{ link: \"discover\"; }, { link: \"dashboards\"; }, { link: \"visualize\"; }]; }]" + ], + "path": "packages/default-nav/analytics/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx new file mode 100644 index 0000000000000..d2edea771cc5b --- /dev/null +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDefaultNavAnalyticsPluginApi +slug: /kibana-dev-docs/api/kbn-default-nav-analytics +title: "@kbn/default-nav-analytics" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/default-nav-analytics plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] +--- +import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; + + + +Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 7 | 1 | 7 | 0 | + +## Common + +### Objects + + +### Consts, variables and types + + diff --git a/api_docs/kbn_default_nav_devtools.devdocs.json b/api_docs/kbn_default_nav_devtools.devdocs.json new file mode 100644 index 0000000000000..7ae5c10bbfc30 --- /dev/null +++ b/api_docs/kbn_default_nav_devtools.devdocs.json @@ -0,0 +1,189 @@ +{ + "id": "@kbn/default-nav-devtools", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/default-nav-devtools", + "id": "def-common.DevToolsNodeDefinition", + "type": "Type", + "tags": [], + "label": "DevToolsNodeDefinition", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + "<", + { + "pluginId": "@kbn/deeplinks-devtools", + "scope": "common", + "docId": "kibKbnDeeplinksDevtoolsPluginApi", + "section": "def-common.DeepLinkId", + "text": "DeepLinkId" + }, + ", ", + { + "pluginId": "@kbn/default-nav-devtools", + "scope": "common", + "docId": "kibKbnDefaultNavDevtoolsPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ", ", + { + "pluginId": "@kbn/default-nav-devtools", + "scope": "common", + "docId": "kibKbnDefaultNavDevtoolsPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + "> & { children: NonEmptyArray<", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + "<", + { + "pluginId": "@kbn/deeplinks-devtools", + "scope": "common", + "docId": "kibKbnDeeplinksDevtoolsPluginApi", + "section": "def-common.DeepLinkId", + "text": "DeepLinkId" + }, + ", ", + { + "pluginId": "@kbn/default-nav-devtools", + "scope": "common", + "docId": "kibKbnDefaultNavDevtoolsPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ", ", + { + "pluginId": "@kbn/default-nav-devtools", + "scope": "common", + "docId": "kibKbnDefaultNavDevtoolsPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ">>; }" + ], + "path": "packages/default-nav/devtools/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/default-nav-devtools", + "id": "def-common.NavigationID", + "type": "Type", + "tags": [], + "label": "NavigationID", + "description": [], + "signature": [ + "\"root\" | \"rootNav:devtools\"" + ], + "path": "packages/default-nav/devtools/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/default-nav-devtools", + "id": "def-common.defaultNavigation", + "type": "Object", + "tags": [], + "label": "defaultNavigation", + "description": [], + "path": "packages/default-nav/devtools/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/default-nav-devtools", + "id": "def-common.defaultNavigation.title", + "type": "Any", + "tags": [], + "label": "title", + "description": [], + "signature": [ + "any" + ], + "path": "packages/default-nav/devtools/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-devtools", + "id": "def-common.defaultNavigation.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "\"rootNav:devtools\"" + ], + "path": "packages/default-nav/devtools/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-devtools", + "id": "def-common.defaultNavigation.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [], + "path": "packages/default-nav/devtools/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-devtools", + "id": "def-common.defaultNavigation.children", + "type": "Object", + "tags": [], + "label": "children", + "description": [], + "signature": [ + "[{ id: \"root\"; children: [{ link: \"dev_tools:console\"; }, { link: \"dev_tools:searchprofiler\"; }, { link: \"dev_tools:grokdebugger\"; }, { link: \"dev_tools:painless_lab\"; }]; }]" + ], + "path": "packages/default-nav/devtools/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx new file mode 100644 index 0000000000000..eb4ecd444d49a --- /dev/null +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDefaultNavDevtoolsPluginApi +slug: /kibana-dev-docs/api/kbn-default-nav-devtools +title: "@kbn/default-nav-devtools" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/default-nav-devtools plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] +--- +import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; + + + +Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 7 | 1 | 7 | 0 | + +## Common + +### Objects + + +### Consts, variables and types + + diff --git a/api_docs/kbn_default_nav_management.devdocs.json b/api_docs/kbn_default_nav_management.devdocs.json new file mode 100644 index 0000000000000..c6b1e4a5911ed --- /dev/null +++ b/api_docs/kbn_default_nav_management.devdocs.json @@ -0,0 +1,189 @@ +{ + "id": "@kbn/default-nav-management", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/default-nav-management", + "id": "def-common.ManagementNodeDefinition", + "type": "Type", + "tags": [], + "label": "ManagementNodeDefinition", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + "<", + { + "pluginId": "@kbn/deeplinks-management", + "scope": "common", + "docId": "kibKbnDeeplinksManagementPluginApi", + "section": "def-common.DeepLinkId", + "text": "DeepLinkId" + }, + ", ", + { + "pluginId": "@kbn/default-nav-management", + "scope": "common", + "docId": "kibKbnDefaultNavManagementPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ", ", + { + "pluginId": "@kbn/default-nav-management", + "scope": "common", + "docId": "kibKbnDefaultNavManagementPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + "> & { children: NonEmptyArray<", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + "<", + { + "pluginId": "@kbn/deeplinks-management", + "scope": "common", + "docId": "kibKbnDeeplinksManagementPluginApi", + "section": "def-common.DeepLinkId", + "text": "DeepLinkId" + }, + ", ", + { + "pluginId": "@kbn/default-nav-management", + "scope": "common", + "docId": "kibKbnDefaultNavManagementPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ", ", + { + "pluginId": "@kbn/default-nav-management", + "scope": "common", + "docId": "kibKbnDefaultNavManagementPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ">>; }" + ], + "path": "packages/default-nav/management/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/default-nav-management", + "id": "def-common.NavigationID", + "type": "Type", + "tags": [], + "label": "NavigationID", + "description": [], + "signature": [ + "\"kibana\" | \"ingest\" | \"data\" | \"root\" | \"rootNav:management\" | \"integration_management\" | \"stack_management\" | \"alerts_and_insights\"" + ], + "path": "packages/default-nav/management/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/default-nav-management", + "id": "def-common.defaultNavigation", + "type": "Object", + "tags": [], + "label": "defaultNavigation", + "description": [], + "path": "packages/default-nav/management/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/default-nav-management", + "id": "def-common.defaultNavigation.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "\"rootNav:management\"" + ], + "path": "packages/default-nav/management/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-management", + "id": "def-common.defaultNavigation.title", + "type": "Any", + "tags": [], + "label": "title", + "description": [], + "signature": [ + "any" + ], + "path": "packages/default-nav/management/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-management", + "id": "def-common.defaultNavigation.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [], + "path": "packages/default-nav/management/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-management", + "id": "def-common.defaultNavigation.children", + "type": "Object", + "tags": [], + "label": "children", + "description": [], + "signature": [ + "[{ id: \"root\"; title: string; children: [{ link: \"monitoring\"; }]; }, { id: \"integration_management\"; title: any; children: [{ link: \"integrations\"; }, { link: \"fleet\"; }, { link: \"osquery\"; }]; }, { id: \"stack_management\"; title: any; children: [{ id: \"ingest\"; title: any; children: [{ link: \"management:ingest_pipelines\"; }, { link: \"management:pipelines\"; }]; }, { id: \"data\"; title: any; children: [{ link: \"management:index_management\"; }, { link: \"management:transform\"; }]; }, { id: \"alerts_and_insights\"; title: any; children: [{ link: \"management:triggersActions\"; }, { link: \"management:cases\"; }, { link: \"management:triggersActionsConnectors\"; }, { link: \"management:jobsListLink\"; }]; }, { id: \"kibana\"; title: string; children: [{ link: \"management:dataViews\"; }, { link: \"management:objects\"; }, { link: \"management:tags\"; }, { link: \"management:spaces\"; }, { link: \"management:settings\"; }]; }]; }]" + ], + "path": "packages/default-nav/management/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx new file mode 100644 index 0000000000000..6f6207ddf5652 --- /dev/null +++ b/api_docs/kbn_default_nav_management.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDefaultNavManagementPluginApi +slug: /kibana-dev-docs/api/kbn-default-nav-management +title: "@kbn/default-nav-management" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/default-nav-management plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] +--- +import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; + + + +Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 7 | 1 | 7 | 0 | + +## Common + +### Objects + + +### Consts, variables and types + + diff --git a/api_docs/kbn_default_nav_ml.devdocs.json b/api_docs/kbn_default_nav_ml.devdocs.json new file mode 100644 index 0000000000000..45e7eed780000 --- /dev/null +++ b/api_docs/kbn_default_nav_ml.devdocs.json @@ -0,0 +1,189 @@ +{ + "id": "@kbn/default-nav-ml", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/default-nav-ml", + "id": "def-common.MlNodeDefinition", + "type": "Type", + "tags": [], + "label": "MlNodeDefinition", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + "<", + { + "pluginId": "@kbn/deeplinks-ml", + "scope": "common", + "docId": "kibKbnDeeplinksMlPluginApi", + "section": "def-common.DeepLinkId", + "text": "DeepLinkId" + }, + ", ", + { + "pluginId": "@kbn/default-nav-ml", + "scope": "common", + "docId": "kibKbnDefaultNavMlPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ", ", + { + "pluginId": "@kbn/default-nav-ml", + "scope": "common", + "docId": "kibKbnDefaultNavMlPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + "> & { children: NonEmptyArray<", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NodeDefinition", + "text": "NodeDefinition" + }, + "<", + { + "pluginId": "@kbn/deeplinks-ml", + "scope": "common", + "docId": "kibKbnDeeplinksMlPluginApi", + "section": "def-common.DeepLinkId", + "text": "DeepLinkId" + }, + ", ", + { + "pluginId": "@kbn/default-nav-ml", + "scope": "common", + "docId": "kibKbnDefaultNavMlPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ", ", + { + "pluginId": "@kbn/default-nav-ml", + "scope": "common", + "docId": "kibKbnDefaultNavMlPluginApi", + "section": "def-common.NavigationID", + "text": "NavigationID" + }, + ">>; }" + ], + "path": "packages/default-nav/ml/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/default-nav-ml", + "id": "def-common.NavigationID", + "type": "Type", + "tags": [], + "label": "NavigationID", + "description": [], + "signature": [ + "\"data_frame_analytics\" | \"root\" | \"rootNav:ml\" | \"anomaly_detection\" | \"model_management\" | \"data_visualizer\" | \"aiops_labs\"" + ], + "path": "packages/default-nav/ml/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/default-nav-ml", + "id": "def-common.defaultNavigation", + "type": "Object", + "tags": [], + "label": "defaultNavigation", + "description": [], + "path": "packages/default-nav/ml/default_navigation.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/default-nav-ml", + "id": "def-common.defaultNavigation.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "\"rootNav:ml\"" + ], + "path": "packages/default-nav/ml/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-ml", + "id": "def-common.defaultNavigation.title", + "type": "Any", + "tags": [], + "label": "title", + "description": [], + "signature": [ + "any" + ], + "path": "packages/default-nav/ml/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-ml", + "id": "def-common.defaultNavigation.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [], + "path": "packages/default-nav/ml/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/default-nav-ml", + "id": "def-common.defaultNavigation.children", + "type": "Object", + "tags": [], + "label": "children", + "description": [], + "signature": [ + "[{ title: string; id: \"root\"; children: [{ link: \"ml:overview\"; }, { link: \"ml:notifications\"; }]; }, { title: any; id: \"anomaly_detection\"; children: [{ title: any; link: \"ml:anomalyDetection\"; }, { link: \"ml:anomalyExplorer\"; }, { link: \"ml:singleMetricViewer\"; }, { link: \"ml:settings\"; }]; }, { id: \"data_frame_analytics\"; title: any; children: [{ title: string; link: \"ml:dataFrameAnalytics\"; }, { link: \"ml:resultExplorer\"; }, { link: \"ml:analyticsMap\"; }]; }, { id: \"model_management\"; title: any; children: [{ link: \"ml:nodesOverview\"; }, { link: \"ml:nodes\"; }]; }, { id: \"data_visualizer\"; title: any; children: [{ title: any; link: \"ml:fileUpload\"; }, { title: any; link: \"ml:indexDataVisualizer\"; }]; }, { id: \"aiops_labs\"; title: any; children: [{ title: any; link: \"ml:explainLogRateSpikes\"; }, { link: \"ml:logPatternAnalysis\"; }]; }]" + ], + "path": "packages/default-nav/ml/default_navigation.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx new file mode 100644 index 0000000000000..6f80974c3e59a --- /dev/null +++ b/api_docs/kbn_default_nav_ml.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDefaultNavMlPluginApi +slug: /kibana-dev-docs/api/kbn-default-nav-ml +title: "@kbn/default-nav-ml" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/default-nav-ml plugin +date: 2023-06-14 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] +--- +import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; + + + +Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 7 | 1 | 7 | 0 | + +## Common + +### Objects + + +### Consts, variables and types + + diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 9fef44173fee4..4d2d542e45206 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 17094dbf17d5b..01c2f415caa08 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index c04b0b60179b7..c54c8b1c90c55 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index c778c7771ceb0..0a04240f1c9a8 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index dbbfa2547042b..c2fa9f9e83a90 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 1fbf4de618840..b1a6a48fbda5d 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-06-13 +date: 2023-06-14 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 d719731b226cf..1ad551f990985 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-06-13 +date: 2023-06-14 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 7af052cf180b3..425e82eccd11d 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-06-13 +date: 2023-06-14 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 96ff910869c95..4dd5ce21a7abd 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-06-13 +date: 2023-06-14 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 bd32961ef74a8..8ef8e7ed36b85 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-06-13 +date: 2023-06-14 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_elastic_assistant.devdocs.json b/api_docs/kbn_elastic_assistant.devdocs.json index e77708c1a3d03..c220da453e6b0 100644 --- a/api_docs/kbn_elastic_assistant.devdocs.json +++ b/api_docs/kbn_elastic_assistant.devdocs.json @@ -136,7 +136,7 @@ "label": "AssistantProvider", "description": [], "signature": [ - "({ actionTypeRegistry, augmentMessageCodeBlocks, basePromptContexts, baseQuickPrompts, children, getComments, http, getInitialConversations, nameSpace, setConversations, title, }: React.PropsWithChildren) => JSX.Element" + "({ actionTypeRegistry, augmentMessageCodeBlocks, basePromptContexts, baseQuickPrompts, baseSystemPrompts, children, getComments, http, getInitialConversations, nameSpace, setConversations, title, }: React.PropsWithChildren) => JSX.Element" ], "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx", "deprecated": false, @@ -147,7 +147,7 @@ "id": "def-public.AssistantProvider.$1", "type": "CompoundType", "tags": [], - "label": "{\n actionTypeRegistry,\n augmentMessageCodeBlocks,\n basePromptContexts = [],\n baseQuickPrompts = [],\n children,\n getComments,\n http,\n getInitialConversations,\n nameSpace = 'elasticAssistantDefault',\n setConversations,\n title = DEFAULT_ASSISTANT_TITLE,\n}", + "label": "{\n actionTypeRegistry,\n augmentMessageCodeBlocks,\n basePromptContexts = [],\n baseQuickPrompts = [],\n baseSystemPrompts = BASE_SYSTEM_PROMPTS,\n children,\n getComments,\n http,\n getInitialConversations,\n nameSpace = DEFAULT_ASSISTANT_NAMESPACE,\n setConversations,\n title = DEFAULT_ASSISTANT_TITLE,\n}", "description": [], "signature": [ "React.PropsWithChildren" @@ -470,7 +470,15 @@ "label": "apiConfig", "description": [], "signature": [ - "{ connectorId?: string | undefined; provider?: ", + "{ connectorId?: string | undefined; defaultSystemPrompt?: ", + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.Prompt", + "text": "Prompt" + }, + " | undefined; provider?: ", "OpenAiProviderType", " | undefined; }" ], @@ -524,6 +532,20 @@ "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Conversation.isDefault", + "type": "CompoundType", + "tags": [], + "label": "isDefault", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -593,6 +615,95 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Prompt", + "type": "Interface", + "tags": [], + "label": "Prompt", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Prompt.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Prompt.content", + "type": "string", + "tags": [], + "label": "content", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Prompt.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Prompt.promptType", + "type": "CompoundType", + "tags": [], + "label": "promptType", + "description": [], + "signature": [ + "\"user\" | \"system\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Prompt.isDefault", + "type": "CompoundType", + "tags": [], + "label": "isDefault", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Prompt.isNewConversationDefault", + "type": "CompoundType", + "tags": [], + "label": "isNewConversationDefault", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.PromptContext", diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index b98f584c17ad4..0415c594cf9c4 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-solution](https://github.com/orgs/elastic/teams/secur | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 75 | 4 | 55 | 3 | +| 83 | 4 | 63 | 3 | ## Client diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 42ff243bf894f..2636b257f49d5 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-06-13 +date: 2023-06-14 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 399ac1c258618..f4f7a6e71963d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index d8ef5f2cba8a2..856812c1f80dd 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index db6b005f68456..d256ee2a49d89 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 74baa5813895c..99e0617c606d6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 0c39f78847ef1..0a1af2e825b66 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index 5769b8bbc5bd4..cdd969a6f179f 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-06-13 +date: 2023-06-14 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 d38e8ceb9475d..3841b4c2fc69e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index a719cdde550a7..26ecfedb675ca 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index f0aaedd322320..6ecc628929a16 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 0455e803fbd4d..a9805ff9b290a 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-06-13 +date: 2023-06-14 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 a7b35d8be85ed..e18fd3e6a5c85 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-06-13 +date: 2023-06-14 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 4ff063d60c48c..9ac4516ca669c 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-06-13 +date: 2023-06-14 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 34cecf7334c11..d5a1418d1439b 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-06-13 +date: 2023-06-14 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 5069591569d45..84cc3916b3bf8 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index dc9bdbef22a75..4fee64cdcdb1b 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-06-13 +date: 2023-06-14 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 a903c3f7a1c29..f3ee311582682 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-06-13 +date: 2023-06-14 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 5173f5dbee046..9114cfd6e74e9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index fcbdd1567280e..e405622f66db6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index 0b0b880182574..3c37043041b33 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-06-13 +date: 2023-06-14 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 4e11f6ce76db2..224495b2408c7 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-06-13 +date: 2023-06-14 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 5f13a27510456..63709113651aa 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index eef35b05c7c12..864fcf332dc81 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index d399b61fccc88..86409e5e3bd85 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 708feace3c286..68587c702e860 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 76061d848a7bf..4e17a2fd3eadb 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 7495240b36943..1de5865fadd28 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-06-13 +date: 2023-06-14 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 f9c9b2a3eac31..09bd72a9dcbea 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-06-13 +date: 2023-06-14 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 e9a85750eae62..24f8a83fb4db3 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index 2f0caad6e674e..10997bb820154 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-06-13 +date: 2023-06-14 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 0ee72c5fcebab..cac99e72b3891 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 2e3587f424f15..3f4e0829c1702 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index 6a83a26ac6151..faf2ee698fa58 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index a9ab3f8b879e0..7700b37bb9ceb 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_maps_vector_tile_utils.mdx b/api_docs/kbn_maps_vector_tile_utils.mdx index d978af63eb330..e934874bb68da 100644 --- a/api_docs/kbn_maps_vector_tile_utils.mdx +++ b/api_docs/kbn_maps_vector_tile_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-maps-vector-tile-utils title: "@kbn/maps-vector-tile-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/maps-vector-tile-utils plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/maps-vector-tile-utils'] --- import kbnMapsVectorTileUtilsObj from './kbn_maps_vector_tile_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 9ed8e5e42e389..3bc9af96abc41 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index c4749beec0713..41824b6fe9dc9 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-06-13 +date: 2023-06-14 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_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index c2bc1de6af996..33cfe1c3958e0 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index 61b1497fdcb75..a97e1c8cdd664 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index 04cfd1aface5f..100dd433e4356 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-06-13 +date: 2023-06-14 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_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index a0323b3f41560..c6d8aa628715e 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index 9c3a4b6f3ed7d..3f4f672b5a4e2 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-06-13 +date: 2023-06-14 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 9166bfe038e14..98f68da68fa66 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-06-13 +date: 2023-06-14 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 48aa94019fb16..52c184c1c9072 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index 7f3adaa51e183..51cb7aea41eec 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index 27f74ec054e39..1e9fa76829b92 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-06-13 +date: 2023-06-14 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 f2deaf2056bc6..7acc3048d99dd 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-06-13 +date: 2023-06-14 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 05414aaa4e66f..8c4491bb11627 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-06-13 +date: 2023-06-14 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 5b558b4dee3e4..d65a1f4cd9025 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-06-13 +date: 2023-06-14 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 bde0e328cdeed..dffb0dbcb5605 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-06-13 +date: 2023-06-14 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 974223a8e7bca..31bc2d5d82a12 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-06-13 +date: 2023-06-14 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_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index 6cb50b1cbc088..357173b3fbffa 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index b5a76359e3f42..685d2fe69bd51 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 11c5937f0e892..58a998e4b1be3 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-06-13 +date: 2023-06-14 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 fe704eca4f624..dbb881068529a 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-06-13 +date: 2023-06-14 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 18d07d435720d..13e2c3371c969 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-06-13 +date: 2023-06-14 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 cc01bf59a3cc7..897dd42e59bdf 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-06-13 +date: 2023-06-14 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 2aa4b4697e40a..a8458b24df6ef 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-06-13 +date: 2023-06-14 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 b3fd12049f1a0..2a2c58fdeca2f 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index 18d972cd6aee4..ebf9c1c9e1c34 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index d9e24c6e5ff0d..6cfa2939b587f 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 8659de850f7c8..1d8d210ae7b35 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index b84b99fa238ef..14895f2bc3649 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 7b23df1395dc0..78e81d368b7b7 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-06-13 +date: 2023-06-14 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 0d461356ab298..6c4c2b6d72751 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-06-13 +date: 2023-06-14 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 b81729654513d..5f97a8315ebc9 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-06-13 +date: 2023-06-14 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 415ea52d6908b..34f1eaaf46bdc 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-06-13 +date: 2023-06-14 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 fdfb5df8a9826..2a245eba7aa52 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-06-13 +date: 2023-06-14 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 406cb49dacb98..e56ebedb9fefd 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-06-13 +date: 2023-06-14 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 d168ef2ee0312..8bdee5e271ff2 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index 872a50fbbf919..85b91ff81e085 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-06-13 +date: 2023-06-14 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 371ca0a435203..6b59072880e4a 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-06-13 +date: 2023-06-14 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 e034834454f04..d20fb0e25e68e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index d4110cb5de40b..a8fbaff2fa84f 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-06-13 +date: 2023-06-14 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 a4d89b4a2d468..06b9165f7bf87 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-06-13 +date: 2023-06-14 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 0f1dca0512127..4216f12314831 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-06-13 +date: 2023-06-14 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 29f37940c933c..24bc8446a0169 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-06-13 +date: 2023-06-14 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 7d13a637f3451..646710f433cac 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-06-13 +date: 2023-06-14 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 303fa56c5160c..dacbb4c56e2fd 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-06-13 +date: 2023-06-14 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 634b6f22c2b34..4e4688ccdecf9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 1638e46030c71..f28690f0b8744 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_grouping.mdx b/api_docs/kbn_securitysolution_grouping.mdx index 7b7e5a8f0d7a8..8de0ae79e8f11 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-06-13 +date: 2023-06-14 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 483164144d7a4..bbbf481d0d715 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index cb05c7cf969ce..1899215be0acd 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 976c215e1f34e..7ceb870270d3c 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index b18490846f31d..1b75543240241 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 1ee5710a2bc9c..eb543967d41fb 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 5fb3cebbc3c66..5c2c649e38c71 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index d62737fc67191..5ed1f2802e636 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index ba2255025db4e..0bc41f8efcdd2 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 3ee1c5c9ae211..fb518b1b3050a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 48fce62f2c23d..7da41489129ce 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 47f3830ed3414..65b7f65ab4f58 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 3edce36855d84..a1e91461b772e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index 267df266153b3..1c7b1b8fc144b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index a2c406c5a3496..19163f70b7269 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index 470f48b809afa..024811c6b9c3f 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-06-13 +date: 2023-06-14 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 030f5cb3cac55..e3cdf4725d85c 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-06-13 +date: 2023-06-14 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 b83977ffa2940..cdc6a16e5eff8 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index 92a2f6de203cc..3928ed140e669 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-06-13 +date: 2023-06-14 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 f0774dce734aa..87479e12a7520 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-user-profile-components'] --- import kbnSharedUxAvatarUserProfileComponentsObj from './kbn_shared_ux_avatar_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 8a329f3b55807..463bc713d2e5a 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-06-13 +date: 2023-06-14 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 11c7fd23bc6f9..506ccd2cb70ae 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen-mocks'] --- import kbnSharedUxButtonExitFullScreenMocksObj from './kbn_shared_ux_button_exit_full_screen_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 4fced199ede1f..f220676a4517a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 955460367840b..4934d0cd3b9d0 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index da6336384989d..df0b215c83450 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_chrome_navigation.devdocs.json b/api_docs/kbn_shared_ux_chrome_navigation.devdocs.json index b568491bb05c8..f6f3f23da3d27 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.devdocs.json +++ b/api_docs/kbn_shared_ux_chrome_navigation.devdocs.json @@ -27,7 +27,7 @@ "label": "DefaultNavigation", "description": [], "signature": [ - "({ homeRef, projectNavigationTree, navigationTree, dataTestSubj, }: React.PropsWithChildren<", + "({ projectNavigationTree, navigationTree, dataTestSubj, }: React.PropsWithChildren<", { "pluginId": "@kbn/shared-ux-chrome-navigation", "scope": "common", @@ -46,7 +46,7 @@ "id": "def-common.DefaultNavigation.$1", "type": "CompoundType", "tags": [], - "label": "{\n homeRef,\n projectNavigationTree,\n navigationTree,\n dataTestSubj,\n}", + "label": "{\n projectNavigationTree,\n navigationTree,\n dataTestSubj,\n}", "description": [], "signature": [ "React.PropsWithChildren<", @@ -77,12 +77,15 @@ "description": [], "signature": [ "(preset: \"devtools\") => ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">" + { + "pluginId": "@kbn/default-nav-devtools", + "scope": "common", + "docId": "kibKbnDefaultNavDevtoolsPluginApi", + "section": "def-common.DevToolsNodeDefinition", + "text": "DevToolsNodeDefinition" + } ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -96,7 +99,7 @@ "signature": [ "\"devtools\"" ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -114,12 +117,15 @@ "description": [], "signature": [ "(preset: \"management\") => ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">" + { + "pluginId": "@kbn/default-nav-management", + "scope": "common", + "docId": "kibKbnDefaultNavManagementPluginApi", + "section": "def-common.ManagementNodeDefinition", + "text": "ManagementNodeDefinition" + } ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -133,7 +139,7 @@ "signature": [ "\"management\"" ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -151,12 +157,15 @@ "description": [], "signature": [ "(preset: \"ml\") => ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">" + { + "pluginId": "@kbn/default-nav-ml", + "scope": "common", + "docId": "kibKbnDefaultNavMlPluginApi", + "section": "def-common.MlNodeDefinition", + "text": "MlNodeDefinition" + } ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -170,7 +179,7 @@ "signature": [ "\"ml\"" ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -188,12 +197,15 @@ "description": [], "signature": [ "(preset: \"analytics\") => ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">" + { + "pluginId": "@kbn/default-nav-analytics", + "scope": "common", + "docId": "kibKbnDefaultNavAnalyticsPluginApi", + "section": "def-common.AnalyticsNodeDefinition", + "text": "AnalyticsNodeDefinition" + } ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -207,7 +219,7 @@ "signature": [ "\"analytics\"" ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -225,24 +237,40 @@ "description": [], "signature": [ "(preset: \"all\") => { analytics: ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">; devtools: ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">; ml: ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">; management: ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">; }" + { + "pluginId": "@kbn/default-nav-analytics", + "scope": "common", + "docId": "kibKbnDefaultNavAnalyticsPluginApi", + "section": "def-common.AnalyticsNodeDefinition", + "text": "AnalyticsNodeDefinition" + }, + "; devtools: ", + { + "pluginId": "@kbn/default-nav-devtools", + "scope": "common", + "docId": "kibKbnDefaultNavDevtoolsPluginApi", + "section": "def-common.DevToolsNodeDefinition", + "text": "DevToolsNodeDefinition" + }, + "; ml: ", + { + "pluginId": "@kbn/default-nav-ml", + "scope": "common", + "docId": "kibKbnDefaultNavMlPluginApi", + "section": "def-common.MlNodeDefinition", + "text": "MlNodeDefinition" + }, + "; management: ", + { + "pluginId": "@kbn/default-nav-management", + "scope": "common", + "docId": "kibKbnDefaultNavManagementPluginApi", + "section": "def-common.ManagementNodeDefinition", + "text": "ManagementNodeDefinition" + }, + "; }" ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -256,7 +284,7 @@ "signature": [ "\"all\"" ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -282,40 +310,72 @@ "text": "NavigationGroupPreset" }, ") => ", - "NodeDefinitionWithChildren", - "<", - "ID", - "> | ", - "NodeDefinitionWithChildren", - "<", - "ID", - "> | ", - "NodeDefinitionWithChildren", - "<", - "ID", - "> | ", - "NodeDefinitionWithChildren", - "<", - "ID", - "> | { analytics: ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">; devtools: ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">; ml: ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">; management: ", - "NodeDefinitionWithChildren", - "<", - "ID", - ">; }" + { + "pluginId": "@kbn/default-nav-analytics", + "scope": "common", + "docId": "kibKbnDefaultNavAnalyticsPluginApi", + "section": "def-common.AnalyticsNodeDefinition", + "text": "AnalyticsNodeDefinition" + }, + " | ", + { + "pluginId": "@kbn/default-nav-devtools", + "scope": "common", + "docId": "kibKbnDefaultNavDevtoolsPluginApi", + "section": "def-common.DevToolsNodeDefinition", + "text": "DevToolsNodeDefinition" + }, + " | ", + { + "pluginId": "@kbn/default-nav-management", + "scope": "common", + "docId": "kibKbnDefaultNavManagementPluginApi", + "section": "def-common.ManagementNodeDefinition", + "text": "ManagementNodeDefinition" + }, + " | ", + { + "pluginId": "@kbn/default-nav-ml", + "scope": "common", + "docId": "kibKbnDefaultNavMlPluginApi", + "section": "def-common.MlNodeDefinition", + "text": "MlNodeDefinition" + }, + " | { analytics: ", + { + "pluginId": "@kbn/default-nav-analytics", + "scope": "common", + "docId": "kibKbnDefaultNavAnalyticsPluginApi", + "section": "def-common.AnalyticsNodeDefinition", + "text": "AnalyticsNodeDefinition" + }, + "; devtools: ", + { + "pluginId": "@kbn/default-nav-devtools", + "scope": "common", + "docId": "kibKbnDefaultNavDevtoolsPluginApi", + "section": "def-common.DevToolsNodeDefinition", + "text": "DevToolsNodeDefinition" + }, + "; ml: ", + { + "pluginId": "@kbn/default-nav-ml", + "scope": "common", + "docId": "kibKbnDefaultNavMlPluginApi", + "section": "def-common.MlNodeDefinition", + "text": "MlNodeDefinition" + }, + "; management: ", + { + "pluginId": "@kbn/default-nav-management", + "scope": "common", + "docId": "kibKbnDefaultNavManagementPluginApi", + "section": "def-common.ManagementNodeDefinition", + "text": "ManagementNodeDefinition" + }, + "; }" ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -336,7 +396,7 @@ "text": "NavigationGroupPreset" } ], - "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets/index.ts", + "path": "packages/shared-ux/chrome/navigation/src/ui/nav_tree_presets.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -353,7 +413,7 @@ "label": "Navigation", "description": [], "signature": [ - "({ children, homeRef, unstyled = false, dataTestSubj }: Props) => JSX.Element" + "({ children, unstyled = false, dataTestSubj }: Props) => JSX.Element" ], "path": "packages/shared-ux/chrome/navigation/src/ui/components/navigation.tsx", "deprecated": false, @@ -364,7 +424,7 @@ "id": "def-common.Navigation.$1", "type": "Object", "tags": [], - "label": "{ children, homeRef, unstyled = false, dataTestSubj }", + "label": "{ children, unstyled = false, dataTestSubj }", "description": [], "signature": [ "Props" @@ -483,35 +543,6 @@ "deprecated": false, "trackAdoption": false, "children": [ - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.ChromeNavigation.homeLink", - "type": "string", - "tags": [], - "label": "homeLink", - "description": [ - "\nTarget for the logo icon. Must be an app id or a deeplink id." - ], - "path": "packages/shared-ux/chrome/navigation/types/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.ChromeNavigation.linkToCloud", - "type": "CompoundType", - "tags": [], - "label": "linkToCloud", - "description": [ - "\nControl of the link that takes the user to their projects or deployments" - ], - "signature": [ - "\"projects\" | \"deployments\" | undefined" - ], - "path": "packages/shared-ux/chrome/navigation/types/index.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "@kbn/shared-ux-chrome-navigation", "id": "def-common.ChromeNavigation.navigationTree", @@ -602,7 +633,7 @@ "tags": [], "label": "ChromeNavigationNode", "description": [ - "\nChrome navigatioin node definition.\n" + "\nChrome navigation node definition.\n" ], "path": "packages/shared-ux/chrome/navigation/types/index.ts", "deprecated": false, @@ -808,45 +839,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.CloudLinkDefinition", - "type": "Interface", - "tags": [], - "label": "CloudLinkDefinition", - "description": [], - "signature": [ - { - "pluginId": "@kbn/shared-ux-chrome-navigation", - "scope": "common", - "docId": "kibKbnSharedUxChromeNavigationPluginApi", - "section": "def-common.CloudLinkDefinition", - "text": "CloudLinkDefinition" - }, - " extends ", - "Props" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.CloudLinkDefinition.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "signature": [ - "\"cloudLink\"" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/shared-ux-chrome-navigation", "id": "def-common.GroupDefinition", @@ -862,15 +854,15 @@ "section": "def-common.GroupDefinition", "text": "GroupDefinition" }, - " extends ", + " extends ", { - "pluginId": "@kbn/shared-ux-chrome-navigation", + "pluginId": "@kbn/core-chrome-browser", "scope": "common", - "docId": "kibKbnSharedUxChromeNavigationPluginApi", + "docId": "kibKbnCoreChromeBrowserPluginApi", "section": "def-common.NodeDefinition", "text": "NodeDefinition" }, - "" + "" ], "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", "deprecated": false, @@ -906,27 +898,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.GroupDefinition.children", - "type": "Array", - "tags": [], - "label": "children", - "description": [], - "signature": [ - { - "pluginId": "@kbn/shared-ux-chrome-navigation", - "scope": "common", - "docId": "kibKbnSharedUxChromeNavigationPluginApi", - "section": "def-common.NodeDefinition", - "text": "NodeDefinition" - }, - "[] | undefined" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "@kbn/shared-ux-chrome-navigation", "id": "def-common.GroupDefinition.preset", @@ -992,21 +963,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.NavigationServices.loadingCount$", - "type": "Object", - "tags": [], - "label": "loadingCount$", - "description": [], - "signature": [ - "Observable", - "" - ], - "path": "packages/shared-ux/chrome/navigation/types/index.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "@kbn/shared-ux-chrome-navigation", "id": "def-common.NavigationServices.recentlyAccessed$", @@ -1192,7 +1148,15 @@ "section": "def-common.RootNavigationItemDefinition", "text": "RootNavigationItemDefinition" }, - "[] | undefined" + "<", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.AppDeepLinkId", + "text": "AppDeepLinkId" + }, + ", string, string>[] | undefined" ], "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", "deprecated": false, @@ -1215,134 +1179,15 @@ "section": "def-common.RootNavigationItemDefinition", "text": "RootNavigationItemDefinition" }, - "[] | undefined" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.NodeDefinition", - "type": "Interface", - "tags": [], - "label": "NodeDefinition", - "description": [], - "signature": [ - { - "pluginId": "@kbn/shared-ux-chrome-navigation", - "scope": "common", - "docId": "kibKbnSharedUxChromeNavigationPluginApi", - "section": "def-common.NodeDefinition", - "text": "NodeDefinition" - }, - "" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.NodeDefinition.id", - "type": "Uncategorized", - "tags": [], - "label": "id", - "description": [ - "Optional id, if not passed a \"link\" must be provided." - ], - "signature": [ - "T | undefined" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.NodeDefinition.title", - "type": "string", - "tags": [], - "label": "title", - "description": [ - "Optional title. If not provided and a \"link\" is provided the title will be the Deep link title" - ], - "signature": [ - "string | undefined" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.NodeDefinition.link", - "type": "string", - "tags": [], - "label": "link", - "description": [ - "App id or deeplink id" - ], - "signature": [ - "string | undefined" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.NodeDefinition.icon", - "type": "string", - "tags": [], - "label": "icon", - "description": [ - "Optional icon for the navigation node. Note: not all navigation depth will render the icon" - ], - "signature": [ - "string | undefined" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.NodeDefinition.children", - "type": "Array", - "tags": [], - "label": "children", - "description": [ - "Optional children of the navigation node" - ], - "signature": [ + "<", { - "pluginId": "@kbn/shared-ux-chrome-navigation", + "pluginId": "@kbn/core-chrome-browser", "scope": "common", - "docId": "kibKbnSharedUxChromeNavigationPluginApi", - "section": "def-common.NodeDefinition", - "text": "NodeDefinition" + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.AppDeepLinkId", + "text": "AppDeepLinkId" }, - "[] | undefined" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.NodeDefinition.href", - "type": "string", - "tags": [], - "label": "href", - "description": [ - "\nTemporarilly we allow href to be passed.\nOnce all the deeplinks will be exposed in packages we will not allow href anymore\nand force deeplink id to be passed" - ], - "signature": [ - "string | undefined" + ", string, string>[] | undefined" ], "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", "deprecated": false, @@ -1362,19 +1207,6 @@ "deprecated": false, "trackAdoption": false, "children": [ - { - "parentPluginId": "@kbn/shared-ux-chrome-navigation", - "id": "def-common.ProjectNavigationDefinition.homeRef", - "type": "string", - "tags": [], - "label": "homeRef", - "description": [ - "\nThe URL href for the home link" - ], - "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "@kbn/shared-ux-chrome-navigation", "id": "def-common.ProjectNavigationDefinition.projectNavigationTree", @@ -1386,7 +1218,15 @@ ], "signature": [ "ProjectNavigationTreeDefinition", - " | undefined" + "<", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.AppDeepLinkId", + "text": "AppDeepLinkId" + }, + ", string, string> | undefined" ], "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", "deprecated": false, @@ -1489,8 +1329,8 @@ "pluginId": "@kbn/shared-ux-chrome-navigation", "scope": "common", "docId": "kibKbnSharedUxChromeNavigationPluginApi", - "section": "def-common.CloudLinkDefinition", - "text": "CloudLinkDefinition" + "section": "def-common.RecentlyAccessedDefinition", + "text": "RecentlyAccessedDefinition" }, " | ", { @@ -1500,14 +1340,7 @@ "section": "def-common.GroupDefinition", "text": "GroupDefinition" }, - " | ", - { - "pluginId": "@kbn/shared-ux-chrome-navigation", - "scope": "common", - "docId": "kibKbnSharedUxChromeNavigationPluginApi", - "section": "def-common.RecentlyAccessedDefinition", - "text": "RecentlyAccessedDefinition" - } + "" ], "path": "packages/shared-ux/chrome/navigation/src/ui/types.ts", "deprecated": false, diff --git a/api_docs/kbn_shared_ux_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index 2dccf875ac0ea..26e4e08d69dc7 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.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 | |-------------------|-----------|------------------------|-----------------| -| 76 | 0 | 46 | 7 | +| 62 | 0 | 41 | 5 | ## Common diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 286787f041ac2..5558c5199c175 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-06-13 +date: 2023-06-14 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 180a0c2d678a4..cd6e018a6eab5 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-06-13 +date: 2023-06-14 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 39aee0ef5c66f..b08446403268a 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-06-13 +date: 2023-06-14 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 012eae021104f..0227d4d153e57 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-06-13 +date: 2023-06-14 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 31dc14626215b..fa3080dfbb909 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-06-13 +date: 2023-06-14 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 12bd6125225dc..b07d15d3500aa 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-06-13 +date: 2023-06-14 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 d17690d908446..5422fa3c6bc60 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-06-13 +date: 2023-06-14 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 04daae129d135..f8e6209122c14 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-06-13 +date: 2023-06-14 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 9e72559242120..d931a6c3769f8 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-06-13 +date: 2023-06-14 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 e6feea9a58677..b943cd9afdf27 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 43f89507e9601..84a4ab665f919 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-06-13 +date: 2023-06-14 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 828b80c7ab543..97923cdead10b 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-06-13 +date: 2023-06-14 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 8714ca2ea5623..3b1cf00c70541 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index 6a2f88b0dccfe..64f4aa85609b6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 106103cfeaea6..5fedc8265b19d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index fe4b1551a1b71..8ab0075c0477d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index 8ea2c360e355f..7db6cc1e88301 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index 0b98faf97aaa5..a98683e5a133f 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 28c4d964f2234..121c51b268bda 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 4796fc464fa8e..fbd9333148492 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index cb94ffd622421..2579f60531492 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index e5908d17124a9..b8f575ceee50e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 4e5b5a084d3a5..d6fbcefcd277e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index d6b0f3308424b..240e6cfb44f6e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index 8721678ec4ba1..af3fed5ba335b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index 1bbb0892848c5..48dac42e37764 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-06-13 +date: 2023-06-14 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 cd84431c2ade1..0f2f7de6ef948 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index e8cffe123100d..324c651d78782 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index d25c1ca22b44e..b1d90759a1920 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index e7d7987269e60..78cdf75919b38 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 64e70895f0652..a8b120c1d7f1c 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index d7e05cf8c88de..207678589fe10 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-06-13 +date: 2023-06-14 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 4576a3d0c8ea1..88cd01bd41406 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 25fce87082479..0334e55667c16 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index 150a36accfc30..e687f1010e180 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index b9060ba191cb3..87d86a2158751 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index d27338bfcd62b..a103ba7c45419 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 855b392d93866..274834cea893f 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.devdocs.json b/api_docs/kbn_test_jest_helpers.devdocs.json index d3d8f95078bf4..966ba9bd7dd51 100644 --- a/api_docs/kbn_test_jest_helpers.devdocs.json +++ b/api_docs/kbn_test_jest_helpers.devdocs.json @@ -715,7 +715,7 @@ "signature": [ "(node: React.ReactElement>, {\n context,\n childContextTypes,\n ...props\n }: { attachTo?: HTMLElement | undefined; context?: any; childContextTypes?: ", "ValidationMap", - " | undefined; }) => ", + " | undefined; wrappingComponent?: React.ComponentType | undefined; wrappingComponentProps?: {} | undefined; }) => ", "ReactWrapper", ", React.Component<{}, {}, any>>" ], @@ -793,6 +793,34 @@ "path": "packages/kbn-test-jest-helpers/src/enzyme_helpers.tsx", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-jest-helpers", + "id": "def-common.mountWithIntl.$2.wrappingComponent", + "type": "CompoundType", + "tags": [], + "label": "wrappingComponent", + "description": [], + "signature": [ + "React.ComponentType | undefined" + ], + "path": "packages/kbn-test-jest-helpers/src/enzyme_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-jest-helpers", + "id": "def-common.mountWithIntl.$2.wrappingComponentProps", + "type": "Object", + "tags": [], + "label": "wrappingComponentProps", + "description": [], + "signature": [ + "{} | undefined" + ], + "path": "packages/kbn-test-jest-helpers/src/enzyme_helpers.tsx", + "deprecated": false, + "trackAdoption": false } ] } diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 7ad0611f2469f..5ea32ff635e9e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 135 | 5 | 103 | 2 | +| 137 | 5 | 105 | 2 | ## Common diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index edaec3592213e..1af65350a9bda 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index a0f8e0c5232d2..f3bfbb1882467 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index 482e18a844e1a..96835f0fb2cf9 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-06-13 +date: 2023-06-14 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 495e5baa923ea..2dc3596c76c21 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-06-13 +date: 2023-06-14 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 bd43d4424b27d..f8f12a5a91381 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 46f2318c74585..7a0ce97c9283c 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-06-13 +date: 2023-06-14 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 abb5f2ad61a77..72eb902f2980d 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-06-13 +date: 2023-06-14 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 9fa746b66eb8f..de23a1a20c181 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-06-13 +date: 2023-06-14 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 028f72d735242..4d44e1db49778 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-06-13 +date: 2023-06-14 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 a148888e9119d..a5c9b54f6b594 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 6c468ed1e5d61..09b5f03fa1799 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 6211f46fe3dee..b9d046faebb60 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 500908cbd800c..ad54e9b898957 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index 644c8d39e22aa..c38c3d43725dc 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index a4dbc4b005403..9ae2cd819c8fb 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.devdocs.json b/api_docs/kibana_react.devdocs.json index 83885de1d0ffe..4ef057e129137 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -3390,6 +3390,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "kibanaReact", + "id": "def-public.LANG", + "type": "string", + "tags": [], + "label": "LANG", + "description": [], + "signature": [ + "\"grok\"" + ], + "path": "src/plugins/kibana_react/public/code_editor/languages/grok/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "kibanaReact", "id": "def-public.NO_DATA_PAGE_MAX_WIDTH", diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 4088b14f01faf..e013442b61908 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.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 | |-------------------|-----------|------------------------|-----------------| -| 185 | 1 | 153 | 5 | +| 186 | 1 | 154 | 5 | ## Client diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 0b98a3700d28f..51ec20ef5ba12 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 1f213a70221d0..3d79a0d83e504 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 5a9ac95b693a9..98804dc6f7f86 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index 0b90477e5fdb9..ff0e63320be1a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index d77251fe50b6b..d904a30cb5ed5 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 71dc8313cc111..30da5bd878460 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 2b08bfe2cc342..336ac8b0a941a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 2a0ff8970ca2e..c1e0a8397d0f3 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-06-13 +date: 2023-06-14 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 3dabf8c2036cb..d81168a954aef 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 8106d94a8d9a0..06a623130f655 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/ml.devdocs.json b/api_docs/ml.devdocs.json index feb21b34e4084..77287b57334ec 100644 --- a/api_docs/ml.devdocs.json +++ b/api_docs/ml.devdocs.json @@ -462,7 +462,7 @@ "label": "capabilities", "description": [], "signature": [ - "{ canGetJobs: boolean; canGetDatafeeds: boolean; canGetCalendars: boolean; canFindFileStructure: boolean; canGetDataFrameAnalytics: boolean; canGetAnnotations: boolean; canCreateAnnotation: boolean; canDeleteAnnotation: boolean; canUseMlAlerts: boolean; canGetTrainedModels: boolean; canTestTrainedModels: boolean; canGetFieldInfo: boolean; canGetMlInfo: boolean; } & { canCreateJob: boolean; canDeleteJob: boolean; canOpenJob: boolean; canCloseJob: boolean; canResetJob: boolean; canUpdateJob: boolean; canForecastJob: boolean; canCreateDatafeed: boolean; canDeleteDatafeed: boolean; canStartStopDatafeed: boolean; canUpdateDatafeed: boolean; canPreviewDatafeed: boolean; canGetFilters: boolean; canCreateCalendar: boolean; canDeleteCalendar: boolean; canCreateFilter: boolean; canDeleteFilter: boolean; canCreateDataFrameAnalytics: boolean; canDeleteDataFrameAnalytics: boolean; canStartStopDataFrameAnalytics: boolean; canCreateMlAlerts: boolean; canUseMlAlerts: boolean; canViewMlNodes: boolean; canCreateTrainedModels: boolean; canDeleteTrainedModels: boolean; canStartStopTrainedModels: boolean; }" + "{ canGetJobs: boolean; canGetDatafeeds: boolean; canGetCalendars: boolean; canFindFileStructure: boolean; canGetDataFrameAnalytics: boolean; canGetAnnotations: boolean; canCreateAnnotation: boolean; canDeleteAnnotation: boolean; canUseMlAlerts: boolean; canGetTrainedModels: boolean; canTestTrainedModels: boolean; canGetFieldInfo: boolean; canGetMlInfo: boolean; canUseAiops: boolean; } & { canCreateJob: boolean; canDeleteJob: boolean; canOpenJob: boolean; canCloseJob: boolean; canResetJob: boolean; canUpdateJob: boolean; canForecastJob: boolean; canCreateDatafeed: boolean; canDeleteDatafeed: boolean; canStartStopDatafeed: boolean; canUpdateDatafeed: boolean; canPreviewDatafeed: boolean; canGetFilters: boolean; canCreateCalendar: boolean; canDeleteCalendar: boolean; canCreateFilter: boolean; canDeleteFilter: boolean; canCreateDataFrameAnalytics: boolean; canDeleteDataFrameAnalytics: boolean; canStartStopDataFrameAnalytics: boolean; canCreateMlAlerts: boolean; canUseMlAlerts: boolean; canViewMlNodes: boolean; canCreateTrainedModels: boolean; canDeleteTrainedModels: boolean; canStartStopTrainedModels: boolean; }" ], "path": "x-pack/plugins/ml/common/types/capabilities.ts", "deprecated": false, @@ -1025,7 +1025,7 @@ "label": "ML_PAGES", "description": [], "signature": [ - "{ readonly ANOMALY_DETECTION_JOBS_MANAGE: \"jobs\"; readonly ANOMALY_EXPLORER: \"explorer\"; readonly SINGLE_METRIC_VIEWER: \"timeseriesexplorer\"; readonly DATA_FRAME_ANALYTICS_JOBS_MANAGE: \"data_frame_analytics\"; readonly DATA_FRAME_ANALYTICS_SOURCE_SELECTION: \"data_frame_analytics/source_selection\"; readonly DATA_FRAME_ANALYTICS_CREATE_JOB: \"data_frame_analytics/new_job\"; readonly TRAINED_MODELS_MANAGE: \"trained_models\"; readonly MEMORY_USAGE: \"memory_usage\"; readonly DATA_FRAME_ANALYTICS_EXPLORATION: \"data_frame_analytics/exploration\"; readonly DATA_FRAME_ANALYTICS_MAP: \"data_frame_analytics/map\"; readonly DATA_VISUALIZER: \"datavisualizer\"; readonly DATA_VISUALIZER_INDEX_SELECT: \"datavisualizer_index_select\"; readonly DATA_VISUALIZER_FILE: \"filedatavisualizer\"; readonly DATA_VISUALIZER_INDEX_VIEWER: \"jobs/new_job/datavisualizer\"; readonly ANOMALY_DETECTION_CREATE_JOB: \"jobs/new_job\"; readonly ANOMALY_DETECTION_CREATE_JOB_RECOGNIZER: \"jobs/new_job/recognize\"; readonly ANOMALY_DETECTION_CREATE_JOB_SINGLE_METRIC: \"jobs/new_job/single_metric\"; readonly ANOMALY_DETECTION_CREATE_JOB_MULTI_METRIC: \"jobs/new_job/multi_metric\"; readonly ANOMALY_DETECTION_CREATE_JOB_CONVERT_TO_MULTI_METRIC: \"jobs/new_job/convert_to_multi_metric\"; readonly ANOMALY_DETECTION_CREATE_JOB_ADVANCED: \"jobs/new_job/advanced\"; readonly ANOMALY_DETECTION_CREATE_JOB_POPULATION: \"jobs/new_job/population\"; readonly ANOMALY_DETECTION_CREATE_JOB_CATEGORIZATION: \"jobs/new_job/categorization\"; readonly ANOMALY_DETECTION_CREATE_JOB_RARE: \"jobs/new_job/rare\"; readonly ANOMALY_DETECTION_CREATE_JOB_GEO: \"jobs/new_job/geo\"; readonly ANOMALY_DETECTION_CREATE_JOB_CONVERT_TO_ADVANCED: \"jobs/new_job/convert_to_advanced\"; readonly ANOMALY_DETECTION_CREATE_JOB_SELECT_TYPE: \"jobs/new_job/step/job_type\"; readonly ANOMALY_DETECTION_CREATE_JOB_SELECT_INDEX: \"jobs/new_job/step/index_or_search\"; readonly ANOMALY_DETECTION_CREATE_JOB_FROM_LENS: \"jobs/new_job/from_lens\"; readonly ANOMALY_DETECTION_CREATE_JOB_FROM_MAP: \"jobs/new_job/from_map\"; readonly ANOMALY_DETECTION_MODULES_VIEW_OR_CREATE: \"modules/check_view_or_create\"; readonly SETTINGS: \"settings\"; readonly CALENDARS_MANAGE: \"settings/calendars_list\"; readonly CALENDARS_NEW: \"settings/calendars_list/new_calendar\"; readonly CALENDARS_EDIT: \"settings/calendars_list/edit_calendar\"; readonly FILTER_LISTS_MANAGE: \"settings/filter_lists\"; readonly FILTER_LISTS_NEW: \"settings/filter_lists/new_filter_list\"; readonly FILTER_LISTS_EDIT: \"settings/filter_lists/edit_filter_list\"; readonly ACCESS_DENIED: \"access-denied\"; readonly OVERVIEW: \"overview\"; readonly NOTIFICATIONS: \"notifications\"; readonly AIOPS: \"aiops\"; readonly AIOPS_EXPLAIN_LOG_RATE_SPIKES: \"aiops/explain_log_rate_spikes\"; readonly AIOPS_EXPLAIN_LOG_RATE_SPIKES_INDEX_SELECT: \"aiops/explain_log_rate_spikes_index_select\"; readonly AIOPS_LOG_CATEGORIZATION: \"aiops/log_categorization\"; readonly AIOPS_LOG_CATEGORIZATION_INDEX_SELECT: \"aiops/log_categorization_index_select\"; readonly AIOPS_CHANGE_POINT_DETECTION: \"aiops/change_point_detection\"; readonly AIOPS_CHANGE_POINT_DETECTION_INDEX_SELECT: \"aiops/change_point_detection_index_select\"; }" + "{ readonly ANOMALY_DETECTION_JOBS_MANAGE: \"jobs\"; readonly ANOMALY_EXPLORER: \"explorer\"; readonly SINGLE_METRIC_VIEWER: \"timeseriesexplorer\"; readonly DATA_FRAME_ANALYTICS_JOBS_MANAGE: \"data_frame_analytics\"; readonly DATA_FRAME_ANALYTICS_SOURCE_SELECTION: \"data_frame_analytics/source_selection\"; readonly DATA_FRAME_ANALYTICS_CREATE_JOB: \"data_frame_analytics/new_job\"; readonly TRAINED_MODELS_MANAGE: \"trained_models\"; readonly NODES: \"nodes\"; readonly MEMORY_USAGE: \"memory_usage\"; readonly DATA_FRAME_ANALYTICS_EXPLORATION: \"data_frame_analytics/exploration\"; readonly DATA_FRAME_ANALYTICS_MAP: \"data_frame_analytics/map\"; readonly DATA_VISUALIZER: \"datavisualizer\"; readonly DATA_VISUALIZER_INDEX_SELECT: \"datavisualizer_index_select\"; readonly DATA_VISUALIZER_FILE: \"filedatavisualizer\"; readonly DATA_VISUALIZER_INDEX_VIEWER: \"jobs/new_job/datavisualizer\"; readonly ANOMALY_DETECTION_CREATE_JOB: \"jobs/new_job\"; readonly ANOMALY_DETECTION_CREATE_JOB_RECOGNIZER: \"jobs/new_job/recognize\"; readonly ANOMALY_DETECTION_CREATE_JOB_SINGLE_METRIC: \"jobs/new_job/single_metric\"; readonly ANOMALY_DETECTION_CREATE_JOB_MULTI_METRIC: \"jobs/new_job/multi_metric\"; readonly ANOMALY_DETECTION_CREATE_JOB_CONVERT_TO_MULTI_METRIC: \"jobs/new_job/convert_to_multi_metric\"; readonly ANOMALY_DETECTION_CREATE_JOB_ADVANCED: \"jobs/new_job/advanced\"; readonly ANOMALY_DETECTION_CREATE_JOB_POPULATION: \"jobs/new_job/population\"; readonly ANOMALY_DETECTION_CREATE_JOB_CATEGORIZATION: \"jobs/new_job/categorization\"; readonly ANOMALY_DETECTION_CREATE_JOB_RARE: \"jobs/new_job/rare\"; readonly ANOMALY_DETECTION_CREATE_JOB_GEO: \"jobs/new_job/geo\"; readonly ANOMALY_DETECTION_CREATE_JOB_CONVERT_TO_ADVANCED: \"jobs/new_job/convert_to_advanced\"; readonly ANOMALY_DETECTION_CREATE_JOB_SELECT_TYPE: \"jobs/new_job/step/job_type\"; readonly ANOMALY_DETECTION_CREATE_JOB_SELECT_INDEX: \"jobs/new_job/step/index_or_search\"; readonly ANOMALY_DETECTION_CREATE_JOB_FROM_LENS: \"jobs/new_job/from_lens\"; readonly ANOMALY_DETECTION_CREATE_JOB_FROM_MAP: \"jobs/new_job/from_map\"; readonly ANOMALY_DETECTION_MODULES_VIEW_OR_CREATE: \"modules/check_view_or_create\"; readonly SETTINGS: \"settings\"; readonly CALENDARS_MANAGE: \"settings/calendars_list\"; readonly CALENDARS_NEW: \"settings/calendars_list/new_calendar\"; readonly CALENDARS_EDIT: \"settings/calendars_list/edit_calendar\"; readonly FILTER_LISTS_MANAGE: \"settings/filter_lists\"; readonly FILTER_LISTS_NEW: \"settings/filter_lists/new_filter_list\"; readonly FILTER_LISTS_EDIT: \"settings/filter_lists/edit_filter_list\"; readonly OVERVIEW: \"overview\"; readonly NOTIFICATIONS: \"notifications\"; readonly AIOPS: \"aiops\"; readonly AIOPS_EXPLAIN_LOG_RATE_SPIKES: \"aiops/explain_log_rate_spikes\"; readonly AIOPS_EXPLAIN_LOG_RATE_SPIKES_INDEX_SELECT: \"aiops/explain_log_rate_spikes_index_select\"; readonly AIOPS_LOG_CATEGORIZATION: \"aiops/log_categorization\"; readonly AIOPS_LOG_CATEGORIZATION_INDEX_SELECT: \"aiops/log_categorization_index_select\"; readonly AIOPS_CHANGE_POINT_DETECTION: \"aiops/change_point_detection\"; readonly AIOPS_CHANGE_POINT_DETECTION_INDEX_SELECT: \"aiops/change_point_detection_index_select\"; }" ], "path": "x-pack/plugins/ml/common/constants/locator.ts", "deprecated": false, diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index a824c6b5a570e..2ce1067581ddc 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index db21033206daa..8e30fcaa0fe90 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 2db414a08df9c..602ccdc906e4a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index b0189796edc4b..5113d8e0764c4 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 85fd3e18d0dc5..1054bc633f504 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-06-13 +date: 2023-06-14 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 685bf9932724b..9aad987fe5a32 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index e4b092c8c8ed9..a529cb9c0665a 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -2652,7 +2652,17 @@ "signature": [ "{ navigation: { PageTemplate: (pageTemplateProps: ", "WrappedPageTemplateProps", - ") => JSX.Element; }; updateGlobalNavigation: ({ capabilities, deepLinks, updater$, }: { capabilities: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean | Readonly<{ [x: string]: boolean; }>; }>; navLinks: Readonly<{ [x: string]: boolean; }>; management: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean; }>; }>; catalogue: Readonly<{ [x: string]: boolean; }>; }>; deepLinks: ", + ") => JSX.Element; registerSections: (sections$: ", + "Observable", + "<", + { + "pluginId": "observabilityShared", + "scope": "public", + "docId": "kibObservabilitySharedPluginApi", + "section": "def-public.NavigationSection", + "text": "NavigationSection" + }, + "[]>) => void; }; updateGlobalNavigation: ({ capabilities, deepLinks, updater$, }: { capabilities: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean | Readonly<{ [x: string]: boolean; }>; }>; navLinks: Readonly<{ [x: string]: boolean; }>; management: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean; }>; }>; catalogue: Readonly<{ [x: string]: boolean; }>; }>; deepLinks: ", { "pluginId": "@kbn/core-application-browser", "scope": "common", @@ -2660,7 +2670,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - "[]; updater$: ", + "[]; updater$: ", "Subject", "<", { @@ -3735,6 +3745,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "observability", + "id": "def-public.enableLegacyUptimeApp", + "type": "string", + "tags": [], + "label": "enableLegacyUptimeApp", + "description": [], + "signature": [ + "\"observability:enableLegacyUptimeApp\"" + ], + "path": "x-pack/plugins/observability/common/ui_settings_keys.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "observability", "id": "def-public.FetchData", @@ -7735,7 +7760,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"GET /api/observability/composite_slos 2023-05-24\": { endpoint: \"GET /api/observability/composite_slos 2023-05-24\"; params?: ", + "; \"GET /api/observability/composite_slos 2023-05-24\"?: ({ endpoint: \"GET /api/observability/composite_slos 2023-05-24\"; params?: ", "PartialC", "<{ query: ", "PartialC", @@ -7769,7 +7794,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"GET /api/observability/composite_slos/{id} 2023-05-24\": { endpoint: \"GET /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", + ") | undefined; \"GET /api/observability/composite_slos/{id} 2023-05-24\"?: ({ endpoint: \"GET /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -7791,7 +7816,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"DELETE /api/observability/composite_slos/{id} 2023-05-24\": { endpoint: \"DELETE /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", + ") | undefined; \"DELETE /api/observability/composite_slos/{id} 2023-05-24\"?: ({ endpoint: \"DELETE /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -7813,7 +7838,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"PUT /api/observability/composite_slos/{id} 2023-05-24\": { endpoint: \"PUT /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", + ") | undefined; \"PUT /api/observability/composite_slos/{id} 2023-05-24\"?: ({ endpoint: \"PUT /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -7935,7 +7960,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"POST /api/observability/composite_slos 2023-05-24\": { endpoint: \"POST /api/observability/composite_slos 2023-05-24\"; params?: ", + ") | undefined; \"POST /api/observability/composite_slos 2023-05-24\"?: ({ endpoint: \"POST /api/observability/composite_slos 2023-05-24\"; params?: ", "TypeC", "<{ body: ", "IntersectionC", @@ -8059,7 +8084,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"GET /internal/observability/slos/{id}/_diagnosis\": { endpoint: \"GET /internal/observability/slos/{id}/_diagnosis\"; params?: ", + ") | undefined; \"GET /internal/observability/slos/{id}/_diagnosis\": { endpoint: \"GET /internal/observability/slos/{id}/_diagnosis\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -8884,7 +8909,7 @@ "label": "ObservabilityConfig", "description": [], "signature": [ - "{ readonly coPilot?: Readonly<{} & { enabled: boolean; provider: Readonly<{} & { openAI: Readonly<{} & { apiKey: string; model: string; }>; }> | Readonly<{} & { azureOpenAI: Readonly<{} & { apiKey: string; resourceName: string; deploymentId: string; }>; }>; }> | undefined; readonly enabled: boolean; readonly annotations: Readonly<{} & { enabled: boolean; index: string; }>; readonly unsafe: Readonly<{} & { alertDetails: Readonly<{} & { uptime: Readonly<{} & { enabled: boolean; }>; metrics: Readonly<{} & { enabled: boolean; }>; logs: Readonly<{} & { enabled: boolean; }>; }>; thresholdRule: Readonly<{} & { enabled: boolean; }>; }>; readonly thresholdRule: Readonly<{} & { groupByPageSize: number; }>; }" + "{ readonly coPilot?: Readonly<{} & { enabled: boolean; provider: Readonly<{} & { openAI: Readonly<{} & { apiKey: string; model: string; }>; }> | Readonly<{} & { azureOpenAI: Readonly<{} & { apiKey: string; resourceName: string; deploymentId: string; }>; }>; }> | undefined; readonly enabled: boolean; readonly annotations: Readonly<{} & { enabled: boolean; index: string; }>; readonly unsafe: Readonly<{} & { alertDetails: Readonly<{} & { uptime: Readonly<{} & { enabled: boolean; }>; metrics: Readonly<{} & { enabled: boolean; }>; logs: Readonly<{} & { enabled: boolean; }>; }>; thresholdRule: Readonly<{} & { enabled: boolean; }>; }>; readonly thresholdRule: Readonly<{} & { groupByPageSize: number; }>; readonly compositeSlo: Readonly<{} & { enabled: boolean; }>; }" ], "path": "x-pack/plugins/observability/server/index.ts", "deprecated": false, @@ -9051,7 +9076,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"GET /api/observability/composite_slos 2023-05-24\": { endpoint: \"GET /api/observability/composite_slos 2023-05-24\"; params?: ", + "; \"GET /api/observability/composite_slos 2023-05-24\"?: ({ endpoint: \"GET /api/observability/composite_slos 2023-05-24\"; params?: ", "PartialC", "<{ query: ", "PartialC", @@ -9085,7 +9110,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"GET /api/observability/composite_slos/{id} 2023-05-24\": { endpoint: \"GET /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", + ") | undefined; \"GET /api/observability/composite_slos/{id} 2023-05-24\"?: ({ endpoint: \"GET /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -9107,7 +9132,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"DELETE /api/observability/composite_slos/{id} 2023-05-24\": { endpoint: \"DELETE /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", + ") | undefined; \"DELETE /api/observability/composite_slos/{id} 2023-05-24\"?: ({ endpoint: \"DELETE /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -9129,7 +9154,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"PUT /api/observability/composite_slos/{id} 2023-05-24\": { endpoint: \"PUT /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", + ") | undefined; \"PUT /api/observability/composite_slos/{id} 2023-05-24\"?: ({ endpoint: \"PUT /api/observability/composite_slos/{id} 2023-05-24\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -9251,7 +9276,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"POST /api/observability/composite_slos 2023-05-24\": { endpoint: \"POST /api/observability/composite_slos 2023-05-24\"; params?: ", + ") | undefined; \"POST /api/observability/composite_slos 2023-05-24\"?: ({ endpoint: \"POST /api/observability/composite_slos 2023-05-24\"; params?: ", "TypeC", "<{ body: ", "IntersectionC", @@ -9375,7 +9400,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "; \"GET /internal/observability/slos/{id}/_diagnosis\": { endpoint: \"GET /internal/observability/slos/{id}/_diagnosis\"; params?: ", + ") | undefined; \"GET /internal/observability/slos/{id}/_diagnosis\": { endpoint: \"GET /internal/observability/slos/{id}/_diagnosis\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -12366,6 +12391,110 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "observability", + "id": "def-server.uiSettings.enableLegacyUptimeApp", + "type": "Object", + "tags": [], + "label": "[enableLegacyUptimeApp]", + "description": [], + "path": "x-pack/plugins/observability/server/ui_settings.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "observability", + "id": "def-server.uiSettings.enableLegacyUptimeApp.category", + "type": "Array", + "tags": [], + "label": "category", + "description": [], + "signature": [ + "string[]" + ], + "path": "x-pack/plugins/observability/server/ui_settings.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "observability", + "id": "def-server.uiSettings.enableLegacyUptimeApp.name", + "type": "Any", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/plugins/observability/server/ui_settings.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "observability", + "id": "def-server.uiSettings.enableLegacyUptimeApp.value", + "type": "boolean", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "false" + ], + "path": "x-pack/plugins/observability/server/ui_settings.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "observability", + "id": "def-server.uiSettings.enableLegacyUptimeApp.description", + "type": "Any", + "tags": [], + "label": "description", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/plugins/observability/server/ui_settings.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "observability", + "id": "def-server.uiSettings.enableLegacyUptimeApp.schema", + "type": "Object", + "tags": [], + "label": "schema", + "description": [], + "signature": [ + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.Type", + "text": "Type" + }, + "" + ], + "path": "x-pack/plugins/observability/server/ui_settings.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "observability", + "id": "def-server.uiSettings.enableLegacyUptimeApp.requiresPageReload", + "type": "boolean", + "tags": [], + "label": "requiresPageReload", + "description": [], + "signature": [ + "true" + ], + "path": "x-pack/plugins/observability/server/ui_settings.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ], "initialIsOpen": false diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index f7186779f56bd..7e1086c21e75f 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/actionable-observability](https://github.com/orgs/elastic/team | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 515 | 43 | 507 | 18 | +| 523 | 45 | 515 | 18 | ## Client diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index 27bdb71a139e1..de2c8f6816e5a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.devdocs.json b/api_docs/observability_shared.devdocs.json index 7c927aedde4af..86d0b5c7f2658 100644 --- a/api_docs/observability_shared.devdocs.json +++ b/api_docs/observability_shared.devdocs.json @@ -93,7 +93,17 @@ "ObservabilitySharedStart", ") => { navigation: { PageTemplate: (pageTemplateProps: ", "WrappedPageTemplateProps", - ") => JSX.Element; }; updateGlobalNavigation: ({ capabilities, deepLinks, updater$, }: { capabilities: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean | Readonly<{ [x: string]: boolean; }>; }>; navLinks: Readonly<{ [x: string]: boolean; }>; management: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean; }>; }>; catalogue: Readonly<{ [x: string]: boolean; }>; }>; deepLinks: ", + ") => JSX.Element; registerSections: (sections$: ", + "Observable", + "<", + { + "pluginId": "observabilityShared", + "scope": "public", + "docId": "kibObservabilitySharedPluginApi", + "section": "def-public.NavigationSection", + "text": "NavigationSection" + }, + "[]>) => void; }; updateGlobalNavigation: ({ capabilities, deepLinks, updater$, }: { capabilities: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean | Readonly<{ [x: string]: boolean; }>; }>; navLinks: Readonly<{ [x: string]: boolean; }>; management: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean; }>; }>; catalogue: Readonly<{ [x: string]: boolean; }>; }>; deepLinks: ", { "pluginId": "@kbn/core-application-browser", "scope": "common", @@ -101,7 +111,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - "[]; updater$: ", + "[]; updater$: ", "Subject", "<", { @@ -2381,7 +2391,17 @@ "signature": [ "{ navigation: { PageTemplate: (pageTemplateProps: ", "WrappedPageTemplateProps", - ") => JSX.Element; }; updateGlobalNavigation: ({ capabilities, deepLinks, updater$, }: { capabilities: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean | Readonly<{ [x: string]: boolean; }>; }>; navLinks: Readonly<{ [x: string]: boolean; }>; management: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean; }>; }>; catalogue: Readonly<{ [x: string]: boolean; }>; }>; deepLinks: ", + ") => JSX.Element; registerSections: (sections$: ", + "Observable", + "<", + { + "pluginId": "observabilityShared", + "scope": "public", + "docId": "kibObservabilitySharedPluginApi", + "section": "def-public.NavigationSection", + "text": "NavigationSection" + }, + "[]>) => void; }; updateGlobalNavigation: ({ capabilities, deepLinks, updater$, }: { capabilities: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean | Readonly<{ [x: string]: boolean; }>; }>; navLinks: Readonly<{ [x: string]: boolean; }>; management: Readonly<{ [x: string]: Readonly<{ [x: string]: boolean; }>; }>; catalogue: Readonly<{ [x: string]: boolean; }>; }>; deepLinks: ", { "pluginId": "@kbn/core-application-browser", "scope": "common", @@ -2389,7 +2409,7 @@ "section": "def-common.AppDeepLink", "text": "AppDeepLink" }, - "[]; updater$: ", + "[]; updater$: ", "Subject", "<", { diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index 3a45e0923bff8..f769b65f41462 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-06-13 +date: 2023-06-14 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 6866dc9eac668..89dd51c4ace86 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 4e3610d7d8a3b..031b0c777b4f9 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 625 | 518 | 38 | +| 638 | 531 | 38 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 70525 | 531 | 60385 | 1378 | +| 70755 | 537 | 60597 | 1379 | ## Plugin Directory @@ -29,8 +29,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] |--------------|----------------|-----------|--------------|----------|---------------|--------| | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 264 | 10 | 259 | 26 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 36 | 1 | 32 | 2 | -| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 41 | 0 | 24 | 1 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 619 | 1 | 595 | 45 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 44 | 0 | 27 | 1 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 622 | 1 | 598 | 46 | | | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 46 | 0 | 46 | 113 | | | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | Asset manager plugin for entity assets (inventory, topology, etc) | 3 | 0 | 3 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 9 | 0 | 9 | 0 | @@ -38,10 +38,11 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Canvas application to Kibana | 9 | 0 | 8 | 3 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | The Case management system in Kibana | 79 | 0 | 64 | 26 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 271 | 16 | 256 | 10 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 41 | 0 | 11 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | Chat available on Elastic Cloud deployments for quicker assistance. | 1 | 0 | 0 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 52 | 0 | 11 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | Chat available on Elastic Cloud deployments for quicker assistance. | 3 | 0 | 2 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | This plugin exists as a workaround for using `cloudChat` plugin in plugins which can't have a direct dependency on security plugin. | 5 | 0 | 5 | 0 | | | [@elastic/platform-onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Static migration page where self-managed users can see text/copy about migrating to Elastic Cloud | 8 | 1 | 8 | 1 | -| | [@elastic/sec-cloudnative-integrations](https://github.com/orgs/elastic/teams/sec-cloudnative-integrations) | Defend for containers (D4C) | 12 | 0 | 4 | 2 | +| | [@elastic/sec-cloudnative-integrations](https://github.com/orgs/elastic/teams/sec-cloudnative-integrations) | Defend for containers (D4C) | 24 | 0 | 16 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | Provides the necessary APIs to implement A/B testing scenarios, fetching the variations in configuration and reporting back metrics to track conversion rates of the experiments. | 12 | 0 | 0 | 0 | | cloudFullStory | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | When Kibana runs on Elastic Cloud, this plugin registers FullStory as a shipper for telemetry. | 0 | 0 | 0 | 0 | | cloudGainsight | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | When Kibana runs on Elastic Cloud, this plugin registers Gainsight as a shipper for telemetry. | 0 | 0 | 0 | 0 | @@ -71,7 +72,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 9 | 0 | 9 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 115 | 3 | 111 | 3 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | ESS customizations for Security Solution. | 6 | 0 | 6 | 0 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | The Event Annotation service contains expressions for event annotations | 204 | 30 | 204 | 3 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | The Event Annotation service contains expressions for event annotations | 227 | 30 | 227 | 4 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 116 | 0 | 116 | 11 | | | [@elastic/uptime](https://github.com/orgs/elastic/teams/uptime) | - | 141 | 1 | 141 | 14 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'error' renderer to expressions | 17 | 0 | 15 | 2 | @@ -93,7 +94,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 239 | 0 | 24 | 9 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Simple UI for managing files in Kibana | 2 | 1 | 2 | 0 | -| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1184 | 3 | 1068 | 33 | +| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1182 | 3 | 1066 | 33 | | ftrApis | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 0 | 0 | 0 | 0 | @@ -111,7 +112,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 123 | 2 | 96 | 4 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides UI and APIs for the interactive setup mode. | 28 | 0 | 18 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 6 | 0 | 6 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 185 | 1 | 153 | 5 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 186 | 1 | 154 | 5 | | kibanaUsageCollection | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/kibana-app-services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 609 | 3 | 416 | 9 | | | [@elastic/sec-cloudnative-integrations](https://github.com/orgs/elastic/teams/sec-cloudnative-integrations) | - | 5 | 0 | 5 | 1 | @@ -130,7 +131,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 34 | 0 | 34 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 1 | -| | [@elastic/actionable-observability](https://github.com/orgs/elastic/teams/actionable-observability) | - | 515 | 43 | 507 | 18 | +| | [@elastic/actionable-observability](https://github.com/orgs/elastic/teams/actionable-observability) | - | 523 | 45 | 515 | 18 | | | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 7 | 0 | 7 | 0 | | | [@elastic/observability-ui](https://github.com/orgs/elastic/teams/observability-ui) | - | 266 | 1 | 265 | 11 | | | [@elastic/security-defend-workflows](https://github.com/orgs/elastic/teams/security-defend-workflows) | - | 24 | 0 | 24 | 7 | @@ -141,7 +142,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Reporting Services enables applications to feature reports that the user can automate with Watcher and download later. | 38 | 0 | 18 | 3 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Currently PDF, PNG or CSV export types for the reporting plugin | 4 | 0 | 4 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 21 | 0 | 21 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 263 | 0 | 234 | 14 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 266 | 0 | 237 | 14 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 24 | 0 | 19 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 129 | 2 | 118 | 4 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 44 | 0 | 44 | 0 | @@ -153,8 +154,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-reporting-services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 27 | 0 | 8 | 5 | | 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) | - | 155 | 2 | 111 | 29 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | The core Serverless plugin, providing APIs to Serverless Project plugins. | 14 | 0 | 13 | 0 | +| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 155 | 2 | 111 | 28 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | The core Serverless plugin, providing APIs to Serverless Project plugins. | 16 | 0 | 15 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Serverless customizations for observability. | 6 | 0 | 6 | 0 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Serverless customizations for search. | 6 | 0 | 6 | 0 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | Serverless customizations for security. | 6 | 0 | 6 | 0 | @@ -199,8 +200,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Registers the vega visualization. Is the elastic version of vega and vega-lite libraries. | 2 | 0 | 2 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the vislib visualizations. These are the classical area/line/bar, gauge/goal and heatmap charts. We want to replace them with elastic-charts. | 1 | 0 | 1 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the new xy-axis chart using the elastic-charts library, which will eventually replace the vislib xy-axis charts including bar, area, and line. | 52 | 0 | 50 | 5 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 122 | 0 | 119 | 4 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 823 | 12 | 793 | 18 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 163 | 0 | 159 | 4 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 823 | 12 | 793 | 19 | | watcher | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | ## Package Directory @@ -240,7 +241,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 24 | 0 | 24 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 135 | 3 | 133 | 18 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 6 | 0 | 4 | 4 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 21 | 0 | 14 | 5 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 14 | 0 | 14 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 9 | 0 | 9 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 58 | 0 | 41 | 4 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 180 | 1 | 115 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 7 | 1 | @@ -263,7 +266,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 5 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 16 | 0 | 7 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 6 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 141 | 0 | 55 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 149 | 0 | 58 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 8 | 0 | @@ -312,8 +315,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 26 | 6 | 26 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 447 | 1 | 178 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 57 | 0 | 51 | 6 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 41 | 0 | 40 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 58 | 0 | 52 | 6 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 43 | 0 | 42 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 2 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 3 | 0 | 1 | 0 | @@ -403,6 +406,16 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 10 | 0 | 10 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 44 | 0 | 43 | 0 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 5 | 0 | 5 | 0 | +| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 5 | 0 | 5 | 0 | +| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 4 | 0 | 4 | 2 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 3 | 0 | 3 | 0 | +| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 3 | 0 | 3 | 0 | +| | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 3 | 0 | 3 | 0 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 7 | 1 | 7 | 0 | +| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 7 | 1 | 7 | 0 | +| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 7 | 1 | 7 | 0 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 7 | 1 | 7 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 9 | 1 | 9 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 101 | 0 | 85 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 15 | 0 | 9 | 0 | @@ -413,7 +426,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 19 | 0 | 11 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 35125 | 0 | 34718 | 0 | | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 13 | 2 | 5 | 0 | -| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 75 | 4 | 55 | 3 | +| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 83 | 4 | 63 | 3 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 4 | 0 | 4 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 27 | 0 | 14 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 3 | 0 | @@ -520,7 +533,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 27 | 0 | 10 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 32 | 0 | 28 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 76 | 0 | 46 | 7 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 62 | 0 | 41 | 5 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 5 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 2 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | @@ -559,7 +572,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 41 | 2 | 21 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 282 | 4 | 238 | 12 | -| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 135 | 5 | 103 | 2 | +| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 137 | 5 | 105 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 15 | 0 | 14 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 72 | 0 | 55 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 028fa0e2292ad..da8983e4761e5 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index a44c6350befa5..9d47b7d7924e6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index fa8a1f421de86..8355f66bf7220 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 7df499db068c3..358b609e340ae 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/reporting_export_types.mdx b/api_docs/reporting_export_types.mdx index 0e438a0ceb6da..ea4ba65cf90e7 100644 --- a/api_docs/reporting_export_types.mdx +++ b/api_docs/reporting_export_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reportingExportTypes title: "reportingExportTypes" image: https://source.unsplash.com/400x175/?github description: API docs for the reportingExportTypes plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reportingExportTypes'] --- import reportingExportTypesObj from './reporting_export_types.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 907f9815f1afa..5f8a6e51d0134 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index 49eb404f14262..7cfd455343e61 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -694,6 +694,55 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getAADFields", + "type": "Function", + "tags": [], + "label": "getAADFields", + "description": [], + "signature": [ + "({ ruleTypeId }: { ruleTypeId: string; }) => Promise<", + { + "pluginId": "dataViews", + "scope": "server", + "docId": "kibDataViewsPluginApi", + "section": "def-server.FieldDescriptor", + "text": "FieldDescriptor" + }, + "[]>" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getAADFields.$1", + "type": "Object", + "tags": [], + "label": "{ ruleTypeId }", + "description": [], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getAADFields.$1.ruleTypeId", + "type": "string", + "tags": [], + "label": "ruleTypeId", + "description": [], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] } ], "initialIsOpen": false @@ -1993,7 +2042,7 @@ "section": "def-server.IRuleTypeAlerts", "text": "IRuleTypeAlerts" }, - " | undefined; actionGroups: ", + " | undefined; recoveryActionGroup?: ", { "pluginId": "alerting", "scope": "common", @@ -2001,7 +2050,7 @@ "section": "def-common.ActionGroup", "text": "ActionGroup" }, - "<\"default\">[]; defaultActionGroupId: \"default\"; recoveryActionGroup?: ", + " | undefined; actionGroups: ", { "pluginId": "alerting", "scope": "common", @@ -2009,7 +2058,7 @@ "section": "def-common.ActionGroup", "text": "ActionGroup" }, - " | undefined; actionVariables?: { context?: ", + "<\"default\">[]; defaultActionGroupId: \"default\"; actionVariables?: { context?: ", { "pluginId": "alerting", "scope": "common", @@ -2051,7 +2100,7 @@ }, "[]) => TParams; } | undefined; isExportable: boolean; defaultScheduleInterval?: string | undefined; ruleTaskTimeout?: string | undefined; doesSetRecoveryContext?: boolean | undefined; autoRecoverAlerts?: boolean | undefined; getViewInAppRelativeUrl?: ", "GetViewInAppRelativeUrlFn", - " | undefined; }" + " | undefined; fieldsForAAD?: string[] | undefined; }" ], "path": "x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts", "deprecated": false, diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index fb46a607dc8db..dcf02a271fc8e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 263 | 0 | 234 | 14 | +| 266 | 0 | 237 | 14 | ## Server diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index c5e8e73093a06..ca7100d0185c1 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 4ee3e051a4f9a..545de022a437c 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index 9e9180bd56d3e..0ac2ddff4c085 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 1af44e5a872e5..1d591a300bfc7 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 266a1ea3adcc1..448193583b408 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index d0e9d7ca93d47..e9656fdce94a5 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 8b49a84cd4cb4..f300386c6093e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index f8cc7516622fe..432326de9cd4e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index 67aa3a573fc55..3f642ce467350 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 00d4c51689a1f..d8110ead78f43 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-06-13 +date: 2023-06-14 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 ed71fa18219a2..8895252af2bd8 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -1728,9 +1728,7 @@ "label": "setGetStartedPage", "description": [], "signature": [ - "(getStartedComponent: ", - "GetStartedComponent", - ") => void" + "(getStartedComponent: React.ComponentType<{}>) => void" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, @@ -1739,12 +1737,12 @@ { "parentPluginId": "securitySolution", "id": "def-public.PluginStart.setGetStartedPage.$1", - "type": "Function", + "type": "CompoundType", "tags": [], "label": "getStartedComponent", "description": [], "signature": [ - "GetStartedComponent" + "React.ComponentType<{}>" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index e660a4bffbad4..4a85faaa7bc06 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-solution](https://github.com/orgs/elastic/teams/secur | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 155 | 2 | 111 | 29 | +| 155 | 2 | 111 | 28 | ## Client diff --git a/api_docs/serverless.devdocs.json b/api_docs/serverless.devdocs.json index 1e514e2acbbfc..b5185f0e6e923 100644 --- a/api_docs/serverless.devdocs.json +++ b/api_docs/serverless.devdocs.json @@ -34,21 +34,25 @@ "children": [ { "parentPluginId": "serverless", - "id": "def-public.ServerlessPluginStart.setSideNavComponent", + "id": "def-public.ServerlessPluginStart.setBreadcrumbs", "type": "Function", "tags": [], - "label": "setSideNavComponent", + "label": "setBreadcrumbs", "description": [], "signature": [ - "(navigation: ", + "(breadcrumbs: ", + "EuiBreadcrumbProps", + " | ", + "EuiBreadcrumbProps", + "[], params?: Partial<", { "pluginId": "@kbn/core-chrome-browser", "scope": "common", "docId": "kibKbnCoreChromeBrowserPluginApi", - "section": "def-common.SideNavComponent", - "text": "SideNavComponent" + "section": "def-common.ChromeSetProjectBreadcrumbsParams", + "text": "ChromeSetProjectBreadcrumbsParams" }, - ") => void" + "> | undefined) => void" ], "path": "x-pack/plugins/serverless/public/types.ts", "deprecated": false, @@ -56,24 +60,44 @@ "children": [ { "parentPluginId": "serverless", - "id": "def-public.ServerlessPluginStart.setSideNavComponent.$1", + "id": "def-public.ServerlessPluginStart.setBreadcrumbs.$1", "type": "CompoundType", "tags": [], - "label": "navigation", + "label": "breadcrumbs", + "description": [], + "signature": [ + "EuiBreadcrumbProps", + " | ", + "EuiBreadcrumbProps", + "[]" + ], + "path": "x-pack/plugins/serverless/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "serverless", + "id": "def-public.ServerlessPluginStart.setBreadcrumbs.$2", + "type": "Object", + "tags": [], + "label": "params", "description": [], "signature": [ + "Partial<", { "pluginId": "@kbn/core-chrome-browser", "scope": "common", "docId": "kibKbnCoreChromeBrowserPluginApi", - "section": "def-common.SideNavComponent", - "text": "SideNavComponent" - } + "section": "def-common.ChromeSetProjectBreadcrumbsParams", + "text": "ChromeSetProjectBreadcrumbsParams" + }, + "> | undefined" ], "path": "x-pack/plugins/serverless/public/types.ts", "deprecated": false, "trackAdoption": false, - "isRequired": true + "isRequired": false } ], "returnComment": [] @@ -126,25 +150,13 @@ }, { "parentPluginId": "serverless", - "id": "def-public.ServerlessPluginStart.setBreadcrumbs", + "id": "def-public.ServerlessPluginStart.setProjectHome", "type": "Function", "tags": [], - "label": "setBreadcrumbs", + "label": "setProjectHome", "description": [], "signature": [ - "(breadcrumbs: ", - "EuiBreadcrumbProps", - " | ", - "EuiBreadcrumbProps", - "[], params?: Partial<", - { - "pluginId": "@kbn/core-chrome-browser", - "scope": "common", - "docId": "kibKbnCoreChromeBrowserPluginApi", - "section": "def-common.ChromeSetProjectBreadcrumbsParams", - "text": "ChromeSetProjectBreadcrumbsParams" - }, - "> | undefined) => void" + "(homeHref: string) => void" ], "path": "x-pack/plugins/serverless/public/types.ts", "deprecated": false, @@ -152,44 +164,64 @@ "children": [ { "parentPluginId": "serverless", - "id": "def-public.ServerlessPluginStart.setBreadcrumbs.$1", - "type": "CompoundType", + "id": "def-public.ServerlessPluginStart.setProjectHome.$1", + "type": "string", "tags": [], - "label": "breadcrumbs", + "label": "homeHref", "description": [], "signature": [ - "EuiBreadcrumbProps", - " | ", - "EuiBreadcrumbProps", - "[]" + "string" ], "path": "x-pack/plugins/serverless/public/types.ts", "deprecated": false, "trackAdoption": false, "isRequired": true + } + ], + "returnComment": [] + }, + { + "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.setBreadcrumbs.$2", - "type": "Object", + "id": "def-public.ServerlessPluginStart.setSideNavComponent.$1", + "type": "CompoundType", "tags": [], - "label": "params", + "label": "navigation", "description": [], "signature": [ - "Partial<", { "pluginId": "@kbn/core-chrome-browser", "scope": "common", "docId": "kibKbnCoreChromeBrowserPluginApi", - "section": "def-common.ChromeSetProjectBreadcrumbsParams", - "text": "ChromeSetProjectBreadcrumbsParams" - }, - "> | undefined" + "section": "def-common.SideNavComponent", + "text": "SideNavComponent" + } ], "path": "x-pack/plugins/serverless/public/types.ts", "deprecated": false, "trackAdoption": false, - "isRequired": false + "isRequired": true } ], "returnComment": [] diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index 54cc09aef47f7..6ae0d89633c54 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-06-13 +date: 2023-06-14 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 | |-------------------|-----------|------------------------|-----------------| -| 14 | 0 | 13 | 0 | +| 16 | 0 | 15 | 0 | ## Client diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index 34fbb494a5f59..f00e7494a6f50 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-06-13 +date: 2023-06-14 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 501601cde50e6..292195baafa78 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-06-13 +date: 2023-06-14 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 40b6633d7e531..9216b21a2efc7 100644 --- a/api_docs/serverless_security.mdx +++ b/api_docs/serverless_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSecurity title: "serverlessSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSecurity plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSecurity'] --- import serverlessSecurityObj from './serverless_security.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 663ab8f19ec6d..ba03f81aafefe 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index c509fde8a4168..ddde1eba39a1d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 84072de496b75..60856788e5b4a 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 7398ab5187b36..4b461d09278a6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index e313e1a15fae4..cf13d986a787b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 7e60273b66299..a13f875ae2968 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 3649b34c6ebbe..85d1d70e12a29 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 0a7d5218ed572..c7bd20885296b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 4a288b12a5b54..96f36e0bd909b 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 9b9cb643e8029..78ad9536886a7 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index fab93f3a75f45..c8aee441aae35 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/text_based_languages.mdx b/api_docs/text_based_languages.mdx index 888945cac3fa1..1c3e97945c7e1 100644 --- a/api_docs/text_based_languages.mdx +++ b/api_docs/text_based_languages.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/textBasedLanguages title: "textBasedLanguages" image: https://source.unsplash.com/400x175/?github description: API docs for the textBasedLanguages plugin -date: 2023-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'textBasedLanguages'] --- import textBasedLanguagesObj from './text_based_languages.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 29c99b98fa605..3c5cbe0282f8d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.devdocs.json b/api_docs/timelines.devdocs.json index 90ef42ea48fc8..9f5ef375f33e4 100644 --- a/api_docs/timelines.devdocs.json +++ b/api_docs/timelines.devdocs.json @@ -4749,6 +4749,14 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/flyout/right/context.tsx" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/left/context.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/flyout/left/context.tsx" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/flyout/right/hooks/use_prevalence.tsx" diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index a20531605af0c..24eb8ff310aa2 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 7ab2c9a5ec420..8068794b6cc3f 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index 990a7738968c9..372a78b05e21a 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -4324,7 +4324,7 @@ "section": "def-common.RuleType", "text": "RuleType" }, - ", \"id\" | \"name\" | \"producer\" | \"actionGroups\" | \"defaultActionGroupId\" | \"recoveryActionGroup\" | \"minimumLicenseRequired\" | \"defaultScheduleInterval\" | \"ruleTaskTimeout\" | \"doesSetRecoveryContext\">" + ", \"id\" | \"name\" | \"producer\" | \"recoveryActionGroup\" | \"actionGroups\" | \"defaultActionGroupId\" | \"minimumLicenseRequired\" | \"defaultScheduleInterval\" | \"ruleTaskTimeout\" | \"doesSetRecoveryContext\">" ], "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", "deprecated": false, diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index fec1b4cc0cbd0..46db455581b60 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-06-13 +date: 2023-06-14 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 8a78db1e22a5f..43ed8b8a81a5c 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index a9880a1270322..e388ec2de8125 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_field_list.mdx b/api_docs/unified_field_list.mdx index 402fa16179fb7..aa3fea5178d7f 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-06-13 +date: 2023-06-14 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 c770b86da21e5..51dfa88497953 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.devdocs.json b/api_docs/unified_search.devdocs.json index c011e50dca8e9..05e52dde8cc23 100644 --- a/api_docs/unified_search.devdocs.json +++ b/api_docs/unified_search.devdocs.json @@ -475,7 +475,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - "; }) => void) | undefined; onRefreshChange?: (((options: { isPaused: boolean; refreshInterval: number; }) => void) & ((options: { isPaused: boolean; refreshInterval: number; }) => void)) | undefined; indicateNoData?: boolean | undefined; nonKqlMode?: \"text\" | \"lucene\" | undefined; disableQueryLanguageSwitcher?: boolean | undefined; displayStyle?: \"inPage\" | \"detached\" | undefined; fillSubmitButton?: boolean | undefined; dataViewPickerComponentProps?: ", + "; }) => void) | undefined; onRefreshChange?: (((options: { isPaused: boolean; refreshInterval: number; }) => void) & ((options: { isPaused: boolean; refreshInterval: number; }) => void)) | undefined; indicateNoData?: boolean | undefined; isAutoRefreshDisabled?: boolean | undefined; nonKqlMode?: \"text\" | \"lucene\" | undefined; disableQueryLanguageSwitcher?: boolean | undefined; displayStyle?: \"inPage\" | \"detached\" | undefined; fillSubmitButton?: boolean | undefined; dataViewPickerComponentProps?: ", { "pluginId": "unifiedSearch", "scope": "public", diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 0dcbe44c42168..8da481b524e6d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index b3820259d1686..8a6686f6ccc1e 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 728d7530fc4a2..0bf837d2832ef 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index afab10872a981..1a4b6fbe2b686 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index c9522560ca006..43cc4e4dfd0c3 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index f4c713017075d..1fe0fa6874c52 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 2885b02894fb9..2b05fa98bab6d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 27544a871ce41..ab9c180db8ab1 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index c99da99893831..b7644cf5039ed 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index f1c27d76cfd12..e1ba532a070b0 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 1da8ee60e0e42..cbbfc60b82472 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 5995262c95aac..e07b0e311688d 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 3ac6711acedf7..67fe9c5772305 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 6ccd729feb6a2..9e299aa633773 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 1f1fa917a814e..194a421bd2ce6 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualization_ui_components.devdocs.json b/api_docs/visualization_ui_components.devdocs.json index 7bc3f79d1b5cf..aee32ecd3be77 100644 --- a/api_docs/visualization_ui_components.devdocs.json +++ b/api_docs/visualization_ui_components.devdocs.json @@ -446,6 +446,97 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.DimensionTrigger", + "type": "Function", + "tags": [], + "label": "DimensionTrigger", + "description": [], + "signature": [ + "({ id, label, color, dataTestSubj, }: { label: React.ReactNode; id?: string | undefined; color?: \"warning\" | \"success\" | \"default\" | \"subdued\" | \"accent\" | \"danger\" | \"ghost\" | ", + "Property", + ".Color | undefined; dataTestSubj?: string | undefined; }) => JSX.Element" + ], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/trigger.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.DimensionTrigger.$1", + "type": "Object", + "tags": [], + "label": "{\n id,\n label,\n color,\n dataTestSubj,\n}", + "description": [], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/trigger.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.DimensionTrigger.$1.label", + "type": "CompoundType", + "tags": [], + "label": "label", + "description": [], + "signature": [ + "boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/trigger.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.DimensionTrigger.$1.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/trigger.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.DimensionTrigger.$1.color", + "type": "CompoundType", + "tags": [], + "label": "color", + "description": [], + "signature": [ + "\"warning\" | \"success\" | \"default\" | \"subdued\" | \"accent\" | \"danger\" | \"ghost\" | ", + "Property", + ".Color | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/trigger.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.DimensionTrigger.$1.dataTestSubj", + "type": "string", + "tags": [], + "label": "dataTestSubj", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/trigger.tsx", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "visualizationUiComponents", "id": "def-public.DragDropBuckets", @@ -658,6 +749,106 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.EmptyDimensionButton", + "type": "Function", + "tags": [], + "label": "EmptyDimensionButton", + "description": [], + "signature": [ + "({ label, ariaLabel, onClick, dataTestSubj, iconType, ...otherProps }: { label: React.ReactNode; ariaLabel: string; onClick: () => void; dataTestSubj?: string | undefined; iconType?: string | undefined; }) => JSX.Element" + ], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.EmptyDimensionButton.$1", + "type": "Object", + "tags": [], + "label": "{\n label,\n ariaLabel,\n onClick,\n dataTestSubj,\n iconType,\n ...otherProps // from Drag&Drop integration\n}", + "description": [], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.EmptyDimensionButton.$1.label", + "type": "CompoundType", + "tags": [], + "label": "label", + "description": [], + "signature": [ + "boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.EmptyDimensionButton.$1.ariaLabel", + "type": "string", + "tags": [], + "label": "ariaLabel", + "description": [], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.EmptyDimensionButton.$1.onClick", + "type": "Function", + "tags": [], + "label": "onClick", + "description": [], + "signature": [ + "() => void" + ], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.EmptyDimensionButton.$1.dataTestSubj", + "type": "string", + "tags": [], + "label": "dataTestSubj", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.EmptyDimensionButton.$1.iconType", + "type": "string", + "tags": [], + "label": "iconType", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/dimension_buttons/empty_button.tsx", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "visualizationUiComponents", "id": "def-public.FieldPicker", @@ -762,7 +953,13 @@ "text": "DataViewBase" }, "; helpMessage?: string | null | undefined; label?: string | undefined; initiallyOpen?: boolean | undefined; \"data-test-subj\"?: string | undefined; queryInputServices: ", - "QueryInputServices", + { + "pluginId": "visualizationUiComponents", + "scope": "public", + "docId": "kibVisualizationUiComponentsPluginApi", + "section": "def-public.QueryInputServices", + "text": "QueryInputServices" + }, "; appName: string; }) => JSX.Element" ], "path": "src/plugins/visualization_ui_components/public/components/query_input/filter_query_input.tsx", @@ -933,7 +1130,13 @@ "label": "queryInputServices", "description": [], "signature": [ - "QueryInputServices" + { + "pluginId": "visualizationUiComponents", + "scope": "public", + "docId": "kibVisualizationUiComponentsPluginApi", + "section": "def-public.QueryInputServices", + "text": "QueryInputServices" + } ], "path": "src/plugins/visualization_ui_components/public/components/query_input/filter_query_input.tsx", "deprecated": false, @@ -1186,6 +1389,53 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.isFieldLensCompatible", + "type": "Function", + "tags": [], + "label": "isFieldLensCompatible", + "description": [], + "signature": [ + "(field: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + ") => boolean" + ], + "path": "src/plugins/visualization_ui_components/public/util.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.isFieldLensCompatible.$1", + "type": "Object", + "tags": [], + "label": "field", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + } + ], + "path": "src/plugins/visualization_ui_components/public/util.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "visualizationUiComponents", "id": "def-public.isQueryValid", @@ -1264,65 +1514,68 @@ }, { "parentPluginId": "visualizationUiComponents", - "id": "def-public.NameInput", + "id": "def-public.LineStyleSettings", "type": "Function", "tags": [], - "label": "NameInput", + "label": "LineStyleSettings", "description": [], "signature": [ - "({ value, onChange, defaultValue, }: { value: string; onChange: (value: string) => void; defaultValue?: string | undefined; }) => JSX.Element" + "({ currentConfig, setConfig, idPrefix, }: { currentConfig?: LineStyleConfig | undefined; setConfig: (config: LineStyleConfig) => void; idPrefix: string; }) => JSX.Element" ], - "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", + "path": "src/plugins/visualization_ui_components/public/components/line_style_settings.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "visualizationUiComponents", - "id": "def-public.NameInput.$1", + "id": "def-public.LineStyleSettings.$1", "type": "Object", "tags": [], - "label": "{\n value,\n onChange,\n defaultValue,\n}", + "label": "{\n currentConfig,\n setConfig,\n idPrefix,\n}", "description": [], - "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", + "path": "src/plugins/visualization_ui_components/public/components/line_style_settings.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "visualizationUiComponents", - "id": "def-public.NameInput.$1.value", - "type": "string", + "id": "def-public.LineStyleSettings.$1.currentConfig", + "type": "Object", "tags": [], - "label": "value", + "label": "currentConfig", "description": [], - "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", + "signature": [ + "LineStyleConfig | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/line_style_settings.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "visualizationUiComponents", - "id": "def-public.NameInput.$1.onChange", + "id": "def-public.LineStyleSettings.$1.setConfig", "type": "Function", "tags": [], - "label": "onChange", + "label": "setConfig", "description": [], "signature": [ - "(value: string) => void" + "(config: LineStyleConfig) => void" ], - "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", + "path": "src/plugins/visualization_ui_components/public/components/line_style_settings.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "visualizationUiComponents", - "id": "def-public.NameInput.$1.onChange.$1", - "type": "string", + "id": "def-public.LineStyleSettings.$1.setConfig.$1", + "type": "Object", "tags": [], - "label": "value", + "label": "config", "description": [], "signature": [ - "string" + "LineStyleConfig" ], - "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", + "path": "src/plugins/visualization_ui_components/public/components/line_style_settings.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1332,15 +1585,12 @@ }, { "parentPluginId": "visualizationUiComponents", - "id": "def-public.NameInput.$1.defaultValue", + "id": "def-public.LineStyleSettings.$1.idPrefix", "type": "string", "tags": [], - "label": "defaultValue", + "label": "idPrefix", "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", + "path": "src/plugins/visualization_ui_components/public/components/line_style_settings.tsx", "deprecated": false, "trackAdoption": false } @@ -1352,49 +1602,137 @@ }, { "parentPluginId": "visualizationUiComponents", - "id": "def-public.NewBucketButton", + "id": "def-public.NameInput", "type": "Function", "tags": [], - "label": "NewBucketButton", + "label": "NameInput", "description": [], "signature": [ - "({ label, onClick, isDisabled, className, \"data-test-subj\": dataTestSubj, }: NewBucketButtonProps) => JSX.Element" + "({ value, onChange, defaultValue, }: { value: string; onChange: (value: string) => void; defaultValue?: string | undefined; }) => JSX.Element" ], - "path": "src/plugins/visualization_ui_components/public/components/drag_drop_bucket/new_bucket_button.tsx", + "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "visualizationUiComponents", - "id": "def-public.NewBucketButton.$1", + "id": "def-public.NameInput.$1", "type": "Object", "tags": [], - "label": "{\n label,\n onClick,\n isDisabled,\n className,\n 'data-test-subj': dataTestSubj = 'lns-newBucket-add',\n}", + "label": "{\n value,\n onChange,\n defaultValue,\n}", "description": [], - "signature": [ - "NewBucketButtonProps" - ], - "path": "src/plugins/visualization_ui_components/public/components/drag_drop_bucket/new_bucket_button.tsx", + "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", "deprecated": false, "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "visualizationUiComponents", - "id": "def-public.QueryInput", - "type": "Function", - "tags": [], - "label": "QueryInput", - "description": [], - "signature": [ - "({ value, onChange, dataView, isInvalid, onSubmit, disableAutoFocus, [\"data-test-subj\"]: dataTestSubj, placeholder, appName, services: { data, uiSettings, http, notifications, docLinks, storage, unifiedSearch, dataViews }, }: { value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.NameInput.$1.value", + "type": "string", + "tags": [], + "label": "value", + "description": [], + "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.NameInput.$1.onChange", + "type": "Function", + "tags": [], + "label": "onChange", + "description": [], + "signature": [ + "(value: string) => void" + ], + "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.NameInput.$1.onChange.$1", + "type": "string", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.NameInput.$1.defaultValue", + "type": "string", + "tags": [], + "label": "defaultValue", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/name_input.tsx", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.NewBucketButton", + "type": "Function", + "tags": [], + "label": "NewBucketButton", + "description": [], + "signature": [ + "({ label, onClick, isDisabled, className, \"data-test-subj\": dataTestSubj, }: NewBucketButtonProps) => JSX.Element" + ], + "path": "src/plugins/visualization_ui_components/public/components/drag_drop_bucket/new_bucket_button.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.NewBucketButton.$1", + "type": "Object", + "tags": [], + "label": "{\n label,\n onClick,\n isDisabled,\n className,\n 'data-test-subj': dataTestSubj = 'lns-newBucket-add',\n}", + "description": [], + "signature": [ + "NewBucketButtonProps" + ], + "path": "src/plugins/visualization_ui_components/public/components/drag_drop_bucket/new_bucket_button.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.QueryInput", + "type": "Function", + "tags": [], + "label": "QueryInput", + "description": [], + "signature": [ + "({ value, onChange, dataView, isInvalid, onSubmit, disableAutoFocus, [\"data-test-subj\"]: dataTestSubj, placeholder, appName, services: { data, uiSettings, http, notifications, docLinks, storage, unifiedSearch, dataViews }, }: { value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", "docId": "kibKbnEsQueryPluginApi", "section": "def-common.Query", "text": "Query" @@ -1408,7 +1746,13 @@ "text": "Query" }, ") => void; dataView: string | { type: \"id\" | \"title\"; value: string; }; isInvalid: boolean; onSubmit: () => void; disableAutoFocus?: boolean | undefined; 'data-test-subj'?: string | undefined; placeholder?: string | undefined; appName: string; services: ", - "QueryInputServices", + { + "pluginId": "visualizationUiComponents", + "scope": "public", + "docId": "kibVisualizationUiComponentsPluginApi", + "section": "def-public.QueryInputServices", + "text": "QueryInputServices" + }, "; }) => JSX.Element" ], "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", @@ -1588,7 +1932,13 @@ "label": "services", "description": [], "signature": [ - "QueryInputServices" + { + "pluginId": "visualizationUiComponents", + "scope": "public", + "docId": "kibVisualizationUiComponentsPluginApi", + "section": "def-public.QueryInputServices", + "text": "QueryInputServices" + } ], "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", "deprecated": false, @@ -1600,6 +1950,142 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.TextDecorationSetting", + "type": "Function", + "tags": [], + "label": "TextDecorationSetting", + "description": [], + "signature": [ + "({\n idPrefix,\n currentConfig,\n setConfig,\n isQueryBased,\n children,\n}: { idPrefix: string; currentConfig?: TextDecorationConfig | undefined; setConfig: (config: TextDecorationConfig) => void; isQueryBased?: boolean | undefined; children?: ((textDecoration: \"none\" | \"name\" | \"field\") => JSX.Element | null) | undefined; }) => JSX.Element" + ], + "path": "src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.TextDecorationSetting.$1", + "type": "Object", + "tags": [], + "label": "{\n idPrefix,\n currentConfig,\n setConfig,\n isQueryBased,\n children,\n}", + "description": [], + "path": "src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.TextDecorationSetting.$1.idPrefix", + "type": "string", + "tags": [], + "label": "idPrefix", + "description": [], + "path": "src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.TextDecorationSetting.$1.currentConfig", + "type": "Object", + "tags": [], + "label": "currentConfig", + "description": [], + "signature": [ + "TextDecorationConfig | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.TextDecorationSetting.$1.setConfig", + "type": "Function", + "tags": [], + "label": "setConfig", + "description": [], + "signature": [ + "(config: TextDecorationConfig) => void" + ], + "path": "src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.TextDecorationSetting.$1.setConfig.$1", + "type": "Object", + "tags": [], + "label": "config", + "description": [], + "signature": [ + "TextDecorationConfig" + ], + "path": "src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.TextDecorationSetting.$1.isQueryBased", + "type": "CompoundType", + "tags": [], + "label": "isQueryBased", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.TextDecorationSetting.$1.children", + "type": "Function", + "tags": [], + "label": "children", + "description": [ + "A children render function for custom sub fields on textDecoration change" + ], + "signature": [ + "((textDecoration: \"none\" | \"name\" | \"field\") => JSX.Element | null) | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.TextDecorationSetting.$1.children.$1", + "type": "CompoundType", + "tags": [], + "label": "textDecoration", + "description": [], + "signature": [ + "\"none\" | \"name\" | \"field\"" + ], + "path": "src/plugins/visualization_ui_components/public/components/text_decoration_setting.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "visualizationUiComponents", "id": "def-public.TooltipWrapper", @@ -2005,6 +2491,181 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.QueryInputServices", + "type": "Interface", + "tags": [], + "label": "QueryInputServices", + "description": [], + "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.QueryInputServices.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.QueryInputServices.storage", + "type": "Object", + "tags": [], + "label": "storage", + "description": [], + "signature": [ + { + "pluginId": "kibanaUtils", + "scope": "public", + "docId": "kibKibanaUtilsPluginApi", + "section": "def-public.IStorageWrapper", + "text": "IStorageWrapper" + }, + "" + ], + "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.QueryInputServices.dataViews", + "type": "Object", + "tags": [], + "label": "dataViews", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "public", + "docId": "kibDataViewsPluginApi", + "section": "def-public.DataViewsServicePublic", + "text": "DataViewsServicePublic" + } + ], + "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.QueryInputServices.data", + "type": "Object", + "tags": [], + "label": "data", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "public", + "docId": "kibDataPluginApi", + "section": "def-public.DataPublicPluginStart", + "text": "DataPublicPluginStart" + } + ], + "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.QueryInputServices.uiSettings", + "type": "Object", + "tags": [], + "label": "uiSettings", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + } + ], + "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.QueryInputServices.notifications", + "type": "Object", + "tags": [], + "label": "notifications", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.NotificationsStart", + "text": "NotificationsStart" + } + ], + "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.QueryInputServices.unifiedSearch", + "type": "Object", + "tags": [], + "label": "unifiedSearch", + "description": [], + "signature": [ + { + "pluginId": "unifiedSearch", + "scope": "public", + "docId": "kibUnifiedSearchPluginApi", + "section": "def-public.UnifiedSearchPublicPluginStart", + "text": "UnifiedSearchPublicPluginStart" + } + ], + "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.QueryInputServices.docLinks", + "type": "Object", + "tags": [], + "label": "docLinks", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-doc-links-browser", + "scope": "common", + "docId": "kibKbnCoreDocLinksBrowserPluginApi", + "section": "def-common.DocLinksStart", + "text": "DocLinksStart" + } + ], + "path": "src/plugins/visualization_ui_components/public/components/query_input/query_input.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false } ], "enums": [], @@ -2041,6 +2702,76 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.FormatFactory", + "type": "Type", + "tags": [], + "label": "FormatFactory", + "description": [], + "signature": [ + "(mapping?: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.SerializableRecord", + "text": "SerializableRecord" + }, + "> | undefined) => ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormat", + "text": "FieldFormat" + } + ], + "path": "src/plugins/visualization_ui_components/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "visualizationUiComponents", + "id": "def-public.FormatFactory.$1", + "type": "Object", + "tags": [], + "label": "mapping", + "description": [], + "signature": [ + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.SerializableRecord", + "text": "SerializableRecord" + }, + "> | undefined" + ], + "path": "src/plugins/visualization_ui_components/public/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "visualizationUiComponents", "id": "def-public.IconSet", diff --git a/api_docs/visualization_ui_components.mdx b/api_docs/visualization_ui_components.mdx index c83bcd9d10cbc..c5b0b73726ebf 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizationUiComponents'] --- import visualizationUiComponentsObj from './visualization_ui_components.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 122 | 0 | 119 | 4 | +| 163 | 0 | 159 | 4 | ## Client diff --git a/api_docs/visualizations.devdocs.json b/api_docs/visualizations.devdocs.json index ecc4a5d81e366..2cdce97b7ea3b 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -6960,7 +6960,9 @@ "VisEditorConstructor", ") => void; get: (name: string) => ", "VisEditorConstructor", - " | undefined; }; }" + " | undefined; }; listingViewRegistry: ", + "ListingViewRegistry", + "; }" ], "path": "src/plugins/visualizations/public/plugin.ts", "deprecated": false, diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 19c1ce9c1bf13..c4e31edf5eba2 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-06-13 +date: 2023-06-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 823 | 12 | 793 | 18 | +| 823 | 12 | 793 | 19 | ## Client From a5ef10ec5e15b8e1bea824c3ca58ff1d19e8ccb9 Mon Sep 17 00:00:00 2001 From: Marta Bondyra <4283304+mbondyra@users.noreply.github.com> Date: Wed, 14 Jun 2023 09:38:20 +0200 Subject: [PATCH 07/89] [Lens] fix missing key warning and IntlProvider warning (#159574) ## Summary Fixes: 1. When opening layer actions, React complains about missing key for `map`. 2. When opening saving modal for annotation group, the warning about missing appears Let's merge it after Drew's PR so he doesn't have to deal with conflicts right before vacations :) ### Checklist Delete any items that are not applicable to this PR. - [ ] 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 - [ ] [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) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### 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) --- .../layer_actions/layer_actions.tsx | 1 + .../xy/annotations/actions/save_action.tsx | 82 ++++++++++--------- 2 files changed, 43 insertions(+), 40 deletions(-) diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/layer_actions.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/layer_actions.tsx index 97a7740211b13..da300bb282cb2 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/layer_actions.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/layer_actions.tsx @@ -129,6 +129,7 @@ const InContextMenuActions = (props: LayerActionsProps) => { size="s" items={props.actions.map((i) => ( } data-test-subj={i['data-test-subj']} aria-label={i.displayName} diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx index 1b4ae5fd4958d..35655254999d1 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx @@ -11,7 +11,7 @@ import { render, unmountComponentAtNode } from 'react-dom'; import { EventAnnotationServiceType } from '@kbn/event-annotation-plugin/public'; import { ToastsStart } from '@kbn/core-notifications-browser'; import { MountPoint } from '@kbn/core-mount-utils-browser'; -import { FormattedMessage } from '@kbn/i18n-react'; +import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; import { OnSaveProps as SavedObjectOnSaveProps, SavedObjectSaveModal, @@ -49,46 +49,48 @@ export const SaveModal = ({ const closeModal = () => unmountComponentAtNode(domElement); return ( - onSave({ ...props, closeModal, newTags: selectedTags })} - onClose={closeModal} - title={title} - description={description} - showCopyOnSave={showCopyOnSave} - objectType={i18n.translate( - 'xpack.lens.xyChart.annotations.saveAnnotationGroupToLibrary.objectType', - { defaultMessage: 'group' } - )} - customModalTitle={i18n.translate( - 'xpack.lens.xyChart.annotations.saveAnnotationGroupToLibrary.modalTitle', - { - defaultMessage: 'Save annotation group to library', + + onSave({ ...props, closeModal, newTags: selectedTags })} + onClose={closeModal} + title={title} + description={description} + showCopyOnSave={showCopyOnSave} + objectType={i18n.translate( + 'xpack.lens.xyChart.annotations.saveAnnotationGroupToLibrary.objectType', + { defaultMessage: 'group' } + )} + customModalTitle={i18n.translate( + 'xpack.lens.xyChart.annotations.saveAnnotationGroupToLibrary.modalTitle', + { + defaultMessage: 'Save annotation group to library', + } + )} + showDescription={true} + confirmButtonLabel={ + <> +
+ +
+
+ {i18n.translate( + 'xpack.lens.xyChart.annotations.saveAnnotationGroupToLibrary.confirmButton', + { defaultMessage: 'Save group' } + )} +
+ } - )} - showDescription={true} - confirmButtonLabel={ - <> -
- -
-
- {i18n.translate( - 'xpack.lens.xyChart.annotations.saveAnnotationGroupToLibrary.confirmButton', - { defaultMessage: 'Save group' } - )} -
- - } - options={ - savedObjectsTagging ? ( - - ) : undefined - } - /> + options={ + savedObjectsTagging ? ( + + ) : undefined + } + /> +
); }; From 56e9cebe218f46a8adc145e6f5a6159a501e2af6 Mon Sep 17 00:00:00 2001 From: Ido Cohen <90558359+CohenIdo@users.noreply.github.com> Date: Wed, 14 Jun 2023 10:49:15 +0300 Subject: [PATCH 08/89] [Cloud Security] convert stats api router to be versioned --- .../src/router.mock.ts | 4 +- .../src/versioned_router.mock.ts | 4 +- .../common/schemas/stats.ts | 18 ++ .../cloud_security_posture/common/types.ts | 3 + .../public/common/api/use_stats_api.ts | 4 +- .../compliance_dashboard.test.ts | 10 +- .../compliance_dashboard.ts | 164 +++++++++--------- 7 files changed, 116 insertions(+), 91 deletions(-) create mode 100644 x-pack/plugins/cloud_security_posture/common/schemas/stats.ts diff --git a/packages/core/http/core-http-router-server-mocks/src/router.mock.ts b/packages/core/http/core-http-router-server-mocks/src/router.mock.ts index 2d39621d57c31..e82a51a14a332 100644 --- a/packages/core/http/core-http-router-server-mocks/src/router.mock.ts +++ b/packages/core/http/core-http-router-server-mocks/src/router.mock.ts @@ -21,9 +21,9 @@ import type { KibanaResponseFactory, } from '@kbn/core-http-server'; import { CoreKibanaRequest } from '@kbn/core-http-router-server-internal'; -import { createVersionedRouterMock } from './versioned_router.mock'; +import { createVersionedRouterMock, type MockedVersionedRouter } from './versioned_router.mock'; -export type RouterMock = jest.Mocked>; +export type RouterMock = jest.Mocked> & { versioned: MockedVersionedRouter }; function createRouterMock({ routerPath = '' }: { routerPath?: string } = {}): RouterMock { return { diff --git a/packages/core/http/core-http-router-server-mocks/src/versioned_router.mock.ts b/packages/core/http/core-http-router-server-mocks/src/versioned_router.mock.ts index 011293c10b049..26ff16903ac09 100644 --- a/packages/core/http/core-http-router-server-mocks/src/versioned_router.mock.ts +++ b/packages/core/http/core-http-router-server-mocks/src/versioned_router.mock.ts @@ -13,7 +13,9 @@ const createMockVersionedRoute = (): VersionedRoute => { return api; }; -export const createVersionedRouterMock = (): jest.Mocked> => ({ +export type MockedVersionedRouter = jest.Mocked>; + +export const createVersionedRouterMock = (): MockedVersionedRouter => ({ delete: jest.fn((_) => createMockVersionedRoute()), get: jest.fn((_) => createMockVersionedRoute()), patch: jest.fn((_) => createMockVersionedRoute()), diff --git a/x-pack/plugins/cloud_security_posture/common/schemas/stats.ts b/x-pack/plugins/cloud_security_posture/common/schemas/stats.ts new file mode 100644 index 0000000000000..e8b3657996e0f --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/common/schemas/stats.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema } from '@kbn/config-schema'; +import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '../constants'; + +// this pages follows versioning interface strategy https://docs.elastic.dev/kibana-dev-docs/versioning-interfaces + +export const getComplianceDashboardSchema = schema.object({ + policy_template: schema.oneOf([ + schema.literal(CSPM_POLICY_TEMPLATE), + schema.literal(KSPM_POLICY_TEMPLATE), + ]), +}); diff --git a/x-pack/plugins/cloud_security_posture/common/types.ts b/x-pack/plugins/cloud_security_posture/common/types.ts index c01e70dc42358..d3c89e0836c07 100644 --- a/x-pack/plugins/cloud_security_posture/common/types.ts +++ b/x-pack/plugins/cloud_security_posture/common/types.ts @@ -11,6 +11,7 @@ import { SUPPORTED_CLOUDBEAT_INPUTS, SUPPORTED_POLICY_TEMPLATES } from './consta import { CspRuleTemplateMetadata } from './schemas/csp_rule_template_metadata'; import { CspRuleTemplate } from './schemas'; import { findCspRuleTemplateRequest } from './schemas/csp_rule_template_api/get_csp_rule_template'; +import { getComplianceDashboardSchema } from './schemas/stats'; export type Evaluation = 'passed' | 'failed' | 'NA'; @@ -119,6 +120,8 @@ export interface BenchmarkResponse { export type GetCspRuleTemplateRequest = TypeOf; +export type GetComplianceDashboardRequest = TypeOf; + export interface GetCspRuleTemplateResponse { items: CspRuleTemplate[]; total: number; diff --git a/x-pack/plugins/cloud_security_posture/public/common/api/use_stats_api.ts b/x-pack/plugins/cloud_security_posture/public/common/api/use_stats_api.ts index 4225c6a67c0b9..68ab9dfc698f7 100644 --- a/x-pack/plugins/cloud_security_posture/public/common/api/use_stats_api.ts +++ b/x-pack/plugins/cloud_security_posture/public/common/api/use_stats_api.ts @@ -28,7 +28,7 @@ export const useCspmStatsApi = ( const { http } = useKibana().services; return useQuery( getCspmStatsKey, - () => http.get(getStatsRoute(CSPM_POLICY_TEMPLATE)), + () => http.get(getStatsRoute(CSPM_POLICY_TEMPLATE), { version: '1' }), options ); }; @@ -39,7 +39,7 @@ export const useKspmStatsApi = ( const { http } = useKibana().services; return useQuery( getKspmStatsKey, - () => http.get(getStatsRoute(KSPM_POLICY_TEMPLATE)), + () => http.get(getStatsRoute(KSPM_POLICY_TEMPLATE), { version: '1' }), options ); }; diff --git a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.test.ts b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.test.ts index 5521ef7e44c26..f2ccc62b129c9 100644 --- a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.test.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.test.ts @@ -17,7 +17,10 @@ describe('compliance dashboard permissions API', () => { const router = httpServiceMock.createRouter(); defineGetComplianceDashboardRoute(router); - const [_, handler] = router.get.mock.calls[0]; + + const versionedRouter = router.versioned.get.mock.results[0].value; + + const handler = versionedRouter.addVersion.mock.calls[0][1]; const mockContext = createCspRequestHandlerContextMock(); const mockResponse = httpServerMock.createResponseFactory(); @@ -33,7 +36,10 @@ describe('compliance dashboard permissions API', () => { const router = httpServiceMock.createRouter(); defineGetComplianceDashboardRoute(router); - const [_, handler] = router.get.mock.calls[0]; + + const versionedRouter = router.versioned.get.mock.results[0].value; + + const handler = versionedRouter.addVersion.mock.calls[0][1]; const mockContext = createCspRequestHandlerContextMock(); const mockResponse = httpServerMock.createResponseFactory(); diff --git a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.ts b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.ts index d242c7a587dda..b827f5a31b4ee 100644 --- a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.ts @@ -7,16 +7,15 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; -import { schema } from '@kbn/config-schema'; import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/types'; +import { getComplianceDashboardSchema } from '../../../common/schemas/stats'; import { getSafePostureTypeRuntimeMapping } from '../../../common/runtime_mappings/get_safe_posture_type_runtime_mapping'; -import type { PosturePolicyTemplate, ComplianceDashboardData } from '../../../common/types'; -import { - CSPM_POLICY_TEMPLATE, - KSPM_POLICY_TEMPLATE, - LATEST_FINDINGS_INDEX_DEFAULT_NS, - STATS_ROUTE_PATH, -} from '../../../common/constants'; +import type { + PosturePolicyTemplate, + ComplianceDashboardData, + GetComplianceDashboardRequest, +} from '../../../common/types'; +import { LATEST_FINDINGS_INDEX_DEFAULT_NS, STATS_ROUTE_PATH } from '../../../common/constants'; import { getGroupedFindingsEvaluation } from './get_grouped_findings_evaluation'; import { ClusterWithoutTrend, getClusters } from './get_clusters'; import { getStats } from './get_stats'; @@ -40,82 +39,79 @@ const getClustersTrends = (clustersWithoutTrends: ClusterWithoutTrend[], trends: const getSummaryTrend = (trends: Trends) => trends.map(({ timestamp, summary }) => ({ timestamp, ...summary })); -const queryParamsSchema = { - params: schema.object({ - policy_template: schema.oneOf([ - schema.literal(CSPM_POLICY_TEMPLATE), - schema.literal(KSPM_POLICY_TEMPLATE), - ]), - }), -}; - -export const defineGetComplianceDashboardRoute = (router: CspRouter): void => - router.get( - { +export const defineGetComplianceDashboardRoute = (router: CspRouter) => + router.versioned + .get({ + access: 'internal', path: STATS_ROUTE_PATH, - validate: queryParamsSchema, - options: { - tags: ['access:cloud-security-posture-read'], - }, - }, - async (context, request, response) => { - const cspContext = await context.csp; - - try { - const esClient = cspContext.esClient.asCurrentUser; - - const { id: pitId } = await esClient.openPointInTime({ - index: LATEST_FINDINGS_INDEX_DEFAULT_NS, - keep_alive: '30s', - }); - - const policyTemplate = request.params.policy_template as PosturePolicyTemplate; - - // runtime mappings create the `safe_posture_type` field, which equals to `kspm` or `cspm` based on the value and existence of the `posture_type` field which was introduced at 8.7 - // the `query` is then being passed to our getter functions to filter per posture type even for older findings before 8.7 - const runtimeMappings: MappingRuntimeFields = getSafePostureTypeRuntimeMapping(); - const query: QueryDslQueryContainer = { - bool: { - filter: [{ term: { safe_posture_type: policyTemplate } }], + }) + .addVersion( + { + version: '1', + validate: { + request: { + params: getComplianceDashboardSchema, }, - }; - - const [stats, groupedFindingsEvaluation, clustersWithoutTrends, trends] = await Promise.all( - [ - getStats(esClient, query, pitId, runtimeMappings), - getGroupedFindingsEvaluation(esClient, query, pitId, runtimeMappings), - getClusters(esClient, query, pitId, runtimeMappings), - getTrends(esClient, policyTemplate), - ] - ); - - // Try closing the PIT, if it fails we can safely ignore the error since it closes itself after the keep alive - // ends. Not waiting on the promise returned from the `closePointInTime` call to avoid delaying the request - esClient.closePointInTime({ id: pitId }).catch((err) => { - cspContext.logger.warn(`Could not close PIT for stats endpoint: ${err}`); - }); - - const clusters = getClustersTrends(clustersWithoutTrends, trends); - const trend = getSummaryTrend(trends); - - const body: ComplianceDashboardData = { - stats, - groupedFindingsEvaluation, - clusters, - trend, - }; - - return response.ok({ - body, - }); - } catch (err) { - const error = transformError(err); - cspContext.logger.error(`Error while fetching CSP stats: ${err}`); - - return response.customError({ - body: { message: error.message }, - statusCode: error.statusCode, - }); + }, + }, + async (context, request, response) => { + const cspContext = await context.csp; + + try { + const esClient = cspContext.esClient.asCurrentUser; + + const { id: pitId } = await esClient.openPointInTime({ + index: LATEST_FINDINGS_INDEX_DEFAULT_NS, + keep_alive: '30s', + }); + + const params: GetComplianceDashboardRequest = request.params; + const policyTemplate = params.policy_template as PosturePolicyTemplate; + + // runtime mappings create the `safe_posture_type` field, which equals to `kspm` or `cspm` based on the value and existence of the `posture_type` field which was introduced at 8.7 + // the `query` is then being passed to our getter functions to filter per posture type even for older findings before 8.7 + const runtimeMappings: MappingRuntimeFields = getSafePostureTypeRuntimeMapping(); + const query: QueryDslQueryContainer = { + bool: { + filter: [{ term: { safe_posture_type: policyTemplate } }], + }, + }; + + const [stats, groupedFindingsEvaluation, clustersWithoutTrends, trends] = + await Promise.all([ + getStats(esClient, query, pitId, runtimeMappings), + getGroupedFindingsEvaluation(esClient, query, pitId, runtimeMappings), + getClusters(esClient, query, pitId, runtimeMappings), + getTrends(esClient, policyTemplate), + ]); + + // Try closing the PIT, if it fails we can safely ignore the error since it closes itself after the keep alive + // ends. Not waiting on the promise returned from the `closePointInTime` call to avoid delaying the request + esClient.closePointInTime({ id: pitId }).catch((err) => { + cspContext.logger.warn(`Could not close PIT for stats endpoint: ${err}`); + }); + + const clusters = getClustersTrends(clustersWithoutTrends, trends); + const trend = getSummaryTrend(trends); + + const body: ComplianceDashboardData = { + stats, + groupedFindingsEvaluation, + clusters, + trend, + }; + + return response.ok({ + body, + }); + } catch (err) { + const error = transformError(err); + cspContext.logger.error(`Error while fetching CSP stats: ${err}`); + + return response.customError({ + body: { message: error.message }, + statusCode: error.statusCode, + }); + } } - } - ); + ); From 17b5fd39b451c3a18485d39aa1791233a7c4cef6 Mon Sep 17 00:00:00 2001 From: Juan Pablo Djeredjian Date: Wed, 14 Jun 2023 10:01:39 +0200 Subject: [PATCH 09/89] [Security Solution] New Rules Installation and Upgrade UI Workflows (#158450) Addresses: https://github.com/elastic/kibana/issues/154614 https://github.com/elastic/kibana/issues/154615 Figma designs: https://www.figma.com/file/gLHm8LpTtSkAUQHrkG3RHU/%5B8.7%5D-%5BRules%5D-Rule-Immutability%2FCustomization?type=design&node-id=2935-577576&t=ziqgnlEJBpowqa7F-0 ## Summary - Removes `prebuiltRulesNewUpgradeAndInstallationWorkflowsEnabled` feature flag. All new prebuilt endpoints now available by default. - Creates the UI for the new **rules installation** and **rules upgrade** workflows. - Creates new **Add Rules** page, which lists rules available for installation. - Creates new **Rule Updates** page, which lists rules which have available updates. - Creates new, separate contexts for the **Add Rules** and the **Rule Updates** page, and the hooks to use them (`useAddPrebuiltRulesTableContext` and `useUpgradePrebuiltRulesTableContext` respectively) - Creates prebuilt rule hooks, which consume new endpoints: - `useFetchPrebuiltRulesStatusQuery` and `usePrebuiltRulesStatus` consume the `/internal/detection_engine/prebuilt_rules/status` endpoint and provide information about number of rules available for installation, number of installed rules, and number of rules with available updates. - `useFetchPrebuiltRulesInstallReviewQuery` and `usePrebuiltRulesInstallReview` consume the `/internal/detection_engine/prebuilt_rules/installation/_review` endpoint and return the rules available for installation which are listed in the **Add Rules** page. - `useFetchPrebuiltRulesUpgradeReviewQuery` and `usePrebuiltRulesUpgradeReview` consume the `/internal/detection_engine/prebuilt_rules/upgrade/_review` endpoint and return the rules which have available updates, and are listed in the **Rule Updates** page. - `usePerformInstallAllRules`, `usePerformInstallSpecificRules`, and its respective mutation hooks `usePerformAllRulesInstallMutation` and `usePerformSpecificRulesInstallMutation` consume the `/internal/detection_engine/prebuilt_rules/upgrade/_perform` endpoint in order to install rules. - `usePerformUpgradeAllRules`, `usePerformUpgradeSpecificRules` and its respective mutation hooks `usePerformAllRulesUpgradeMutation` and `usePerformSpecificRulesUpgradeMutation` consume the `/internal/detection_engine/prebuilt_rules/upgrade/_perform` endpoint in order to upgrade rules. ### Deprecated code **Hooks:** - `useCreatePrebuiltRulesMutation` - `useInstallPrePackagedRules` - `useCreatePrePackagedRules` - `usePrePackagedRulesInstallationStatus` - `usePrePackagedTimelinesInstallationStatus` ### Major points to resolve - **Timeline templates installation**: Since this PR stops using the `/api/detection_engine/rules/prepackaged` endpoint in favour of the new ones, we are not currently installing timeline templates. Serverside, we will need a new endpoint to install them separately from rules? In the UI, how would this still work: would they get installed in the background now? Or maybe have a new button for it somewhere? - **ML Jobs warning**: when updating rules, we currently have a wrapper to add confirmation modal for users who may be running older ML Jobs that would be overridden by updating their rules. This PR removes that code, but we'll need to reintroduce it for the cases of: upgrading single rules, upgrading a selection of rules, upgrading all rules. ### Deviations from design This PR includes a reduced scope to the final workflow shown in the Figma designs. Most notably, in Milestone 2, to be released in 8.9, we did not build the flyout that, in the Add Rules page, shows the rule details when the user clicks on it, so the user can review it before installing. The same is true in the Rule Updates table, which does not allow, for now, reviewing the rules. In both cases, the user can only click in "Install Rule" and "Upgrade Rule". There are other differences in the UI, for technical reasons: - Both for the Add Rules page and the Rule Updates table we decided to use **EUI's InMemoryTable**. Since the endpoint that return the data to populate both of these tables do not allow for sorting, filtering and paging, we decided to use the InMemoryTable for both cases, as all of those functions are handled out-of-the-box by the EUI component. The relatively low number of items that populate these tables means that we won't face significant performance issues. However, this meant a number of deviations from the designs: - Since filtering, sorting and pagination are handled by the table, the contexts for these table do not includes any internal state relating to these functions. This makes it hard to recreate the RuleUtilityBar for each of these components or make the existing one reusable. We therefore decided to leave the Utility Bar for the new two tables out of scope, and deviate from the design by moving the button that the user can click on o install or upgrade the selected rules to beside the "Install all" or "Upgrade all" buttons. This button is shown only when at least one rule of the table is selected. - The **tags filter box** that comes out-of-the-box with the InMemoryTable can only be positioned to the right of the search bar, instead of the left like we have in our main **Installed Rules** table. Also, clicking on the tabs adds the text to the search bar, and the box does not allow for negative selection of tabs (exclusion). - The search bar filters on keystroke rather than on Enter. This behaviour can be changed, but it feels more useful than the other behaviour for these new two tables. - The search bar filters by searching the user's input in any of the string properties of first order within the rule object. This means that the search bar can be used to look up rules according to their name, description, rule_id, etc (but not for example for MITRE techniques, which are an object.) This behaviour, however, is also customisable. - Neither the Add Rules table nor the Rule Updates tables display the _Last updated_ column which is shown in the design. Since the original intent of the designers is to show when the rule asset (`security-rule`) was created or updated, this is information we don't currently have within the SO. After discussion with @ksevasilyeva and @ARWNightingale, we decided, for now, to remove the column. In the meantime, @terrancedejesus [created an issue to include `createdAt` and `updatedAt` fields](https://github.com/elastic/detection-rules/issues/2826) within the rule assets, that we can use to display in the table in later iterations. #### Other remaining work: - Introduce confirmation modals when the user clicks on the "Install all" or "Upgrade all" modal. - Unit testing for new hooks and components. - Other component redesign: Rule Filter, Tag Filter #### How to test rule upgrade 1. Have at least one rule installed 2. Find its `rule_id` from the Network tab. 3. Make a request to `PATCH /api/detection_engine/rules` with the `rule_id` in the payload, and also set the `version` to a number lower than the current version. 4. Reload the page. 5. The `/upgrade/_review` endpoint will now return that rule as available for upgrade. ### Videos #### Rule Installation Workflow https://github.com/elastic/kibana/assets/5354282/5a219625-beb1-48ee-a9fc-ff48b69eeae0 #### Rule Upgrade Workflow https://github.com/elastic/kibana/assets/5354282/b5f3c23b-004a-462c-bbdd-ed04321f5ce7 ### TODO - [x] Align copy, use "update" instead of "upgrade" - [ ] Persist user's choice when they dismiss the upgrade/install rules callouts till the next package release (create a separate task for that) - [ ] Unify table controls (search bar and tags), use the ones we have on the rules management table - [ ] After rule installation, adjust copy, and display that all available rules have been installed. Add a "Go Back" CTA - [ ] Add links from the available rules table to docs - [ ] Rule severity sorting should take semantics into consideration --------- Co-authored-by: Dmitrii Co-authored-by: Dmitrii Shevchenko Co-authored-by: Sergi Massaneda --- .../security_solution/common/constants.ts | 2 + ...erform_rule_installation_request_schema.ts | 4 + .../perform_rule_upgrade_request_schema.ts | 5 +- .../review_rule_upgrade/response_schema.ts | 1 + .../common/experimental_features.ts | 6 - .../e2e/detection_rules/bulk_edit_rules.cy.ts | 12 +- .../bulk_edit_rules_actions.cy.ts | 6 +- .../e2e/detection_rules/export_rule.cy.ts | 12 +- .../e2e/detection_rules/prebuilt_rules.cy.ts | 45 +++-- .../e2e/detection_rules/rules_selection.cy.ts | 12 +- .../cypress/screens/alerts_detection_rules.ts | 2 + .../cypress/tasks/alerts_detection_rules.ts | 24 --- .../cypress/tasks/api_calls/prebuilt_rules.ts | 24 +++ .../public/app/translations.ts | 4 + .../common/components/ml_popover/api.mock.ts | 24 +++ .../components/ml_popover/helpers.test.tsx | 10 +- .../__snapshots__/jobs_table.test.tsx.snap | 138 ------------- .../jobs_table_filters.test.tsx.snap | 148 -------------- .../filters/jobs_table_filters.test.tsx | 9 +- .../ml_popover/jobs_table/jobs_table.test.tsx | 14 +- .../navigation/breadcrumbs/index.ts | 1 + .../tab_navigation/tab_navigation.tsx | 4 +- .../common/components/utility_bar/styles.tsx | 4 +- .../utility_bar/utility_bar.test.tsx | 9 +- .../utils/global_query_string/helpers.ts | 1 + .../rule_management/api/api.test.ts | 29 --- .../rule_management/api/api.ts | 137 ++++++++++--- ...tch_prebuilt_rules_install_review_query.ts | 48 +++++ .../use_fetch_prebuilt_rules_status_query.ts | 22 +- ...tch_prebuilt_rules_upgrade_review_query.ts | 48 +++++ .../use_perform_all_rules_install_mutation.ts | 50 +++++ .../use_perform_all_rules_upgrade_mutation.ts | 46 +++++ ...perform_specific_rules_install_mutation.ts | 66 ++++++ ...perform_specific_rules_upgrade_mutation.ts | 62 ++++++ .../api/hooks/use_bulk_action_mutation.ts | 10 +- ...se_bulk_install_fleet_packages_mutation.ts | 2 +- .../use_create_prebuilt_rules_mutation.ts | 43 ---- .../use_install_fleet_package_mutation.ts | 2 +- .../logic/prebuilt_rules/translations.ts | 72 +++++++ .../use_perform_rule_install.ts | 61 ++++++ .../use_perform_rule_upgrade.ts | 61 ++++++ .../use_prebuilt_rules_install_review.ts | 29 +++ .../use_prebuilt_rules_status.ts} | 8 +- .../use_prebuilt_rules_upgrade_review.ts | 29 +++ .../logic/use_create_pre_packaged_rules.ts | 31 --- .../logic/use_install_pre_packaged_rules.ts | 52 ----- ..._pre_packaged_rules_installation_status.ts | 19 -- ..._packaged_timelines_installation_status.ts | 19 -- .../auto_refresh_button.test.tsx | 67 ++++++ .../auto_refresh_button.tsx | 117 +++++++++++ .../mini_callout/mini_callout.test.tsx | 64 ++++++ .../components/mini_callout/mini_callout.tsx | 107 ++++++++++ .../components/mini_callout/translations.tsx | 51 +++++ .../ml_rule_warning_popover.tsx | 102 ++++++++++ .../add_prebuilt_rules_header_buttons.tsx | 49 +++++ .../add_prebuilt_rules_table.tsx | 116 +++++++++++ .../add_prebuilt_rules_table_context.tsx | 184 +++++++++++++++++ .../add_prebuilt_rules_table/translations.ts | 25 +++ .../use_add_prebuilt_rules_table_columns.tsx | 141 +++++++++++++ .../components/rules_table/constants.ts | 1 + .../components/rules_table/index.tsx | 33 ++- .../rules_table/rules_table_context.test.tsx | 1 + .../rules_table/rules_table_context.tsx | 61 +++--- .../rules_table/rules_table_toolbar.tsx | 39 +++- .../components/rules_table/rules_tables.tsx | 60 +++--- .../components/rules_table/translations.ts | 28 +++ .../translations.ts | 25 +++ .../upgrade_prebuilt_rules_table.tsx | 117 +++++++++++ .../upgrade_prebuilt_rules_table_buttons.tsx | 50 +++++ .../upgrade_prebuilt_rules_table_context.tsx | 190 ++++++++++++++++++ ...e_upgrade_prebuilt_rules_table_columns.tsx | 141 +++++++++++++ .../components/rules_table/use_columns.tsx | 4 +- .../rules_table_utility_bar.test.tsx | 52 +---- .../rules_table_utility_bar.tsx | 75 +------ .../pages/add_rules/index.tsx | 70 +++++++ .../pages/add_rules/translations.tsx | 15 ++ .../pages/rule_management/index.tsx | 77 +++++-- .../load_empty_prompt.test.tsx | 181 ----------------- .../pre_packaged_rules/load_empty_prompt.tsx | 31 +-- .../load_prepackaged_rules.tsx | 77 ------- .../load_prepackaged_rules_button.tsx | 135 ++++--------- .../rules/pre_packaged_rules/translations.ts | 48 ++--- .../update_callout.test.tsx | 167 --------------- .../pre_packaged_rules/update_callout.tsx | 65 ------ .../detection_engine/rules/helpers.test.tsx | 68 ------- .../pages/detection_engine/rules/helpers.tsx | 39 ---- .../detection_engine/rules/translations.ts | 41 ++++ .../public/management/links.ts | 9 + .../security_solution/public/rules/routes.tsx | 8 +- .../prebuilt_rules/api/register_routes.ts | 22 +- .../review_rule_upgrade_route.ts | 1 + .../security_solution/server/routes/index.ts | 2 +- .../translations/translations/fr-FR.json | 5 - .../translations/translations/ja-JP.json | 5 - .../translations/translations/zh-CN.json | 5 - 95 files changed, 2830 insertions(+), 1608 deletions(-) delete mode 100644 x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap delete mode 100644 x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/__snapshots__/jobs_table_filters.test.tsx.snap create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_install_review_query.ts rename x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/{ => prebuilt_rules}/use_fetch_prebuilt_rules_status_query.ts (58%) create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_upgrade_review_query.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_all_rules_install_mutation.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_all_rules_upgrade_mutation.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_specific_rules_install_mutation.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_specific_rules_upgrade_mutation.ts delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_create_prebuilt_rules_mutation.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/translations.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_perform_rule_install.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_perform_rule_upgrade.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_install_review.ts rename x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/{use_pre_packaged_rules_status.ts => prebuilt_rules/use_prebuilt_rules_status.ts} (61%) create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_upgrade_review.ts delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_create_pre_packaged_rules.ts delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_install_pre_packaged_rules.ts delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_rules_installation_status.ts delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_timelines_installation_status.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/auto_refresh_button/auto_refresh_button.test.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/auto_refresh_button/auto_refresh_button.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/mini_callout.test.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/mini_callout.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/translations.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/ml_rule_warning_popover/ml_rule_warning_popover.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_header_buttons.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table_context.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/translations.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_buttons.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx rename x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/{rules_table => rules_table_utility_bar}/rules_table_utility_bar.test.tsx (70%) rename x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/{rules_table => rules_table_utility_bar}/rules_table_utility_bar.tsx (69%) create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/index.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/translations.tsx delete mode 100644 x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx delete mode 100644 x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_prepackaged_rules.tsx delete mode 100644 x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/update_callout.test.tsx delete mode 100644 x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/update_callout.tsx diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index 34694ea652caf..ec3c86097117c 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -126,6 +126,7 @@ export enum SecurityPageName { policies = 'policy', responseActionsHistory = 'response_actions_history', rules = 'rules', + rulesAdd = 'rules-add', rulesCreate = 'rules-create', sessions = 'sessions', /* @@ -158,6 +159,7 @@ export const DETECTIONS_PATH = '/detections' as const; export const ALERTS_PATH = '/alerts' as const; export const ALERT_DETAILS_REDIRECT_PATH = `${ALERTS_PATH}/redirect` as const; export const RULES_PATH = '/rules' as const; +export const RULES_ADD_PATH = `${RULES_PATH}/add_rules` as const; export const RULES_CREATE_PATH = `${RULES_PATH}/create` as const; export const EXCEPTIONS_PATH = '/exceptions' as const; export const EXCEPTION_LIST_DETAIL_PATH = `${EXCEPTIONS_PATH}/details/:detailName` as const; diff --git a/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_request_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_request_schema.ts index 0fede224254e6..3dc0c3619b2ee 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_request_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_request_schema.ts @@ -14,6 +14,8 @@ export const RuleVersionSpecifier = t.exact( ); export type RuleVersionSpecifier = t.TypeOf; +export type InstallSpecificRulesRequest = t.TypeOf; + export const InstallSpecificRulesRequest = t.exact( t.type({ mode: t.literal(`SPECIFIC_RULES`), @@ -21,6 +23,8 @@ export const InstallSpecificRulesRequest = t.exact( }) ); +export type InstallAllRulesRequest = t.TypeOf; + export const InstallAllRulesRequest = t.exact( t.type({ mode: t.literal(`ALL_RULES`), diff --git a/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_request_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_request_schema.ts index e0cfe9427dc97..eb92782f4d916 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_request_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_request_schema.ts @@ -22,11 +22,11 @@ export const RuleUpgradeSpecifier = t.exact( rule_id: t.string, /** * This parameter is needed for handling race conditions with Optimistic Concurrency Control. - * Two or more users can call installation/_review and installation/_perform endpoints concurrently. + * Two or more users can call upgrade/_review and upgrade/_perform endpoints concurrently. * Also, in general the time between these two calls can be anything. * The idea is to only allow the user to install a rule if the user has reviewed the exact version * of it that had been returned from the _review endpoint. If the version changed on the BE, - * installation/_perform endpoint will return a version mismatch error for this rule. + * upgrade/_perform endpoint will return a version mismatch error for this rule. */ revision: t.number, /** @@ -41,6 +41,7 @@ export const RuleUpgradeSpecifier = t.exact( ); export type RuleUpgradeSpecifier = t.TypeOf; +export type UpgradeSpecificRulesRequest = t.TypeOf; export const UpgradeSpecificRulesRequest = t.exact( t.intersection([ t.type({ diff --git a/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/review_rule_upgrade/response_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/review_rule_upgrade/response_schema.ts index 06c45008caf6e..52e12bc49fac6 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/review_rule_upgrade/response_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules/api/review_rule_upgrade/response_schema.ts @@ -30,4 +30,5 @@ export interface RuleUpgradeInfoForReview { rule_id: RuleSignatureId; rule: DiffableRule; diff: PartialRuleDiff; + revision: number; } diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index 68f4308384649..131d9a52cc5bb 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -46,12 +46,6 @@ export const allowedExperimentalValues = Object.freeze({ */ extendedRuleExecutionLoggingEnabled: false, - /** - * Enables the new API and UI for https://github.com/elastic/security-team/issues/1974. - * It's a temporary feature flag that will be removed once the feature gets a basic production-ready implementation. - */ - prebuiltRulesNewUpgradeAndInstallationWorkflowsEnabled: false, - /** * Enables the SOC trends timerange and stats on D&R page */ diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/bulk_edit_rules.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/bulk_edit_rules.cy.ts index 549b46a0b886e..b07555156b351 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/bulk_edit_rules.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/bulk_edit_rules.cy.ts @@ -34,7 +34,6 @@ import { testAllTagsBadges, testTagsBadge, testMultipleSelectedRulesLabel, - loadPrebuiltDetectionRulesFromHeaderBtn, filterByElasticRules, clickErrorToastBtn, unselectRuleByName, @@ -90,7 +89,10 @@ import { } from '../../objects/rule'; import { esArchiverResetKibana } from '../../tasks/es_archiver'; -import { getAvailablePrebuiltRulesCount } from '../../tasks/api_calls/prebuilt_rules'; +import { + getAvailablePrebuiltRulesCount, + excessivelyInstallAllPrebuiltRules, +} from '../../tasks/api_calls/prebuilt_rules'; import { setRowsPerPageTo } from '../../tasks/table_pagination'; const RULE_NAME = 'Custom rule for bulk actions'; @@ -151,7 +153,7 @@ describe('Detection rules, bulk edit', () => { it('Only prebuilt rules selected', () => { const expectedNumberOfSelectedRules = 10; - loadPrebuiltDetectionRulesFromHeaderBtn(); + excessivelyInstallAllPrebuiltRules(); // select Elastic(prebuilt) rules, check if we can't proceed further, as Elastic rules are not editable filterByElasticRules(); @@ -167,7 +169,7 @@ describe('Detection rules, bulk edit', () => { }); it('Prebuilt and custom rules selected: user proceeds with custom rules editing', () => { - loadPrebuiltDetectionRulesFromHeaderBtn(); + excessivelyInstallAllPrebuiltRules(); // modal window should show how many rules can be edit, how many not selectAllRules(); @@ -190,7 +192,7 @@ describe('Detection rules, bulk edit', () => { }); it('Prebuilt and custom rules selected: user cancels action', () => { - loadPrebuiltDetectionRulesFromHeaderBtn(); + excessivelyInstallAllPrebuiltRules(); // modal window should show how many rules can be edit, how many not selectAllRules(); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/bulk_edit_rules_actions.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/bulk_edit_rules_actions.cy.ts index 624dec7f1c955..2845c3b2b7adf 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/bulk_edit_rules_actions.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/bulk_edit_rules_actions.cy.ts @@ -32,7 +32,6 @@ import { import { waitForRulesTableToBeLoaded, selectNumberOfRules, - loadPrebuiltDetectionRulesFromHeaderBtn, goToEditRuleActionsSettingsOf, } from '../../tasks/alerts_detection_rules'; import { @@ -58,6 +57,7 @@ import { getMachineLearningRule, getNewTermsRule, } from '../../objects/rule'; +import { excessivelyInstallAllPrebuiltRules } from '../../tasks/api_calls/prebuilt_rules'; const ruleNameToAssert = 'Custom rule name with actions'; const expectedNumberOfCustomRulesToBeEdited = 7; @@ -136,7 +136,7 @@ describe.skip('Detection rules, bulk edit of rule actions', () => { throttleUnit: 'd', }; - loadPrebuiltDetectionRulesFromHeaderBtn(); + excessivelyInstallAllPrebuiltRules(); // select both custom and prebuilt rules selectNumberOfRules(expectedNumberOfRulesToBeEdited); @@ -164,7 +164,7 @@ describe.skip('Detection rules, bulk edit of rule actions', () => { }); it('Overwrite rule actions in rules', () => { - loadPrebuiltDetectionRulesFromHeaderBtn(); + excessivelyInstallAllPrebuiltRules(); // select both custom and prebuilt rules selectNumberOfRules(expectedNumberOfRulesToBeEdited); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/export_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/export_rule.cy.ts index 2065b914b8168..ee0dc9379c613 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/export_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/export_rule.cy.ts @@ -15,7 +15,6 @@ import { TOASTER, } from '../../screens/alerts_detection_rules'; import { - loadPrebuiltDetectionRulesFromHeaderBtn, filterByElasticRules, selectNumberOfRules, bulkExportRules, @@ -32,7 +31,10 @@ import { cleanKibana, resetRulesTableState, deleteAlertsAndRules } from '../../t import { login, visitWithoutDateRange } from '../../tasks/login'; import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; -import { getAvailablePrebuiltRulesCount } from '../../tasks/api_calls/prebuilt_rules'; +import { + excessivelyInstallAllPrebuiltRules, + getAvailablePrebuiltRulesCount, +} from '../../tasks/api_calls/prebuilt_rules'; const EXPORTED_RULES_FILENAME = 'rules_export.ndjson'; const exceptionList = getExceptionList(); @@ -83,7 +85,7 @@ describe('Export rules', () => { it('shows a modal saying that no rules can be exported if all the selected rules are prebuilt', function () { const expectedElasticRulesCount = 7; - loadPrebuiltDetectionRulesFromHeaderBtn(); + excessivelyInstallAllPrebuiltRules(); filterByElasticRules(); selectNumberOfRules(expectedElasticRulesCount); @@ -97,7 +99,7 @@ describe('Export rules', () => { it('exports only custom rules', function () { const expectedNumberCustomRulesToBeExported = 1; - loadPrebuiltDetectionRulesFromHeaderBtn(); + excessivelyInstallAllPrebuiltRules(); selectAllRules(); bulkExportRules(); @@ -149,7 +151,7 @@ describe('Export rules', () => { // one rule with exception, one without it const expectedNumberCustomRulesToBeExported = 2; - loadPrebuiltDetectionRulesFromHeaderBtn(); + excessivelyInstallAllPrebuiltRules(); selectAllRules(); bulkExportRules(); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules.cy.ts index 532bf5bf0bf24..024797b7fde78 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules.cy.ts @@ -15,6 +15,7 @@ import { RULES_MANAGEMENT_TABLE, RULE_SWITCH, SELECT_ALL_RULES_ON_PAGE_CHECKBOX, + INSTALL_ALL_RULES_BUTTON, } from '../../screens/alerts_detection_rules'; import { confirmRulesDelete, @@ -22,14 +23,15 @@ import { deleteSelectedRules, disableSelectedRules, enableSelectedRules, - loadPrebuiltDetectionRules, - reloadDeletedRules, selectAllRules, selectNumberOfRules, waitForPrebuiltDetectionRulesToBeLoaded, waitForRuleToUpdate, } from '../../tasks/alerts_detection_rules'; -import { getAvailablePrebuiltRulesCount } from '../../tasks/api_calls/prebuilt_rules'; +import { + excessivelyInstallAllPrebuiltRules, + getAvailablePrebuiltRulesCount, +} from '../../tasks/api_calls/prebuilt_rules'; import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common'; import { login, visitWithoutDateRange } from '../../tasks/login'; import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; @@ -43,7 +45,8 @@ describe('Prebuilt rules', () => { login(); deleteAlertsAndRules(); visitWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL); - loadPrebuiltDetectionRules(); + excessivelyInstallAllPrebuiltRules(); + cy.reload(); waitForPrebuiltDetectionRulesToBeLoaded(); }); @@ -111,15 +114,19 @@ describe('Prebuilt rules', () => { 'have.text', `Elastic rules (${expectedNumberOfRulesAfterDeletion})` ); - cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN).should('exist'); - cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN).should( - 'have.text', - 'Install 1 Elastic prebuilt rule ' - ); + cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN).should('have.text', `Add Elastic rules1`); - reloadDeletedRules(); + // Navigate to the prebuilt rule installation page + cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN).click(); - cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN).should('not.exist'); + // Click the "Install all rules" button + cy.get(INSTALL_ALL_RULES_BUTTON).click(); + + // Wait for the rules to be installed + cy.get(INSTALL_ALL_RULES_BUTTON).should('be.disabled'); + + // Navigate back to the rules page + cy.go('back'); cy.get(ELASTIC_RULES_BTN).should( 'have.text', @@ -137,20 +144,28 @@ describe('Prebuilt rules', () => { selectNumberOfRules(numberOfRulesToBeSelected); deleteSelectedRules(); - cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN).should('exist'); cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN).should( 'have.text', - `Install ${numberOfRulesToBeSelected} Elastic prebuilt rules ` + `Add Elastic rules${numberOfRulesToBeSelected}` ); cy.get(ELASTIC_RULES_BTN).should( 'have.text', `Elastic rules (${expectedNumberOfRulesAfterDeletion})` ); - reloadDeletedRules(); + // Navigate to the prebuilt rule installation page + cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN).click(); + + // Click the "Install all rules" button + cy.get(INSTALL_ALL_RULES_BUTTON).click(); + + // Wait for the rules to be installed + cy.get(INSTALL_ALL_RULES_BUTTON).should('be.disabled'); - cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN).should('not.exist'); + // Navigate back to the rules page + cy.go('back'); + // Check that the rules table contains all rules cy.get(ELASTIC_RULES_BTN).should( 'have.text', `Elastic rules (${expectedNumberOfRulesAfterRecovering})` diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_selection.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_selection.cy.ts index 37ac8ddadfe7a..43d2445b318b0 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_selection.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_selection.cy.ts @@ -10,12 +10,14 @@ import { SELECT_ALL_RULES_ON_PAGE_CHECKBOX, } from '../../screens/alerts_detection_rules'; import { - loadPrebuiltDetectionRules, selectNumberOfRules, unselectNumberOfRules, waitForPrebuiltDetectionRulesToBeLoaded, } from '../../tasks/alerts_detection_rules'; -import { getAvailablePrebuiltRulesCount } from '../../tasks/api_calls/prebuilt_rules'; +import { + excessivelyInstallAllPrebuiltRules, + getAvailablePrebuiltRulesCount, +} from '../../tasks/api_calls/prebuilt_rules'; import { cleanKibana } from '../../tasks/common'; import { login, visitWithoutDateRange } from '../../tasks/login'; import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; @@ -29,7 +31,7 @@ describe.skip('Rules selection', () => { }); it('should correctly update the selection label when rules are individually selected and unselected', () => { - loadPrebuiltDetectionRules(); + excessivelyInstallAllPrebuiltRules(); waitForPrebuiltDetectionRulesToBeLoaded(); selectNumberOfRules(2); @@ -42,7 +44,7 @@ describe.skip('Rules selection', () => { }); it('should correctly update the selection label when rules are bulk selected and then bulk un-selected', () => { - loadPrebuiltDetectionRules(); + excessivelyInstallAllPrebuiltRules(); waitForPrebuiltDetectionRulesToBeLoaded(); cy.get(SELECT_ALL_RULES_BTN).click(); @@ -63,7 +65,7 @@ describe.skip('Rules selection', () => { }); it('should correctly update the selection label when rules are bulk selected and then unselected via the table select all checkbox', () => { - loadPrebuiltDetectionRules(); + excessivelyInstallAllPrebuiltRules(); waitForPrebuiltDetectionRulesToBeLoaded(); cy.get(SELECT_ALL_RULES_BTN).click(); diff --git a/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts b/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts index 8d8ac48a06782..a4383b48d2dd0 100644 --- a/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts +++ b/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts @@ -63,6 +63,8 @@ export const LOAD_PREBUILT_RULES_BTN = '[data-test-subj="load-prebuilt-rules"]'; export const LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN = '[data-test-subj="loadPrebuiltRulesBtn"]'; +export const INSTALL_ALL_RULES_BUTTON = '[data-test-subj="installAllRulesButton"]'; + export const RULES_TABLE_INITIAL_LOADING_INDICATOR = '[data-test-subj="initialLoadingPanelAllRulesTable"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts b/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts index 27d6ee054c0d5..7f4a8fcacd0b1 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts @@ -14,7 +14,6 @@ import { DELETE_RULE_BULK_BTN, RULES_SELECTED_TAG, LOAD_PREBUILT_RULES_BTN, - LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN, RULES_TABLE_INITIAL_LOADING_INDICATOR, RULES_TABLE_AUTOREFRESH_INDICATOR, RULE_CHECKBOX, @@ -72,7 +71,6 @@ import { EUI_CHECKBOX } from '../screens/common/controls'; import { ALL_ACTIONS } from '../screens/rule_details'; import { EDIT_SUBMIT_BUTTON } from '../screens/edit_rule'; import { LOADING_INDICATOR } from '../screens/security_header'; -import { waitTillPrebuiltRulesReadyToInstall } from './api_calls/prebuilt_rules'; import { goToRuleEditSettings } from './rule_details'; import { goToActionsStepTab } from './create_new_rule'; @@ -243,32 +241,10 @@ export const goToTheRuleDetailsOf = (ruleName: string) => { cy.contains(RULE_NAME, ruleName).click(); }; -export const loadPrebuiltDetectionRules = () => { - cy.log('load prebuilt detection rules'); - waitTillPrebuiltRulesReadyToInstall(); - cy.get(LOAD_PREBUILT_RULES_BTN, { timeout: 300000 }).should('be.enabled'); - cy.get(LOAD_PREBUILT_RULES_BTN).click(); - cy.get(LOAD_PREBUILT_RULES_BTN).should('be.disabled'); -}; - -/** - * load prebuilt rules by clicking button on page header - */ -export const loadPrebuiltDetectionRulesFromHeaderBtn = () => { - cy.log('load prebuilt detection rules from header'); - waitTillPrebuiltRulesReadyToInstall(); - cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN, { timeout: 300000 }).click(); - cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN, { timeout: 300000 }).should('not.exist'); -}; - export const openIntegrationsPopover = () => { cy.get(INTEGRATIONS_POPOVER).click(); }; -export const reloadDeletedRules = () => { - cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN).click(); -}; - /** * Selects the number of rules. Since there can be missing click handlers * when the page loads at first, we use a pipe and a trigger of click diff --git a/x-pack/plugins/security_solution/cypress/tasks/api_calls/prebuilt_rules.ts b/x-pack/plugins/security_solution/cypress/tasks/api_calls/prebuilt_rules.ts index 2d8d8b7bf49e0..424426e91d793 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/api_calls/prebuilt_rules.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/api_calls/prebuilt_rules.ts @@ -15,6 +15,17 @@ export const getPrebuiltRulesStatus = () => { }); }; +export const installAllPrebuiltRulesRequest = () => { + return cy.request({ + method: 'POST', + url: 'internal/detection_engine/prebuilt_rules/installation/_perform', + headers: { 'kbn-xsrf': 'cypress-creds' }, + body: { + mode: 'ALL_RULES', + }, + }); +}; + export const getAvailablePrebuiltRulesCount = () => { cy.log('Get prebuilt rules count'); return getPrebuiltRulesStatus().then(({ body }) => { @@ -34,3 +45,16 @@ export const waitTillPrebuiltRulesReadyToInstall = () => { { interval: 2000, timeout: 60000 } ); }; + +/** + * Install all prebuilt rules. + * + * This is a heavy request and should be used with caution. Most likely you + * don't need all prebuilt rules to be installed, crating just a few prebuilt + * rules should be enough for most cases. + */ +export const excessivelyInstallAllPrebuiltRules = () => { + cy.log('Install prebuilt rules (heavy request)'); + waitTillPrebuiltRulesReadyToInstall(); + installAllPrebuiltRulesRequest(); +}; diff --git a/x-pack/plugins/security_solution/public/app/translations.ts b/x-pack/plugins/security_solution/public/app/translations.ts index 1c75cb7bba595..50c3fae8f8ad2 100644 --- a/x-pack/plugins/security_solution/public/app/translations.ts +++ b/x-pack/plugins/security_solution/public/app/translations.ts @@ -64,6 +64,10 @@ export const RULES = i18n.translate('xpack.securitySolution.navigation.rules', { defaultMessage: 'Rules', }); +export const ADD_RULES = i18n.translate('xpack.securitySolution.navigation.addRules', { + defaultMessage: 'Add Rules', +}); + export const EXCEPTIONS = i18n.translate('xpack.securitySolution.navigation.exceptions', { defaultMessage: 'Shared Exception Lists', }); diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/api.mock.ts b/x-pack/plugins/security_solution/public/common/components/ml_popover/api.mock.ts index 6915c5e4305d9..2000db1807cbf 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/api.mock.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/api.mock.ts @@ -418,4 +418,28 @@ export const mockSecurityJobs: SecurityJob[] = [ security_app_display_name: 'Unusually Windows Processes', }, }, + { + datafeedId: 'datafeed-siem-api-rare_process_linux_ecs', + datafeedIndices: ['auditbeat-*'], + datafeedState: 'failed', + description: 'SIEM Auditbeat: Detect unusually rare processes on Linux (beta)', + earliestTimestampMs: 1561651364098, + groups: ['siem'], + hasDatafeed: true, + id: 'siem-api-rare_process_linux_ecs', + isSingleMetricViewerJob: true, + jobState: 'closed', + latestTimestampMs: 1562870521264, + memory_status: 'hard_limit', + nodeName: 'siem-es', + processed_record_count: 3425264, + awaitingNodeAssignment: false, + jobTags: {}, + bucketSpanSeconds: 900, + moduleId: 'security_linux_v3', + defaultIndexPattern: 'auditbeat-*', + isCompatible: true, + isInstalled: true, + isElasticJob: true, + }, ]; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.test.tsx index 7811710cfd6da..3af90ea528eec 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.test.tsx @@ -10,7 +10,7 @@ import { filterJobs, getStablePatternTitles, searchFilter } from './helpers'; describe('helpers', () => { describe('filterJobs', () => { - test('returns all jobs when no filter is suplied', () => { + test('returns all jobs when no filter is supplied', () => { const filteredJobs = filterJobs({ jobs: mockSecurityJobs, selectedGroups: [], @@ -18,24 +18,24 @@ describe('helpers', () => { showElasticJobs: false, filterQuery: '', }); - expect(filteredJobs.length).toEqual(3); + expect(filteredJobs.length).toEqual(mockSecurityJobs.length); }); }); describe('searchFilter', () => { - test('returns all jobs when nullfilterQuery is provided', () => { + test('returns all jobs when null filterQuery is provided', () => { const jobsToDisplay = searchFilter(mockSecurityJobs); expect(jobsToDisplay.length).toEqual(mockSecurityJobs.length); }); test('returns correct DisplayJobs when filterQuery matches job.id', () => { const jobsToDisplay = searchFilter(mockSecurityJobs, 'rare_process'); - expect(jobsToDisplay.length).toEqual(2); + expect(jobsToDisplay.length).toEqual(3); }); test('returns correct DisplayJobs when filterQuery matches job.description', () => { const jobsToDisplay = searchFilter(mockSecurityJobs, 'Detect unusually'); - expect(jobsToDisplay.length).toEqual(2); + expect(jobsToDisplay.length).toEqual(3); }); }); diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap deleted file mode 100644 index 76ac5ef287004..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap +++ /dev/null @@ -1,138 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`JobsTableComponent renders correctly against snapshot 1`] = ` - - } - onChange={[Function]} - pagination={ - Object { - "pageIndex": 0, - "pageSize": 5, - "showPerPageOptions": false, - "totalItemCount": 3, - } - } - responsive={false} - tableLayout="fixed" -/> -`; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/__snapshots__/jobs_table_filters.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/__snapshots__/jobs_table_filters.test.tsx.snap deleted file mode 100644 index d6fb52aa3acac..0000000000000 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/__snapshots__/jobs_table_filters.test.tsx.snap +++ /dev/null @@ -1,148 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`JobsTableFilters renders correctly against snapshot 1`] = ` - - - - - - - - - - - - - Elastic jobs - - - Custom jobs - - - - -`; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx index 16879a0c22cc3..6156a01c70485 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { mount, shallow } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import { JobsTableFiltersComponent } from './jobs_table_filters'; import type { SecurityJob } from '../../types'; @@ -19,13 +19,6 @@ describe('JobsTableFilters', () => { securityJobs = cloneDeep(mockSecurityJobs); }); - test('renders correctly against snapshot', () => { - const wrapper = shallow( - - ); - expect(wrapper).toMatchSnapshot(); - }); - test('when you click Elastic Jobs filter, state is updated and it is selected', () => { const onFilterChanged = jest.fn(); const wrapper = mount( diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.test.tsx index 63a0fbb55d973..48308202c1a26 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { shallow, mount } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import { render, waitFor } from '@testing-library/react'; import { JobsTableComponent } from './jobs_table'; @@ -33,18 +33,6 @@ describe('JobsTableComponent', () => { onJobStateChangeMock = jest.fn(); }); - test('renders correctly against snapshot', () => { - const wrapper = shallow( - - ); - expect(wrapper).toMatchSnapshot(); - }); - test('should render the hyperlink which points specifically to the job id', async () => { const href = await getRenderedHref( () => ( diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts index fdaa1e04a00e1..cfbffae6ad8de 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts @@ -103,6 +103,7 @@ const getTrailingBreadcrumbsForRoutes = ( case SecurityPageName.users: return getUsersBreadcrumbs(spyState, getSecuritySolutionUrl); case SecurityPageName.rules: + case SecurityPageName.rulesAdd: case SecurityPageName.rulesCreate: return getDetectionRulesBreadcrumbs(spyState, getSecuritySolutionUrl); case SecurityPageName.exceptions: diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx index f903611a3bf96..24f50df4a5c67 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiTab, EuiTabs, EuiBetaBadge } from '@elastic/eui'; +import { EuiTab, EuiTabs, EuiBadge } from '@elastic/eui'; import { getOr } from 'lodash/fp'; import React, { useEffect, useState, useCallback, useMemo } from 'react'; import { useLocation } from 'react-router-dom'; @@ -49,7 +49,7 @@ const TabNavigationItemComponent = ({ isSelected={isSelected} href={appHref} onClick={handleClick} - append={isBeta && } + append={isBeta && {betaOptions?.text ?? BETA}} > {name} diff --git a/x-pack/plugins/security_solution/public/common/components/utility_bar/styles.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/styles.tsx index 11886504eaa20..52740c0b3213d 100644 --- a/x-pack/plugins/security_solution/public/common/components/utility_bar/styles.tsx +++ b/x-pack/plugins/security_solution/public/common/components/utility_bar/styles.tsx @@ -30,7 +30,8 @@ export const Bar = styled.aside.attrs({ ${border && css` border-bottom: ${theme.eui.euiBorderThin}; - padding-bottom: ${theme.eui.euiSizeS}; + padding-bottom: ${theme.eui.euiSizeXS}; + align-items: center; `} @media only screen and (min-width: ${theme.eui.euiBreakpoints.l}) { @@ -47,6 +48,7 @@ export const BarSection = styled.div.attrs({ ${({ grow, theme }) => css` & + & { margin-top: ${theme.eui.euiSizeS}; + align-items: center; } @media only screen and (min-width: ${theme.eui.euiBreakpoints.m}) { diff --git a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.test.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.test.tsx index e753b4ff40560..9f21ccbb9c0b4 100644 --- a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.test.tsx @@ -5,7 +5,6 @@ * 2.0. */ -import { euiDarkVars } from '@kbn/ui-theme'; import { mount, shallow } from 'enzyme'; import React from 'react'; @@ -85,8 +84,8 @@ describe('UtilityBar', () => { ); const siemUtilityBar = wrapper.find('.siemUtilityBar').first(); - expect(siemUtilityBar).toHaveStyleRule('border-bottom', euiDarkVars.euiBorderThin); - expect(siemUtilityBar).toHaveStyleRule('padding-bottom', euiDarkVars.euiSizeS); + expect(siemUtilityBar).toHaveStyleRule('border-bottom', expect.any(String)); + expect(siemUtilityBar).toHaveStyleRule('padding-bottom', expect.any(String)); }); test('it DOES NOT apply border styles when border is false', () => { @@ -121,7 +120,7 @@ describe('UtilityBar', () => { ); const siemUtilityBar = wrapper.find('.siemUtilityBar').first(); - expect(siemUtilityBar).not.toHaveStyleRule('border-bottom', euiDarkVars.euiBorderThin); - expect(siemUtilityBar).not.toHaveStyleRule('padding-bottom', euiDarkVars.euiSizeS); + expect(siemUtilityBar).not.toHaveStyleRule('border-bottom', expect.any(String)); + expect(siemUtilityBar).not.toHaveStyleRule('padding-bottom', expect.any(String)); }); }); diff --git a/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts b/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts index a8120cd0b99cc..a5b3bb1c8d31f 100644 --- a/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts @@ -17,6 +17,7 @@ import { SecurityPageName } from '../../../app/types'; export const isDetectionsPages = (pageName: string) => pageName === SecurityPageName.alerts || pageName === SecurityPageName.rules || + pageName === SecurityPageName.rulesAdd || pageName === SecurityPageName.rulesCreate || pageName === SecurityPageName.exceptions; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts index d1e67923d7b56..8ec7f77531653 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts @@ -28,7 +28,6 @@ import { patchRule, fetchRules, fetchRuleById, - createPrepackagedRules, importRules, exportRules, getPrePackagedRulesStatus, @@ -435,34 +434,6 @@ describe('Detections Rules API', () => { }); }); - describe('createPrepackagedRules', () => { - beforeEach(() => { - fetchMock.mockClear(); - fetchMock.mockResolvedValue({ - rules_installed: 0, - rules_updated: 0, - timelines_installed: 0, - timelines_updated: 0, - }); - }); - - test('check parameter url when creating pre-packaged rules', async () => { - await createPrepackagedRules(); - expect(fetchMock).toHaveBeenCalledWith('/api/detection_engine/rules/prepackaged', { - method: 'PUT', - }); - }); - test('happy path', async () => { - const resp = await createPrepackagedRules(); - expect(resp).toEqual({ - rules_installed: 0, - rules_updated: 0, - timelines_installed: 0, - timelines_updated: 0, - }); - }); - }); - describe('importRules', () => { const fileToImport: File = { lastModified: 33, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts index 74eb06bb373e9..aff10f8a817aa 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts @@ -13,6 +13,11 @@ import { INTERNAL_ALERTING_API_FIND_RULES_PATH } from '@kbn/alerting-plugin/comm import type { BulkInstallPackagesResponse } from '@kbn/fleet-plugin/common'; import { epmRouteService } from '@kbn/fleet-plugin/common'; import type { InstallPackageResponse } from '@kbn/fleet-plugin/common/types'; +import type { UpgradeSpecificRulesRequest } from '../../../../common/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_request_schema'; +import type { PerformRuleUpgradeResponseBody } from '../../../../common/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_response_schema'; +import type { InstallSpecificRulesRequest } from '../../../../common/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_request_schema'; +import type { PerformRuleInstallationResponseBody } from '../../../../common/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_response_schema'; +import type { GetPrebuiltRulesStatusResponseBody } from '../../../../common/detection_engine/prebuilt_rules/api/get_prebuilt_rules_status/response_schema'; import type { RuleManagementFiltersResponse } from '../../../../common/detection_engine/rule_management/api/rules/filters/response_schema'; import { RULE_MANAGEMENT_FILTERS_URL } from '../../../../common/detection_engine/rule_management/api/urls'; import type { BulkActionsDryRunErrCode } from '../../../../common/constants'; @@ -24,21 +29,25 @@ import { } from '../../../../common/constants'; import { + GET_PREBUILT_RULES_STATUS_URL, + PERFORM_RULE_INSTALLATION_URL, + PERFORM_RULE_UPGRADE_URL, PREBUILT_RULES_STATUS_URL, - PREBUILT_RULES_URL, + REVIEW_RULE_INSTALLATION_URL, + REVIEW_RULE_UPGRADE_URL, } from '../../../../common/detection_engine/prebuilt_rules'; import type { RulesReferencedByExceptionListsSchema } from '../../../../common/detection_engine/rule_exceptions'; import { DETECTION_ENGINE_RULES_EXCEPTIONS_REFERENCE_URL } from '../../../../common/detection_engine/rule_exceptions'; import type { - BulkActionEditPayload, BulkActionDuplicatePayload, + BulkActionEditPayload, } from '../../../../common/detection_engine/rule_management/api/rules/bulk_actions/request_schema'; import { BulkActionType } from '../../../../common/detection_engine/rule_management/api/rules/bulk_actions/request_schema'; import type { - RuleResponse, PreviewResponse, + RuleResponse, } from '../../../../common/detection_engine/rule_schema'; import { KibanaServices } from '../../../common/lib/kibana'; @@ -62,6 +71,8 @@ import type { UpdateRulesProps, } from '../logic/types'; import { convertRulesFilterToKQL } from '../logic/utils'; +import type { ReviewRuleUpgradeResponseBody } from '../../../../common/detection_engine/prebuilt_rules/api/review_rule_upgrade/response_schema'; +import type { ReviewRuleInstallationResponseBody } from '../../../../common/detection_engine/prebuilt_rules/api/review_rule_installation/response_schema'; /** * Create provided Rule @@ -225,7 +236,6 @@ export const fetchRulesSnoozeSettings = async ({ return result; }, {} as RulesSnoozeSettingsMap); }; - export interface BulkActionSummary { failed: number; skipped: number; @@ -347,26 +357,6 @@ export interface CreatePrepackagedRulesResponse { timelines_updated: number; } -/** - * Create Prepackaged Rules - * - * @param signal AbortSignal for cancelling request - * - * @throws An error if response is not OK - */ -export const createPrepackagedRules = async (): Promise => { - const result = await KibanaServices.get().http.fetch<{ - rules_installed: number; - rules_updated: number; - timelines_installed: number; - timelines_updated: number; - }>(PREBUILT_RULES_URL, { - method: 'PUT', - }); - - return result; -}; - /** * Imports rules in the same format as exported via the _export API * @@ -584,3 +574,102 @@ export const bulkInstallFleetPackages = ({ } ); }; + +/** + * NEW PREBUILT RULES ROUTES START HERE! 👋 + * USE THESE ONES! THEY'RE THE NICE ONES, PROMISE! + */ + +/** + * Get prebuilt rules status + * + * @param signal AbortSignal for cancelling request + * + * @throws An error if response is not OK + */ +export const getPrebuiltRulesStatus = async ({ + signal, +}: { + signal: AbortSignal | undefined; +}): Promise => + KibanaServices.get().http.fetch( + GET_PREBUILT_RULES_STATUS_URL, + { + method: 'GET', + signal, + } + ); + +/** + * Review prebuilt rules upgrade + * + * @param signal AbortSignal for cancelling request + * + * @throws An error if response is not OK + */ +export const reviewRuleUpgrade = async ({ + signal, +}: { + signal: AbortSignal | undefined; +}): Promise => + KibanaServices.get().http.fetch(REVIEW_RULE_UPGRADE_URL, { + method: 'POST', + signal, + }); + +/** + * Review prebuilt rules install (new rules) + * + * @param signal AbortSignal for cancelling request + * + * @throws An error if response is not OK + */ +export const reviewRuleInstall = async ({ + signal, +}: { + signal: AbortSignal | undefined; +}): Promise => + KibanaServices.get().http.fetch(REVIEW_RULE_INSTALLATION_URL, { + method: 'POST', + signal, + }); + +export const performInstallAllRules = async (): Promise => + KibanaServices.get().http.fetch(PERFORM_RULE_INSTALLATION_URL, { + method: 'POST', + body: JSON.stringify({ + mode: 'ALL_RULES', + }), + }); + +export const performInstallSpecificRules = async ( + rules: InstallSpecificRulesRequest['rules'] +): Promise => + KibanaServices.get().http.fetch(PERFORM_RULE_INSTALLATION_URL, { + method: 'POST', + body: JSON.stringify({ + mode: 'SPECIFIC_RULES', + rules, + }), + }); + +export const performUpgradeAllRules = async (): Promise => + KibanaServices.get().http.fetch(PERFORM_RULE_UPGRADE_URL, { + method: 'POST', + body: JSON.stringify({ + mode: 'ALL_RULES', + pick_version: 'TARGET', + }), + }); + +export const performUpgradeSpecificRules = async ( + rules: UpgradeSpecificRulesRequest['rules'] +): Promise => + KibanaServices.get().http.fetch(PERFORM_RULE_UPGRADE_URL, { + method: 'POST', + body: JSON.stringify({ + mode: 'SPECIFIC_RULES', + rules, + pick_version: 'TARGET', // Setting fixed 'TARGET' temporarily for Milestone 2 + }), + }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_install_review_query.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_install_review_query.ts new file mode 100644 index 0000000000000..a67baf429521b --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_install_review_query.ts @@ -0,0 +1,48 @@ +/* + * 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 { useCallback } from 'react'; +import type { UseQueryOptions } from '@tanstack/react-query'; +import { useQuery, useQueryClient } from '@tanstack/react-query'; +import { reviewRuleInstall } from '../../api'; +import { REVIEW_RULE_INSTALLATION_URL } from '../../../../../../common/detection_engine/prebuilt_rules/api/urls'; +import type { ReviewRuleInstallationResponseBody } from '../../../../../../common/detection_engine/prebuilt_rules/api/review_rule_installation/response_schema'; +import { DEFAULT_QUERY_OPTIONS } from '../constants'; + +export const REVIEW_RULE_INSTALLATION_QUERY_KEY = ['POST', REVIEW_RULE_INSTALLATION_URL]; + +export const useFetchPrebuiltRulesInstallReviewQuery = ( + options?: UseQueryOptions +) => { + return useQuery( + REVIEW_RULE_INSTALLATION_QUERY_KEY, + async ({ signal }) => { + const response = await reviewRuleInstall({ signal }); + return response; + }, + { + ...DEFAULT_QUERY_OPTIONS, + ...options, + } + ); +}; + +/** + * We should use this hook to invalidate the prebuilt rules to install cache. For + * example, rule mutations that affect rule set size, like installing a rule, + * should lead to cache invalidation. + * + * @returns A rules cache invalidation callback + */ +export const useInvalidateFetchPrebuiltRulesInstallReviewQuery = () => { + const queryClient = useQueryClient(); + + return useCallback(() => { + queryClient.invalidateQueries(REVIEW_RULE_INSTALLATION_QUERY_KEY, { + refetchType: 'active', + }); + }, [queryClient]); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_fetch_prebuilt_rules_status_query.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_status_query.ts similarity index 58% rename from x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_fetch_prebuilt_rules_status_query.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_status_query.ts index 5fd22fae143cb..7865cedc2d314 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_fetch_prebuilt_rules_status_query.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_status_query.ts @@ -7,21 +7,21 @@ import { useCallback } from 'react'; import type { UseQueryOptions } from '@tanstack/react-query'; import { useQuery, useQueryClient } from '@tanstack/react-query'; -import { getPrePackagedRulesStatus } from '../api'; -import { DEFAULT_QUERY_OPTIONS } from './constants'; -import type { PrePackagedRulesStatusResponse } from '../../logic'; -import { PREBUILT_RULES_STATUS_URL } from '../../../../../common/detection_engine/prebuilt_rules/api/urls'; +import type { PrebuiltRulesStatusStats } from '../../../../../../common/detection_engine/prebuilt_rules/api/get_prebuilt_rules_status/response_schema'; +import { getPrebuiltRulesStatus } from '../../api'; +import { DEFAULT_QUERY_OPTIONS } from '../constants'; +import { GET_PREBUILT_RULES_STATUS_URL } from '../../../../../../common/detection_engine/prebuilt_rules/api/urls'; -export const PREBUILT_RULES_STATUS_QUERY_KEY = ['GET', PREBUILT_RULES_STATUS_URL]; +export const PREBUILT_RULES_STATUS_QUERY_KEY = ['GET', GET_PREBUILT_RULES_STATUS_URL]; export const useFetchPrebuiltRulesStatusQuery = ( - options?: UseQueryOptions + options?: UseQueryOptions ) => { - return useQuery( + return useQuery( PREBUILT_RULES_STATUS_QUERY_KEY, async ({ signal }) => { - const response = await getPrePackagedRulesStatus({ signal }); - return response; + const response = await getPrebuiltRulesStatus({ signal }); + return response.stats; }, { ...DEFAULT_QUERY_OPTIONS, @@ -32,8 +32,8 @@ export const useFetchPrebuiltRulesStatusQuery = ( /** * We should use this hook to invalidate the prepackaged rules cache. For - * example, rule mutations that affect rule set size, like creation or deletion, - * should lead to cache invalidation. + * example, rule mutations that affect rule set size, like creation, deletion, + * or installing and updating (which affect the stats) should lead to cache invalidation. * * @returns A rules cache invalidation callback */ diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_upgrade_review_query.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_upgrade_review_query.ts new file mode 100644 index 0000000000000..be6b3eb14207c --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_upgrade_review_query.ts @@ -0,0 +1,48 @@ +/* + * 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 { useCallback } from 'react'; +import type { UseQueryOptions } from '@tanstack/react-query'; +import { useQuery, useQueryClient } from '@tanstack/react-query'; +import { reviewRuleUpgrade } from '../../api'; +import { REVIEW_RULE_UPGRADE_URL } from '../../../../../../common/detection_engine/prebuilt_rules/api/urls'; +import type { ReviewRuleUpgradeResponseBody } from '../../../../../../common/detection_engine/prebuilt_rules/api/review_rule_upgrade/response_schema'; +import { DEFAULT_QUERY_OPTIONS } from '../constants'; + +export const REVIEW_RULE_UPGRADE_QUERY_KEY = ['POST', REVIEW_RULE_UPGRADE_URL]; + +export const useFetchPrebuiltRulesUpgradeReviewQuery = ( + options?: UseQueryOptions +) => { + return useQuery( + REVIEW_RULE_UPGRADE_QUERY_KEY, + async ({ signal }) => { + const response = await reviewRuleUpgrade({ signal }); + return response; + }, + { + ...DEFAULT_QUERY_OPTIONS, + ...options, + } + ); +}; + +/** + * We should use this hook to invalidate the prebuilt rules to upgrade cache. For + * example, rule mutations that affect rule set size, like upgrading a rule, + * should lead to cache invalidation. + * + * @returns A rules cache invalidation callback + */ +export const useInvalidateFetchPrebuiltRulesUpgradeReviewQuery = () => { + const queryClient = useQueryClient(); + + return useCallback(() => { + queryClient.invalidateQueries(REVIEW_RULE_UPGRADE_QUERY_KEY, { + refetchType: 'active', + }); + }, [queryClient]); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_all_rules_install_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_all_rules_install_mutation.ts new file mode 100644 index 0000000000000..ccb9be0b0f82a --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_all_rules_install_mutation.ts @@ -0,0 +1,50 @@ +/* + * 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 type { UseMutationOptions } from '@tanstack/react-query'; +import { useMutation } from '@tanstack/react-query'; +import type { PerformRuleInstallationResponseBody } from '../../../../../../common/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_response_schema'; +import { PERFORM_RULE_INSTALLATION_URL } from '../../../../../../common/detection_engine/prebuilt_rules/api/urls'; +import { useInvalidateFetchPrebuiltRulesStatusQuery } from './use_fetch_prebuilt_rules_status_query'; +import { useInvalidateFindRulesQuery } from '../use_find_rules_query'; +import { useInvalidateFetchRuleManagementFiltersQuery } from '../use_fetch_rule_management_filters_query'; +import { useInvalidateFetchRulesSnoozeSettingsQuery } from '../use_fetch_rules_snooze_settings'; +import { useInvalidateFetchPrebuiltRulesInstallReviewQuery } from './use_fetch_prebuilt_rules_install_review_query'; +import { performInstallAllRules } from '../../api'; + +export const PERFORM_ALL_RULES_INSTALLATION_KEY = [ + 'POST', + 'ALL_RULES', + PERFORM_RULE_INSTALLATION_URL, +]; + +export const usePerformAllRulesInstallMutation = ( + options?: UseMutationOptions +) => { + const invalidateFindRulesQuery = useInvalidateFindRulesQuery(); + const invalidateFetchRulesSnoozeSettings = useInvalidateFetchRulesSnoozeSettingsQuery(); + const invalidateFetchRuleManagementFilters = useInvalidateFetchRuleManagementFiltersQuery(); + const invalidateFetchPrebuiltRulesInstallReview = + useInvalidateFetchPrebuiltRulesInstallReviewQuery(); + const invalidateRuleStatus = useInvalidateFetchPrebuiltRulesStatusQuery(); + + return useMutation(() => performInstallAllRules(), { + ...options, + mutationKey: PERFORM_ALL_RULES_INSTALLATION_KEY, + onSettled: (...args) => { + invalidateFindRulesQuery(); + invalidateFetchRulesSnoozeSettings(); + invalidateFetchRuleManagementFilters(); + + invalidateFetchPrebuiltRulesInstallReview(); + invalidateRuleStatus(); + + if (options?.onSettled) { + options.onSettled(...args); + } + }, + }); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_all_rules_upgrade_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_all_rules_upgrade_mutation.ts new file mode 100644 index 0000000000000..e1137acf146f0 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_all_rules_upgrade_mutation.ts @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { UseMutationOptions } from '@tanstack/react-query'; +import { useMutation } from '@tanstack/react-query'; +import type { PerformRuleUpgradeResponseBody } from '../../../../../../common/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_response_schema'; +import { PERFORM_RULE_UPGRADE_URL } from '../../../../../../common/detection_engine/prebuilt_rules/api/urls'; +import { useInvalidateFindRulesQuery } from '../use_find_rules_query'; +import { useInvalidateFetchRuleManagementFiltersQuery } from '../use_fetch_rule_management_filters_query'; +import { useInvalidateFetchRulesSnoozeSettingsQuery } from '../use_fetch_rules_snooze_settings'; +import { useInvalidateFetchPrebuiltRulesUpgradeReviewQuery } from './use_fetch_prebuilt_rules_upgrade_review_query'; +import { useInvalidateFetchPrebuiltRulesStatusQuery } from './use_fetch_prebuilt_rules_status_query'; +import { performUpgradeAllRules } from '../../api'; + +export const PERFORM_ALL_RULES_UPGRADE_KEY = ['POST', 'ALL_RULES', PERFORM_RULE_UPGRADE_URL]; + +export const usePerformAllRulesUpgradeMutation = ( + options?: UseMutationOptions +) => { + const invalidateFindRulesQuery = useInvalidateFindRulesQuery(); + const invalidateFetchRulesSnoozeSettings = useInvalidateFetchRulesSnoozeSettingsQuery(); + const invalidateFetchRuleManagementFilters = useInvalidateFetchRuleManagementFiltersQuery(); + const invalidateFetchPrebuiltRulesUpgradeReview = + useInvalidateFetchPrebuiltRulesUpgradeReviewQuery(); + const invalidateRuleStatus = useInvalidateFetchPrebuiltRulesStatusQuery(); + + return useMutation(() => performUpgradeAllRules(), { + ...options, + mutationKey: PERFORM_ALL_RULES_UPGRADE_KEY, + onSettled: (...args) => { + invalidateFindRulesQuery(); + invalidateFetchRulesSnoozeSettings(); + invalidateFetchRuleManagementFilters(); + + invalidateFetchPrebuiltRulesUpgradeReview(); + invalidateRuleStatus(); + + if (options?.onSettled) { + options.onSettled(...args); + } + }, + }); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_specific_rules_install_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_specific_rules_install_mutation.ts new file mode 100644 index 0000000000000..33d6c10f5ee95 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_specific_rules_install_mutation.ts @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { UseMutationOptions } from '@tanstack/react-query'; +import { useMutation } from '@tanstack/react-query'; +import type { PerformRuleInstallationResponseBody } from '../../../../../../common/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_response_schema'; +import { PERFORM_RULE_INSTALLATION_URL } from '../../../../../../common/detection_engine/prebuilt_rules/api/urls'; +import { useInvalidateFetchPrebuiltRulesStatusQuery } from './use_fetch_prebuilt_rules_status_query'; +import { useInvalidateFindRulesQuery } from '../use_find_rules_query'; +import { useInvalidateFetchRuleManagementFiltersQuery } from '../use_fetch_rule_management_filters_query'; +import { useInvalidateFetchRulesSnoozeSettingsQuery } from '../use_fetch_rules_snooze_settings'; +import { useInvalidateFetchPrebuiltRulesInstallReviewQuery } from './use_fetch_prebuilt_rules_install_review_query'; +import type { InstallSpecificRulesRequest } from '../../../../../../common/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_request_schema'; +import { performInstallSpecificRules } from '../../api'; + +export const PERFORM_SPECIFIC_RULES_INSTALLATION_KEY = [ + 'POST', + 'SPECIFIC_RULES', + PERFORM_RULE_INSTALLATION_URL, +]; + +export const usePerformSpecificRulesInstallMutation = ( + options?: UseMutationOptions< + PerformRuleInstallationResponseBody, + Error, + InstallSpecificRulesRequest['rules'] + > +) => { + const invalidateFindRulesQuery = useInvalidateFindRulesQuery(); + const invalidateFetchRulesSnoozeSettings = useInvalidateFetchRulesSnoozeSettingsQuery(); + const invalidatePrePackagedRulesStatus = useInvalidateFetchPrebuiltRulesStatusQuery(); + const invalidateFetchRuleManagementFilters = useInvalidateFetchRuleManagementFiltersQuery(); + const invalidateFetchPrebuiltRulesInstallReview = + useInvalidateFetchPrebuiltRulesInstallReviewQuery(); + const invalidateRuleStatus = useInvalidateFetchPrebuiltRulesStatusQuery(); + + return useMutation< + PerformRuleInstallationResponseBody, + Error, + InstallSpecificRulesRequest['rules'] + >( + (rulesToInstall: InstallSpecificRulesRequest['rules']) => { + return performInstallSpecificRules(rulesToInstall); + }, + { + ...options, + mutationKey: PERFORM_SPECIFIC_RULES_INSTALLATION_KEY, + onSettled: (...args) => { + invalidatePrePackagedRulesStatus(); + invalidateFindRulesQuery(); + invalidateFetchRulesSnoozeSettings(); + invalidateFetchRuleManagementFilters(); + + invalidateFetchPrebuiltRulesInstallReview(); + invalidateRuleStatus(); + + if (options?.onSettled) { + options.onSettled(...args); + } + }, + } + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_specific_rules_upgrade_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_specific_rules_upgrade_mutation.ts new file mode 100644 index 0000000000000..501e01732c962 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/prebuilt_rules/use_perform_specific_rules_upgrade_mutation.ts @@ -0,0 +1,62 @@ +/* + * 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 type { UseMutationOptions } from '@tanstack/react-query'; +import { useMutation } from '@tanstack/react-query'; +import type { PerformRuleUpgradeResponseBody } from '../../../../../../common/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_response_schema'; +import { PERFORM_RULE_UPGRADE_URL } from '../../../../../../common/detection_engine/prebuilt_rules/api/urls'; +import { useInvalidateFetchPrebuiltRulesStatusQuery } from './use_fetch_prebuilt_rules_status_query'; +import { useInvalidateFindRulesQuery } from '../use_find_rules_query'; +import { useInvalidateFetchRuleManagementFiltersQuery } from '../use_fetch_rule_management_filters_query'; +import { useInvalidateFetchRulesSnoozeSettingsQuery } from '../use_fetch_rules_snooze_settings'; +import type { UpgradeSpecificRulesRequest } from '../../../../../../common/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_request_schema'; +import { performUpgradeSpecificRules } from '../../api'; +import { useInvalidateFetchPrebuiltRulesUpgradeReviewQuery } from './use_fetch_prebuilt_rules_upgrade_review_query'; + +export const PERFORM_SPECIFIC_RULES_UPGRADE_KEY = [ + 'POST', + 'SPECIFIC_RULES', + PERFORM_RULE_UPGRADE_URL, +]; + +export const usePerformSpecificRulesUpgradeMutation = ( + options?: UseMutationOptions< + PerformRuleUpgradeResponseBody, + Error, + UpgradeSpecificRulesRequest['rules'] + > +) => { + const invalidateFindRulesQuery = useInvalidateFindRulesQuery(); + const invalidateFetchRulesSnoozeSettings = useInvalidateFetchRulesSnoozeSettingsQuery(); + const invalidatePrePackagedRulesStatus = useInvalidateFetchPrebuiltRulesStatusQuery(); + const invalidateFetchRuleManagementFilters = useInvalidateFetchRuleManagementFiltersQuery(); + const invalidateFetchPrebuiltRulesUpgradeReview = + useInvalidateFetchPrebuiltRulesUpgradeReviewQuery(); + const invalidateRuleStatus = useInvalidateFetchPrebuiltRulesStatusQuery(); + + return useMutation( + (rulesToUpgrade: UpgradeSpecificRulesRequest['rules']) => { + return performUpgradeSpecificRules(rulesToUpgrade); + }, + { + ...options, + mutationKey: PERFORM_SPECIFIC_RULES_UPGRADE_KEY, + onSettled: (...args) => { + invalidatePrePackagedRulesStatus(); + invalidateFindRulesQuery(); + invalidateFetchRulesSnoozeSettings(); + invalidateFetchRuleManagementFilters(); + + invalidateFetchPrebuiltRulesUpgradeReview(); + invalidateRuleStatus(); + + if (options?.onSettled) { + options.onSettled(...args); + } + }, + } + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts index 2647dfae6934e..fcb26a8aaee1b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts @@ -11,10 +11,12 @@ import { BulkActionType } from '../../../../../common/detection_engine/rule_mana import type { BulkActionErrorResponse, BulkActionResponse, PerformBulkActionProps } from '../api'; import { performBulkAction } from '../api'; import { DETECTION_ENGINE_RULES_BULK_ACTION } from '../../../../../common/constants'; -import { useInvalidateFetchPrebuiltRulesStatusQuery } from './use_fetch_prebuilt_rules_status_query'; import { useInvalidateFindRulesQuery, useUpdateRulesCache } from './use_find_rules_query'; import { useInvalidateFetchRuleByIdQuery } from './use_fetch_rule_by_id_query'; import { useInvalidateFetchRuleManagementFiltersQuery } from './use_fetch_rule_management_filters_query'; +import { useInvalidateFetchPrebuiltRulesStatusQuery } from './prebuilt_rules/use_fetch_prebuilt_rules_status_query'; +import { useInvalidateFetchPrebuiltRulesUpgradeReviewQuery } from './prebuilt_rules/use_fetch_prebuilt_rules_upgrade_review_query'; +import { useInvalidateFetchPrebuiltRulesInstallReviewQuery } from './prebuilt_rules/use_fetch_prebuilt_rules_install_review_query'; export const BULK_ACTION_MUTATION_KEY = ['POST', DETECTION_ENGINE_RULES_BULK_ACTION]; @@ -29,6 +31,10 @@ export const useBulkActionMutation = ( const invalidateFetchRuleByIdQuery = useInvalidateFetchRuleByIdQuery(); const invalidateFetchRuleManagementFilters = useInvalidateFetchRuleManagementFiltersQuery(); const invalidateFetchPrebuiltRulesStatusQuery = useInvalidateFetchPrebuiltRulesStatusQuery(); + const invalidateFetchPrebuiltRulesInstallReviewQuery = + useInvalidateFetchPrebuiltRulesInstallReviewQuery(); + const invalidateFetchPrebuiltRulesUpgradeReviewQuery = + useInvalidateFetchPrebuiltRulesUpgradeReviewQuery(); const updateRulesCache = useUpdateRulesCache(); return useMutation< @@ -68,6 +74,8 @@ export const useBulkActionMutation = ( invalidateFetchRuleByIdQuery(); invalidateFetchRuleManagementFilters(); invalidateFetchPrebuiltRulesStatusQuery(); + invalidateFetchPrebuiltRulesInstallReviewQuery(); + invalidateFetchPrebuiltRulesUpgradeReviewQuery(); break; case BulkActionType.duplicate: invalidateFindRulesQuery(); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_install_fleet_packages_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_install_fleet_packages_mutation.ts index adbcec981ca3c..dff2bef7b39e7 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_install_fleet_packages_mutation.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_install_fleet_packages_mutation.ts @@ -11,7 +11,7 @@ import { useMutation } from '@tanstack/react-query'; import { PREBUILT_RULES_PACKAGE_NAME } from '../../../../../common/detection_engine/constants'; import type { BulkInstallFleetPackagesProps } from '../api'; import { bulkInstallFleetPackages } from '../api'; -import { useInvalidateFetchPrebuiltRulesStatusQuery } from './use_fetch_prebuilt_rules_status_query'; +import { useInvalidateFetchPrebuiltRulesStatusQuery } from './prebuilt_rules/use_fetch_prebuilt_rules_status_query'; export const BULK_INSTALL_FLEET_PACKAGES_MUTATION_KEY = [ 'POST', diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_create_prebuilt_rules_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_create_prebuilt_rules_mutation.ts deleted file mode 100644 index 37001caf43b8c..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_create_prebuilt_rules_mutation.ts +++ /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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import type { UseMutationOptions } from '@tanstack/react-query'; -import { useMutation } from '@tanstack/react-query'; -import { PREBUILT_RULES_URL } from '../../../../../common/detection_engine/prebuilt_rules/api/urls'; -import type { CreatePrepackagedRulesResponse } from '../api'; -import { createPrepackagedRules } from '../api'; -import { useInvalidateFetchPrebuiltRulesStatusQuery } from './use_fetch_prebuilt_rules_status_query'; -import { useInvalidateFindRulesQuery } from './use_find_rules_query'; -import { useInvalidateFetchRuleManagementFiltersQuery } from './use_fetch_rule_management_filters_query'; -import { useInvalidateFetchRulesSnoozeSettingsQuery } from './use_fetch_rules_snooze_settings'; - -export const CREATE_PREBUILT_RULES_MUTATION_KEY = ['PUT', PREBUILT_RULES_URL]; - -export const useCreatePrebuiltRulesMutation = ( - options?: UseMutationOptions -) => { - const invalidateFindRulesQuery = useInvalidateFindRulesQuery(); - const invalidateFetchRulesSnoozeSettings = useInvalidateFetchRulesSnoozeSettingsQuery(); - const invalidatePrePackagedRulesStatus = useInvalidateFetchPrebuiltRulesStatusQuery(); - const invalidateFetchRuleManagementFilters = useInvalidateFetchRuleManagementFiltersQuery(); - - return useMutation(() => createPrepackagedRules(), { - ...options, - mutationKey: CREATE_PREBUILT_RULES_MUTATION_KEY, - onSettled: (...args) => { - // Always invalidate all rules and the prepackaged rules status cache as - // the number of rules might change after the installation - invalidatePrePackagedRulesStatus(); - invalidateFindRulesQuery(); - invalidateFetchRulesSnoozeSettings(); - invalidateFetchRuleManagementFilters(); - - if (options?.onSettled) { - options.onSettled(...args); - } - }, - }); -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_install_fleet_package_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_install_fleet_package_mutation.ts index 0e6927e1745dd..3ed308c860b3d 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_install_fleet_package_mutation.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_install_fleet_package_mutation.ts @@ -11,7 +11,7 @@ import { useMutation } from '@tanstack/react-query'; import { PREBUILT_RULES_PACKAGE_NAME } from '../../../../../common/detection_engine/constants'; import type { InstallFleetPackageProps } from '../api'; import { installFleetPackage } from '../api'; -import { useInvalidateFetchPrebuiltRulesStatusQuery } from './use_fetch_prebuilt_rules_status_query'; +import { useInvalidateFetchPrebuiltRulesStatusQuery } from './prebuilt_rules/use_fetch_prebuilt_rules_status_query'; export const INSTALL_FLEET_PACKAGE_MUTATION_KEY = [ 'POST', diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/translations.ts new file mode 100644 index 0000000000000..c2d7b5a671f01 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/translations.ts @@ -0,0 +1,72 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const FAILED_ALL_RULES_INSTALL = i18n.translate( + 'xpack.securitySolution.detectionEngine.prebuiltRules.toast.failedAllRulesInstall', + { + defaultMessage: 'Failed to install Elastic prebuilt rules', + } +); + +export const FAILED_SPECIFIC_RULES_INSTALL = i18n.translate( + 'xpack.securitySolution.detectionEngine.prebuiltRules.toast.failedSepecifcRulesInstall', + { + defaultMessage: 'Failed to install selected Elastic prebuilt rules', + } +); + +export const INSTALL_RULE_SUCCESS = (succeeded: number) => + i18n.translate('xpack.securitySolution.detectionEngine.prebuiltRules.toast.installRuleSuccess', { + defaultMessage: '{succeeded, plural, one {# rule} other {# rules}} installed successfully. ', + values: { succeeded }, + }); + +export const INSTALL_RULE_SKIPPED = (skipped: number) => + i18n.translate('xpack.securitySolution.detectionEngine.prebuiltRules.toast.installRuleSkipped', { + defaultMessage: '{skipped, plural, one {# rule} other {# rules}} skipped installation. ', + values: { skipped }, + }); + +export const INSTALL_RULE_FAILED = (failed: number) => + i18n.translate('xpack.securitySolution.detectionEngine.prebuiltRules.toast.installRuleFailed', { + defaultMessage: '{failed, plural, one {# rule} other {# rules}} failed installation. ', + values: { failed }, + }); + +export const FAILED_ALL_RULES_UPGRADE = i18n.translate( + 'xpack.securitySolution.detectionEngine.prebuiltRules.toast.failedAllRulesUpgrade', + { + defaultMessage: 'Failed to upgrade Elastic prebuilt rules', + } +); + +export const FAILED_SPECIFIC_RULES_UPGRADE = i18n.translate( + 'xpack.securitySolution.detectionEngine.prebuiltRules.toast.failedSpecificRulesUpgrade', + { + defaultMessage: 'Failed to upgrade selected Elastic prebuilt rules', + } +); + +export const UPGRADE_RULE_SUCCESS = (succeeded: number) => + i18n.translate('xpack.securitySolution.detectionEngine.prebuiltRules.toast.upgradeRuleSuccess', { + defaultMessage: '{succeeded, plural, one {# rule} other {# rules}} update successfully. ', + values: { succeeded }, + }); + +export const UPGRADE_RULE_SKIPPED = (skipped: number) => + i18n.translate('xpack.securitySolution.detectionEngine.prebuiltRules.toast.upgradeRuleSkipped', { + defaultMessage: '{skipped, plural, one {# rule} other {# rules}} skipped update. ', + values: { skipped }, + }); + +export const UPGRADE_RULE_FAILED = (failed: number) => + i18n.translate('xpack.securitySolution.detectionEngine.prebuiltRules.toast.upgradeRuleFailed', { + defaultMessage: '{failed, plural, one {# rule} other {# rules}} failed update. ', + values: { failed }, + }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_perform_rule_install.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_perform_rule_install.ts new file mode 100644 index 0000000000000..b3c05bc12037d --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_perform_rule_install.ts @@ -0,0 +1,61 @@ +/* + * 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 { useAppToasts } from '../../../../common/hooks/use_app_toasts'; +import { usePerformAllRulesInstallMutation } from '../../api/hooks/prebuilt_rules/use_perform_all_rules_install_mutation'; +import { usePerformSpecificRulesInstallMutation } from '../../api/hooks/prebuilt_rules/use_perform_specific_rules_install_mutation'; + +import * as i18n from './translations'; + +export const usePerformInstallAllRules = () => { + const { addError, addSuccess } = useAppToasts(); + + return usePerformAllRulesInstallMutation({ + onError: (err) => { + addError(err, { title: i18n.FAILED_ALL_RULES_INSTALL }); + }, + onSuccess: (result) => { + addSuccess(getSuccessToastMessage(result)); + }, + }); +}; + +export const usePerformInstallSpecificRules = () => { + const { addError, addSuccess } = useAppToasts(); + + return usePerformSpecificRulesInstallMutation({ + onError: (err) => { + addError(err, { title: i18n.FAILED_SPECIFIC_RULES_INSTALL }); + }, + onSuccess: (result) => { + addSuccess(getSuccessToastMessage(result)); + }, + }); +}; + +const getSuccessToastMessage = (result: { + summary: { + total: number; + succeeded: number; + skipped: number; + failed: number; + }; +}) => { + let toastMessage: string = ''; + const { + summary: { succeeded, skipped, failed }, + } = result; + if (succeeded > 0) { + toastMessage += i18n.INSTALL_RULE_SUCCESS(succeeded); + } + if (skipped > 0) { + toastMessage += i18n.INSTALL_RULE_SKIPPED(skipped); + } + if (failed > 0) { + toastMessage += i18n.INSTALL_RULE_FAILED(failed); + } + return toastMessage; +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_perform_rule_upgrade.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_perform_rule_upgrade.ts new file mode 100644 index 0000000000000..6703d738beb3a --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_perform_rule_upgrade.ts @@ -0,0 +1,61 @@ +/* + * 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 { useAppToasts } from '../../../../common/hooks/use_app_toasts'; +import { usePerformAllRulesUpgradeMutation } from '../../api/hooks/prebuilt_rules/use_perform_all_rules_upgrade_mutation'; +import { usePerformSpecificRulesUpgradeMutation } from '../../api/hooks/prebuilt_rules/use_perform_specific_rules_upgrade_mutation'; + +import * as i18n from './translations'; + +export const usePerformUpgradeAllRules = () => { + const { addError, addSuccess } = useAppToasts(); + + return usePerformAllRulesUpgradeMutation({ + onError: (err) => { + addError(err, { title: i18n.FAILED_ALL_RULES_UPGRADE }); + }, + onSuccess: (result) => { + addSuccess(getSuccessToastMessage(result)); + }, + }); +}; + +export const usePerformUpgradeSpecificRules = () => { + const { addError, addSuccess } = useAppToasts(); + + return usePerformSpecificRulesUpgradeMutation({ + onError: (err) => { + addError(err, { title: i18n.FAILED_SPECIFIC_RULES_UPGRADE }); + }, + onSuccess: (result) => { + addSuccess(getSuccessToastMessage(result)); + }, + }); +}; + +const getSuccessToastMessage = (result: { + summary: { + total: number; + succeeded: number; + skipped: number; + failed: number; + }; +}) => { + let toastMessage: string = ''; + const { + summary: { succeeded, skipped, failed }, + } = result; + if (succeeded > 0) { + toastMessage += i18n.UPGRADE_RULE_SUCCESS(succeeded); + } + if (skipped > 0) { + toastMessage += i18n.UPGRADE_RULE_SKIPPED(skipped); + } + if (failed > 0) { + toastMessage += i18n.UPGRADE_RULE_FAILED(failed); + } + return toastMessage; +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_install_review.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_install_review.ts new file mode 100644 index 0000000000000..c274a1ab2f386 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_install_review.ts @@ -0,0 +1,29 @@ +/* + * 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 type { UseQueryOptions } from '@tanstack/react-query'; +import type { ReviewRuleInstallationResponseBody } from '../../../../../common/detection_engine/prebuilt_rules/api/review_rule_installation/response_schema'; +import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; +import * as i18n from '../translations'; +import { useFetchPrebuiltRulesInstallReviewQuery } from '../../api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_install_review_query'; + +/** + * A wrapper around useQuery provides default values to the underlying query, + * like query key, abortion signal, and error handler. + * + * @returns useQuery result + */ +export const usePrebuiltRulesInstallReview = ( + options?: UseQueryOptions +) => { + const { addError } = useAppToasts(); + + return useFetchPrebuiltRulesInstallReviewQuery({ + onError: (error) => addError(error, { title: i18n.RULE_AND_TIMELINE_FETCH_FAILURE }), + ...options, + }); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_rules_status.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_status.ts similarity index 61% rename from x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_rules_status.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_status.ts index 889b670432d54..92dd17ca7bf44 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_rules_status.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_status.ts @@ -4,11 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { useAppToasts } from '../../../common/hooks/use_app_toasts'; -import { useFetchPrebuiltRulesStatusQuery } from '../api/hooks/use_fetch_prebuilt_rules_status_query'; -import * as i18n from './translations'; +import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; +import { useFetchPrebuiltRulesStatusQuery } from '../../api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_status_query'; +import * as i18n from '../translations'; -export const usePrePackagedRulesStatus = () => { +export const usePrebuiltRulesStatus = () => { const { addError } = useAppToasts(); return useFetchPrebuiltRulesStatusQuery({ diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_upgrade_review.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_upgrade_review.ts new file mode 100644 index 0000000000000..1ea85b8aff05e --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_upgrade_review.ts @@ -0,0 +1,29 @@ +/* + * 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 type { UseQueryOptions } from '@tanstack/react-query'; +import type { ReviewRuleUpgradeResponseBody } from '../../../../../common/detection_engine/prebuilt_rules/api/review_rule_upgrade/response_schema'; +import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; + +import * as i18n from '../translations'; +import { useFetchPrebuiltRulesUpgradeReviewQuery } from '../../api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_upgrade_review_query'; + +/** + * A wrapper around useQuery provides default values to the underlying query, + * like query key, abortion signal, and error handler. + * + * @returns useQuery result + */ +export const usePrebuiltRulesUpgradeReview = ( + options?: UseQueryOptions +) => { + const { addError } = useAppToasts(); + + return useFetchPrebuiltRulesUpgradeReviewQuery({ + onError: (error) => addError(error, { title: i18n.RULE_AND_TIMELINE_FETCH_FAILURE }), + ...options, + }); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_create_pre_packaged_rules.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_create_pre_packaged_rules.ts deleted file mode 100644 index c1de79159918f..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_create_pre_packaged_rules.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { useCallback } from 'react'; -import { useUserData } from '../../../detections/components/user_info'; -import { useInstallPrePackagedRules } from './use_install_pre_packaged_rules'; - -export const useCreatePrePackagedRules = () => { - const [{ isSignalIndexExists, isAuthenticated, hasEncryptionKey, canUserCRUD, hasIndexWrite }] = - useUserData(); - const { mutateAsync: installPrePackagedRules, isLoading } = useInstallPrePackagedRules(); - - const canCreatePrePackagedRules = - canUserCRUD && hasIndexWrite && isAuthenticated && hasEncryptionKey && isSignalIndexExists; - - const createPrePackagedRules = useCallback(async () => { - if (canCreatePrePackagedRules) { - await installPrePackagedRules(); - } - }, [canCreatePrePackagedRules, installPrePackagedRules]); - - return { - isLoading, - createPrePackagedRules, - canCreatePrePackagedRules, - }; -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_install_pre_packaged_rules.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_install_pre_packaged_rules.ts deleted file mode 100644 index b7fa307c0fedc..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_install_pre_packaged_rules.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { useIsMutating } from '@tanstack/react-query'; -import { useAppToasts } from '../../../common/hooks/use_app_toasts'; -import { - CREATE_PREBUILT_RULES_MUTATION_KEY, - useCreatePrebuiltRulesMutation, -} from '../api/hooks/use_create_prebuilt_rules_mutation'; -import * as i18n from './translations'; - -export const useInstallPrePackagedRules = () => { - const { addError, addSuccess } = useAppToasts(); - - return useCreatePrebuiltRulesMutation({ - onError: (err) => { - addError(err, { title: i18n.RULE_AND_TIMELINE_PREPACKAGED_FAILURE }); - }, - onSuccess: (result) => { - addSuccess(getSuccessToastMessage(result)); - }, - }); -}; - -export const useIsInstallingPrePackagedRules = () => { - const mutationsCount = useIsMutating(CREATE_PREBUILT_RULES_MUTATION_KEY); - return mutationsCount > 0; -}; - -const getSuccessToastMessage = (result: { - rules_installed: number; - rules_updated: number; - timelines_installed: number; - timelines_updated: number; -}) => { - const { - rules_installed: rulesInstalled, - rules_updated: rulesUpdated, - timelines_installed: timelinesInstalled, - timelines_updated: timelinesUpdated, - } = result; - if (rulesInstalled === 0 && (timelinesInstalled > 0 || timelinesUpdated > 0)) { - return i18n.TIMELINE_PREPACKAGED_SUCCESS; - } else if ((rulesInstalled > 0 || rulesUpdated > 0) && timelinesInstalled === 0) { - return i18n.RULE_PREPACKAGED_SUCCESS; - } else { - return i18n.RULE_AND_TIMELINE_PREPACKAGED_SUCCESS; - } -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_rules_installation_status.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_rules_installation_status.ts deleted file mode 100644 index d45109ee078ed..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_rules_installation_status.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { getPrePackagedRuleInstallationStatus } from '../../../detections/pages/detection_engine/rules/helpers'; -import { usePrePackagedRulesStatus } from './use_pre_packaged_rules_status'; - -export const usePrePackagedRulesInstallationStatus = () => { - const { data: prePackagedRulesStatus } = usePrePackagedRulesStatus(); - - return getPrePackagedRuleInstallationStatus( - prePackagedRulesStatus?.rules_installed, - prePackagedRulesStatus?.rules_not_installed, - prePackagedRulesStatus?.rules_not_updated - ); -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_timelines_installation_status.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_timelines_installation_status.ts deleted file mode 100644 index 61933d625ba18..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_pre_packaged_timelines_installation_status.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { getPrePackagedTimelineInstallationStatus } from '../../../detections/pages/detection_engine/rules/helpers'; -import { usePrePackagedRulesStatus } from './use_pre_packaged_rules_status'; - -export const usePrePackagedTimelinesInstallationStatus = () => { - const { data: prePackagedRulesStatus } = usePrePackagedRulesStatus(); - - return getPrePackagedTimelineInstallationStatus( - prePackagedRulesStatus?.timelines_installed, - prePackagedRulesStatus?.timelines_not_installed, - prePackagedRulesStatus?.timelines_not_updated - ); -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/auto_refresh_button/auto_refresh_button.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/auto_refresh_button/auto_refresh_button.test.tsx new file mode 100644 index 0000000000000..1505cc2fbe8ef --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/auto_refresh_button/auto_refresh_button.test.tsx @@ -0,0 +1,67 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { mount } from 'enzyme'; +import { fireEvent, render } from '@testing-library/react'; + +import { TestProviders } from '../../../../common/mock'; +import { AutoRefreshButton } from './auto_refresh_button'; + +describe('AutoRefreshButton', () => { + const reFetchRulesMock = jest.fn(); + const setIsRefreshOnMock = jest.fn(); + + afterEach(() => { + reFetchRulesMock.mockReset(); + setIsRefreshOnMock.mockReset(); + }); + + it('renders AutoRefreshButton as enabled', () => { + const wrapper = mount( + + + + ); + + expect(wrapper.find('[data-test-subj="autoRefreshButton"]').at(0).text()).toEqual('On'); + }); + + it.skip('invokes refetch when enabling auto refresh', () => { + const { container } = render( + + ); + + fireEvent( + container.querySelector('[data-test-subj="autoRefreshButton"]')!, + new MouseEvent('click', { + bubbles: true, + cancelable: true, + }) + ); + + fireEvent( + container.querySelector('[data-test-subj="refreshSettingsSwitch"]')!, + new MouseEvent('click', { + bubbles: true, + cancelable: true, + }) + ); + + expect(setIsRefreshOnMock).toHaveBeenCalledTimes(1); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/auto_refresh_button/auto_refresh_button.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/auto_refresh_button/auto_refresh_button.tsx new file mode 100644 index 0000000000000..83499efd323c8 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/auto_refresh_button/auto_refresh_button.tsx @@ -0,0 +1,117 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useCallback, useState } from 'react'; +import type { EuiSwitchEvent } from '@elastic/eui'; +import { + EuiButtonEmpty, + EuiContextMenuPanel, + EuiPopover, + EuiSpacer, + EuiSwitch, + EuiTextColor, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { css } from '@emotion/react'; +import * as i18n from '../../../../detections/pages/detection_engine/rules/translations'; + +export interface AutoRefreshButtonProps { + isRefreshOn: boolean; + isDisabled: boolean; + reFetchRules: () => {}; + setIsRefreshOn: React.Dispatch>; +} + +/** + * AutoRefreshButton - component for toggling auto-refresh setting. + * + * @param isRefreshOn whether or not auto refresh is enabled + * @param isDisabled whether or not component is in disabled state + * @param reFetchRules action for re-fetching rules + * @param setIsRefreshOn action for enabling/disabling refresh + */ +const AutoRefreshButtonComponent = ({ + isRefreshOn, + isDisabled, + reFetchRules, + setIsRefreshOn, +}: AutoRefreshButtonProps) => { + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + + const handleAutoRefreshSwitch = useCallback( + (closePopover: () => void) => (e: EuiSwitchEvent) => { + const refreshOn = e.target.checked; + if (refreshOn) { + reFetchRules(); + } + setIsRefreshOn(refreshOn); + closePopover(); + }, + [reFetchRules, setIsRefreshOn] + ); + + const handleGetRefreshSettingsPopoverContent = useCallback( + (closePopover: () => void) => ( + , + ...(isDisabled + ? [ +
+ + + + +
, + ] + : []), + ]} + /> + ), + [isRefreshOn, handleAutoRefreshSwitch, isDisabled] + ); + + return ( + setIsPopoverOpen(false)} + button={ + setIsPopoverOpen(!isPopoverOpen)} + disabled={isDisabled} + css={css` + margin-left: 10px; + `} + > + {isRefreshOn ? 'On' : 'Off'} + + } + > + {handleGetRefreshSettingsPopoverContent(() => setIsPopoverOpen(false))} + + ); +}; + +AutoRefreshButtonComponent.displayName = 'AutoRefreshButtonComponent'; + +export const AutoRefreshButton = React.memo(AutoRefreshButtonComponent); + +AutoRefreshButton.displayName = 'AutoRefreshButton'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/mini_callout.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/mini_callout.test.tsx new file mode 100644 index 0000000000000..1a6d8392d859a --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/mini_callout.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { render, fireEvent, screen } from '@testing-library/react'; +import type { MiniCalloutProps } from './mini_callout'; +import { MiniCallout } from './mini_callout'; + +describe('MiniCallout', () => { + const defaultProps: MiniCalloutProps = { + color: 'primary', + iconType: 'iInCircle', + title: 'Mini Callout Title', + }; + + it('renders the MiniCallout component with the provided title', () => { + render(); + + expect(screen.getByText(defaultProps.title as string)).toBeInTheDocument(); + }); + + it('renders the MiniCallout component with the provided iconType and color', () => { + const { container } = render(); + + const miniCallout = screen.getByTestId('mini-callout'); + const icon = container.querySelector('[data-euiicon-type="iInCircle"]'); + expect(icon).not.toBeNull(); + expect(miniCallout).toHaveAttribute( + 'class', + expect.stringContaining(defaultProps.color as string) + ); + }); + + it('renders the MiniCallout component with no icon if not provided', () => { + const { container } = render(); + + const icon = container.querySelector('[data-euiicon-type]'); + expect(icon).toBeNull(); + }); + + it('renders the dismiss link when dismissible is true', () => { + render(); + + expect(screen.getByText('Dismiss')).toBeInTheDocument(); + }); + + it('does not render the dismiss link when dismissible is false', () => { + render(); + + expect(screen.queryByText('Dismiss')).not.toBeInTheDocument(); + }); + + it('removes the MiniCallout component from the DOM when the dismiss link is clicked', () => { + render(); + + fireEvent.click(screen.getByText('Dismiss')); + + expect(screen.queryByText(defaultProps.title as string)).not.toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/mini_callout.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/mini_callout.tsx new file mode 100644 index 0000000000000..8b319d36c2809 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/mini_callout.tsx @@ -0,0 +1,107 @@ +/* + * 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 { + EuiCallOut, + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiLink, + EuiTextColor, + useEuiTheme, +} from '@elastic/eui'; +import type { ReactNode } from 'react'; +import React, { useState } from 'react'; +import type { IconType } from '@elastic/eui/src/components/icon'; +import type { Color } from '@elastic/eui/src/components/call_out/call_out'; +import { css } from '@emotion/react'; +import * as i18n from './translations'; + +export interface MiniCalloutProps { + color?: Color; + dismissible?: boolean; + iconType: IconType | undefined; + title: ReactNode | string; +} + +/** + * A customized mini variant of the EuiCallOut component. Includes additional styling overrides + * for displaying rich titles when callout size="s", and an option enabling dismissal. + * + * @param color color for the callout, defaults to 'primary' + * @param dismissible whether the callout can be dismissed, defaults to 'true' + * @param iconType icon for the callout + * @param title ReactNode or string title text to be displayed + * + * @constructor + */ +const MiniCalloutComponent: React.FC = ({ + color = 'primary', + dismissible = true, + iconType, + title, +}: MiniCalloutProps) => { + const { euiTheme } = useEuiTheme(); + const [isDismissed, setIsDismissed] = useState(false); + + if (isDismissed) { + return null; + } + + const calloutTitle = ( +
+ + + + + {title} + + + + {dismissible && ( + + setIsDismissed(true)} + > + {i18n.DISMISS} + + + )} + +
+ ); + + return ( + +
+ {iconType && } + {calloutTitle} +
+
+ ); +}; + +export const MiniCallout = React.memo(MiniCalloutComponent); +MiniCallout.displayName = 'MiniCallout'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/translations.tsx new file mode 100644 index 0000000000000..4d6a26042696c --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/mini_callout/translations.tsx @@ -0,0 +1,51 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { EuiLink } from '@elastic/eui'; +import { css } from '@emotion/css'; +import React from 'react'; + +export const DISMISS = i18n.translate('xpack.securitySolution.detectionEngine.rules.dismissTitle', { + defaultMessage: 'Dismiss', +}); + +export const NEW_PREBUILT_RULES_AVAILABLE_CALLOUT_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.newPrebuiltRulesCalloutTitle', + { + defaultMessage: + 'New Elastic rules are available to be installed. Click on the “Add Elastic Rules” button to Review and install.', + } +); + +export const RULE_UPDATES_LINK = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.ruleUpdatesLinkTitle', + { + defaultMessage: 'Rule Updates', + } +); + +type OnClick = () => void; +export const getUpdateRulesCalloutTitle = (onClick: OnClick) => ( + + {RULE_UPDATES_LINK} + + ), + }} + /> +); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/ml_rule_warning_popover/ml_rule_warning_popover.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/ml_rule_warning_popover/ml_rule_warning_popover.tsx new file mode 100644 index 0000000000000..8c4e9775c35e5 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/ml_rule_warning_popover/ml_rule_warning_popover.tsx @@ -0,0 +1,102 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { + EuiPopover, + EuiText, + EuiPopoverTitle, + EuiSpacer, + EuiPopoverFooter, + EuiButtonIcon, +} from '@elastic/eui'; + +import { RuleExecutionStatus } from '../../../../../common/detection_engine/rule_monitoring'; +import type { SecurityJob } from '../../../../common/components/ml_popover/types'; +import * as i18n from '../rules_table/translations'; + +import { useBoolState } from '../../../../common/hooks/use_bool_state'; +import { getRuleDetailsTabUrl } from '../../../../common/components/link_to/redirect_to_detection_engine'; +import { SecurityPageName } from '../../../../../common/constants'; +import { SecuritySolutionLinkButton } from '../../../../common/components/links'; +import { isMlRule } from '../../../../../common/detection_engine/utils'; +import { getCapitalizedStatusText } from '../../../../detections/components/rules/rule_execution_status/utils'; +import type { Rule } from '../../../rule_management/logic'; +import { isJobStarted } from '../../../../../common/machine_learning/helpers'; +import { RuleDetailTabs } from '../../../rule_details_ui/pages/rule_details'; + +const POPOVER_WIDTH = '340px'; + +export interface MlRuleWarningPopoverComponentProps { + rule: Rule; + loadingJobs: boolean; + jobs: SecurityJob[]; +} + +const MlRuleWarningPopoverComponent: React.FC = ({ + rule, + loadingJobs, + jobs, +}) => { + const [isPopoverOpen, , closePopover, togglePopover] = useBoolState(); + + if (!isMlRule(rule.type) || loadingJobs || !rule.machine_learning_job_id) { + return null; + } + + const jobIds = rule.machine_learning_job_id; + const notRunningJobs = jobs.filter( + (job) => jobIds.includes(job.id) && !isJobStarted(job.jobState, job.datafeedState) + ); + if (!notRunningJobs.length) { + return null; + } + + const button = ( + + ); + const popoverTitle = getCapitalizedStatusText(RuleExecutionStatus['partial failure']); + + return ( + + {popoverTitle} +
+ +

{i18n.ML_RULE_JOBS_WARNING_DESCRIPTION}

+
+
+ + {notRunningJobs.map((job) => ( + {job.customSettings?.security_app_display_name ?? job.id} + ))} + + + {i18n.ML_RULE_JOBS_WARNING_BUTTON_LABEL} + + +
+ ); +}; + +export const MlRuleWarningPopover = React.memo(MlRuleWarningPopoverComponent); + +MlRuleWarningPopover.displayName = 'MlRuleWarningPopover'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_header_buttons.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_header_buttons.tsx new file mode 100644 index 0000000000000..ec9eb2f3fb2a9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_header_buttons.tsx @@ -0,0 +1,49 @@ +/* + * 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 { EuiButton, EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; +import React from 'react'; +import { useAddPrebuiltRulesTableContext } from './add_prebuilt_rules_table_context'; +import * as i18n from './translations'; + +export const AddPrebuiltRulesHeaderButtons = () => { + const { + state: { rules, selectedRules, loadingRules }, + actions: { installAllRules, installSelectedRules }, + } = useAddPrebuiltRulesTableContext(); + + const isRulesAvailableForInstall = rules.length > 0; + const numberOfSelectedRules = selectedRules.length ?? 0; + const shouldDisplayInstallSelectedRulesButton = numberOfSelectedRules > 0; + + const isRuleInstalling = loadingRules.length > 0; + + return ( + + {shouldDisplayInstallSelectedRulesButton ? ( + + + {i18n.INSTALL_SELECTED_RULES(numberOfSelectedRules)} + {isRuleInstalling ? : undefined} + + + ) : null} + + + {i18n.INSTALL_ALL} + {isRuleInstalling ? : undefined} + + + + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table.tsx new file mode 100644 index 0000000000000..159e76e822911 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table.tsx @@ -0,0 +1,116 @@ +/* + * 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 { + EuiEmptyPrompt, + EuiInMemoryTable, + EuiSkeletonLoading, + EuiProgress, + EuiSkeletonTitle, + EuiSkeletonText, +} from '@elastic/eui'; +import React from 'react'; + +import * as i18n from '../../../../../detections/pages/detection_engine/rules/translations'; +import { useIsUpgradingSecurityPackages } from '../../../../rule_management/logic/use_upgrade_security_packages'; +import { RULES_TABLE_INITIAL_PAGE_SIZE, RULES_TABLE_PAGE_SIZE_OPTIONS } from '../constants'; +import { useAddPrebuiltRulesTableContext } from './add_prebuilt_rules_table_context'; +import { useAddPrebuiltRulesTableColumns } from './use_add_prebuilt_rules_table_columns'; + +const NO_ITEMS_MESSAGE = ( + {i18n.NO_RULES_AVAILABLE_FOR_INSTALL}} + titleSize="s" + body={i18n.NO_RULES_AVAILABLE_FOR_INSTALL_BODY} + /> +); + +/** + * Table Component for displaying new rules that are available to be installed + */ +export const AddPrebuiltRulesTable = React.memo(() => { + const isUpgradingSecurityPackages = useIsUpgradingSecurityPackages(); + + const addRulesTableContext = useAddPrebuiltRulesTableContext(); + + const { + state: { rules, tags, isFetched, isLoading, isRefetching, selectedRules }, + actions: { selectRules }, + } = addRulesTableContext; + const rulesColumns = useAddPrebuiltRulesTableColumns(); + + const isTableEmpty = isFetched && rules.length === 0; + + const shouldShowLinearProgress = (isFetched && isRefetching) || isUpgradingSecurityPackages; + const shouldShowLoadingOverlay = !isFetched && isRefetching; + + return ( + <> + {shouldShowLinearProgress && ( + + )} + + + + + } + loadedContent={ + isTableEmpty ? ( + NO_ITEMS_MESSAGE + ) : ( + ({ + value: tag, + name: tag, + field: 'tags', + })), + }, + ], + }} + pagination={{ + initialPageSize: RULES_TABLE_INITIAL_PAGE_SIZE, + pageSizeOptions: RULES_TABLE_PAGE_SIZE_OPTIONS, + }} + isSelectable + selection={{ + selectable: () => true, + onSelectionChange: selectRules, + initialSelected: selectedRules, + }} + itemId="rule_id" + data-test-subj="add-prebuilt-rules-table" + columns={rulesColumns} + /> + ) + } + /> + + ); +}); + +AddPrebuiltRulesTable.displayName = 'AddPrebuiltRulesTable'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table_context.tsx new file mode 100644 index 0000000000000..b3aceacc4b1b9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table_context.tsx @@ -0,0 +1,184 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { createContext, useCallback, useContext, useMemo, useState } from 'react'; +import type { RuleInstallationInfoForReview } from '../../../../../../common/detection_engine/prebuilt_rules/api/review_rule_installation/response_schema'; +import type { RuleSignatureId } from '../../../../../../common/detection_engine/rule_schema'; +import { invariant } from '../../../../../../common/utils/invariant'; +import { + usePerformInstallAllRules, + usePerformInstallSpecificRules, +} from '../../../../rule_management/logic/prebuilt_rules/use_perform_rule_install'; +import { usePrebuiltRulesInstallReview } from '../../../../rule_management/logic/prebuilt_rules/use_prebuilt_rules_install_review'; + +export interface AddPrebuiltRulesTableState { + /** + * Rules available to be installed + */ + rules: RuleInstallationInfoForReview[]; + /** + * All unique tags for all rules + */ + tags: string[]; + /** + * Is true then there is no cached data and the query is currently fetching. + */ + isLoading: boolean; + /** + * Will be true if the query has been fetched. + */ + isFetched: boolean; + /** + * Is true whenever a background refetch is in-flight, which does not include initial loading + */ + isRefetching: boolean; + /** + * List of rule IDs that are currently being upgraded + */ + loadingRules: RuleSignatureId[]; + /** + * The timestamp for when the rules were successfully fetched + */ + lastUpdated: number; + /** + * Rule rows selected in EUI InMemory Table + */ + selectedRules: RuleInstallationInfoForReview[]; +} + +export interface AddPrebuiltRulesTableActions { + reFetchRules: () => void; + installOneRule: (ruleId: RuleSignatureId) => void; + installAllRules: () => void; + installSelectedRules: () => void; + selectRules: (rules: RuleInstallationInfoForReview[]) => void; +} + +export interface AddPrebuiltRulesContextType { + state: AddPrebuiltRulesTableState; + actions: AddPrebuiltRulesTableActions; +} + +const AddPrebuiltRulesTableContext = createContext(null); + +interface AddPrebuiltRulesTableContextProviderProps { + children: React.ReactNode; +} + +export const AddPrebuiltRulesTableContextProvider = ({ + children, +}: AddPrebuiltRulesTableContextProviderProps) => { + const [loadingRules, setLoadingRules] = useState([]); + const [selectedRules, setSelectedRules] = useState([]); + + const { + data: { rules, stats: { tags } } = { + rules: [], + stats: { tags: [] }, + }, + refetch, + dataUpdatedAt, + isFetched, + isLoading, + isRefetching, + } = usePrebuiltRulesInstallReview({ + refetchInterval: 60000, // Refetch available rules for installation every minute + keepPreviousData: true, // Use this option so that the state doesn't jump between "success" and "loading" on page change + }); + + const { mutateAsync: installAllRulesRequest } = usePerformInstallAllRules(); + const { mutateAsync: installSpecificRulesRequest } = usePerformInstallSpecificRules(); + + const installOneRule = useCallback( + async (ruleId: RuleSignatureId) => { + const rule = rules.find((r) => r.rule_id === ruleId); + invariant(rule, `Rule with id ${ruleId} not found`); + + setLoadingRules((prev) => [...prev, ruleId]); + await installSpecificRulesRequest([ + { + rule_id: ruleId, + version: rule.version, + }, + ]); + setLoadingRules((prev) => prev.filter((id) => id !== ruleId)); + }, + [installSpecificRulesRequest, rules] + ); + + const installSelectedRules = useCallback(async () => { + const rulesToUpgrade = selectedRules.map((rule) => ({ + rule_id: rule.rule_id, + version: rule.version, + })); + setLoadingRules((prev) => [...prev, ...rulesToUpgrade.map((r) => r.rule_id)]); + await installSpecificRulesRequest(rulesToUpgrade); + setLoadingRules((prev) => prev.filter((id) => !rulesToUpgrade.some((r) => r.rule_id === id))); + setSelectedRules([]); + }, [installSpecificRulesRequest, selectedRules]); + + const installAllRules = useCallback(async () => { + // Unselect all rules so that the table doesn't show the "bulk actions" bar + setLoadingRules((prev) => [...prev, ...rules.map((r) => r.rule_id)]); + await installAllRulesRequest(); + setLoadingRules((prev) => prev.filter((id) => !rules.some((r) => r.rule_id === id))); + setSelectedRules([]); + }, [installAllRulesRequest, rules]); + + const actions = useMemo( + () => ({ + installAllRules, + installOneRule, + installSelectedRules, + reFetchRules: refetch, + selectRules: setSelectedRules, + }), + [installAllRules, installOneRule, installSelectedRules, refetch] + ); + + const providerValue = useMemo(() => { + return { + state: { + rules, + tags, + isFetched, + isLoading, + loadingRules, + isRefetching, + selectedRules, + lastUpdated: dataUpdatedAt, + }, + actions, + }; + }, [ + rules, + tags, + isFetched, + isLoading, + loadingRules, + isRefetching, + selectedRules, + dataUpdatedAt, + actions, + ]); + + return ( + + {children} + + ); +}; + +export const useAddPrebuiltRulesTableContext = (): AddPrebuiltRulesContextType => { + const rulesTableContext = useContext(AddPrebuiltRulesTableContext); + invariant( + rulesTableContext, + 'useAddPrebuiltRulesTableContext should be used inside AddPrebuiltRulesTableContextProvider' + ); + + return rulesTableContext; +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/translations.ts new file mode 100644 index 0000000000000..72cac13e5494d --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/translations.ts @@ -0,0 +1,25 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const INSTALL_ALL = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.addRules.installAllButtonTitle', + { + defaultMessage: 'Install all', + } +); + +export const INSTALL_SELECTED_RULES = (numberOfSelectedRules: number) => { + return i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.addRules.installSelectedRules', + { + defaultMessage: 'Install {numberOfSelectedRules} selected rule(s)', + values: { numberOfSelectedRules }, + } + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx new file mode 100644 index 0000000000000..234350129986c --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx @@ -0,0 +1,141 @@ +/* + * 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 type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiButtonEmpty, EuiBadge, EuiText, EuiLoadingSpinner } from '@elastic/eui'; +import React, { useMemo } from 'react'; +import { SHOW_RELATED_INTEGRATIONS_SETTING } from '../../../../../../common/constants'; +import { PopoverItems } from '../../../../../common/components/popover_items'; +import { useUiSetting$ } from '../../../../../common/lib/kibana'; +import { IntegrationsPopover } from '../../../../../detections/components/rules/related_integrations/integrations_popover'; +import { SeverityBadge } from '../../../../../detections/components/rules/severity_badge'; +import * as i18n from '../../../../../detections/pages/detection_engine/rules/translations'; +import type { Rule } from '../../../../rule_management/logic'; +import type { RuleInstallationInfoForReview } from '../../../../../../common/detection_engine/prebuilt_rules/api/review_rule_installation/response_schema'; +import { useUserData } from '../../../../../detections/components/user_info'; +import { hasUserCRUDPermission } from '../../../../../common/utils/privileges'; +import type { AddPrebuiltRulesTableActions } from './add_prebuilt_rules_table_context'; +import { useAddPrebuiltRulesTableContext } from './add_prebuilt_rules_table_context'; +import type { RuleSignatureId } from '../../../../../../common/detection_engine/rule_schema'; + +export type TableColumn = EuiBasicTableColumn; + +export const RULE_NAME_COLUMN: TableColumn = { + field: 'name', + name: i18n.COLUMN_RULE, + render: (value: RuleInstallationInfoForReview['name']) => ( + + {value} + + ), + sortable: true, + truncateText: true, + width: '40%', + align: 'left', +}; + +const TAGS_COLUMN: TableColumn = { + field: 'tags', + name: null, + align: 'center', + render: (tags: RuleInstallationInfoForReview['tags']) => { + if (tags == null || tags.length === 0) { + return null; + } + + const renderItem = (tag: string, i: number) => ( + + {tag} + + ); + return ( + + ); + }, + width: '65px', + truncateText: true, +}; + +const INTEGRATIONS_COLUMN: TableColumn = { + field: 'related_integrations', + name: null, + align: 'center', + render: (integrations: RuleInstallationInfoForReview['related_integrations']) => { + if (integrations == null || integrations.length === 0) { + return null; + } + + return ; + }, + width: '143px', + truncateText: true, +}; + +const createInstallButtonColumn = ( + installOneRule: AddPrebuiltRulesTableActions['installOneRule'], + loadingRules: RuleSignatureId[] +): TableColumn => ({ + field: 'rule_id', + name: '', + render: (ruleId: RuleSignatureId) => { + const isRuleInstalling = loadingRules.includes(ruleId); + return ( + installOneRule(ruleId)}> + {isRuleInstalling ? : i18n.INSTALL_RULE_BUTTON} + + ); + }, + width: '10%', + align: 'center', +}); + +export const useAddPrebuiltRulesTableColumns = (): TableColumn[] => { + const [{ canUserCRUD }] = useUserData(); + const hasCRUDPermissions = hasUserCRUDPermission(canUserCRUD); + const [showRelatedIntegrations] = useUiSetting$(SHOW_RELATED_INTEGRATIONS_SETTING); + const { + state: { loadingRules }, + actions: { installOneRule }, + } = useAddPrebuiltRulesTableContext(); + + return useMemo( + () => [ + RULE_NAME_COLUMN, + ...(showRelatedIntegrations ? [INTEGRATIONS_COLUMN] : []), + TAGS_COLUMN, + { + field: 'risk_score', + name: i18n.COLUMN_RISK_SCORE, + render: (value: Rule['risk_score']) => ( + + {value} + + ), + sortable: true, + truncateText: true, + width: '85px', + }, + { + field: 'severity', + name: i18n.COLUMN_SEVERITY, + render: (value: Rule['severity']) => , + sortable: true, + truncateText: true, + width: '12%', + }, + ...(hasCRUDPermissions ? [createInstallButtonColumn(installOneRule, loadingRules)] : []), + ], + [hasCRUDPermissions, installOneRule, loadingRules, showRelatedIntegrations] + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/constants.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/constants.ts index d5a8db24b14e8..b65ba5f111c0e 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/constants.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/constants.ts @@ -7,5 +7,6 @@ import { RULES_TABLE_MAX_PAGE_SIZE } from '../../../../../common/constants'; +export const RULES_TABLE_INITIAL_PAGE_SIZE = 20; export const RULES_TABLE_PAGE_SIZE_OPTIONS = [5, 10, 20, 50, RULES_TABLE_MAX_PAGE_SIZE]; export const RULES_TABLE_STATE_STORAGE_KEY = 'securitySolution.rulesTable'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/index.tsx index 58ba3c2f96a5c..6a127faacdac6 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/index.tsx @@ -11,8 +11,9 @@ import { useRouteSpy } from '../../../../common/utils/route/use_route_spy'; import { RulesManagementTour } from './rules_table/guided_onboarding/rules_management_tour'; import { useSyncRulesTableSavedState } from './rules_table/use_sync_rules_table_saved_state'; import { RulesTables } from './rules_tables'; -import type { AllRulesTabs } from './rules_table_toolbar'; -import { RulesTableToolbar } from './rules_table_toolbar'; +import { AllRulesTabs, RulesTableToolbar } from './rules_table_toolbar'; +import { UpgradePrebuiltRulesTable } from './upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table'; +import { UpgradePrebuiltRulesTableContextProvider } from './upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context'; /** * Table Component for displaying all Rules for a given cluster. Provides the ability to filter @@ -26,14 +27,26 @@ export const AllRules = React.memo(() => { useSyncRulesTableSavedState(); const [{ tabName }] = useRouteSpy(); - return ( - <> - - - - - - ); + if (tabName !== AllRulesTabs.updates) { + return ( + <> + + + + + + ); + } else { + return ( + <> + + + + + + + ); + } }); AllRules.displayName = 'AllRules'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_context.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_context.test.tsx index ad9ea30ed9f4d..64d82b50c9e84 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_context.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_context.test.tsx @@ -25,6 +25,7 @@ import { useRulesTableSavedState } from './use_rules_table_saved_state'; jest.mock('../../../../../common/lib/kibana'); jest.mock('../../../../rule_management/logic/use_find_rules'); +jest.mock('../../../../rule_management/logic/prebuilt_rules/use_prebuilt_rules_install_review'); jest.mock('../../../../rule_management/api/hooks/use_fetch_rules_snooze_settings'); jest.mock('./use_rules_table_saved_state'); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_context.tsx index 0c5550a8c66dc..37b554e02a906 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_context.tsx @@ -39,7 +39,7 @@ import { import { RuleSource } from './rules_table_saved_state'; import { useRulesTableSavedState } from './use_rules_table_saved_state'; -interface RulesSnoozeSettingsState { +interface RulesSnoozeSettings { /** * A map object using rule SO's id (not ruleId) as keys and snooze settings as values */ @@ -127,7 +127,7 @@ export interface RulesTableState { /** * Rules snooze settings for the current rules */ - rulesSnoozeSettings: RulesSnoozeSettingsState; + rulesSnoozeSettings: RulesSnoozeSettings; } export type LoadingRuleAction = @@ -346,8 +346,8 @@ export const RulesTableContextProvider = ({ children }: RulesTableContextProvide ] ); - const providerValue = useMemo( - () => ({ + const providerValue = useMemo(() => { + return { state: { rules, rulesSnoozeSettings: { @@ -382,33 +382,32 @@ export const RulesTableContextProvider = ({ children }: RulesTableContextProvide }), }, actions, - }), - [ - rules, - rulesSnoozeSettingsMap, - isSnoozeSettingsLoading, - isSnoozeSettingsFetching, - isSnoozeSettingsFetchError, - page, - perPage, - total, - filterOptions, - isPreflightInProgress, - isActionInProgress, - isAllSelected, - isFetched, - isFetching, - isLoading, - isRefetching, - isRefreshOn, - dataUpdatedAt, - loadingRules.ids, - loadingRules.action, - selectedRuleIds, - sortingOptions, - actions, - ] - ); + }; + }, [ + rules, + rulesSnoozeSettingsMap, + isSnoozeSettingsLoading, + isSnoozeSettingsFetching, + isSnoozeSettingsFetchError, + page, + perPage, + total, + filterOptions, + isPreflightInProgress, + isActionInProgress, + isAllSelected, + isFetched, + isFetching, + isLoading, + isRefetching, + isRefreshOn, + dataUpdatedAt, + loadingRules.ids, + loadingRules.action, + selectedRuleIds, + sortingOptions, + actions, + ]); return {children}; }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx index bacdced332c58..b8b3b165a2ca6 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx @@ -7,30 +7,61 @@ import React, { useMemo } from 'react'; import { TabNavigation } from '../../../../common/components/navigation/tab_navigation'; -import * as i18n from '../../../../detections/pages/detection_engine/rules/translations'; +import * as i18n from './translations'; +import { useRulesTableContext } from './rules_table/rules_table_context'; +import { usePrebuiltRulesStatus } from '../../../rule_management/logic/prebuilt_rules/use_prebuilt_rules_status'; export enum AllRulesTabs { management = 'management', monitoring = 'monitoring', + updates = 'updates', } export const RulesTableToolbar = React.memo(() => { + const { + state: { + pagination: { total: installedTotal }, + }, + } = useRulesTableContext(); + + const { data: prebuiltRulesStatus } = usePrebuiltRulesStatus(); + + const updateTotal = prebuiltRulesStatus?.num_prebuilt_rules_to_upgrade ?? 0; + const ruleTabs = useMemo( () => ({ [AllRulesTabs.management]: { id: AllRulesTabs.management, - name: i18n.RULES_TAB, + name: i18n.INSTALLED_RULES_TAB, disabled: false, href: `/rules/${AllRulesTabs.management}`, + isBeta: installedTotal > 0, + betaOptions: { + text: `${installedTotal}`, + }, }, [AllRulesTabs.monitoring]: { id: AllRulesTabs.monitoring, - name: i18n.MONITORING_TAB, + name: i18n.RULE_MONITORING_TAB, disabled: false, href: `/rules/${AllRulesTabs.monitoring}`, + isBeta: installedTotal > 0, + betaOptions: { + text: `${installedTotal}`, + }, + }, + [AllRulesTabs.updates]: { + id: AllRulesTabs.updates, + name: i18n.RULE_UPDATES_TAB, + disabled: false, + href: `/rules/${AllRulesTabs.updates}`, + isBeta: updateTotal > 0, + betaOptions: { + text: `${updateTotal}`, + }, }, }), - [] + [installedTotal, updateTotal] ); return ; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx index ca4d0241e508f..bae55018ec778 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx @@ -5,13 +5,7 @@ * 2.0. */ -import { - EuiBasicTable, - EuiConfirmModal, - EuiEmptyPrompt, - EuiSkeletonText, - EuiProgress, -} from '@elastic/eui'; +import { EuiBasicTable, EuiConfirmModal, EuiEmptyPrompt, EuiProgress } from '@elastic/eui'; import React, { useCallback, useMemo, useRef } from 'react'; import { Loader } from '../../../../common/components/loader'; import { useBoolState } from '../../../../common/hooks/use_bool_state'; @@ -30,7 +24,7 @@ import { useRulesTableContext } from './rules_table/rules_table_context'; import { useAsyncConfirmation } from './rules_table/use_async_confirmation'; import { RulesTableFilters } from './rules_table_filters/rules_table_filters'; import { AllRulesTabs } from './rules_table_toolbar'; -import { RulesTableUtilityBar } from './rules_table_utility_bar'; +import { RulesTableUtilityBar } from '../rules_table_utility_bar/rules_table_utility_bar'; import { useMonitoringColumns, useRulesColumns } from './use_columns'; import { useUserData } from '../../../../detections/components/user_info'; import { hasUserCRUDPermission } from '../../../../common/utils/privileges'; @@ -131,15 +125,14 @@ export const RulesTables = React.memo(({ selectedTab }) => { executeBulkActionsDryRun, }); - const paginationMemo = useMemo( - () => ({ + const paginationMemo = useMemo(() => { + return { pageIndex: pagination.page - 1, pageSize: pagination.perPage, totalItemCount: pagination.total, pageSizeOptions: RULES_TABLE_PAGE_SIZE_OPTIONS, - }), - [pagination] - ); + }; + }, [pagination.page, pagination.perPage, pagination.total]); const tableOnChangeCallback = useCallback( ({ page, sort }: EuiBasicTableOnChange) => { @@ -179,6 +172,10 @@ export const RulesTables = React.memo(({ selectedTab }) => { } }, selectedRuleIds); + const isTableSelectable = + hasPermissions && + (selectedTab === AllRulesTabs.management || selectedTab === AllRulesTabs.monitoring); + const euiBasicTableSelectionProps = useMemo( () => ({ selectable: (item: Rule) => !loadingRuleIds.includes(item.id), @@ -221,13 +218,27 @@ export const RulesTables = React.memo(({ selectedTab }) => { const shouldShowRulesTable = !isLoading && !isTableEmpty; - const tableProps = - selectedTab === AllRulesTabs.management - ? { - 'data-test-subj': 'rules-management-table', - columns: rulesColumns, - } - : { 'data-test-subj': 'rules-monitoring-table', columns: monitoringColumns }; + let tableProps; + switch (selectedTab) { + case AllRulesTabs.management: + tableProps = { + 'data-test-subj': 'rules-management-table', + columns: rulesColumns, + }; + break; + case AllRulesTabs.monitoring: + tableProps = { + 'data-test-subj': 'rules-monitoring-table', + columns: monitoringColumns, + }; + break; + default: + tableProps = { + 'data-test-subj': 'rules-management-table', + columns: rulesColumns, + }; + break; + } const shouldShowLinearProgress = (isFetched && isRefetching) || isUpgradingSecurityPackages; const shouldShowLoadingOverlay = (!isFetched && isRefetching) || isPreflightInProgress; @@ -247,9 +258,6 @@ export const RulesTables = React.memo(({ selectedTab }) => { )} {isTableEmpty && } - {isLoading && ( - - )} {isDeleteConfirmationVisible && ( (({ selectedTab }) => { 0 ? numberOfSelectedRules : 1} + rulesCount={numberOfSelectedRules} /> )} {isBulkEditFlyoutVisible && bulkEditActionType !== undefined && ( @@ -299,12 +307,12 @@ export const RulesTables = React.memo(({ selectedTab }) => { { + return i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.upgradeRules.upgradeSelected', + { + defaultMessage: 'Update {numberOfSelectedRules} selected rule(s)', + values: { numberOfSelectedRules }, + } + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table.tsx new file mode 100644 index 0000000000000..7a8b79037a06f --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table.tsx @@ -0,0 +1,117 @@ +/* + * 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 { + EuiEmptyPrompt, + EuiInMemoryTable, + EuiProgress, + EuiSkeletonLoading, + EuiSkeletonText, + EuiSkeletonTitle, +} from '@elastic/eui'; +import React from 'react'; +import * as i18n from '../../../../../detections/pages/detection_engine/rules/translations'; +import { useIsUpgradingSecurityPackages } from '../../../../rule_management/logic/use_upgrade_security_packages'; +import { RULES_TABLE_INITIAL_PAGE_SIZE, RULES_TABLE_PAGE_SIZE_OPTIONS } from '../constants'; +import { UpgradePrebuiltRulesTableButtons } from './upgrade_prebuilt_rules_table_buttons'; +import { useUpgradePrebuiltRulesTableContext } from './upgrade_prebuilt_rules_table_context'; +import { useUpgradePrebuiltRulesTableColumns } from './use_upgrade_prebuilt_rules_table_columns'; + +const NO_ITEMS_MESSAGE = ( + {i18n.NO_RULES_AVAILABLE_FOR_UPGRADE}} + titleSize="s" + body={i18n.NO_RULES_AVAILABLE_FOR_UPGRADE_BODY} + /> +); + +/** + * Table Component for displaying rules that have available updates + */ +export const UpgradePrebuiltRulesTable = React.memo(() => { + const isUpgradingSecurityPackages = useIsUpgradingSecurityPackages(); + + const upgradeRulesTableContext = useUpgradePrebuiltRulesTableContext(); + + const { + state: { rules, tags, isFetched, isLoading, isRefetching, selectedRules }, + actions: { selectRules }, + } = upgradeRulesTableContext; + const rulesColumns = useUpgradePrebuiltRulesTableColumns(); + + const isTableEmpty = isFetched && rules.length === 0; + + const shouldShowLinearProgress = (isFetched && isRefetching) || isUpgradingSecurityPackages; + const shouldShowLoadingOverlay = !isFetched && isRefetching; + + return ( + <> + {shouldShowLinearProgress && ( + + )} + + + + + } + loadedContent={ + isTableEmpty ? ( + NO_ITEMS_MESSAGE + ) : ( + ], + filters: [ + { + type: 'field_value_selection', + field: 'rule.tags', + name: 'Tags', + multiSelect: true, + options: tags.map((tag) => ({ + value: tag, + name: tag, + field: 'rule.tags', + })), + }, + ], + }} + pagination={{ + initialPageSize: RULES_TABLE_INITIAL_PAGE_SIZE, + pageSizeOptions: RULES_TABLE_PAGE_SIZE_OPTIONS, + }} + isSelectable + selection={{ + selectable: () => true, + onSelectionChange: selectRules, + initialSelected: selectedRules, + }} + itemId="rule_id" + data-test-subj="rules-upgrades-table" + columns={rulesColumns} + /> + ) + } + /> + + ); +}); + +UpgradePrebuiltRulesTable.displayName = 'UpgradePrebuiltRulesTable'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_buttons.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_buttons.tsx new file mode 100644 index 0000000000000..640fb5a74f9cf --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_buttons.tsx @@ -0,0 +1,50 @@ +/* + * 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 { EuiButton, EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; +import React from 'react'; +import * as i18n from './translations'; +import { useUpgradePrebuiltRulesTableContext } from './upgrade_prebuilt_rules_table_context'; + +export const UpgradePrebuiltRulesTableButtons = () => { + const { + state: { rules, selectedRules, loadingRules }, + actions: { upgradeAllRules, upgradeSelectedRules }, + } = useUpgradePrebuiltRulesTableContext(); + + const isRulesAvailableForUpgrade = rules.length > 0; + const numberOfSelectedRules = selectedRules.length ?? 0; + const shouldDisplayUpgradeSelectedRulesButton = numberOfSelectedRules > 0; + + const isRuleUpgrading = loadingRules.length > 0; + + return ( + + {shouldDisplayUpgradeSelectedRulesButton ? ( + + + <> + {i18n.UPDATE_SELECTED_RULES(numberOfSelectedRules)} + {isRuleUpgrading ? : undefined} + + + + ) : null} + + + {i18n.UPDATE_ALL} + {isRuleUpgrading ? : undefined} + + + + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx new file mode 100644 index 0000000000000..319b9b47e4c54 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx @@ -0,0 +1,190 @@ +/* + * 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 { isEqual } from 'lodash'; +import React, { createContext, useCallback, useContext, useMemo, useState } from 'react'; +import type { RuleUpgradeInfoForReview } from '../../../../../../common/detection_engine/prebuilt_rules/api/review_rule_upgrade/response_schema'; +import type { RuleSignatureId } from '../../../../../../common/detection_engine/rule_schema'; +import { invariant } from '../../../../../../common/utils/invariant'; +import { + usePerformUpgradeAllRules, + usePerformUpgradeSpecificRules, +} from '../../../../rule_management/logic/prebuilt_rules/use_perform_rule_upgrade'; +import { usePrebuiltRulesUpgradeReview } from '../../../../rule_management/logic/prebuilt_rules/use_prebuilt_rules_upgrade_review'; + +export interface UpgradePrebuiltRulesTableState { + /** + * Rules available to be updated + */ + rules: RuleUpgradeInfoForReview[]; + /** + * All unique tags for all rules + */ + tags: string[]; + /** + * Is true then there is no cached data and the query is currently fetching. + */ + isLoading: boolean; + /** + * Will be true if the query has been fetched. + */ + isFetched: boolean; + /** + * Is true whenever a background refetch is in-flight, which does not include initial loading + */ + isRefetching: boolean; + /** + * List of rule IDs that are currently being upgraded + */ + loadingRules: RuleSignatureId[]; + /** + /** + * The timestamp for when the rules were successfully fetched + */ + lastUpdated: number; + /** + * Rule rows selected in EUI InMemory Table + */ + selectedRules: RuleUpgradeInfoForReview[]; +} + +export interface UpgradePrebuiltRulesTableActions { + reFetchRules: () => void; + upgradeOneRule: (ruleId: string) => void; + upgradeSelectedRules: () => void; + upgradeAllRules: () => void; + selectRules: (rules: RuleUpgradeInfoForReview[]) => void; +} + +export interface UpgradePrebuiltRulesContextType { + state: UpgradePrebuiltRulesTableState; + actions: UpgradePrebuiltRulesTableActions; +} + +const UpgradePrebuiltRulesTableContext = createContext( + null +); + +interface UpgradePrebuiltRulesTableContextProviderProps { + children: React.ReactNode; +} + +export const UpgradePrebuiltRulesTableContextProvider = ({ + children, +}: UpgradePrebuiltRulesTableContextProviderProps) => { + const [loadingRules, setLoadingRules] = useState([]); + const [selectedRules, setSelectedRules] = useState([]); + + const { + data: { rules, stats: { tags } } = { + rules: [], + stats: { tags: [] }, + }, + refetch, + dataUpdatedAt, + isFetched, + isLoading, + isRefetching, + } = usePrebuiltRulesUpgradeReview({ + refetchInterval: false, // Disable automatic refetching since request is expensive + keepPreviousData: true, // Use this option so that the state doesn't jump between "success" and "loading" on page change + }); + + const { mutateAsync: upgradeAllRulesRequest } = usePerformUpgradeAllRules(); + const { mutateAsync: upgradeSpecificRulesRequest } = usePerformUpgradeSpecificRules(); + + const upgradeOneRule = useCallback( + async (ruleId: RuleSignatureId) => { + const rule = rules.find((r) => r.rule_id === ruleId); + invariant(rule, `Rule with id ${ruleId} not found`); + + setLoadingRules((prev) => [...prev, ruleId]); + await upgradeSpecificRulesRequest([ + { + rule_id: ruleId, + version: rule.diff.fields.version?.target_version ?? rule.rule.version, + revision: rule.revision, + }, + ]); + setLoadingRules((prev) => prev.filter((id) => id !== ruleId)); + }, + [rules, upgradeSpecificRulesRequest] + ); + + const upgradeSelectedRules = useCallback(async () => { + const rulesToUpgrade = selectedRules.map((rule) => ({ + rule_id: rule.rule_id, + version: rule.diff.fields.version?.target_version ?? rule.rule.version, + revision: rule.revision, + })); + setLoadingRules((prev) => [...prev, ...rulesToUpgrade.map((r) => r.rule_id)]); + await upgradeSpecificRulesRequest(rulesToUpgrade); + setLoadingRules((prev) => prev.filter((id) => !rulesToUpgrade.some((r) => r.rule_id === id))); + setSelectedRules([]); + }, [selectedRules, upgradeSpecificRulesRequest]); + + const upgradeAllRules = useCallback(async () => { + // Unselect all rules so that the table doesn't show the "bulk actions" bar + setLoadingRules((prev) => [...prev, ...rules.map((r) => r.rule_id)]); + await upgradeAllRulesRequest(); + setLoadingRules((prev) => prev.filter((id) => !rules.some((r) => r.rule_id === id))); + setSelectedRules([]); + }, [rules, upgradeAllRulesRequest]); + + const actions = useMemo( + () => ({ + reFetchRules: refetch, + upgradeOneRule, + upgradeSelectedRules, + upgradeAllRules, + selectRules: setSelectedRules, + }), + [refetch, upgradeAllRules, upgradeOneRule, upgradeSelectedRules] + ); + + const providerValue = useMemo(() => { + return { + state: { + rules, + tags, + isFetched, + isLoading, + isRefetching, + selectedRules, + loadingRules, + lastUpdated: dataUpdatedAt, + }, + actions, + }; + }, [ + rules, + tags, + isFetched, + isLoading, + isRefetching, + selectedRules, + loadingRules, + dataUpdatedAt, + actions, + ]); + + return ( + + {children} + + ); +}; + +export const useUpgradePrebuiltRulesTableContext = (): UpgradePrebuiltRulesContextType => { + const rulesTableContext = useContext(UpgradePrebuiltRulesTableContext); + invariant( + rulesTableContext, + 'useUpgradePrebuiltRulesTableContext should be used inside UpgradePrebuiltRulesTableContextProvider' + ); + + return rulesTableContext; +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx new file mode 100644 index 0000000000000..78ef1f7069ace --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx @@ -0,0 +1,141 @@ +/* + * 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 type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBadge, EuiButtonEmpty, EuiLoadingSpinner, EuiText } from '@elastic/eui'; +import React, { useMemo } from 'react'; +import { SHOW_RELATED_INTEGRATIONS_SETTING } from '../../../../../../common/constants'; +import type { RuleUpgradeInfoForReview } from '../../../../../../common/detection_engine/prebuilt_rules/api/review_rule_upgrade/response_schema'; +import type { RuleSignatureId } from '../../../../../../common/detection_engine/rule_schema'; +import { PopoverItems } from '../../../../../common/components/popover_items'; +import { useUiSetting$ } from '../../../../../common/lib/kibana'; +import { hasUserCRUDPermission } from '../../../../../common/utils/privileges'; +import { IntegrationsPopover } from '../../../../../detections/components/rules/related_integrations/integrations_popover'; +import { SeverityBadge } from '../../../../../detections/components/rules/severity_badge'; +import { useUserData } from '../../../../../detections/components/user_info'; +import * as i18n from '../../../../../detections/pages/detection_engine/rules/translations'; +import type { Rule } from '../../../../rule_management/logic'; +import type { UpgradePrebuiltRulesTableActions } from './upgrade_prebuilt_rules_table_context'; +import { useUpgradePrebuiltRulesTableContext } from './upgrade_prebuilt_rules_table_context'; + +export type TableColumn = EuiBasicTableColumn; + +const RULE_NAME_COLUMN: TableColumn = { + field: 'rule.name', + name: i18n.COLUMN_RULE, + render: (value: RuleUpgradeInfoForReview['rule']['name']) => ( + + {value} + + ), + sortable: true, + truncateText: true, + width: '60%', + align: 'left', +}; + +const TAGS_COLUMN: TableColumn = { + field: 'rule.tags', + name: null, + align: 'center', + render: (tags: Rule['tags']) => { + if (tags == null || tags.length === 0) { + return null; + } + + const renderItem = (tag: string, i: number) => ( + + {tag} + + ); + return ( + + ); + }, + width: '65px', + truncateText: true, +}; + +const INTEGRATIONS_COLUMN: TableColumn = { + field: 'rule.related_integrations', + name: null, + align: 'center', + render: (integrations: Rule['related_integrations']) => { + if (integrations == null || integrations.length === 0) { + return null; + } + + return ; + }, + width: '143px', + truncateText: true, +}; + +const createUpgradeButtonColumn = ( + upgradeOneRule: UpgradePrebuiltRulesTableActions['upgradeOneRule'], + loadingRules: RuleSignatureId[] +): TableColumn => ({ + field: 'rule_id', + name: '', + render: (ruleId: RuleUpgradeInfoForReview['rule_id']) => { + const isRuleUpgrading = loadingRules.includes(ruleId); + return ( + upgradeOneRule(ruleId)}> + {isRuleUpgrading ? : i18n.UPDATE_RULE_BUTTON} + + ); + }, + width: '10%', + align: 'center', +}); + +export const useUpgradePrebuiltRulesTableColumns = (): TableColumn[] => { + const [{ canUserCRUD }] = useUserData(); + const hasCRUDPermissions = hasUserCRUDPermission(canUserCRUD); + const [showRelatedIntegrations] = useUiSetting$(SHOW_RELATED_INTEGRATIONS_SETTING); + const { + state: { loadingRules }, + actions: { upgradeOneRule }, + } = useUpgradePrebuiltRulesTableContext(); + + return useMemo( + () => [ + RULE_NAME_COLUMN, + ...(showRelatedIntegrations ? [INTEGRATIONS_COLUMN] : []), + TAGS_COLUMN, + { + field: 'rule.risk_score', + name: i18n.COLUMN_RISK_SCORE, + render: (value: Rule['risk_score']) => ( + + {value} + + ), + sortable: true, + truncateText: true, + width: '85px', + }, + { + field: 'rule.severity', + name: i18n.COLUMN_SEVERITY, + render: (value: Rule['severity']) => , + sortable: true, + truncateText: true, + width: '12%', + }, + ...(hasCRUDPermissions ? [createUpgradeButtonColumn(upgradeOneRule, loadingRules)] : []), + ], + [hasCRUDPermissions, loadingRules, showRelatedIntegrations, upgradeOneRule] + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx index cccd9f394d65e..4cd1d43a04ef2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx @@ -45,7 +45,7 @@ import { TableHeaderTooltipCell } from './table_header_tooltip_cell'; import { useHasActionsPrivileges } from './use_has_actions_privileges'; import { useHasMlPermissions } from './use_has_ml_permissions'; import { useRulesTableActions } from './use_rules_table_actions'; -import { MlRuleWarningPopover } from './ml_rule_warning_popover'; +import { MlRuleWarningPopover } from '../ml_rule_warning_popover/ml_rule_warning_popover'; export type TableColumn = EuiBasicTableColumn | EuiTableActionsColumnType; @@ -191,7 +191,7 @@ const TAGS_COLUMN: TableColumn = { name: null, align: 'center', render: (tags: Rule['tags']) => { - if (tags.length === 0) { + if (tags == null || tags.length === 0) { return null; } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_utility_bar.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table_utility_bar/rules_table_utility_bar.test.tsx similarity index 70% rename from x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_utility_bar.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table_utility_bar/rules_table_utility_bar.test.tsx index 2b88020f4ff35..650ec328fb5b4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_utility_bar.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table_utility_bar/rules_table_utility_bar.test.tsx @@ -7,14 +7,13 @@ import React from 'react'; import { mount } from 'enzyme'; -import { waitFor } from '@testing-library/react'; import { getShowingRulesParams, RulesTableUtilityBar } from './rules_table_utility_bar'; import { TestProviders } from '../../../../common/mock'; -import { useRulesTableContextMock } from './rules_table/__mocks__/rules_table_context'; -import { useRulesTableContext } from './rules_table/rules_table_context'; +import { useRulesTableContextMock } from '../rules_table/rules_table/__mocks__/rules_table_context'; +import { useRulesTableContext } from '../rules_table/rules_table/rules_table_context'; -jest.mock('./rules_table/rules_table_context'); +jest.mock('../rules_table/rules_table/rules_table_context'); describe('RulesTableUtilityBar', () => { it('renders RulesTableUtilityBar total rules and selected rules', () => { @@ -92,51 +91,6 @@ describe('RulesTableUtilityBar', () => { expect(rulesTableContext.actions.reFetchRules).toHaveBeenCalledTimes(1); }); - it('invokes rule refetch when auto refresh switch is clicked if there are not selected items', async () => { - const rulesTableContext = useRulesTableContextMock.create(); - rulesTableContext.state.isRefreshOn = false; - (useRulesTableContext as jest.Mock).mockReturnValue(rulesTableContext); - - const wrapper = mount( - - - - ); - - await waitFor(() => { - wrapper.find('[data-test-subj="refreshSettings"] button').first().simulate('click'); - wrapper.find('[data-test-subj="refreshSettingsSwitch"] button').first().simulate('click'); - expect(rulesTableContext.actions.reFetchRules).toHaveBeenCalledTimes(1); - }); - }); - - it('does not invokes onRefreshSwitch when auto refresh switch is clicked if there are selected items', async () => { - const rulesTableContext = useRulesTableContextMock.create(); - rulesTableContext.state.isRefreshOn = false; - rulesTableContext.state.selectedRuleIds = ['testId']; - (useRulesTableContext as jest.Mock).mockReturnValue(rulesTableContext); - - const wrapper = mount( - - - - ); - - await waitFor(() => { - wrapper.find('[data-test-subj="refreshSettings"] button').first().simulate('click'); - wrapper.find('[data-test-subj="refreshSettingsSwitch"] button').first().simulate('click'); - expect(rulesTableContext.actions.reFetchRules).not.toHaveBeenCalled(); - }); - }); - describe('getShowingRulesParams creates correct label when', () => { it('there are 0 rules to display', () => { const pagination = { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_utility_bar.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table_utility_bar/rules_table_utility_bar.tsx similarity index 69% rename from x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_utility_bar.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table_utility_bar/rules_table_utility_bar.tsx index 9c681d95ae520..254387ddd7a30 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_utility_bar.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table_utility_bar/rules_table_utility_bar.tsx @@ -5,16 +5,9 @@ * 2.0. */ -import type { EuiSwitchEvent, EuiContextMenuPanelDescriptor } from '@elastic/eui'; -import { - EuiContextMenu, - EuiContextMenuPanel, - EuiSwitch, - EuiTextColor, - EuiSpacer, -} from '@elastic/eui'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiContextMenu } from '@elastic/eui'; import React, { useCallback } from 'react'; -import { FormattedMessage } from '@kbn/i18n-react'; import { UtilityBar, @@ -25,10 +18,11 @@ import { } from '../../../../common/components/utility_bar'; import * as i18n from '../../../../detections/pages/detection_engine/rules/translations'; import { useKibana } from '../../../../common/lib/kibana'; -import { useRulesTableContext } from './rules_table/rules_table_context'; +import { useRulesTableContext } from '../rules_table/rules_table/rules_table_context'; import type { PaginationOptions } from '../../../rule_management/logic/types'; import { useStartTransaction } from '../../../../common/lib/apm/use_start_transaction'; import { RULES_TABLE_ACTIONS } from '../../../../common/lib/apm/user_actions'; +import { AutoRefreshButton } from '../auto_refresh_button/auto_refresh_button'; export const getShowingRulesParams = ({ page, perPage, total: totalRules }: PaginationOptions) => { const firstInPage = totalRules === 0 ? 0 : (page - 1) * perPage + 1; @@ -37,7 +31,7 @@ export const getShowingRulesParams = ({ page, perPage, total: totalRules }: Pagi return [firstInPage, lastInPage, totalRules] as const; }; -interface RulesTableUtilityBarProps { +export interface RulesTableUtilityBarProps { canBulkEdit: boolean; onGetBulkItemsPopoverContent?: (closePopover: () => void) => EuiContextMenuPanelDescriptor[]; onToggleSelectAll: () => void; @@ -77,50 +71,6 @@ export const RulesTableUtilityBar = React.memo( [onGetBulkItemsPopoverContent] ); - const handleAutoRefreshSwitch = useCallback( - (closePopover: () => void) => (e: EuiSwitchEvent) => { - const refreshOn = e.target.checked; - if (refreshOn) { - reFetchRules(); - } - setIsRefreshOn(refreshOn); - closePopover(); - }, - [reFetchRules, setIsRefreshOn] - ); - - const handleGetRefreshSettingsPopoverContent = useCallback( - (closePopover: () => void) => ( - , - ...(isAnyRuleSelected - ? [ -
- - - - -
, - ] - : []), - ]} - /> - ), - [isRefreshOn, handleAutoRefreshSwitch, isAnyRuleSelected] - ); - return ( @@ -170,15 +120,6 @@ export const RulesTableUtilityBar = React.memo( > {i18n.REFRESH} - - {i18n.REFRESH_RULE_POPOVER_LABEL} - {!rulesTableContext.state.isDefault && ( ( showUpdating: rulesTableContext.state.isFetching, updatedAt: rulesTableContext.state.lastUpdated, })} + ); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/index.tsx new file mode 100644 index 0000000000000..3a776a1029522 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/index.tsx @@ -0,0 +1,70 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { redirectToDetections } from '../../../../detections/pages/detection_engine/rules/helpers'; +import { SecurityPageName } from '../../../../app/types'; +import { HeaderPage } from '../../../../common/components/header_page'; +import { SecuritySolutionPageWrapper } from '../../../../common/components/page_wrapper'; +import { useKibana } from '../../../../common/lib/kibana'; +import { SpyRoute } from '../../../../common/utils/route/spy_routes'; + +import { useUserData } from '../../../../detections/components/user_info'; +import { useListsConfig } from '../../../../detections/containers/detection_engine/lists/use_lists_config'; + +import * as i18n from './translations'; +import { AddPrebuiltRulesTable } from '../../components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table'; +import { AddPrebuiltRulesTableContextProvider } from '../../components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table_context'; +import { AddPrebuiltRulesHeaderButtons } from '../../components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_header_buttons'; +import { APP_UI_ID } from '../../../../../common'; +import { NeedAdminForUpdateRulesCallOut } from '../../../../detections/components/callouts/need_admin_for_update_callout'; +import { MissingPrivilegesCallOut } from '../../../../detections/components/callouts/missing_privileges_callout'; +import { getDetectionEngineUrl } from '../../../../common/components/link_to'; + +const AddRulesPageComponent: React.FC = () => { + const { navigateToApp } = useKibana().services.application; + + const [{ isSignalIndexExists, isAuthenticated, hasEncryptionKey }] = useUserData(); + const { needsConfiguration: needsListsConfiguration } = useListsConfig(); + + if ( + redirectToDetections( + isSignalIndexExists, + isAuthenticated, + hasEncryptionKey, + needsListsConfiguration + ) + ) { + navigateToApp(APP_UI_ID, { + deepLinkId: SecurityPageName.alerts, + path: getDetectionEngineUrl(), + }); + return null; + } + + return ( + <> + + + + + + + + + + + + + + + ); +}; + +export const AddRulesPage = React.memo(AddRulesPageComponent); +AddRulesPage.displayName = 'AddRulesPage'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/translations.tsx new file mode 100644 index 0000000000000..e9c43e411ee37 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/translations.tsx @@ -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. + */ + +import { i18n } from '@kbn/i18n'; + +export const PAGE_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.addRules.pageTitle', + { + defaultMessage: 'Add Elastic Rules', + } +); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx index 1e2ae5b88fba7..7af3ef9e74fcf 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx @@ -6,12 +6,15 @@ */ import React, { useCallback } from 'react'; -import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; +import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiToolTip } from '@elastic/eui'; import { APP_UI_ID } from '../../../../../common/constants'; import { SecurityPageName } from '../../../../app/types'; import { ImportDataModal } from '../../../../common/components/import_data_modal'; -import { SecuritySolutionLinkButton } from '../../../../common/components/links'; +import { + SecuritySolutionLinkButton, + useGetSecuritySolutionLinkProps, +} from '../../../../common/components/links'; import { getDetectionEngineUrl } from '../../../../common/components/link_to/redirect_to_detection_engine'; import { SecuritySolutionPageWrapper } from '../../../../common/components/page_wrapper'; import { useBoolState } from '../../../../common/hooks/use_bool_state'; @@ -22,9 +25,7 @@ import { SpyRoute } from '../../../../common/utils/route/spy_routes'; import { MissingPrivilegesCallOut } from '../../../../detections/components/callouts/missing_privileges_callout'; import { MlJobCompatibilityCallout } from '../../../../detections/components/callouts/ml_job_compatibility_callout'; import { NeedAdminForUpdateRulesCallOut } from '../../../../detections/components/callouts/need_admin_for_update_callout'; -import { LoadPrePackagedRules } from '../../../../detections/components/rules/pre_packaged_rules/load_prepackaged_rules'; import { LoadPrePackagedRulesButton } from '../../../../detections/components/rules/pre_packaged_rules/load_prepackaged_rules_button'; -import { UpdatePrePackagedRulesCallOut } from '../../../../detections/components/rules/pre_packaged_rules/update_callout'; import { ValueListsFlyout } from '../../../../detections/components/value_lists_management_flyout'; import { useUserData } from '../../../../detections/components/user_info'; import { useListsConfig } from '../../../../detections/containers/detection_engine/lists/use_lists_config'; @@ -32,17 +33,22 @@ import { redirectToDetections } from '../../../../detections/pages/detection_eng import { useInvalidateFindRulesQuery } from '../../../rule_management/api/hooks/use_find_rules_query'; import { importRules } from '../../../rule_management/logic'; -import { usePrePackagedRulesInstallationStatus } from '../../../rule_management/logic/use_pre_packaged_rules_installation_status'; -import { usePrePackagedTimelinesInstallationStatus } from '../../../rule_management/logic/use_pre_packaged_timelines_installation_status'; import { AllRules } from '../../components/rules_table'; import { RulesTableContextProvider } from '../../components/rules_table/rules_table/rules_table_context'; import * as i18n from '../../../../detections/pages/detection_engine/rules/translations'; import { useInvalidateFetchRuleManagementFiltersQuery } from '../../../rule_management/api/hooks/use_fetch_rule_management_filters_query'; +import { MiniCallout } from '../../components/mini_callout/mini_callout'; +import { usePrebuiltRulesStatus } from '../../../rule_management/logic/prebuilt_rules/use_prebuilt_rules_status'; import { MaintenanceWindowCallout } from '../../components/maintenance_window_callout/maintenance_window_callout'; import { SuperHeader } from './super_header'; +import { + NEW_PREBUILT_RULES_AVAILABLE_CALLOUT_TITLE, + getUpdateRulesCalloutTitle, +} from '../../components/mini_callout/translations'; +import { AllRulesTabs } from '../../components/rules_table/rules_table_toolbar'; const RulesPageComponent: React.FC = () => { const [isImportModalVisible, showImportModal, hideImportModal] = useBoolState(); @@ -55,6 +61,15 @@ const RulesPageComponent: React.FC = () => { invalidateFetchRuleManagementFilters(); }, [invalidateFindRulesQuery, invalidateFetchRuleManagementFilters]); + const { data: prebuiltRulesStatus } = usePrebuiltRulesStatus(); + + const rulesToInstallCount = prebuiltRulesStatus?.num_prebuilt_rules_to_install ?? 0; + const rulesToUpgradeCount = prebuiltRulesStatus?.num_prebuilt_rules_to_upgrade ?? 0; + + // Check against rulesInstalledCount since we don't want to show banners if we're showing the empty prompt + const shouldDisplayNewRulesCallout = rulesToInstallCount > 0; + const shouldDisplayUpdateRulesCallout = rulesToUpgradeCount > 0; + const [ { loading: userInfoLoading, @@ -70,8 +85,19 @@ const RulesPageComponent: React.FC = () => { needsConfiguration: needsListsConfiguration, } = useListsConfig(); const loading = userInfoLoading || listsConfigLoading; - const prePackagedRuleStatus = usePrePackagedRulesInstallationStatus(); - const prePackagedTimelineStatus = usePrePackagedTimelinesInstallationStatus(); + + const getSecuritySolutionLinkProps = useGetSecuritySolutionLinkProps(); + const { href } = getSecuritySolutionLinkProps({ + deepLinkId: SecurityPageName.rules, + path: AllRulesTabs.updates, + }); + const { + application: { navigateToUrl }, + } = useKibana().services; + + const updateCallOutOnClick = useCallback(() => { + navigateToUrl(href); + }, [navigateToUrl, href]); if ( redirectToDetections( @@ -117,31 +143,29 @@ const RulesPageComponent: React.FC = () => { - - {(renderProps) => } - + - {i18n.IMPORT_VALUE_LISTS} - + - {i18n.IMPORT_RULE} - + { - {(prePackagedRuleStatus === 'ruleNeedUpdate' || - prePackagedTimelineStatus === 'timelineNeedUpdate') && ( - + + {shouldDisplayUpdateRulesCallout && ( + + )} + + {shouldDisplayUpdateRulesCallout && shouldDisplayNewRulesCallout && ( + + )} + + {shouldDisplayNewRulesCallout && ( + )} diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx deleted file mode 100644 index bd1b951a7002f..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { waitFor } from '@testing-library/react'; -import type { ReactWrapper } from 'enzyme'; -import { mount } from 'enzyme'; -import React from 'react'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; -import { TestProviders } from '../../../../common/mock'; -import '../../../../common/mock/match_media'; -import { getPrePackagedRulesStatus } from '../../../../detection_engine/rule_management/api/api'; -import { PrePackagedRulesPrompt } from './load_empty_prompt'; - -jest.mock('react-router-dom', () => { - const original = jest.requireActual('react-router-dom'); - - return { - ...original, - useHistory: () => ({ - useHistory: jest.fn(), - }), - }; -}); - -jest.mock('../../../../common/components/link_to'); -jest.mock('../../../../common/lib/kibana/kibana_react', () => { - const original = jest.requireActual('../../../../common/lib/kibana/kibana_react'); - return { - ...original, - useKibana: () => ({ - services: { - application: { - navigateToApp: jest.fn(), - getUrlForApp: jest.fn(), - }, - }, - }), - }; -}); - -jest.mock('../../../../detection_engine/rule_management/api/api', () => ({ - getPrePackagedRulesStatus: jest.fn().mockResolvedValue({ - rules_not_installed: 0, - rules_installed: 0, - rules_not_updated: 0, - timelines_not_installed: 0, - timelines_installed: 0, - timelines_not_updated: 0, - }), - createPrepackagedRules: jest.fn(), -})); -jest.mock('../../../../common/hooks/use_app_toasts'); - -const props = { - createPrePackagedRules: jest.fn(), - loading: false, - userHasPermissions: true, - 'data-test-subj': 'load-prebuilt-rules', -}; - -describe('PrePackagedRulesPrompt', () => { - let appToastsMock: jest.Mocked>; - - beforeEach(() => { - appToastsMock = useAppToastsMock.create(); - (useAppToasts as jest.Mock).mockReturnValue(appToastsMock); - }); - - afterEach(() => { - jest.clearAllMocks(); - }); - - it('renders correctly', () => { - const wrapper = mount(, { - wrappingComponent: TestProviders, - }); - - expect(wrapper.find('EmptyPrompt')).toHaveLength(1); - }); -}); - -describe('LoadPrebuiltRulesAndTemplatesButton', () => { - it('renders correct button with correct text - Load Elastic prebuilt rules and timeline templates', async () => { - (getPrePackagedRulesStatus as jest.Mock).mockResolvedValue({ - rules_not_installed: 3, - rules_installed: 0, - rules_not_updated: 0, - timelines_not_installed: 3, - timelines_installed: 0, - timelines_not_updated: 0, - }); - - const wrapper: ReactWrapper = mount(, { - wrappingComponent: TestProviders, - }); - await waitFor(() => { - wrapper.update(); - - expect(wrapper.find('[data-test-subj="load-prebuilt-rules"]').exists()).toEqual(true); - expect(wrapper.find('[data-test-subj="load-prebuilt-rules"]').last().text()).toEqual( - 'Load Elastic prebuilt rules and timeline templates' - ); - }); - }); - - it('renders correct button with correct text - Load Elastic prebuilt rules', async () => { - (getPrePackagedRulesStatus as jest.Mock).mockResolvedValue({ - rules_not_installed: 3, - rules_installed: 0, - rules_not_updated: 0, - timelines_not_installed: 0, - timelines_installed: 0, - timelines_not_updated: 0, - }); - - const wrapper: ReactWrapper = mount(, { - wrappingComponent: TestProviders, - }); - await waitFor(() => { - wrapper.update(); - - expect(wrapper.find('[data-test-subj="load-prebuilt-rules"]').exists()).toEqual(true); - expect(wrapper.find('[data-test-subj="load-prebuilt-rules"]').last().text()).toEqual( - 'Load Elastic prebuilt rules' - ); - }); - }); - - it('renders correct button with correct text - Load Elastic prebuilt timeline templates', async () => { - (getPrePackagedRulesStatus as jest.Mock).mockResolvedValue({ - rules_not_installed: 0, - rules_installed: 0, - rules_not_updated: 0, - timelines_not_installed: 3, - timelines_installed: 0, - timelines_not_updated: 0, - }); - - const wrapper: ReactWrapper = mount(, { - wrappingComponent: TestProviders, - }); - await waitFor(() => { - wrapper.update(); - - expect(wrapper.find('[data-test-subj="load-prebuilt-rules"]').exists()).toEqual(true); - expect(wrapper.find('[data-test-subj="load-prebuilt-rules"]').last().text()).toEqual( - 'Load Elastic prebuilt timeline templates' - ); - }); - }); - - it('renders disabled button if loading is true', async () => { - (getPrePackagedRulesStatus as jest.Mock).mockResolvedValue({ - rules_not_installed: 0, - rules_installed: 0, - rules_not_updated: 0, - timelines_not_installed: 3, - timelines_installed: 0, - timelines_not_updated: 0, - }); - - const wrapper: ReactWrapper = mount( - , - { - wrappingComponent: TestProviders, - } - ); - await waitFor(() => { - wrapper.update(); - - expect(wrapper.find('button[data-test-subj="load-prebuilt-rules"]').props().disabled).toEqual( - true - ); - }); - }); -}); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.tsx index f44008622eb9e..da6ccd39753c8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.tsx @@ -8,11 +8,6 @@ import { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React, { memo } from 'react'; import styled from 'styled-components'; -import { SecurityPageName } from '../../../../app/types'; -import { SecuritySolutionLinkButton } from '../../../../common/components/links'; -import { hasUserCRUDPermission } from '../../../../common/utils/privileges'; -import { useUserData } from '../../user_info'; -import { LoadPrePackagedRules } from './load_prepackaged_rules'; import { LoadPrePackagedRulesButton } from './load_prepackaged_rules_button'; import * as i18n from './translations'; @@ -23,9 +18,6 @@ const EmptyPrompt = styled(EuiEmptyPrompt)` EmptyPrompt.displayName = 'EmptyPrompt'; const PrePackagedRulesPromptComponent = () => { - const [{ canUserCRUD }] = useUserData(); - const hasPermissions = hasUserCRUDPermission(canUserCRUD); - return ( { actions={ - - {(renderProps) => ( - - )} - - - - - {i18n.CREATE_RULE_ACTION} - + } diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_prepackaged_rules.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_prepackaged_rules.tsx deleted file mode 100644 index 9ec37ecfcb7c0..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_prepackaged_rules.tsx +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useCallback } from 'react'; -import { useInstalledSecurityJobs } from '../../../../common/components/ml/hooks/use_installed_security_jobs'; -import { useBoolState } from '../../../../common/hooks/use_bool_state'; -import { RULES_TABLE_ACTIONS } from '../../../../common/lib/apm/user_actions'; -import { useStartTransaction } from '../../../../common/lib/apm/use_start_transaction'; -import { useCreatePrePackagedRules } from '../../../../detection_engine/rule_management/logic/use_create_pre_packaged_rules'; -import { useIsInstallingPrePackagedRules } from '../../../../detection_engine/rule_management/logic/use_install_pre_packaged_rules'; -import { usePrePackagedRulesStatus } from '../../../../detection_engine/rule_management/logic/use_pre_packaged_rules_status'; -import { affectedJobIds } from '../../callouts/ml_job_compatibility_callout/affected_job_ids'; -import { MlJobUpgradeModal } from '../../modals/ml_job_upgrade_modal'; - -interface LoadPrePackagedRulesRenderProps { - isLoading: boolean; - isDisabled: boolean; - onClick: () => Promise; -} - -interface LoadPrePackagedRulesProps { - children: (renderProps: LoadPrePackagedRulesRenderProps) => React.ReactNode; -} - -export const LoadPrePackagedRules = ({ children }: LoadPrePackagedRulesProps) => { - const { isFetching: isFetchingPrepackagedStatus } = usePrePackagedRulesStatus(); - const isInstallingPrebuiltRules = useIsInstallingPrePackagedRules(); - const { createPrePackagedRules, canCreatePrePackagedRules } = useCreatePrePackagedRules(); - - const { startTransaction } = useStartTransaction(); - const handleCreatePrePackagedRules = useCallback(async () => { - startTransaction({ name: RULES_TABLE_ACTIONS.LOAD_PREBUILT }); - await createPrePackagedRules(); - }, [createPrePackagedRules, startTransaction]); - - const [isUpgradeModalVisible, showUpgradeModal, hideUpgradeModal] = useBoolState(false); - const { loading: loadingJobs, jobs } = useInstalledSecurityJobs(); - const legacyJobsInstalled = jobs.filter((job) => affectedJobIds.includes(job.id)); - - const handleInstallPrePackagedRules = useCallback(async () => { - if (legacyJobsInstalled.length > 0) { - showUpgradeModal(); - } else { - await handleCreatePrePackagedRules(); - } - }, [handleCreatePrePackagedRules, legacyJobsInstalled.length, showUpgradeModal]); - - // Wrapper to add confirmation modal for users who may be running older ML Jobs that would - // be overridden by updating their rules. For details, see: https://github.com/elastic/kibana/issues/128121 - const mlJobUpgradeModalConfirm = useCallback(() => { - hideUpgradeModal(); - handleCreatePrePackagedRules(); - }, [handleCreatePrePackagedRules, hideUpgradeModal]); - - const isDisabled = !canCreatePrePackagedRules || isFetchingPrepackagedStatus || loadingJobs; - - return ( - <> - {children({ - isLoading: isInstallingPrebuiltRules, - isDisabled, - onClick: handleInstallPrePackagedRules, - })} - {isUpgradeModalVisible && ( - hideUpgradeModal()} - onConfirm={mlJobUpgradeModalConfirm} - /> - )} - - ); -}; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_prepackaged_rules_button.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_prepackaged_rules_button.tsx index dc59cc64eee9f..78efbab06024c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_prepackaged_rules_button.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_prepackaged_rules_button.tsx @@ -5,111 +5,58 @@ * 2.0. */ -import { EuiButton } from '@elastic/eui'; +import { EuiBadge, EuiButton, EuiButtonEmpty } from '@elastic/eui'; import React from 'react'; -import { usePrePackagedRulesInstallationStatus } from '../../../../detection_engine/rule_management/logic/use_pre_packaged_rules_installation_status'; -import { usePrePackagedRulesStatus } from '../../../../detection_engine/rule_management/logic/use_pre_packaged_rules_status'; -import { usePrePackagedTimelinesInstallationStatus } from '../../../../detection_engine/rule_management/logic/use_pre_packaged_timelines_installation_status'; +import { css } from '@emotion/react'; import { INSTALL_PREBUILT_RULES_ANCHOR } from '../../../../detection_engine/rule_management_ui/components/rules_table/rules_table/guided_onboarding/rules_management_tour'; -import type { - PrePackagedRuleInstallationStatus, - PrePackagedTimelineInstallationStatus, -} from '../../../pages/detection_engine/rules/helpers'; import * as i18n from './translations'; +import { useGetSecuritySolutionLinkProps } from '../../../../common/components/links'; +import { SecurityPageName } from '../../../../../common'; +import { usePrebuiltRulesStatus } from '../../../../detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_status'; -const getLoadRulesOrTimelinesButtonTitle = ( - rulesStatus: PrePackagedRuleInstallationStatus, - timelineStatus: PrePackagedTimelineInstallationStatus -) => { - if (rulesStatus === 'ruleNotInstalled' && timelineStatus === 'timelinesNotInstalled') - return i18n.LOAD_PREPACKAGED_RULES_AND_TEMPLATES; - else if (rulesStatus === 'ruleNotInstalled' && timelineStatus !== 'timelinesNotInstalled') - return i18n.LOAD_PREPACKAGED_RULES; - else if (rulesStatus !== 'ruleNotInstalled' && timelineStatus === 'timelinesNotInstalled') - return i18n.LOAD_PREPACKAGED_TIMELINE_TEMPLATES; -}; - -const getMissingRulesOrTimelinesButtonTitle = (missingRules: number, missingTimelines: number) => { - if (missingRules > 0 && missingTimelines === 0) - return i18n.RELOAD_MISSING_PREPACKAGED_RULES(missingRules); - else if (missingRules === 0 && missingTimelines > 0) - return i18n.RELOAD_MISSING_PREPACKAGED_TIMELINES(missingTimelines); - else if (missingRules > 0 && missingTimelines > 0) - return i18n.RELOAD_MISSING_PREPACKAGED_RULES_AND_TIMELINES(missingRules, missingTimelines); -}; +// TODO: Still need to load timeline templates interface LoadPrePackagedRulesButtonProps { - fill?: boolean; 'data-test-subj'?: string; - isLoading: boolean; - isDisabled: boolean; - onClick: () => Promise; + fill?: boolean; + showBadge?: boolean; } export const LoadPrePackagedRulesButton = ({ - fill, 'data-test-subj': dataTestSubj = 'loadPrebuiltRulesBtn', - isLoading, - isDisabled, - onClick, + fill, + showBadge = true, }: LoadPrePackagedRulesButtonProps) => { - const { data: prePackagedRulesStatus } = usePrePackagedRulesStatus(); - const prePackagedAssetsStatus = usePrePackagedRulesInstallationStatus(); - const prePackagedTimelineStatus = usePrePackagedTimelinesInstallationStatus(); - - const showInstallButton = - (prePackagedAssetsStatus === 'ruleNotInstalled' || - prePackagedTimelineStatus === 'timelinesNotInstalled') && - prePackagedAssetsStatus !== 'someRuleUninstall'; - - if (showInstallButton) { - // Without the outer div EuiStepTour crashes with Uncaught DOMException: - // Failed to execute 'removeChild' on 'Node': The node to be removed is not - // a child of this node. - return ( -
- - {getLoadRulesOrTimelinesButtonTitle(prePackagedAssetsStatus, prePackagedTimelineStatus)} - -
- ); - } - - const showUpdateButton = - prePackagedAssetsStatus === 'someRuleUninstall' || - prePackagedTimelineStatus === 'someTimelineUninstall'; - - if (showUpdateButton) { - // Without the outer div EuiStepTour crashes with Uncaught DOMException: - // Failed to execute 'removeChild' on 'Node': The node to be removed is not - // a child of this node. - return ( -
- + {i18n.ADD_ELASTIC_RULES} + {newRulesCount > 0 && showBadge && ( + - {getMissingRulesOrTimelinesButtonTitle( - prePackagedRulesStatus?.rules_not_installed ?? 0, - prePackagedRulesStatus?.timelines_not_installed ?? 0 - )} - -
- ); - } - - return null; + {newRulesCount} + + )} + + ); }; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/translations.ts b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/translations.ts index b1207b59faf8b..aa36b18beecdf 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/translations.ts @@ -28,47 +28,23 @@ export const CREATE_RULE_ACTION = i18n.translate( defaultMessage: 'Create your own rules', } ); - -export const UPDATE_PREPACKAGED_RULES_TITLE = i18n.translate( - 'xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesTitle', +export const RULE_UPDATES_LINK = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.ruleUpdatesLinkTitle', { - defaultMessage: 'Update available for Elastic prebuilt rules or timeline templates', + defaultMessage: 'Rule Updates', } ); -export const UPDATE_PREPACKAGED_RULES_MSG = (updateRules: number) => - i18n.translate('xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesMsg', { - values: { updateRules }, - defaultMessage: - 'You can update {updateRules} Elastic prebuilt {updateRules, plural, =1 {rule} other {rules}}', - }); - -export const UPDATE_PREPACKAGED_TIMELINES_MSG = (updateTimelines: number) => - i18n.translate('xpack.securitySolution.detectionEngine.rules.updatePrePackagedTimelinesMsg', { - values: { updateTimelines }, - defaultMessage: - 'You can update {updateTimelines} Elastic prebuilt {updateTimelines, plural, =1 {timeline} other {timelines}}', - }); - -export const UPDATE_PREPACKAGED_RULES_AND_TIMELINES_MSG = ( - updateRules: number, - updateTimelines: number -) => - i18n.translate( - 'xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesAndTimelinesMsg', - { - values: { updateRules, updateTimelines }, - defaultMessage: - 'You can update {updateRules} Elastic prebuilt {updateRules, plural, =1 {rule} other {rules}} and {updateTimelines} Elastic prebuilt {updateTimelines, plural, =1 {timeline} other {timelines}}. Note that this will reload deleted Elastic prebuilt rules.', - } - ); +export const ADD_ELASTIC_RULES = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.addElasticRulesButtonTitle', + { + defaultMessage: 'Add Elastic rules', + } +); -export const UPDATE_PREPACKAGED_RULES = (updateRules: number) => - i18n.translate('xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesButton', { - values: { updateRules }, - defaultMessage: - 'Update {updateRules} Elastic prebuilt {updateRules, plural, =1 {rule} other {rules}}', - }); +export const DISMISS = i18n.translate('xpack.securitySolution.detectionEngine.rules.dismissTitle', { + defaultMessage: 'Dismiss', +}); export const UPDATE_PREPACKAGED_TIMELINES = (updateTimelines: number) => i18n.translate('xpack.securitySolution.detectionEngine.rules.updatePrePackagedTimelinesButton', { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/update_callout.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/update_callout.test.tsx deleted file mode 100644 index 6d882fe2930a3..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/update_callout.test.tsx +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { render } from '@testing-library/react'; -import React from 'react'; -import { useKibana } from '../../../../common/lib/kibana'; -import { TestProviders } from '../../../../common/mock'; -import { useFetchPrebuiltRulesStatusQuery } from '../../../../detection_engine/rule_management/api/hooks/use_fetch_prebuilt_rules_status_query'; -import { mockReactQueryResponse } from '../../../../detection_engine/rule_management/api/hooks/__mocks__/mock_react_query_response'; -import { UpdatePrePackagedRulesCallOut } from './update_callout'; - -jest.mock('../../../../common/lib/kibana'); -jest.mock( - '../../../../detection_engine/rule_management/api/hooks/use_fetch_prebuilt_rules_status_query' -); - -describe('UpdatePrePackagedRulesCallOut', () => { - beforeAll(() => { - (useKibana as jest.Mock).mockReturnValue({ - services: { - docLinks: { - ELASTIC_WEBSITE_URL: '', - DOC_LINK_VERSION: '', - links: { - siem: { ruleChangeLog: '' }, - }, - }, - }, - }); - }); - - it('renders callOutMessage correctly: numberOfUpdatedRules > 0 and numberOfUpdatedTimelines = 0', () => { - (useFetchPrebuiltRulesStatusQuery as jest.Mock).mockReturnValue( - mockReactQueryResponse({ - data: { - rules_custom_installed: 0, - rules_installed: 0, - rules_not_installed: 0, - rules_not_updated: 1, - timelines_updated: 0, - timelines_not_installed: 0, - timelines_not_updated: 0, - }, - }) - ); - - const { getByTestId } = render(, { wrapper: TestProviders }); - - expect(getByTestId('update-callout')).toHaveTextContent( - 'You can update 1 Elastic prebuilt ruleRelease notes' - ); - }); - - it('renders buttonTitle correctly: numberOfUpdatedRules > 0 and numberOfUpdatedTimelines = 0', () => { - (useFetchPrebuiltRulesStatusQuery as jest.Mock).mockReturnValue( - mockReactQueryResponse({ - data: { - rules_custom_installed: 0, - rules_installed: 0, - rules_not_installed: 0, - rules_not_updated: 1, - timelines_updated: 0, - timelines_not_installed: 0, - timelines_not_updated: 0, - }, - }) - ); - - const { getByTestId } = render(, { wrapper: TestProviders }); - - expect(getByTestId('update-callout-button')).toHaveTextContent( - 'Update 1 Elastic prebuilt rule' - ); - }); - - it('renders callOutMessage correctly: numberOfUpdatedRules = 0 and numberOfUpdatedTimelines > 0', () => { - (useFetchPrebuiltRulesStatusQuery as jest.Mock).mockReturnValue( - mockReactQueryResponse({ - data: { - rules_custom_installed: 0, - rules_installed: 0, - rules_not_installed: 0, - rules_not_updated: 0, - timelines_updated: 0, - timelines_not_installed: 0, - timelines_not_updated: 1, - }, - }) - ); - - const { getByTestId } = render(, { wrapper: TestProviders }); - - expect(getByTestId('update-callout')).toHaveTextContent( - 'You can update 1 Elastic prebuilt timelineRelease notes' - ); - }); - - it('renders buttonTitle correctly: numberOfUpdatedRules = 0 and numberOfUpdatedTimelines > 0', () => { - (useFetchPrebuiltRulesStatusQuery as jest.Mock).mockReturnValue( - mockReactQueryResponse({ - data: { - rules_custom_installed: 0, - rules_installed: 0, - rules_not_installed: 0, - rules_not_updated: 0, - timelines_updated: 0, - timelines_not_installed: 0, - timelines_not_updated: 1, - }, - }) - ); - - const { getByTestId } = render(, { wrapper: TestProviders }); - - expect(getByTestId('update-callout-button')).toHaveTextContent( - 'Update 1 Elastic prebuilt timeline' - ); - }); - - it('renders callOutMessage correctly: numberOfUpdatedRules > 0 and numberOfUpdatedTimelines > 0', () => { - (useFetchPrebuiltRulesStatusQuery as jest.Mock).mockReturnValue( - mockReactQueryResponse({ - data: { - rules_custom_installed: 0, - rules_installed: 0, - rules_not_installed: 0, - rules_not_updated: 1, - timelines_updated: 0, - timelines_not_installed: 0, - timelines_not_updated: 1, - }, - }) - ); - - const { getByTestId } = render(, { wrapper: TestProviders }); - - expect(getByTestId('update-callout')).toHaveTextContent( - 'You can update 1 Elastic prebuilt rule and 1 Elastic prebuilt timeline. Note that this will reload deleted Elastic prebuilt rules.Release notes' - ); - }); - - it('renders buttonTitle correctly: numberOfUpdatedRules > 0 and numberOfUpdatedTimelines > 0', () => { - (useFetchPrebuiltRulesStatusQuery as jest.Mock).mockReturnValue( - mockReactQueryResponse({ - data: { - rules_custom_installed: 0, - rules_installed: 0, - rules_not_installed: 0, - rules_not_updated: 1, - timelines_updated: 0, - timelines_not_installed: 0, - timelines_not_updated: 1, - }, - }) - ); - - const { getByTestId } = render(, { wrapper: TestProviders }); - - expect(getByTestId('update-callout-button')).toHaveTextContent( - 'Update 1 Elastic prebuilt rule and 1 Elastic prebuilt timeline' - ); - }); -}); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/update_callout.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/update_callout.tsx deleted file mode 100644 index 1526c211990e3..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/update_callout.tsx +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { EuiButton, EuiCallOut, EuiLink } from '@elastic/eui'; -import React, { memo, useMemo } from 'react'; -import { useKibana } from '../../../../common/lib/kibana'; -import { usePrePackagedRulesStatus } from '../../../../detection_engine/rule_management/logic/use_pre_packaged_rules_status'; -import { LoadPrePackagedRules } from './load_prepackaged_rules'; -import * as i18n from './translations'; - -const UpdatePrePackagedRulesCallOutComponent = () => { - const { services } = useKibana(); - const { data: prePackagedRulesStatus } = usePrePackagedRulesStatus(); - const rulesNotUpdated = prePackagedRulesStatus?.rules_not_updated ?? 0; - const timelinesNotUpdated = prePackagedRulesStatus?.timelines_not_updated ?? 0; - - const prepackagedRulesOrTimelines = useMemo(() => { - if (rulesNotUpdated > 0 && timelinesNotUpdated === 0) { - return { - callOutMessage: i18n.UPDATE_PREPACKAGED_RULES_MSG(rulesNotUpdated), - buttonTitle: i18n.UPDATE_PREPACKAGED_RULES(rulesNotUpdated), - }; - } else if (rulesNotUpdated === 0 && timelinesNotUpdated > 0) { - return { - callOutMessage: i18n.UPDATE_PREPACKAGED_TIMELINES_MSG(timelinesNotUpdated), - buttonTitle: i18n.UPDATE_PREPACKAGED_TIMELINES(timelinesNotUpdated), - }; - } else if (rulesNotUpdated > 0 && timelinesNotUpdated > 0) - return { - callOutMessage: i18n.UPDATE_PREPACKAGED_RULES_AND_TIMELINES_MSG( - rulesNotUpdated, - timelinesNotUpdated - ), - buttonTitle: i18n.UPDATE_PREPACKAGED_RULES_AND_TIMELINES( - rulesNotUpdated, - timelinesNotUpdated - ), - }; - }, [rulesNotUpdated, timelinesNotUpdated]); - - return ( - -

- {prepackagedRulesOrTimelines?.callOutMessage} -
- - {i18n.RELEASE_NOTES_HELP} - -

- - {(renderProps) => ( - - {prepackagedRulesOrTimelines?.buttonTitle} - - )} - -
- ); -}; - -export const UpdatePrePackagedRulesCallOut = memo(UpdatePrePackagedRulesCallOutComponent); diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.test.tsx index 6b15a59528067..2e76e2f9c8988 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.test.tsx @@ -15,7 +15,6 @@ import { getActionsStepsData, getHumanizedDuration, getModifiedAboutDetailsData, - getPrePackagedRuleInstallationStatus, getPrePackagedTimelineInstallationStatus, determineDetailsValue, fillEmptySeverityMappings, @@ -430,73 +429,6 @@ describe('rule helpers', () => { }); }); - describe('getPrePackagedRuleStatus', () => { - test('ruleNotInstalled', () => { - const rulesInstalled = 0; - const rulesNotInstalled = 1; - const rulesNotUpdated = 0; - const result: string = getPrePackagedRuleInstallationStatus( - rulesInstalled, - rulesNotInstalled, - rulesNotUpdated - ); - - expect(result).toEqual('ruleNotInstalled'); - }); - - test('ruleInstalled', () => { - const rulesInstalled = 1; - const rulesNotInstalled = 0; - const rulesNotUpdated = 0; - const result: string = getPrePackagedRuleInstallationStatus( - rulesInstalled, - rulesNotInstalled, - rulesNotUpdated - ); - - expect(result).toEqual('ruleInstalled'); - }); - - test('someRuleUninstall', () => { - const rulesInstalled = 1; - const rulesNotInstalled = 1; - const rulesNotUpdated = 0; - const result: string = getPrePackagedRuleInstallationStatus( - rulesInstalled, - rulesNotInstalled, - rulesNotUpdated - ); - - expect(result).toEqual('someRuleUninstall'); - }); - - test('ruleNeedUpdate', () => { - const rulesInstalled = 1; - const rulesNotInstalled = 0; - const rulesNotUpdated = 1; - const result: string = getPrePackagedRuleInstallationStatus( - rulesInstalled, - rulesNotInstalled, - rulesNotUpdated - ); - - expect(result).toEqual('ruleNeedUpdate'); - }); - - test('unknown', () => { - const rulesInstalled = undefined; - const rulesNotInstalled = undefined; - const rulesNotUpdated = undefined; - const result: string = getPrePackagedRuleInstallationStatus( - rulesInstalled, - rulesNotInstalled, - rulesNotUpdated - ); - - expect(result).toEqual('unknown'); - }); - }); - describe('getPrePackagedTimelineStatus', () => { test('timelinesNotInstalled', () => { const timelinesInstalled = 0; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx index 9d7c89bbfac02..40280def1d3a2 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx @@ -287,45 +287,6 @@ export type PrePackagedTimelineInstallationStatus = | 'timelineNeedUpdate' | 'unknown'; -export const getPrePackagedRuleInstallationStatus = ( - rulesInstalled?: number, - rulesNotInstalled?: number, - rulesNotUpdated?: number -): PrePackagedRuleInstallationStatus => { - if ( - rulesNotInstalled != null && - rulesInstalled === 0 && - rulesNotInstalled > 0 && - rulesNotUpdated === 0 - ) { - return 'ruleNotInstalled'; - } else if ( - rulesInstalled != null && - rulesInstalled > 0 && - rulesNotInstalled === 0 && - rulesNotUpdated === 0 - ) { - return 'ruleInstalled'; - } else if ( - rulesInstalled != null && - rulesNotInstalled != null && - rulesInstalled > 0 && - rulesNotInstalled > 0 && - rulesNotUpdated === 0 - ) { - return 'someRuleUninstall'; - } else if ( - rulesInstalled != null && - rulesNotInstalled != null && - rulesNotUpdated != null && - rulesInstalled > 0 && - rulesNotInstalled >= 0 && - rulesNotUpdated > 0 - ) { - return 'ruleNeedUpdate'; - } - return 'unknown'; -}; export const getPrePackagedTimelineInstallationStatus = ( timelinesInstalled?: number, timelinesNotInstalled?: number, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts index 3ad119a67c4ac..42820374c22c3 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts @@ -686,6 +686,33 @@ export const NO_RULES_BODY = i18n.translate( } ); +export const NO_RULES_AVAILABLE_FOR_INSTALL = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.addRules.noRulesTitle', + { + defaultMessage: 'All Elastic rules have been installed', + } +); + +export const NO_RULES_AVAILABLE_FOR_INSTALL_BODY = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.addRules.noRulesBodyTitle', + { + defaultMessage: 'There are no prebuilt detection rules available for installation', + } +); +export const NO_RULES_AVAILABLE_FOR_UPGRADE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.upgradeRules.noRulesTitle', + { + defaultMessage: 'All Elastic rules are up to date', + } +); + +export const NO_RULES_AVAILABLE_FOR_UPGRADE_BODY = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.upgradeRules.noRulesBodyTitle', + { + defaultMessage: 'There are currently no available updates to your installed Elastic rules.', + } +); + export const DEFINE_RULE = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.defineRuleTitle', { @@ -1170,3 +1197,17 @@ export const RULE_MANAGEMENT_CONTEXT_TOOLTIP = i18n.translate( defaultMessage: 'Add this alert as context', } ); + +export const INSTALL_RULE_BUTTON = i18n.translate( + 'xpack.securitySolution.addRules.installRuleButton', + { + defaultMessage: 'Install rule', + } +); + +export const UPDATE_RULE_BUTTON = i18n.translate( + 'xpack.securitySolution.addRules.upgradeRuleButton', + { + defaultMessage: 'Update rule', + } +); diff --git a/x-pack/plugins/security_solution/public/management/links.ts b/x-pack/plugins/security_solution/public/management/links.ts index 745f639438352..3506b4e4d962a 100644 --- a/x-pack/plugins/security_solution/public/management/links.ts +++ b/x-pack/plugins/security_solution/public/management/links.ts @@ -22,6 +22,7 @@ import { MANAGE_PATH, POLICIES_PATH, RESPONSE_ACTIONS_HISTORY_PATH, + RULES_ADD_PATH, RULES_CREATE_PATH, RULES_PATH, SecurityPageName, @@ -29,6 +30,7 @@ import { TRUSTED_APPS_PATH, } from '../../common/constants'; import { + ADD_RULES, BLOCKLIST, CREATE_NEW_RULE, ENDPOINTS, @@ -115,6 +117,13 @@ export const links: LinkItem = { }), ], links: [ + { + id: SecurityPageName.rulesAdd, + title: ADD_RULES, + path: RULES_ADD_PATH, + skipUrlState: true, + hideTimeline: true, + }, { id: SecurityPageName.rulesCreate, title: CREATE_NEW_RULE, diff --git a/x-pack/plugins/security_solution/public/rules/routes.tsx b/x-pack/plugins/security_solution/public/rules/routes.tsx index 9f8192fa7866c..b7fc674499b20 100644 --- a/x-pack/plugins/security_solution/public/rules/routes.tsx +++ b/x-pack/plugins/security_solution/public/rules/routes.tsx @@ -23,6 +23,7 @@ import { useReadonlyHeader } from '../use_readonly_header'; import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper'; import { SpyRoute } from '../common/utils/route/spy_routes'; import { AllRulesTabs } from '../detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar'; +import { AddRulesPage } from '../detection_engine/rule_management_ui/pages/add_rules'; const RulesSubRoutes = [ { @@ -41,10 +42,15 @@ const RulesSubRoutes = [ exact: true, }, { - path: `/rules/:tabName(${AllRulesTabs.management}|${AllRulesTabs.monitoring})`, + path: `/rules/:tabName(${AllRulesTabs.management}|${AllRulesTabs.monitoring}|${AllRulesTabs.updates})`, main: RulesPage, exact: true, }, + { + path: '/rules/add_rules', + main: AddRulesPage, + exact: true, + }, ]; const RulesContainerComponent: React.FC = () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/register_routes.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/register_routes.ts index 35fd65338a1e4..51fc32fca542f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/register_routes.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/register_routes.ts @@ -5,7 +5,6 @@ * 2.0. */ -import type { ConfigType } from '../../../../config'; import type { SetupPlugins } from '../../../../plugin_contract'; import type { SecuritySolutionPluginRouter } from '../../../../types'; @@ -20,24 +19,19 @@ import { performRuleUpgradeRoute } from './perform_rule_upgrade/perform_rule_upg export const registerPrebuiltRulesRoutes = ( router: SecuritySolutionPluginRouter, - config: ConfigType, security: SetupPlugins['security'] ) => { - const { prebuiltRulesNewUpgradeAndInstallationWorkflowsEnabled } = config.experimentalFeatures; - // Legacy endpoints that we're going to deprecate getPrebuiltRulesAndTimelinesStatusRoute(router, security); installPrebuiltRulesAndTimelinesRoute(router); - if (prebuiltRulesNewUpgradeAndInstallationWorkflowsEnabled) { - // New endpoints for the rule upgrade and installation workflows - getPrebuiltRulesStatusRoute(router); - performRuleInstallationRoute(router); - performRuleUpgradeRoute(router); - reviewRuleInstallationRoute(router); - reviewRuleUpgradeRoute(router); + // New endpoints for the rule upgrade and installation workflows + getPrebuiltRulesStatusRoute(router); + performRuleInstallationRoute(router); + performRuleUpgradeRoute(router); + reviewRuleInstallationRoute(router); + reviewRuleUpgradeRoute(router); - // Helper endpoints for development and testing. Should be removed later. - generateAssetsRoute(router); - } + // Helper endpoints for development and testing. Should be removed later. + generateAssetsRoute(router); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts index 844e0a4c188c8..65d912cb1ac46 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts @@ -92,6 +92,7 @@ const calculateRuleInfos = (results: CalculateRuleDiffResult[]): RuleUpgradeInfo return { id: installedCurrentVersion.id, rule_id: installedCurrentVersion.rule_id, + revision: installedCurrentVersion.revision, rule: diffableCurrentVersion, diff: { fields: pickBy>( diff --git a/x-pack/plugins/security_solution/server/routes/index.ts b/x-pack/plugins/security_solution/server/routes/index.ts index dd1a4aa843767..38dea982d5a9e 100644 --- a/x-pack/plugins/security_solution/server/routes/index.ts +++ b/x-pack/plugins/security_solution/server/routes/index.ts @@ -92,7 +92,7 @@ export const initRoutes = ( ) => { registerFleetIntegrationsRoutes(router, logger); registerLegacyRuleActionsRoutes(router, logger); - registerPrebuiltRulesRoutes(router, config, security); + registerPrebuiltRulesRoutes(router, security); registerRuleExceptionsRoutes(router); registerManageExceptionsRoutes(router); registerRuleManagementRoutes(router, config, ml, logger); diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 65e1cae7b8ec6..e302758ce1c05 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -29109,11 +29109,7 @@ "xpack.securitySolution.detectionEngine.rules.reloadMissingPrePackagedTimelinesButton": "Installer la/les {missingTimelines, plural, =1 {chronologie} one {chronologies} many {chronologies} other {chronologies}} Elastic prédéfinie(s) {missingTimelines} ", "xpack.securitySolution.detectionEngine.rules.update.successfullySavedRuleTitle": "{ruleName} a été enregistré", "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesAndTimelinesButton": "Mettre à jour la/les {updateRules, plural, =1 {règle} one {règles} many {règles} other {règles}} Elastic prédéfinie(s) {updateRules} et la/les {updateTimelines, plural, =1 {chronologie} one {chronologies} many {chronologies} other {chronologies}} Elastic prédéfinie(s) {updateTimelines}", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesAndTimelinesMsg": "Vous pouvez mettre à jour la/les {updateRules, plural, =1 {règle} one {règles} many {règles} other {règles}} Elastic prédéfinie(s) {updateRules} et la/les {updateTimelines, plural, =1 {chronologie} one {chronologies} many {chronologies} other {chronologies}} Elastic prédéfinie(s) {updateTimelines} Notez que cela rechargera les règles prédéfinies d'Elastic supprimées.", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesButton": "Mettre à jour la/les {updateRules, plural, =1 {règle} one {règles} many {règles} other {règles}} Elastic prédéfinie(s) {updateRules}", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesMsg": "Vous pouvez mettre à jour la/les {updateRules, plural, =1 {règle} one {règles} many {règles} other {règles}} Elastic prédéfinies {updateRules}", "xpack.securitySolution.detectionEngine.rules.updatePrePackagedTimelinesButton": "Mettre à jour la/les {updateTimelines, plural, =1 {chronologie} one {chronologies} many {chronologies} other {chronologies}} Elastic prédéfinies {updateTimelines}", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedTimelinesMsg": "Vous pouvez mettre à jour la/les {updateTimelines, plural, =1 {chronologie} one {chronologies} many {chronologies} other {chronologies}} Elastic prédéfinies {updateTimelines}", "xpack.securitySolution.detectionEngine.signals.alertReasonDescription": "{eventCategory, select, null {} other {{eventCategory}{whitespace}}}événement{hasFieldOfInterest, select, false {} other {{whitespace}avec}}{processName, select, null {} other {{whitespace}processus {processName},}}{processParentName, select, null {} other {{whitespace}processus parent {processParentName},}}{fileName, select, null {} other {{whitespace}fichier {fileName},}}{sourceAddress, select, null {} other {{whitespace}source {sourceAddress}}}{sourcePort, select, null {} other {: {sourcePort},}}{destinationAddress, select, null {} other {{whitespace}destination {destinationAddress}}}{destinationPort, select, null {} other {: {destinationPort},}}{userName, select, null {} other {{whitespace}par {userName}}}{hostName, select, null {} other {{whitespace}le {hostName}}} a créé l'alerte {alertName} {alertSeverity}.", "xpack.securitySolution.detectionEngine.stepDefineRule.dataViewNotFoundDescription": "Votre vue de données avec l'ID \"{dataView}\" est introuvable. Il est possible qu'elle ait été supprimée.", "xpack.securitySolution.detectionResponse.alertsByStatus.totalAlerts": "Total : {totalAlerts, plural, =1 {alerte} one {alertes} many {alertes} other {alertes}}", @@ -31391,7 +31387,6 @@ "xpack.securitySolution.detectionEngine.rules.tour.createRuleTourContent": "Les options de suppression d'alerte sont maintenant disponibles pour les règles de requête personnalisée, et plusieurs champs peuvent être sélectionnés dans les règles relatives aux nouveaux termes", "xpack.securitySolution.detectionEngine.rules.tour.createRuleTourTitle": "De nouvelles fonctionnalités de règle de sécurité sont disponibles", "xpack.securitySolution.detectionEngine.rules.updateButtonTitle": "Mettre à jour", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesTitle": "Mise à jour disponible pour les règles ou les modèles de chronologie prédéfinis d'Elastic", "xpack.securitySolution.detectionEngine.rulesSnoozeBadge.error.unableToFetch": "Impossible de récupérer les paramètres de répétition", "xpack.securitySolution.detectionEngine.ruleStatus.errorCalloutTitle": "Échec de règle à", "xpack.securitySolution.detectionEngine.ruleStatus.partialErrorCalloutTitle": "Avertissement à", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 30ca83889d63f..f0f986628419e 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -29090,11 +29090,7 @@ "xpack.securitySolution.detectionEngine.rules.reloadMissingPrePackagedTimelinesButton": "{missingTimelines}個のElastic事前構築済み{missingTimelines, plural, =1 {タイムライン} other {タイムライン}}をインストール ", "xpack.securitySolution.detectionEngine.rules.update.successfullySavedRuleTitle": "{ruleName} が保存されました", "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesAndTimelinesButton": "{updateRules}個のElastic事前構築済み{updateRules, plural, =1 {ルール} other {ルール}}と{updateTimelines}個のElastic事前構築済み{updateTimelines, plural, =1 {タイムライン} other {タイムライン}}を更新", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesAndTimelinesMsg": "{updateRules}個のElastic事前構築済み{updateRules, plural, =1 {ルール} other {ルール}}と{updateTimelines}個のElastic事前構築済み{updateTimelines, plural, =1 {タイムライン} other {タイムライン}}を更新できます。これにより、削除されたElastic事前構築済みルールが再読み込みされます。", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesButton": "{updateRules}個のElastic事前構築済み{updateRules, plural, =1 {ルール} other {ルール}}を更新", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesMsg": "{updateRules}個のElastic事前構築済み{updateRules, plural, =1 {ルール} other {ルール}}を更新できます", "xpack.securitySolution.detectionEngine.rules.updatePrePackagedTimelinesButton": "{updateTimelines}個のElastic事前構築済み{updateTimelines, plural, =1 {タイムライン} other {タイムライン}}を更新", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedTimelinesMsg": "{updateTimelines}個のElastic事前構築済み{updateTimelines, plural, =1 {タイムライン} other {タイムライン}}を更新できます", "xpack.securitySolution.detectionEngine.signals.alertReasonDescription": "{eventCategory, select, null {} other {{eventCategory}{whitespace}}}イベント{hasFieldOfInterest, select, false {} other {{whitespace}の}}{processName, select, null {} other {{whitespace}プロセス{processName}、}}{processParentName, select, null {} other {{whitespace}親プロセス{processParentName}、}}{fileName, select, null {} other {{whitespace}ファイル{fileName}、}}{sourceAddress, select, null {} other {{whitespace}ソース{sourceAddress}}}{sourcePort, select, null {} other {:{sourcePort}、}}{destinationAddress, select, null {} other {{whitespace}{destinationAddress}のデスティネーション}}{destinationPort, select, null {} other {:{destinationPort}、}}{userName, select, null {} other {{whitespace}{userName}によって}}{hostName, select, null {} other {{whitespace}{hostName}で}}で{alertSeverity}アラート{alertName}が作成されました。", "xpack.securitySolution.detectionEngine.stepDefineRule.dataViewNotFoundDescription": "ID \"{dataView}\"のデータビューが見つかりませんでした。削除された可能性があります。", "xpack.securitySolution.detectionResponse.alertsByStatus.totalAlerts": "合計{totalAlerts, plural, =1 {アラート} other {アラート}}", @@ -31372,7 +31368,6 @@ "xpack.securitySolution.detectionEngine.rules.tour.createRuleTourContent": "カスタムクエリルールでアラート抑制オプションが利用可能になり、新規条件ルールで複数のフィールドを選択できるようになりました", "xpack.securitySolution.detectionEngine.rules.tour.createRuleTourTitle": "新しいセキュリティルール機能が利用可能です", "xpack.securitySolution.detectionEngine.rules.updateButtonTitle": "更新", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesTitle": "Elastic事前構築済みルールまたはタイムラインテンプレートを更新", "xpack.securitySolution.detectionEngine.rulesSnoozeBadge.error.unableToFetch": "スヌーズ設定を取得できません", "xpack.securitySolution.detectionEngine.ruleStatus.errorCalloutTitle": "ルール失敗", "xpack.securitySolution.detectionEngine.ruleStatus.partialErrorCalloutTitle": "警告", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 212f1bed8ff47..0f00f726dfd25 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -29086,11 +29086,7 @@ "xpack.securitySolution.detectionEngine.rules.reloadMissingPrePackagedTimelinesButton": "安装 {missingTimelines} 个 Elastic 预构建{missingTimelines, plural, =1 {时间线} other {时间线}} ", "xpack.securitySolution.detectionEngine.rules.update.successfullySavedRuleTitle": "{ruleName} 已保存", "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesAndTimelinesButton": "更新 {updateRules} 个 Elastic 预构建{updateRules, plural, =1 {规则} other {规则}}和 {updateTimelines} 个 Elastic 预构建{updateTimelines, plural, =1 {时间线} other {时间线}}", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesAndTimelinesMsg": "您可以更新 {updateRules} 个 Elastic 预构建{updateRules, plural, =1 {规则} other {规则}}和 {updateTimelines} 个 Elastic 预构建{updateTimelines, plural, =1 {时间线} other {时间线}}。注意,这将重新加载删除的 Elastic 预构建规则。", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesButton": "更新 {updateRules} 个 Elastic 预构建{updateRules, plural, =1 {规则} other {规则}}", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesMsg": "您可以更新 {updateRules} 个 Elastic 预构建{updateRules, plural, =1 {规则} other {规则}}", "xpack.securitySolution.detectionEngine.rules.updatePrePackagedTimelinesButton": "更新 {updateTimelines} 个 Elastic 预构建{updateTimelines, plural, =1 {时间线} other {时间线}}", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedTimelinesMsg": "您可以更新 {updateTimelines} 个 Elastic 预构建{updateTimelines, plural, =1 {时间线} other {时间线}}", "xpack.securitySolution.detectionEngine.signals.alertReasonDescription": "{eventCategory, select, null {} other {{eventCategory}{whitespace}}}事件{hasFieldOfInterest, select, false {} other {{whitespace}具有}}{processName, select, null {} other {{whitespace}进程 {processName},}}{processParentName, select, null {} other {{whitespace}父进程 {processParentName},}}{fileName, select, null {} other {{whitespace}文件 {fileName},}}{sourceAddress, select, null {} other {{whitespace}源 {sourceAddress}}}{sourcePort, select, null {} other {:{sourcePort},}}{destinationAddress, select, null {} other {{whitespace}目标 {destinationAddress}}}{destinationPort, select, null {} other {:{destinationPort},}}{userName, select, null {} other {{whitespace}由 {userName}}}{hostName, select, null {} other {{whitespace}于{hostName}}} 创建了 {alertSeverity} 告警 {alertName}。", "xpack.securitySolution.detectionEngine.stepDefineRule.dataViewNotFoundDescription": "未找到“id”为“{dataView}”的数据视图。可能是因为它已被删除。", "xpack.securitySolution.detectionResponse.alertsByStatus.totalAlerts": "{totalAlerts, plural, =1 {告警} other {告警}}总计", @@ -31368,7 +31364,6 @@ "xpack.securitySolution.detectionEngine.rules.tour.createRuleTourContent": "告警阻止选项现在可用于定制查询规则,并且可以在新字词规则中选择多个字段", "xpack.securitySolution.detectionEngine.rules.tour.createRuleTourTitle": "有新的安全规则功能可用", "xpack.securitySolution.detectionEngine.rules.updateButtonTitle": "更新", - "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesTitle": "更新可用于 Elastic 预构建规则或时间线模板", "xpack.securitySolution.detectionEngine.rulesSnoozeBadge.error.unableToFetch": "无法提取暂停设置", "xpack.securitySolution.detectionEngine.ruleStatus.errorCalloutTitle": "规则错误位置", "xpack.securitySolution.detectionEngine.ruleStatus.partialErrorCalloutTitle": "警告于", From f2dbde14e96fbb6caf67f7d3b9fbdce321e9e260 Mon Sep 17 00:00:00 2001 From: Matthew Kime Date: Wed, 14 Jun 2023 03:17:40 -0500 Subject: [PATCH 10/89] [core router] Improve error message when version header is missing (#159601) ## Summary Across the kibana code base there are a number of http client wrappers, some of which have special handling of the version header and some don't. This can be quite confusing when you get an error message that says "Please specify a version." and you _are_ specifying a version header but you're not specifying _the_ version header. Now the error message will remind you where it expects to find the version. --- .../src/versioned_router/core_versioned_route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.ts b/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.ts index 3bef80c63eb05..d757c2d457607 100644 --- a/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.ts +++ b/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.ts @@ -111,7 +111,7 @@ export class CoreVersionedRoute implements VersionedRoute { if (!this.hasVersion(req) && (this.isInternal || this.router.isDev)) { return res.badRequest({ - body: `Please specify a version. Available versions: ${this.versionsToString()}`, + body: `Please specify a version via ${ELASTIC_HTTP_VERSION_HEADER} header. Available versions: ${this.versionsToString()}`, }); } From b85d92c3432a8b08c8d87b8b6a3ad731473536fc Mon Sep 17 00:00:00 2001 From: Angela Chuang <6295984+angorayc@users.noreply.github.com> Date: Wed, 14 Jun 2023 09:19:00 +0100 Subject: [PATCH 11/89] [SecuritySolution] Fix styling issue for histograms (#159292) ## Summary We added additional padding to the wrapper and set inner heights manually to avoid `...` button overlapped with chart legend https://github.com/elastic/kibana/issues/156640 https://github.com/elastic/kibana/issues/156812, but this has caused the problem below. So I remove all the hight limits we manually set and move `...` higher. Before: ![cropped_histograms](https://github.com/elastic/kibana/assets/6295984/5892fb79-6e05-4f99-8065-3ce1111d9235) After: Screenshot 2023-06-08 at 12 02 58 Screenshot 2023-06-08 at 12 07 48 Screenshot 2023-06-08 at 14 32 11 --- .../visualization_actions/lens_embeddable.tsx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_embeddable.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_embeddable.tsx index 99952c8b590ce..27acaa6c17059 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_embeddable.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_embeddable.tsx @@ -37,17 +37,12 @@ const LensComponentWrapper = styled.div<{ }>` height: ${({ $height }) => ($height ? `${$height}px` : 'auto')}; width: ${({ width }) => width ?? 'auto'}; - > div { - background-color: transparent; - ${({ $addHoverActionsPadding }) => - $addHoverActionsPadding ? `padding: ${HOVER_ACTIONS_PADDING}px 0 0 0;` : ``} - } - .lnsExpressionRenderer .echLegend { - ${({ $height, $addHoverActionsPadding }) => - $height && $height > HOVER_ACTIONS_PADDING && $addHoverActionsPadding - ? `height: ${$height - HOVER_ACTIONS_PADDING * 1.5}px;` - : ''} - } + + ${({ $addHoverActionsPadding }) => + $addHoverActionsPadding + ? `.embPanel__header--floater { top: ${HOVER_ACTIONS_PADDING * -1}px; }` + : ''} + .expExpressionRenderer__expression { padding: 2px 0 0 0 !important; } From c6bca36d96582063d3b7361d7013fb8c036a89d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Marcondes?= <55978943+cauemarcondes@users.noreply.github.com> Date: Wed, 14 Jun 2023 09:19:39 +0100 Subject: [PATCH 12/89] [Profiling] Adding normalize by time and scale factor on Diff TopN functions page (#159394) Relevant changes: - Adding **Normalize by** field on the Diff TopN functions page. - Refactoring functions route/pages. Screenshot 2023-06-09 at 2 34 48 PM Screenshot 2023-06-09 at 2 34 58 PM --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- x-pack/plugins/profiling/common/flamegraph.ts | 10 - .../differential_comparison_mode/index.tsx} | 42 ++-- .../public/components/flamegraph/index.tsx | 5 +- .../normalization_menu/index.tsx} | 74 +++---- .../components/topn_functions/index.tsx | 59 +++-- .../profiling/public/routing/index.tsx | 50 +++-- .../utils/get_flamegraph_model/index.ts | 16 +- .../flame_graph_search_panel.tsx | 32 +-- .../public/views/flame_graphs_view/index.tsx | 30 ++- .../functions/differential_topn/index.tsx | 208 ++++++++++++++++++ .../public/views/functions/index.tsx | 64 ++++++ .../public/views/functions/topn/index.tsx | 80 +++++++ .../public/views/functions_view/index.tsx | 188 ---------------- .../translations/translations/fr-FR.json | 10 - .../translations/translations/ja-JP.json | 10 - .../translations/translations/zh-CN.json | 10 - 16 files changed, 524 insertions(+), 364 deletions(-) rename x-pack/plugins/profiling/public/{views/flame_graphs_view/differential_comparison_mode.tsx => components/differential_comparison_mode/index.tsx} (50%) rename x-pack/plugins/profiling/public/{views/flame_graphs_view/normalization_menu.tsx => components/normalization_menu/index.tsx} (71%) create mode 100644 x-pack/plugins/profiling/public/views/functions/differential_topn/index.tsx create mode 100644 x-pack/plugins/profiling/public/views/functions/index.tsx create mode 100644 x-pack/plugins/profiling/public/views/functions/topn/index.tsx delete mode 100644 x-pack/plugins/profiling/public/views/functions_view/index.tsx diff --git a/x-pack/plugins/profiling/common/flamegraph.ts b/x-pack/plugins/profiling/common/flamegraph.ts index ba6e55c62d3df..ae9adc37679f2 100644 --- a/x-pack/plugins/profiling/common/flamegraph.ts +++ b/x-pack/plugins/profiling/common/flamegraph.ts @@ -10,16 +10,6 @@ import { createFrameGroupID } from './frame_group'; import { fnv1a64 } from './hash'; import { createStackFrameMetadata, getCalleeLabel } from './profiling'; -export enum FlameGraphComparisonMode { - Absolute = 'absolute', - Relative = 'relative', -} - -export enum FlameGraphNormalizationMode { - Scale = 'scale', - Time = 'time', -} - export interface BaseFlameGraph { Size: number; Edges: number[][]; diff --git a/x-pack/plugins/profiling/public/views/flame_graphs_view/differential_comparison_mode.tsx b/x-pack/plugins/profiling/public/components/differential_comparison_mode/index.tsx similarity index 50% rename from x-pack/plugins/profiling/public/views/flame_graphs_view/differential_comparison_mode.tsx rename to x-pack/plugins/profiling/public/components/differential_comparison_mode/index.tsx index 433802798402a..0751bb539bb2e 100644 --- a/x-pack/plugins/profiling/public/views/flame_graphs_view/differential_comparison_mode.tsx +++ b/x-pack/plugins/profiling/public/components/differential_comparison_mode/index.tsx @@ -7,11 +7,11 @@ import { EuiButtonGroup, EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { FlameGraphComparisonMode } from '../../../common/flamegraph'; +import { ComparisonMode } from '../normalization_menu'; interface Props { - comparisonMode: FlameGraphComparisonMode; - onChange: (nextComparisonMode: FlameGraphComparisonMode) => void; + comparisonMode: ComparisonMode; + onChange: (nextComparisonMode: ComparisonMode) => void; } export function DifferentialComparisonMode({ comparisonMode, onChange }: Props) { return ( @@ -20,45 +20,37 @@ export function DifferentialComparisonMode({ comparisonMode, onChange }: Props)

- {i18n.translate( - 'xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeTitle', - { defaultMessage: 'Format' } - )} + {i18n.translate('xpack.profiling.differentialComparisonMode.title', { + defaultMessage: 'Format', + })}

{ - onChange(nextComparisonMode as FlameGraphComparisonMode); + onChange(nextComparisonMode as ComparisonMode); }} options={[ { - id: FlameGraphComparisonMode.Absolute, + id: ComparisonMode.Absolute, label: i18n.translate( - 'xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeAbsoluteButtonLabel', - { - defaultMessage: 'Abs', - } + 'xpack.profiling.differentialComparisonMode.absoluteButtonLabel', + { defaultMessage: 'Abs' } ), }, { - id: FlameGraphComparisonMode.Relative, + id: ComparisonMode.Relative, label: i18n.translate( - 'xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeRelativeButtonLabel', - { - defaultMessage: 'Rel', - } + 'xpack.profiling.differentialComparisonMode.relativeButtonLabel', + { defaultMessage: 'Rel' } ), }, ]} diff --git a/x-pack/plugins/profiling/public/components/flamegraph/index.tsx b/x-pack/plugins/profiling/public/components/flamegraph/index.tsx index 40adaeb896946..1d5ac238ce017 100644 --- a/x-pack/plugins/profiling/public/components/flamegraph/index.tsx +++ b/x-pack/plugins/profiling/public/components/flamegraph/index.tsx @@ -9,16 +9,17 @@ import { Chart, Datum, Flame, FlameLayerValue, PartialTheme, Settings } from '@e import { EuiFlexGroup, EuiFlexItem, useEuiTheme } from '@elastic/eui'; import { Maybe } from '@kbn/observability-plugin/common/typings'; import React, { useEffect, useMemo, useState } from 'react'; -import { ElasticFlameGraph, FlameGraphComparisonMode } from '../../../common/flamegraph'; +import { ElasticFlameGraph } from '../../../common/flamegraph'; import { getFlamegraphModel } from '../../utils/get_flamegraph_model'; import { FlameGraphLegend } from './flame_graph_legend'; import { FrameInformationWindow } from '../frame_information_window'; import { FrameInformationTooltip } from '../frame_information_window/frame_information_tooltip'; import { FlameGraphTooltip } from './flamegraph_tooltip'; +import { ComparisonMode } from '../normalization_menu'; interface Props { id: string; - comparisonMode: FlameGraphComparisonMode; + comparisonMode: ComparisonMode; primaryFlamegraph?: ElasticFlameGraph; comparisonFlamegraph?: ElasticFlameGraph; baseline?: number; diff --git a/x-pack/plugins/profiling/public/views/flame_graphs_view/normalization_menu.tsx b/x-pack/plugins/profiling/public/components/normalization_menu/index.tsx similarity index 71% rename from x-pack/plugins/profiling/public/views/flame_graphs_view/normalization_menu.tsx rename to x-pack/plugins/profiling/public/components/normalization_menu/index.tsx index 06007bd09a767..3d80d43bbe89c 100644 --- a/x-pack/plugins/profiling/public/views/flame_graphs_view/normalization_menu.tsx +++ b/x-pack/plugins/profiling/public/components/normalization_menu/index.tsx @@ -25,35 +25,41 @@ import { import { css } from '@emotion/react'; import { i18n } from '@kbn/i18n'; import React, { useEffect, useState } from 'react'; -import { FlameGraphNormalizationMode } from '../../../common/flamegraph'; -export interface FlameGraphNormalizationOptions { +export interface NormalizationOptions { baselineScale: number; baselineTime: number; comparisonScale: number; comparisonTime: number; } +export enum ComparisonMode { + Absolute = 'absolute', + Relative = 'relative', +} + +export enum NormalizationMode { + Scale = 'scale', + Time = 'time', +} + interface Props { - mode: FlameGraphNormalizationMode; - options: FlameGraphNormalizationOptions; - onChange: (mode: FlameGraphNormalizationMode, options: FlameGraphNormalizationOptions) => void; + mode: NormalizationMode; + options: NormalizationOptions; + onChange: (mode: NormalizationMode, options: NormalizationOptions) => void; } -const SCALE_LABEL = i18n.translate('xpack.profiling.flameGraphNormalizationMenu.scale', { +const SCALE_LABEL = i18n.translate('xpack.profiling.normalizationMenu.scale', { defaultMessage: 'Scale factor', }); -const TIME_LABEL = i18n.translate('xpack.profiling.flameGraphNormalizationMenu.time', { +const TIME_LABEL = i18n.translate('xpack.profiling.normalizationMenu.time', { defaultMessage: 'Time', }); -const NORMALIZE_BY_LABEL = i18n.translate( - 'xpack.profiling.flameGraphNormalizationMenu.normalizeBy', - { - defaultMessage: 'Normalize by', - } -); +const NORMALIZE_BY_LABEL = i18n.translate('xpack.profiling.normalizationMenu.normalizeBy', { + defaultMessage: 'Normalize by', +}); export function NormalizationMenu(props: Props) { const [isPopoverOpen, setIsPopoverOpen] = useState(false); @@ -72,7 +78,7 @@ export function NormalizationMenu(props: Props) { }, [props.mode, props.options]); const { baseline, comparison } = - mode === FlameGraphNormalizationMode.Time + mode === NormalizationMode.Time ? { comparison: options.comparisonTime, baseline: options.baselineTime } : { comparison: options.comparisonScale, baseline: options.baselineScale }; @@ -110,7 +116,7 @@ export function NormalizationMenu(props: Props) { padding: '0 16px', }} > - {props.mode === FlameGraphNormalizationMode.Scale ? SCALE_LABEL : TIME_LABEL} + {props.mode === NormalizationMode.Scale ? SCALE_LABEL : TIME_LABEL} } @@ -129,24 +135,18 @@ export function NormalizationMenu(props: Props) { - {i18n.translate( - 'xpack.profiling.flameGraphNormalizationMenu.normalizeByTimeTooltip', - { - defaultMessage: - 'Select Normalize by Scale factor and set your Baseline and Comparison scale factors to compare a set of machines of different sizes. For example, you can compare a deployment of 10% of machines to a deployment of 90% of machines.', - } - )} + {i18n.translate('xpack.profiling.normalizationMenu.normalizeByTimeTooltip', { + defaultMessage: + 'Select Normalize by Scale factor and set your Baseline and Comparison scale factors to compare a set of machines of different sizes. For example, you can compare a deployment of 10% of machines to a deployment of 90% of machines.', + })} - {i18n.translate( - 'xpack.profiling.flameGraphNormalizationMenu.normalizeByScaleTooltip', - { - defaultMessage: - 'Select Normalize by Time to compare a set of machines across different time periods. For example, if you compare the last hour to the last 24 hours, the shorter timeframe (1 hour) is multiplied to match the longer timeframe (24 hours).', - } - )} + {i18n.translate('xpack.profiling.normalizationMenu.normalizeByScaleTooltip', { + defaultMessage: + 'Select Normalize by Time to compare a set of machines across different time periods. For example, if you compare the last hour to the last 24 hours, the shorter timeframe (1 hour) is multiplied to match the longer timeframe (24 hours).', + })} @@ -160,19 +160,19 @@ export function NormalizationMenu(props: Props) { buttonSize="compressed" isFullWidth onChange={(id, value) => { - setMode(id as FlameGraphNormalizationMode); + setMode(id as NormalizationMode); }} - legend={i18n.translate('xpack.profiling.flameGraphNormalizationMode.selectModeLegend', { + legend={i18n.translate('xpack.profiling.normalizationMode.selectModeLegend', { defaultMessage: 'Select a normalization mode for the flamegraph', })} idSelected={mode} options={[ { - id: FlameGraphNormalizationMode.Scale, + id: NormalizationMode.Scale, label: SCALE_LABEL, }, { - id: FlameGraphNormalizationMode.Time, + id: NormalizationMode.Time, label: TIME_LABEL, }, ]} @@ -195,14 +195,14 @@ export function NormalizationMenu(props: Props) { id={baselineScaleFactorInputId} value={baseline} onChange={(e) => { - if (mode === FlameGraphNormalizationMode.Scale) { + if (mode === NormalizationMode.Scale) { setOptions((prevOptions) => ({ ...prevOptions, baselineScale: e.target.valueAsNumber, })); } }} - disabled={mode === FlameGraphNormalizationMode.Time} + disabled={mode === NormalizationMode.Time} /> @@ -223,14 +223,14 @@ export function NormalizationMenu(props: Props) { id={comparisonScaleFactorInputId} value={comparison} onChange={(e) => { - if (mode === FlameGraphNormalizationMode.Scale) { + if (mode === NormalizationMode.Scale) { setOptions((prevOptions) => ({ ...prevOptions, comparisonScale: e.target.valueAsNumber, })); } }} - disabled={mode === FlameGraphNormalizationMode.Time} + disabled={mode === NormalizationMode.Time} /> diff --git a/x-pack/plugins/profiling/public/components/topn_functions/index.tsx b/x-pack/plugins/profiling/public/components/topn_functions/index.tsx index d1bfde5d12f73..d86f5fe62d66f 100644 --- a/x-pack/plugins/profiling/public/components/topn_functions/index.tsx +++ b/x-pack/plugins/profiling/public/components/topn_functions/index.tsx @@ -92,7 +92,7 @@ function SampleStat({ diffSamples?: number; totalSamples: number; }) { - const samplesLabel = `${samples.toLocaleString()}`; + const samplesLabel = samples.toLocaleString(); if (diffSamples === undefined || diffSamples === 0 || totalSamples === 0) { return <>{samplesLabel}; @@ -142,6 +142,12 @@ interface Props { comparisonTopNFunctions?: TopNFunctions; totalSeconds: number; isDifferentialView: boolean; + baselineScaleFactor?: number; + comparisonScaleFactor?: number; +} + +function scaleValue({ value, scaleFactor = 1 }: { value: number; scaleFactor?: number }) { + return value * scaleFactor; } export function TopNFunctionsTable({ @@ -152,6 +158,8 @@ export function TopNFunctionsTable({ comparisonTopNFunctions, totalSeconds, isDifferentialView, + baselineScaleFactor, + comparisonScaleFactor, }: Props) { const [selectedRow, setSelectedRow] = useState(); @@ -175,6 +183,11 @@ export function TopNFunctionsTable({ return topNFunctions.TopN.filter((topN) => topN.CountExclusive > 0).map((topN, i) => { const comparisonRow = comparisonDataById?.[topN.Id]; + const topNCountExclusiveScaled = scaleValue({ + value: topN.CountExclusive, + scaleFactor: baselineScaleFactor, + }); + const inclusiveCPU = (topN.CountInclusive / topNFunctions.TotalCount) * 100; const exclusiveCPU = (topN.CountExclusive / topNFunctions.TotalCount) * 100; const totalSamples = topN.CountExclusive; @@ -189,31 +202,43 @@ export function TopNFunctionsTable({ }) : undefined; - const diff = - comparisonTopNFunctions && comparisonRow - ? { - rank: topN.Rank - comparisonRow.Rank, - samples: topN.CountExclusive - comparisonRow.CountExclusive, - exclusiveCPU: - exclusiveCPU - - (comparisonRow.CountExclusive / comparisonTopNFunctions.TotalCount) * 100, - inclusiveCPU: - inclusiveCPU - - (comparisonRow.CountInclusive / comparisonTopNFunctions.TotalCount) * 100, - } - : undefined; + function calculateDiff() { + if (comparisonTopNFunctions && comparisonRow) { + const comparisonCountExclusiveScaled = scaleValue({ + value: comparisonRow.CountExclusive, + scaleFactor: comparisonScaleFactor, + }); + + return { + rank: topN.Rank - comparisonRow.Rank, + samples: topNCountExclusiveScaled - comparisonCountExclusiveScaled, + exclusiveCPU: + exclusiveCPU - + (comparisonRow.CountExclusive / comparisonTopNFunctions.TotalCount) * 100, + inclusiveCPU: + inclusiveCPU - + (comparisonRow.CountInclusive / comparisonTopNFunctions.TotalCount) * 100, + }; + } + } return { rank: topN.Rank, frame: topN.Frame, - samples: topN.CountExclusive, + samples: topNCountExclusiveScaled, exclusiveCPU, inclusiveCPU, impactEstimates, - diff, + diff: calculateDiff(), }; }); - }, [topNFunctions, comparisonTopNFunctions, totalSeconds]); + }, [ + topNFunctions, + comparisonTopNFunctions, + totalSeconds, + comparisonScaleFactor, + baselineScaleFactor, + ]); const theme = useEuiTheme(); diff --git a/x-pack/plugins/profiling/public/routing/index.tsx b/x-pack/plugins/profiling/public/routing/index.tsx index 5f80378eb73cf..28210598aad1c 100644 --- a/x-pack/plugins/profiling/public/routing/index.tsx +++ b/x-pack/plugins/profiling/public/routing/index.tsx @@ -9,12 +9,14 @@ import { toNumberRt } from '@kbn/io-ts-utils'; import { createRouter, Outlet } from '@kbn/typed-react-router-config'; import * as t from 'io-ts'; import React from 'react'; -import { FlameGraphComparisonMode, FlameGraphNormalizationMode } from '../../common/flamegraph'; import { TopNFunctionSortField, topNFunctionSortFieldRt } from '../../common/functions'; import { StackTracesDisplayOption, TopNType } from '../../common/stack_traces'; +import { ComparisonMode, NormalizationMode } from '../components/normalization_menu'; import { RedirectTo } from '../components/redirect_to'; import { FlameGraphsView } from '../views/flame_graphs_view'; -import { FunctionsView } from '../views/functions_view'; +import { FunctionsView } from '../views/functions'; +import { DifferentialTopNFunctionsView } from '../views/functions/differential_topn'; +import { TopNFunctionsView } from '../views/functions/topn'; import { NoDataView } from '../views/no_data_view'; import { StackTracesView } from '../views/stack_traces_view'; import { RouteBreadcrumb } from './route_breadcrumb'; @@ -117,14 +119,14 @@ const routes = { comparisonRangeTo: t.string, comparisonKuery: t.string, comparisonMode: t.union([ - t.literal(FlameGraphComparisonMode.Absolute), - t.literal(FlameGraphComparisonMode.Relative), + t.literal(ComparisonMode.Absolute), + t.literal(ComparisonMode.Relative), ]), }), t.partial({ normalizationMode: t.union([ - t.literal(FlameGraphNormalizationMode.Scale), - t.literal(FlameGraphNormalizationMode.Time), + t.literal(NormalizationMode.Scale), + t.literal(NormalizationMode.Time), ]), baseline: toNumberRt, comparison: toNumberRt, @@ -133,8 +135,8 @@ const routes = { }), defaults: { query: { - comparisonMode: FlameGraphComparisonMode.Absolute, - normalizationMode: FlameGraphNormalizationMode.Time, + comparisonMode: ComparisonMode.Absolute, + normalizationMode: NormalizationMode.Time, }, }, }, @@ -174,7 +176,7 @@ const routes = { })} href="/functions/topn" > - + ), }, @@ -186,16 +188,34 @@ const routes = { })} href="/functions/differential" > - + ), params: t.type({ - query: t.type({ - comparisonRangeFrom: t.string, - comparisonRangeTo: t.string, - comparisonKuery: t.string, - }), + query: t.intersection([ + t.type({ + comparisonRangeFrom: t.string, + comparisonRangeTo: t.string, + comparisonKuery: t.string, + normalizationMode: t.union([ + t.literal(NormalizationMode.Scale), + t.literal(NormalizationMode.Time), + ]), + }), + t.partial({ + baseline: toNumberRt, + comparison: toNumberRt, + }), + ]), }), + defaults: { + query: { + comparisonRangeFrom: 'now-15m', + comparisonRangeTo: 'now', + comparisonKuery: '', + normalizationMode: NormalizationMode.Time, + }, + }, }, }, }, diff --git a/x-pack/plugins/profiling/public/utils/get_flamegraph_model/index.ts b/x-pack/plugins/profiling/public/utils/get_flamegraph_model/index.ts index 616965dba3b19..08c08e2eb6014 100644 --- a/x-pack/plugins/profiling/public/utils/get_flamegraph_model/index.ts +++ b/x-pack/plugins/profiling/public/utils/get_flamegraph_model/index.ts @@ -9,9 +9,10 @@ import { i18n } from '@kbn/i18n'; import d3 from 'd3'; import { compact, range, sum, uniqueId } from 'lodash'; import { createColumnarViewModel } from '../../../common/columnar_view_model'; -import { ElasticFlameGraph, FlameGraphComparisonMode } from '../../../common/flamegraph'; +import { ElasticFlameGraph } from '../../../common/flamegraph'; import { FRAME_TYPE_COLOR_MAP, rgbToRGBA } from '../../../common/frame_type_colors'; import { describeFrameType, FrameType } from '../../../common/profiling'; +import { ComparisonMode } from '../../components/normalization_menu'; import { getInterpolationValue } from './get_interpolation_value'; const nullColumnarViewModel = { @@ -39,7 +40,7 @@ export function getFlamegraphModel({ colorSuccess: string; colorDanger: string; colorNeutral: string; - comparisonMode: FlameGraphComparisonMode; + comparisonMode: ComparisonMode; baseline?: number; comparison?: number; }): { @@ -135,23 +136,20 @@ export function getFlamegraphModel({ const comparisonTotalSamples = sum(comparisonFlamegraph.CountExclusive); const weightComparisonSide = - comparisonMode === FlameGraphComparisonMode.Relative - ? 1 - : (comparison ?? 1) / (baseline ?? 1); + comparisonMode === ComparisonMode.Relative ? 1 : (comparison ?? 1) / (baseline ?? 1); primaryFlamegraph.ID.forEach((nodeID, index) => { const samples = primaryFlamegraph.CountInclusive[index]; const comparisonSamples = comparisonNodesById[nodeID]?.CountInclusive as number | undefined; const foreground = - comparisonMode === FlameGraphComparisonMode.Absolute ? samples : samples / totalSamples; + comparisonMode === ComparisonMode.Absolute ? samples : samples / totalSamples; const background = - comparisonMode === FlameGraphComparisonMode.Absolute + comparisonMode === ComparisonMode.Absolute ? comparisonSamples : (comparisonSamples ?? 0) / comparisonTotalSamples; - const denominator = - comparisonMode === FlameGraphComparisonMode.Absolute ? totalSamples : foreground; + const denominator = comparisonMode === ComparisonMode.Absolute ? totalSamples : foreground; const interpolationValue = getInterpolationValue( foreground, diff --git a/x-pack/plugins/profiling/public/views/flame_graphs_view/flame_graph_search_panel.tsx b/x-pack/plugins/profiling/public/views/flame_graphs_view/flame_graph_search_panel.tsx index 14cd28fd9126a..6d1416f91079b 100644 --- a/x-pack/plugins/profiling/public/views/flame_graphs_view/flame_graph_search_panel.tsx +++ b/x-pack/plugins/profiling/public/views/flame_graphs_view/flame_graph_search_panel.tsx @@ -6,20 +6,24 @@ */ import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, EuiPanel } from '@elastic/eui'; import React from 'react'; -import { FlameGraphComparisonMode, FlameGraphNormalizationMode } from '../../../common/flamegraph'; import { useProfilingParams } from '../../hooks/use_profiling_params'; import { useProfilingRouter } from '../../hooks/use_profiling_router'; import { useProfilingRoutePath } from '../../hooks/use_profiling_route_path'; import { PrimaryAndComparisonSearchBar } from '../../components/primary_and_comparison_search_bar'; import { PrimaryProfilingSearchBar } from '../../components/profiling_app_page_template/primary_profiling_search_bar'; -import { DifferentialComparisonMode } from './differential_comparison_mode'; -import { FlameGraphNormalizationOptions, NormalizationMenu } from './normalization_menu'; +import { + ComparisonMode, + NormalizationMode, + NormalizationOptions, + NormalizationMenu, +} from '../../components/normalization_menu'; +import { DifferentialComparisonMode } from '../../components/differential_comparison_mode'; interface Props { isDifferentialView: boolean; - comparisonMode: FlameGraphComparisonMode; - normalizationMode: FlameGraphNormalizationMode; - normalizationOptions: FlameGraphNormalizationOptions; + comparisonMode: ComparisonMode; + normalizationMode: NormalizationMode; + normalizationOptions: NormalizationOptions; } export function FlameGraphSearchPanel({ @@ -32,7 +36,7 @@ export function FlameGraphSearchPanel({ const routePath = useProfilingRoutePath(); const profilingRouter = useProfilingRouter(); - function onChangeComparisonMode(nextComparisonMode: FlameGraphComparisonMode) { + function onChangeComparisonMode(nextComparisonMode: ComparisonMode) { if (!('comparisonRangeFrom' in query)) { return; } @@ -41,24 +45,24 @@ export function FlameGraphSearchPanel({ path, query: { ...query, - ...(nextComparisonMode === FlameGraphComparisonMode.Absolute + ...(nextComparisonMode === ComparisonMode.Absolute ? { - comparisonMode: FlameGraphComparisonMode.Absolute, + comparisonMode: ComparisonMode.Absolute, normalizationMode, } - : { comparisonMode: FlameGraphComparisonMode.Relative }), + : { comparisonMode: ComparisonMode.Relative }), }, }); } function onChangeNormalizationMode( - nextNormalizationMode: FlameGraphNormalizationMode, - options: FlameGraphNormalizationOptions + nextNormalizationMode: NormalizationMode, + options: NormalizationOptions ) { profilingRouter.push(routePath, { path: routePath, query: - nextNormalizationMode === FlameGraphNormalizationMode.Scale + nextNormalizationMode === NormalizationMode.Scale ? { ...query, baseline: options.baselineScale, @@ -82,7 +86,7 @@ export function FlameGraphSearchPanel({ comparisonMode={comparisonMode} onChange={onChangeComparisonMode} /> - {comparisonMode === FlameGraphComparisonMode.Absolute && ( + {comparisonMode === ComparisonMode.Absolute && ( diff --git a/x-pack/plugins/profiling/public/views/flame_graphs_view/index.tsx b/x-pack/plugins/profiling/public/views/flame_graphs_view/index.tsx index 2f0478ce1a823..b15936141f4ef 100644 --- a/x-pack/plugins/profiling/public/views/flame_graphs_view/index.tsx +++ b/x-pack/plugins/profiling/public/views/flame_graphs_view/index.tsx @@ -8,7 +8,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiPageHeaderContentProps } from '@elastic/e import { i18n } from '@kbn/i18n'; import { get } from 'lodash'; import React, { useState } from 'react'; -import { FlameGraphComparisonMode, FlameGraphNormalizationMode } from '../../../common/flamegraph'; import { useProfilingParams } from '../../hooks/use_profiling_params'; import { useProfilingRouter } from '../../hooks/use_profiling_router'; import { useProfilingRoutePath } from '../../hooks/use_profiling_route_path'; @@ -20,7 +19,11 @@ import { FlameGraph } from '../../components/flamegraph'; import { ProfilingAppPageTemplate } from '../../components/profiling_app_page_template'; import { RedirectTo } from '../../components/redirect_to'; import { FlameGraphSearchPanel } from './flame_graph_search_panel'; -import { FlameGraphNormalizationOptions } from './normalization_menu'; +import { + ComparisonMode, + NormalizationMode, + NormalizationOptions, +} from '../../components/normalization_menu'; export function FlameGraphsView({ children }: { children: React.ReactElement }) { const { @@ -37,13 +40,12 @@ export function FlameGraphsView({ children }: { children: React.ReactElement }) ); const comparisonKuery = 'comparisonKuery' in query ? query.comparisonKuery : ''; - const comparisonMode = - 'comparisonMode' in query ? query.comparisonMode : FlameGraphComparisonMode.Absolute; + const comparisonMode = 'comparisonMode' in query ? query.comparisonMode : ComparisonMode.Absolute; - const normalizationMode: FlameGraphNormalizationMode = get( + const normalizationMode: NormalizationMode = get( query, 'normalizationMode', - FlameGraphNormalizationMode.Time + NormalizationMode.Time ); const baselineScale: number = get(query, 'baseline', 1); @@ -58,7 +60,7 @@ export function FlameGraphsView({ children }: { children: React.ReactElement }) const baselineTime = 1; const comparisonTime = totalSeconds / totalComparisonSeconds; - const normalizationOptions: FlameGraphNormalizationOptions = { + const normalizationOptions: NormalizationOptions = { baselineScale, baselineTime, comparisonScale, @@ -146,6 +148,8 @@ export function FlameGraphsView({ children }: { children: React.ReactElement }) return ; } + const isNormalizedByTime = normalizationMode === NormalizationMode.Time; + return ( @@ -164,16 +168,8 @@ export function FlameGraphsView({ children }: { children: React.ReactElement }) primaryFlamegraph={data?.primaryFlamegraph} comparisonFlamegraph={data?.comparisonFlamegraph} comparisonMode={comparisonMode} - baseline={ - normalizationMode === FlameGraphNormalizationMode.Time - ? baselineTime - : baselineScale - } - comparison={ - normalizationMode === FlameGraphNormalizationMode.Time - ? comparisonTime - : comparisonScale - } + baseline={isNormalizedByTime ? baselineTime : baselineScale} + comparison={isNormalizedByTime ? comparisonTime : comparisonScale} showInformationWindow={showInformationWindow} toggleShowInformationWindow={toggleShowInformationWindow} /> diff --git a/x-pack/plugins/profiling/public/views/functions/differential_topn/index.tsx b/x-pack/plugins/profiling/public/views/functions/differential_topn/index.tsx new file mode 100644 index 0000000000000..01e2a21eb4524 --- /dev/null +++ b/x-pack/plugins/profiling/public/views/functions/differential_topn/index.tsx @@ -0,0 +1,208 @@ +/* + * 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 { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { TypeOf } from '@kbn/typed-react-router-config'; +import React from 'react'; +import { AsyncComponent } from '../../../components/async_component'; +import { useProfilingDependencies } from '../../../components/contexts/profiling_dependencies/use_profiling_dependencies'; +import { + NormalizationMenu, + NormalizationMode, + NormalizationOptions, +} from '../../../components/normalization_menu'; +import { PrimaryAndComparisonSearchBar } from '../../../components/primary_and_comparison_search_bar'; +import { TopNFunctionsTable } from '../../../components/topn_functions'; +import { useProfilingParams } from '../../../hooks/use_profiling_params'; +import { useProfilingRouter } from '../../../hooks/use_profiling_router'; +import { useProfilingRoutePath } from '../../../hooks/use_profiling_route_path'; +import { useTimeRange } from '../../../hooks/use_time_range'; +import { useTimeRangeAsync } from '../../../hooks/use_time_range_async'; +import { ProfilingRoutes } from '../../../routing'; + +export function DifferentialTopNFunctionsView() { + const { + path, + query, + query: { + rangeFrom, + rangeTo, + kuery, + sortDirection, + sortField, + comparisonKuery, + normalizationMode, + comparisonRangeFrom, + comparisonRangeTo, + baseline = 1, + comparison = 1, + }, + } = useProfilingParams('/functions/differential'); + + const timeRange = useTimeRange({ rangeFrom, rangeTo }); + const comparisonTimeRange = useTimeRange({ + rangeFrom: comparisonRangeFrom, + rangeTo: comparisonRangeTo, + optional: true, + }); + + const totalSeconds = timeRange.inSeconds.end - timeRange.inSeconds.start; + const totalComparisonSeconds = + (new Date(comparisonTimeRange.end!).getTime() - + new Date(comparisonTimeRange.start!).getTime()) / + 1000; + + const comparisonTime = totalSeconds / totalComparisonSeconds; + + const baselineTime = 1; + const normalizationOptions: NormalizationOptions = { + baselineScale: baseline, + baselineTime, + comparisonScale: comparison, + comparisonTime, + }; + + const { + services: { fetchTopNFunctions }, + } = useProfilingDependencies(); + + const state = useTimeRangeAsync( + ({ http }) => { + return fetchTopNFunctions({ + http, + timeFrom: timeRange.inSeconds.start, + timeTo: timeRange.inSeconds.end, + startIndex: 0, + endIndex: 100000, + kuery, + }); + }, + [timeRange.inSeconds.start, timeRange.inSeconds.end, kuery, fetchTopNFunctions] + ); + + const comparisonState = useTimeRangeAsync( + ({ http }) => { + if (!comparisonTimeRange.inSeconds.start || !comparisonTimeRange.inSeconds.end) { + return undefined; + } + return fetchTopNFunctions({ + http, + timeFrom: comparisonTimeRange.inSeconds.start, + timeTo: comparisonTimeRange.inSeconds.end, + startIndex: 0, + endIndex: 100000, + kuery: comparisonKuery, + }); + }, + [ + comparisonTimeRange.inSeconds.start, + comparisonTimeRange.inSeconds.end, + comparisonKuery, + fetchTopNFunctions, + ] + ); + + const routePath = useProfilingRoutePath() as + | '/functions' + | '/functions/topn' + | '/functions/differential'; + + const profilingRouter = useProfilingRouter(); + + function onChangeNormalizationMode( + nextNormalizationMode: NormalizationMode, + options: NormalizationOptions + ) { + profilingRouter.push(routePath, { + path: routePath, + query: + nextNormalizationMode === NormalizationMode.Scale + ? { + ...query, + baseline: options.baselineScale, + comparison: options.comparisonScale, + normalizationMode: nextNormalizationMode, + } + : { + ...query, + normalizationMode: nextNormalizationMode, + }, + }); + } + + const isNormalizedByTime = normalizationMode === NormalizationMode.Time; + + return ( + <> + + + + + + + + + + + + { + profilingRouter.push(routePath, { + path, + query: { + ...query, + sortField: nextSort.sortField, + sortDirection: nextSort.sortDirection, + }, + }); + }} + totalSeconds={timeRange.inSeconds.end - timeRange.inSeconds.start} + isDifferentialView={true} + baselineScaleFactor={isNormalizedByTime ? baselineTime : baseline} + /> + + + {comparisonTimeRange.inSeconds.start && comparisonTimeRange.inSeconds.end ? ( + + + { + profilingRouter.push(routePath, { + path, + query: { + ...(query as TypeOf['query']), + sortField: nextSort.sortField, + sortDirection: nextSort.sortDirection, + }, + }); + }} + topNFunctions={comparisonState.data} + comparisonTopNFunctions={state.data} + totalSeconds={ + comparisonTimeRange.inSeconds.end - comparisonTimeRange.inSeconds.start + } + isDifferentialView={true} + baselineScaleFactor={isNormalizedByTime ? comparisonTime : comparison} + comparisonScaleFactor={isNormalizedByTime ? baselineTime : baseline} + /> + + + ) : null} + + + + + ); +} diff --git a/x-pack/plugins/profiling/public/views/functions/index.tsx b/x-pack/plugins/profiling/public/views/functions/index.tsx new file mode 100644 index 0000000000000..1131056d9a9b8 --- /dev/null +++ b/x-pack/plugins/profiling/public/views/functions/index.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiPageHeaderContentProps } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; +import { NormalizationMode } from '../../components/normalization_menu'; +import { ProfilingAppPageTemplate } from '../../components/profiling_app_page_template'; +import { RedirectTo } from '../../components/redirect_to'; +import { useProfilingParams } from '../../hooks/use_profiling_params'; +import { useProfilingRouter } from '../../hooks/use_profiling_router'; +import { useProfilingRoutePath } from '../../hooks/use_profiling_route_path'; + +export function FunctionsView({ children }: { children: React.ReactElement }) { + const { query } = useProfilingParams('/functions/*'); + const routePath = useProfilingRoutePath() as + | '/functions' + | '/functions/topn' + | '/functions/differential'; + + const profilingRouter = useProfilingRouter(); + + if (routePath === '/functions') { + return ; + } + + const isDifferentialView = routePath === '/functions/differential'; + + const tabs: Required['tabs'] = [ + { + label: i18n.translate('xpack.profiling.functionsView.functionsTabLabel', { + defaultMessage: 'TopN functions', + }), + isSelected: !isDifferentialView, + href: profilingRouter.link('/functions/topn', { query }), + }, + { + label: i18n.translate('xpack.profiling.functionsView.differentialFunctionsTabLabel', { + defaultMessage: 'Differential TopN functions', + }), + isSelected: isDifferentialView, + href: profilingRouter.link('/functions/differential', { + query: { + ...query, + comparisonRangeFrom: query.rangeFrom, + comparisonRangeTo: query.rangeTo, + comparisonKuery: query.kuery, + normalizationMode: + 'normalizationMode' in query ? query.normalizationMode : NormalizationMode.Time, + }, + }), + }, + ]; + + return ( + + {children} + + ); +} diff --git a/x-pack/plugins/profiling/public/views/functions/topn/index.tsx b/x-pack/plugins/profiling/public/views/functions/topn/index.tsx new file mode 100644 index 0000000000000..08129d6320a11 --- /dev/null +++ b/x-pack/plugins/profiling/public/views/functions/topn/index.tsx @@ -0,0 +1,80 @@ +/* + * 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 { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import React from 'react'; +import { AsyncComponent } from '../../../components/async_component'; +import { useProfilingDependencies } from '../../../components/contexts/profiling_dependencies/use_profiling_dependencies'; +import { TopNFunctionsTable } from '../../../components/topn_functions'; +import { useProfilingParams } from '../../../hooks/use_profiling_params'; +import { useProfilingRouter } from '../../../hooks/use_profiling_router'; +import { useProfilingRoutePath } from '../../../hooks/use_profiling_route_path'; +import { useTimeRange } from '../../../hooks/use_time_range'; +import { useTimeRangeAsync } from '../../../hooks/use_time_range_async'; + +export function TopNFunctionsView() { + const { + path, + query, + query: { rangeFrom, rangeTo, kuery, sortDirection, sortField }, + } = useProfilingParams('/functions/topn'); + + const timeRange = useTimeRange({ rangeFrom, rangeTo }); + + const { + services: { fetchTopNFunctions }, + } = useProfilingDependencies(); + + const state = useTimeRangeAsync( + ({ http }) => { + return fetchTopNFunctions({ + http, + timeFrom: timeRange.inSeconds.start, + timeTo: timeRange.inSeconds.end, + startIndex: 0, + endIndex: 100000, + kuery, + }); + }, + [timeRange.inSeconds.start, timeRange.inSeconds.end, kuery, fetchTopNFunctions] + ); + + const routePath = useProfilingRoutePath() as '/functions/topn'; + + const profilingRouter = useProfilingRouter(); + + return ( + <> + + + + + + { + profilingRouter.push(routePath, { + path, + query: { + ...query, + sortField: nextSort.sortField, + sortDirection: nextSort.sortDirection, + }, + }); + }} + totalSeconds={timeRange.inSeconds.end - timeRange.inSeconds.start} + isDifferentialView={false} + /> + + + + + + + ); +} diff --git a/x-pack/plugins/profiling/public/views/functions_view/index.tsx b/x-pack/plugins/profiling/public/views/functions_view/index.tsx deleted file mode 100644 index 891998bc9d482..0000000000000 --- a/x-pack/plugins/profiling/public/views/functions_view/index.tsx +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { EuiFlexGroup, EuiFlexItem, EuiPageHeaderContentProps } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import { TypeOf } from '@kbn/typed-react-router-config'; -import React from 'react'; -import { useProfilingParams } from '../../hooks/use_profiling_params'; -import { useProfilingRouter } from '../../hooks/use_profiling_router'; -import { useProfilingRoutePath } from '../../hooks/use_profiling_route_path'; -import { useTimeRange } from '../../hooks/use_time_range'; -import { useTimeRangeAsync } from '../../hooks/use_time_range_async'; -import { ProfilingRoutes } from '../../routing'; -import { AsyncComponent } from '../../components/async_component'; -import { useProfilingDependencies } from '../../components/contexts/profiling_dependencies/use_profiling_dependencies'; -import { PrimaryAndComparisonSearchBar } from '../../components/primary_and_comparison_search_bar'; -import { ProfilingAppPageTemplate } from '../../components/profiling_app_page_template'; -import { RedirectTo } from '../../components/redirect_to'; -import { TopNFunctionsTable } from '../../components/topn_functions'; - -export function FunctionsView({ children }: { children: React.ReactElement }) { - const { - path, - query, - query: { rangeFrom, rangeTo, kuery, sortDirection, sortField }, - } = useProfilingParams('/functions/*'); - - const timeRange = useTimeRange({ rangeFrom, rangeTo }); - - const comparisonTimeRange = useTimeRange( - 'comparisonRangeFrom' in query - ? { rangeFrom: query.comparisonRangeFrom, rangeTo: query.comparisonRangeTo, optional: true } - : { rangeFrom: undefined, rangeTo: undefined, optional: true } - ); - - const comparisonKuery = 'comparisonKuery' in query ? query.comparisonKuery : ''; - - const { - services: { fetchTopNFunctions }, - } = useProfilingDependencies(); - - const state = useTimeRangeAsync( - ({ http }) => { - return fetchTopNFunctions({ - http, - timeFrom: timeRange.inSeconds.start, - timeTo: timeRange.inSeconds.end, - startIndex: 0, - endIndex: 100000, - kuery, - }); - }, - [timeRange.inSeconds.start, timeRange.inSeconds.end, kuery, fetchTopNFunctions] - ); - - const comparisonState = useTimeRangeAsync( - ({ http }) => { - if (!comparisonTimeRange.inSeconds.start || !comparisonTimeRange.inSeconds.end) { - return undefined; - } - return fetchTopNFunctions({ - http, - timeFrom: comparisonTimeRange.inSeconds.start, - timeTo: comparisonTimeRange.inSeconds.end, - startIndex: 0, - endIndex: 100000, - kuery: comparisonKuery, - }); - }, - [ - comparisonTimeRange.inSeconds.start, - comparisonTimeRange.inSeconds.end, - comparisonKuery, - fetchTopNFunctions, - ] - ); - - const routePath = useProfilingRoutePath() as - | '/functions' - | '/functions/topn' - | '/functions/differential'; - - const profilingRouter = useProfilingRouter(); - - const isDifferentialView = routePath === '/functions/differential'; - - const tabs: Required['tabs'] = [ - { - label: i18n.translate('xpack.profiling.functionsView.functionsTabLabel', { - defaultMessage: 'TopN functions', - }), - isSelected: !isDifferentialView, - href: profilingRouter.link('/functions/topn', { query }), - }, - { - label: i18n.translate('xpack.profiling.functionsView.differentialFunctionsTabLabel', { - defaultMessage: 'Differential TopN functions', - }), - isSelected: isDifferentialView, - href: profilingRouter.link('/functions/differential', { - query: { - ...query, - comparisonRangeFrom: query.rangeFrom, - comparisonRangeTo: query.rangeTo, - comparisonKuery: query.kuery, - }, - }), - }, - ]; - - if (routePath === '/functions') { - return ; - } - - return ( - - <> - - {isDifferentialView && ( - - - - )} - - - - - { - profilingRouter.push(routePath, { - path, - query: { - ...query, - sortField: nextSort.sortField, - sortDirection: nextSort.sortDirection, - }, - }); - }} - totalSeconds={timeRange.inSeconds.end - timeRange.inSeconds.start} - isDifferentialView={isDifferentialView} - /> - - - {isDifferentialView && - comparisonTimeRange.inSeconds.start && - comparisonTimeRange.inSeconds.end ? ( - - - { - profilingRouter.push(routePath, { - path, - query: { - ...(query as TypeOf< - ProfilingRoutes, - '/functions/differential' - >['query']), - sortField: nextSort.sortField, - sortDirection: nextSort.sortDirection, - }, - }); - }} - topNFunctions={comparisonState.data} - comparisonTopNFunctions={state.data} - totalSeconds={ - comparisonTimeRange.inSeconds.end - comparisonTimeRange.inSeconds.start - } - isDifferentialView={isDifferentialView} - /> - - - ) : null} - - - - {children} - - - ); -} diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index e302758ce1c05..a1a5ee63bd39e 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -27434,16 +27434,6 @@ "xpack.profiling.flameGraphLegend.improvement": "Amélioration", "xpack.profiling.flameGraphLegend.regression": "Régression", "xpack.profiling.flamegraphModel.noChange": "Aucune modification", - "xpack.profiling.flameGraphNormalizationMenu.normalizeBy": "Normaliser par", - "xpack.profiling.flameGraphNormalizationMenu.normalizeByScaleTooltip": "Sélectionnez Normaliser par heure pour comparer un ensemble de machines sur différentes périodes. Par exemple, si vous comparez la dernière heure aux dernières 24 heures, la période la plus courte (1 heure) est multipliée pour égaler la période la plus longue (24 heures).", - "xpack.profiling.flameGraphNormalizationMenu.normalizeByTimeTooltip": "Sélectionnez Normaliser par facteur d'échelle et définissez vos facteurs d'échelle de référence et de comparaison pour comparer un ensemble de machines de différentes tailles. Par exemple, vous pouvez comparer un déploiement de 10 % de machines à un déploiement de 90 % de machines.", - "xpack.profiling.flameGraphNormalizationMenu.scale": "Facteur de montée en charge", - "xpack.profiling.flameGraphNormalizationMenu.time": "Heure", - "xpack.profiling.flameGraphNormalizationMode.selectModeLegend": "Sélectionner un mode de normalisation pour le flame-graph", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeAbsoluteButtonLabel": "Abs", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeLegend": "Ce commutateur vous permet de basculer entre comparaison absolue et comparaison relative entre les deux graphes", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeRelativeButtonLabel": "Rel", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeTitle": "Format", "xpack.profiling.flameGraphsView.differentialFlameGraphTabLabel": "Flame-graph différentiel", "xpack.profiling.flameGraphsView.flameGraphTabLabel": "Flame-graph", "xpack.profiling.flameGraphTooltip.annualizedCo2": "CO2 annualisé", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index f0f986628419e..9e49ac2bea3f2 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -27416,16 +27416,6 @@ "xpack.profiling.flameGraphLegend.improvement": "改善", "xpack.profiling.flameGraphLegend.regression": "回帰", "xpack.profiling.flamegraphModel.noChange": "変更なし", - "xpack.profiling.flameGraphNormalizationMenu.normalizeBy": "正規化", - "xpack.profiling.flameGraphNormalizationMenu.normalizeByScaleTooltip": "[時間で正規化]を選択すると、異なる期間でコンピューターのセットを比較します。たとえば、過去1時間と過去24時間を比較する場合は、短い方の時間枠(1時間)が乗算され、長い方の時間枠(24時間)と照合されます。", - "xpack.profiling.flameGraphNormalizationMenu.normalizeByTimeTooltip": "[比率で正規化]を選択し、ベースラインと比較比率を設定すると、異なるサイズのコンピューターのセットを比較します。たとえば、コンピューターの10%のデプロイをコンピューターの90%のデプロイと比較できます。", - "xpack.profiling.flameGraphNormalizationMenu.scale": "倍率", - "xpack.profiling.flameGraphNormalizationMenu.time": "時間", - "xpack.profiling.flameGraphNormalizationMode.selectModeLegend": "フレームグラフの正規化モードを選択", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeAbsoluteButtonLabel": "Abs", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeLegend": "このスイッチでは、両方のグラフの絶対比較と相対比較を切り替えることができます", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeRelativeButtonLabel": "Rel", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeTitle": "フォーマット", "xpack.profiling.flameGraphsView.differentialFlameGraphTabLabel": "差分flamegraph", "xpack.profiling.flameGraphsView.flameGraphTabLabel": "Flamegraph", "xpack.profiling.flameGraphTooltip.annualizedCo2": "年間換算CO2", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 0f00f726dfd25..1b373abbe3ee3 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -27414,16 +27414,6 @@ "xpack.profiling.flameGraphLegend.improvement": "提升", "xpack.profiling.flameGraphLegend.regression": "回归", "xpack.profiling.flamegraphModel.noChange": "无更改", - "xpack.profiling.flameGraphNormalizationMenu.normalizeBy": "标准化依据", - "xpack.profiling.flameGraphNormalizationMenu.normalizeByScaleTooltip": "选择按时间标准化以跨不同时段比较一组机器。例如,如果您比较过去 1 小时与过去 24 小时的情况,则会将较短时间范围(1 小时)加倍以匹配更长时间范围(24 小时)。", - "xpack.profiling.flameGraphNormalizationMenu.normalizeByTimeTooltip": "选择按缩放因数标准化并设置基线和比较缩放因数,以比较不同大小的一组机器。例如,您可以将 10% 的机器部署与 90% 的机器部署进行比较。", - "xpack.profiling.flameGraphNormalizationMenu.scale": "缩放因数", - "xpack.profiling.flameGraphNormalizationMenu.time": "时间", - "xpack.profiling.flameGraphNormalizationMode.selectModeLegend": "为火焰图选择标准化模式", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeAbsoluteButtonLabel": "绝对", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeLegend": "此开关允许您在两个图表的绝对与相对比较之间进行切换", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeRelativeButtonLabel": "相对", - "xpack.profiling.flameGraphsView.differentialFlameGraphComparisonModeTitle": "格式", "xpack.profiling.flameGraphsView.differentialFlameGraphTabLabel": "差异火焰图", "xpack.profiling.flameGraphsView.flameGraphTabLabel": "火焰图", "xpack.profiling.flameGraphTooltip.annualizedCo2": "年化 CO2", From 11bcdb760663e7d35e5935bd669023810999c058 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Wed, 14 Jun 2023 12:07:18 +0200 Subject: [PATCH 13/89] [docs] remove invalid arg from scripts/generate_plugin example (#159466) --- docs/developer/plugin/plugin-tooling.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/plugin/plugin-tooling.asciidoc b/docs/developer/plugin/plugin-tooling.asciidoc index 5d515c99399de..14e6d46aaed1b 100644 --- a/docs/developer/plugin/plugin-tooling.asciidoc +++ b/docs/developer/plugin/plugin-tooling.asciidoc @@ -9,7 +9,7 @@ We recommend that you kick-start your plugin by generating it with the {kib-repo ["source","shell"] ----------- -node scripts/generate_plugin my_plugin_name # replace "my_plugin_name" with your desired plugin name +node scripts/generate_plugin ----------- [discrete] From d9fb3f4f24ff5c9080f30a4920e86a82a38d5e2e Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Wed, 14 Jun 2023 12:13:28 +0200 Subject: [PATCH 14/89] Make Operations team codeowners of /src/cli/serve (#159022) --- .github/CODEOWNERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7d57bd2924ba0..7e1058f28af48 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -920,6 +920,7 @@ x-pack/test/observability_functional @elastic/actionable-observability /src/dev/ @elastic/kibana-operations /src/setup_node_env/ @elastic/kibana-operations /src/cli/keystore/ @elastic/kibana-operations +/src/cli/serve/ @elastic/kibana-operations /.ci/es-snapshots/ @elastic/kibana-operations /.github/workflows/ @elastic/kibana-operations /vars/ @elastic/kibana-operations @@ -947,8 +948,8 @@ x-pack/test/observability_functional @elastic/actionable-observability # Core /config/kibana.yml @elastic/kibana-core /typings/ @elastic/kibana-core -/x-pack/test/saved_objects_field_count/ @elastic/kibana-core /test/analytics @elastic/kibana-core +/x-pack/test/saved_objects_field_count/ @elastic/kibana-core #CC# /src/core/server/csp/ @elastic/kibana-core #CC# /src/plugins/saved_objects/ @elastic/kibana-core #CC# /x-pack/plugins/cloud/ @elastic/kibana-core From a2bd9a78975895a82459adfbc10bdfc627e22785 Mon Sep 17 00:00:00 2001 From: Bena Kansara <69037875+benakansara@users.noreply.github.com> Date: Wed, 14 Jun 2023 12:30:27 +0200 Subject: [PATCH 15/89] Add log rate spike analysis to Logs alert details page (#158960) Resolves https://github.com/elastic/actionable-observability/issues/8 Adds log rate spike analysis to Logs threshold alert details page for the "Count" alerts. The logs spike analysis is shown for the following configurations: - Count alerts when condition is to check "more than" or "more than or equals" threshold The logs spike analysis is hidden for the following configurations: - Ratio alerts - If rule params contain group by - If the condition is to check "less than" or "less than or equals" threshold ### Note about Co-Pilot The PR also integrates Co-Pilot prompt. The prompt message needs to be updated with the correct field values from the analysis results, which will be done in a separate PR. ### Manual testing 1. Create a Log threshold rule 2. Ensure "Count" is selected 3. Ensure "more than" or "more than or equals" is selected for the threshold 4. Enter threshold 5. Save rule 6. Wait for alerts to be generated 7. Go to alert details page 8. Ensure "Explain Log Rate Spikes" is shown [Guide to generate test data](https://docs.google.com/document/d/1PfPU5mjFx_jWFUkgtaHVy7qPvgBC7g1l4LKe7Jn-qUc) ### Feature flag The Logs threshold alert details page is behind a feature flag. To test, add the following in the `kibana.dev.yml`: `xpack.observability.unsafe.alertDetails.logs.enabled: true` Screenshot 2023-06-12 at 20 18 34 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- packages/kbn-optimizer/limits.yml | 2 +- .../logs/log_threshold/query_helpers.ts | 165 +++++++++++++++++ x-pack/plugins/infra/kibana.jsonc | 2 + .../components/explain_log_rate_spike.tsx | 167 ++++++++++++++++++ .../alert_details_app_section/index.tsx | 21 ++- .../log_rate_spike_query.ts | 25 +++ .../log_threshold/log_threshold_rule_type.tsx | 8 +- x-pack/plugins/infra/public/types.ts | 3 + .../log_threshold_chart_preview.ts | 7 +- .../log_threshold_executor.test.ts | 12 +- .../log_threshold/log_threshold_executor.ts | 160 +---------------- x-pack/plugins/infra/tsconfig.json | 2 + .../plugins/observability/common/co_pilot.ts | 33 ++++ 13 files changed, 434 insertions(+), 173 deletions(-) create mode 100644 x-pack/plugins/infra/common/alerting/logs/log_threshold/query_helpers.ts create mode 100644 x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/explain_log_rate_spike.tsx create mode 100644 x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/log_rate_spike_query.ts diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index db5f45fb4447f..c389287ad4da6 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -95,7 +95,7 @@ pageLoadAssetSize: monitoring: 80000 navigation: 37269 newsfeed: 42228 - observability: 100000 + observability: 105500 observabilityOnboarding: 19573 observabilityShared: 52256 osquery: 107090 diff --git a/x-pack/plugins/infra/common/alerting/logs/log_threshold/query_helpers.ts b/x-pack/plugins/infra/common/alerting/logs/log_threshold/query_helpers.ts new file mode 100644 index 0000000000000..a88d8fa767654 --- /dev/null +++ b/x-pack/plugins/infra/common/alerting/logs/log_threshold/query_helpers.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + +import { RuleParams, Comparator, CountCriteria, Criterion, ExecutionTimeRange } from '.'; + +import { getIntervalInSeconds } from '../../../utils/get_interval_in_seconds'; + +export type LogThresholdRuleTypeParams = RuleParams; + +export const buildFiltersFromCriteria = ( + params: Pick & { criteria: CountCriteria }, + timestampField: string, + executionTimeRange?: ExecutionTimeRange +) => { + const { timeSize, timeUnit, criteria } = params; + const interval = `${timeSize}${timeUnit}`; + const intervalAsSeconds = getIntervalInSeconds(interval); + const intervalAsMs = intervalAsSeconds * 1000; + const to = executionTimeRange?.lte || Date.now(); + const from = executionTimeRange?.gte || to - intervalAsMs; + + const positiveCriteria = criteria.filter((criterion) => + positiveComparators.includes(criterion.comparator) + ); + const negativeCriteria = criteria.filter((criterion) => + negativeComparators.includes(criterion.comparator) + ); + // Positive assertions (things that "must" match) + const mustFilters = buildFiltersForCriteria(positiveCriteria); + // Negative assertions (things that "must not" match) + const mustNotFilters = buildFiltersForCriteria(negativeCriteria); + + const rangeFilter = { + range: { + [timestampField]: { + gte: from, + lte: to, + format: 'epoch_millis', + }, + }, + }; + + // For group by scenarios we'll pad the time range by 1 x the interval size on the left (lte) and right (gte), this is so + // a wider net is cast to "capture" the groups. This is to account for scenarios where we want ascertain if + // there were "no documents" (less than 1 for example). In these cases we may be missing documents to build the groups + // and match / not match the criteria. + const groupedRangeFilter = { + range: { + [timestampField]: { + gte: from - intervalAsMs, + lte: to + intervalAsMs, + format: 'epoch_millis', + }, + }, + }; + + return { rangeFilter, groupedRangeFilter, mustFilters, mustNotFilters }; +}; + +const buildFiltersForCriteria = (criteria: CountCriteria) => { + let filters: estypes.QueryDslQueryContainer[] = []; + + criteria.forEach((criterion) => { + const criterionQuery = buildCriterionQuery(criterion); + if (criterionQuery) { + filters = [...filters, criterionQuery]; + } + }); + return filters; +}; + +const buildCriterionQuery = (criterion: Criterion): estypes.QueryDslQueryContainer | undefined => { + const { field, value, comparator } = criterion; + + const queryType = getQueryMappingForComparator(comparator); + + switch (queryType) { + case 'term': + return { + term: { + [field]: { + value, + }, + }, + }; + case 'match': { + return { + match: { + [field]: value, + }, + }; + } + case 'match_phrase': { + return { + match_phrase: { + [field]: String(value), + }, + }; + } + case 'range': { + const comparatorToRangePropertyMapping: { + [key: string]: string; + } = { + [Comparator.LT]: 'lt', + [Comparator.LT_OR_EQ]: 'lte', + [Comparator.GT]: 'gt', + [Comparator.GT_OR_EQ]: 'gte', + }; + + const rangeProperty = comparatorToRangePropertyMapping[comparator]; + + return { + range: { + [field]: { + [rangeProperty]: value, + }, + }, + }; + } + default: { + return undefined; + } + } +}; + +export const positiveComparators = [ + Comparator.GT, + Comparator.GT_OR_EQ, + Comparator.LT, + Comparator.LT_OR_EQ, + Comparator.EQ, + Comparator.MATCH, + Comparator.MATCH_PHRASE, +]; + +export const negativeComparators = [ + Comparator.NOT_EQ, + Comparator.NOT_MATCH, + Comparator.NOT_MATCH_PHRASE, +]; + +export const queryMappings: { + [key: string]: string; +} = { + [Comparator.GT]: 'range', + [Comparator.GT_OR_EQ]: 'range', + [Comparator.LT]: 'range', + [Comparator.LT_OR_EQ]: 'range', + [Comparator.EQ]: 'term', + [Comparator.MATCH]: 'match', + [Comparator.MATCH_PHRASE]: 'match_phrase', + [Comparator.NOT_EQ]: 'term', + [Comparator.NOT_MATCH]: 'match', + [Comparator.NOT_MATCH_PHRASE]: 'match_phrase', +}; + +const getQueryMappingForComparator = (comparator: Comparator) => { + return queryMappings[comparator]; +}; diff --git a/x-pack/plugins/infra/kibana.jsonc b/x-pack/plugins/infra/kibana.jsonc index e381f2b753371..c9a9ca0e18674 100644 --- a/x-pack/plugins/infra/kibana.jsonc +++ b/x-pack/plugins/infra/kibana.jsonc @@ -9,6 +9,7 @@ "browser": true, "configPath": ["xpack", "infra"], "requiredPlugins": [ + "aiops", "alerting", "cases", "charts", @@ -17,6 +18,7 @@ "discover", "embeddable", "features", + "fieldFormats", "lens", "observability", "observabilityShared", diff --git a/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/explain_log_rate_spike.tsx b/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/explain_log_rate_spike.tsx new file mode 100644 index 0000000000000..059abd1a550d6 --- /dev/null +++ b/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/explain_log_rate_spike.tsx @@ -0,0 +1,167 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { FC, useEffect, useState } from 'react'; +import { pick } from 'lodash'; +import moment from 'moment'; + +import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiTitle } from '@elastic/eui'; + +import { FormattedMessage } from '@kbn/i18n-react'; +import { DataView } from '@kbn/data-views-plugin/common'; +import { ExplainLogRateSpikesContent } from '@kbn/aiops-plugin/public'; + +import { Rule } from '@kbn/alerting-plugin/common'; +import { CoPilotPrompt, TopAlert, useCoPilot } from '@kbn/observability-plugin/public'; +import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import { i18n } from '@kbn/i18n'; +import { CoPilotPromptId } from '@kbn/observability-plugin/common'; +import { ALERT_END } from '@kbn/rule-data-utils'; +import { useKibanaContextForPlugin } from '../../../../../hooks/use_kibana'; +import { + Comparator, + CountRuleParams, + hasGroupBy, + isRatioRuleParams, + PartialRuleParams, + ruleParamsRT, +} from '../../../../../../common/alerting/logs/log_threshold'; +import { decodeOrThrow } from '../../../../../../common/runtime_types'; +import { getESQueryForLogSpike } from '../log_rate_spike_query'; + +export interface AlertDetailsExplainLogRateSpikesSectionProps { + rule: Rule; + alert: TopAlert>; +} + +export const ExplainLogRateSpikes: FC = ({ + rule, + alert, +}) => { + const { services } = useKibanaContextForPlugin(); + const { dataViews, logViews } = services; + const [dataView, setDataView] = useState(); + const [esSearchQuery, setEsSearchQuery] = useState(); + + useEffect(() => { + const getDataView = async () => { + const { timestampField, dataViewReference } = await logViews.client.getResolvedLogView( + rule.params.logView + ); + + if (dataViewReference.id) { + const logDataView = await dataViews.get(dataViewReference.id); + setDataView(logDataView); + getQuery(timestampField); + } + }; + + const getQuery = (timestampField: string) => { + const esSearchRequest = getESQueryForLogSpike( + validatedParams as CountRuleParams, + timestampField + ) as QueryDslQueryContainer; + + if (esSearchRequest) { + setEsSearchQuery(esSearchRequest); + } + }; + + const validatedParams = decodeOrThrow(ruleParamsRT)(rule.params); + + if ( + !isRatioRuleParams(validatedParams) && + !hasGroupBy(validatedParams) && + (validatedParams.count.comparator === Comparator.GT || + validatedParams.count.comparator === Comparator.GT_OR_EQ) + ) { + getDataView(); + } + }, [rule, alert, dataViews, logViews]); + + const alertStart = moment(alert.start); + const alertEnd = alert.fields[ALERT_END] ? moment(alert.fields[ALERT_END]) : undefined; + + const timeRange = { + min: alertStart.clone().subtract(20, 'minutes'), + max: alertEnd ? alertEnd.clone().add(5, 'minutes') : moment(new Date()), + }; + + const initialAnalysisStart = { + baselineMin: alertStart.clone().subtract(10, 'minutes').valueOf(), + baselineMax: alertStart.clone().subtract(1, 'minutes').valueOf(), + deviationMin: alertStart.valueOf(), + deviationMax: alertStart.clone().add(10, 'minutes').isAfter(moment(new Date())) + ? moment(new Date()).valueOf() + : alertStart.clone().add(10, 'minutes').valueOf(), + }; + + const coPilotService = useCoPilot(); + + const explainLogSpikeParams = undefined; + + const explainLogSpikeTitle = i18n.translate( + 'xpack.infra.logs.alertDetails.explainLogSpikeTitle', + { + defaultMessage: 'Possible causes and remediations', + } + ); + + if (!dataView || !esSearchQuery) return null; + + return ( + + + + +

+ +

+
+
+ + + +
+ + {coPilotService?.isEnabled() && explainLogSpikeParams ? ( + + + + ) : null} + +
+ ); +}; diff --git a/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/index.tsx b/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/index.tsx index dc065ff8d17c8..2bb7c559a09fe 100644 --- a/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/index.tsx +++ b/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/index.tsx @@ -26,6 +26,7 @@ import { import { useEuiTheme } from '@elastic/eui'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; import { get } from 'lodash'; +import { CoPilotContextProvider } from '@kbn/observability-plugin/public'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; import { getChartGroupNames } from '../../../../../common/utils/get_chart_group_names'; import { @@ -38,6 +39,7 @@ import { CriterionPreview } from '../expression_editor/criterion_preview_chart'; import { AlertDetailsAppSectionProps } from './types'; import { Threshold } from '../../../common/components/threshold'; import LogsRatioChart from './components/logs_ratio_chart'; +import { ExplainLogRateSpikes } from './components/explain_log_rate_spike'; const LogsHistoryChart = React.lazy(() => import('./components/logs_history_chart')); const formatThreshold = (threshold: number) => String(threshold); @@ -48,7 +50,7 @@ const AlertDetailsAppSection = ({ setAlertSummaryFields, }: AlertDetailsAppSectionProps) => { const [selectedSeries, setSelectedSeries] = useState(''); - const { uiSettings } = useKibanaContextForPlugin().services; + const { uiSettings, observability } = useKibanaContextForPlugin().services; const { euiTheme } = useEuiTheme(); const theme = useTheme(); const timeRange = getPaddedAlertTimeRange(alert.fields[ALERT_START]!, alert.fields[ALERT_END]); @@ -248,12 +250,19 @@ const AlertDetailsAppSection = ({ ); }; + const getExplainLogRateSpikesSection = () => { + return ; + }; + return ( - - {getLogRatioChart()} - {getLogCountChart()} - {getLogsHistoryChart()} - + + + {getLogRatioChart()} + {getLogCountChart()} + {getExplainLogRateSpikesSection()} + {getLogsHistoryChart()} + + ); }; // eslint-disable-next-line import/no-default-export diff --git a/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/log_rate_spike_query.ts b/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/log_rate_spike_query.ts new file mode 100644 index 0000000000000..446182ddf217d --- /dev/null +++ b/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/log_rate_spike_query.ts @@ -0,0 +1,25 @@ +/* + * 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 { RuleParams, CountCriteria } from '../../../../../common/alerting/logs/log_threshold'; +import { buildFiltersFromCriteria } from '../../../../../common/alerting/logs/log_threshold/query_helpers'; + +export const getESQueryForLogSpike = ( + params: Pick & { criteria: CountCriteria }, + timestampField: string +): object => { + const { mustFilters, mustNotFilters } = buildFiltersFromCriteria(params, timestampField); + + const query = { + bool: { + filter: mustFilters, + ...(mustNotFilters.length > 0 && { must_not: mustNotFilters }), + }, + }; + + return query; +}; diff --git a/x-pack/plugins/infra/public/alerting/log_threshold/log_threshold_rule_type.tsx b/x-pack/plugins/infra/public/alerting/log_threshold/log_threshold_rule_type.tsx index 1138935ed3b8b..1d02f8291b0cf 100644 --- a/x-pack/plugins/infra/public/alerting/log_threshold/log_threshold_rule_type.tsx +++ b/x-pack/plugins/infra/public/alerting/log_threshold/log_threshold_rule_type.tsx @@ -8,7 +8,6 @@ import { i18n } from '@kbn/i18n'; import { ObservabilityRuleTypeModel } from '@kbn/observability-plugin/public'; import type { LocatorPublic } from '@kbn/share-plugin/public'; -import { lazy } from 'react'; import type { LogsLocatorParams } from '../../../common/locators'; import { LOG_DOCUMENT_COUNT_RULE_TYPE_ID, @@ -28,6 +27,11 @@ export function createLogThresholdRuleType( () => import('./components/expression_editor/editor') ); + const alertDetailsAppSection = createLazyComponentWithKibanaContext( + core, + () => import('./components/alert_details_app_section') + ); + return { id: LOG_DOCUMENT_COUNT_RULE_TYPE_ID, description: i18n.translate('xpack.infra.logs.alertFlyout.alertDescription', { @@ -37,7 +41,7 @@ export function createLogThresholdRuleType( documentationUrl(docLinks) { return `${docLinks.links.observability.logsThreshold}`; }, - alertDetailsAppSection: lazy(() => import('./components/alert_details_app_section')), + alertDetailsAppSection, ruleParamsExpression, validate: validateExpression, defaultActionMessage: i18n.translate( diff --git a/x-pack/plugins/infra/public/types.ts b/x-pack/plugins/infra/public/types.ts index e666b6b734bd8..fb1d2d4ab2a91 100644 --- a/x-pack/plugins/infra/public/types.ts +++ b/x-pack/plugins/infra/public/types.ts @@ -38,6 +38,7 @@ import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; import { CasesUiStart } from '@kbn/cases-plugin/public'; import { DiscoverStart } from '@kbn/discover-plugin/public'; import { UiActionsSetup, UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import { FieldFormatsSetup, FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import type { UnwrapPromise } from '../common/utility_types'; import type { SourceProviderProps, @@ -82,6 +83,7 @@ export interface InfraClientSetupDeps { embeddable: EmbeddableSetup; share: SharePluginSetup; lens: LensPublicStart; + fieldFormats: FieldFormatsSetup; } export interface InfraClientStartDeps { @@ -104,6 +106,7 @@ export interface InfraClientStartDeps { unifiedSearch: UnifiedSearchPublicPluginStart; usageCollection: UsageCollectionStart; telemetry: ITelemetryClient; + fieldFormats: FieldFormatsStart; } export type InfraClientCoreSetup = CoreSetup; diff --git a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_chart_preview.ts b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_chart_preview.ts index 43f4e6924012c..97c43ea578e73 100644 --- a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_chart_preview.ts +++ b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_chart_preview.ts @@ -23,11 +23,8 @@ import { ResolvedLogView } from '../../../../common/log_views'; import { decodeOrThrow } from '../../../../common/runtime_types'; import type { InfraPluginRequestHandlerContext } from '../../../types'; import { KibanaFramework } from '../../adapters/framework/kibana_framework_adapter'; -import { - buildFiltersFromCriteria, - getGroupedESQuery, - getUngroupedESQuery, -} from './log_threshold_executor'; +import { buildFiltersFromCriteria } from '../../../../common/alerting/logs/log_threshold/query_helpers'; +import { getGroupedESQuery, getUngroupedESQuery } from './log_threshold_executor'; const COMPOSITE_GROUP_SIZE = 40; diff --git a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts index 79a258c620baf..7e948a4bb8799 100644 --- a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts +++ b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts @@ -6,16 +6,12 @@ */ import { - positiveComparators, - negativeComparators, - queryMappings, - buildFiltersFromCriteria, - getUngroupedESQuery, getGroupedESQuery, processUngroupedResults, processGroupByResults, LogThresholdAlertFactory, LogThresholdAlertLimit, + getUngroupedESQuery, } from './log_threshold_executor'; import { Comparator, @@ -25,6 +21,12 @@ import { GroupedSearchQueryResponse, } from '../../../../common/alerting/logs/log_threshold'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { + positiveComparators, + negativeComparators, + buildFiltersFromCriteria, + queryMappings, +} from '../../../../common/alerting/logs/log_threshold/query_helpers'; // Mocks // const numericField = { diff --git a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts index d7c6871fafa03..7091fc62a2bba 100644 --- a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts +++ b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts @@ -39,7 +39,6 @@ import { Comparator, CountRuleParams, CountCriteria, - Criterion, getDenominator, getNumerator, GroupedSearchQueryResponse, @@ -52,10 +51,10 @@ import { UngroupedSearchQueryResponse, UngroupedSearchQueryResponseRT, ExecutionTimeRange, + Criterion, } from '../../../../common/alerting/logs/log_threshold'; import { decodeOrThrow } from '../../../../common/runtime_types'; import { getLogsAppAlertUrl } from '../../../../common/formatters/alert_link'; -import { getIntervalInSeconds } from '../../../../common/utils/get_interval_in_seconds'; import { InfraBackendLibs } from '../../infra_types'; import { AdditionalContext, @@ -71,9 +70,13 @@ import { getReasonMessageForUngroupedCountAlert, getReasonMessageForUngroupedRatioAlert, } from './reason_formatters'; +import { + buildFiltersFromCriteria, + LogThresholdRuleTypeParams, + positiveComparators, +} from '../../../../common/alerting/logs/log_threshold/query_helpers'; export type LogThresholdActionGroups = ActionGroupIdsOf; -export type LogThresholdRuleTypeParams = RuleParams; export type LogThresholdRuleTypeState = RuleTypeState; // no specific state used export type LogThresholdAlertState = AlertState; // no specific state used export type LogThresholdAlertContext = AlertContext; // no specific instance context used @@ -659,56 +662,6 @@ export const processGroupByRatioResults = ( alertLimit.setLimitReached(remainingAlertCount <= 0); }; -export const buildFiltersFromCriteria = ( - params: Pick & { criteria: CountCriteria }, - timestampField: string, - executionTimeRange?: ExecutionTimeRange -) => { - const { timeSize, timeUnit, criteria } = params; - const interval = `${timeSize}${timeUnit}`; - const intervalAsSeconds = getIntervalInSeconds(interval); - const intervalAsMs = intervalAsSeconds * 1000; - const to = executionTimeRange?.lte || Date.now(); - const from = executionTimeRange?.gte || to - intervalAsMs; - - const positiveCriteria = criteria.filter((criterion) => - positiveComparators.includes(criterion.comparator) - ); - const negativeCriteria = criteria.filter((criterion) => - negativeComparators.includes(criterion.comparator) - ); - // Positive assertions (things that "must" match) - const mustFilters = buildFiltersForCriteria(positiveCriteria); - // Negative assertions (things that "must not" match) - const mustNotFilters = buildFiltersForCriteria(negativeCriteria); - - const rangeFilter = { - range: { - [timestampField]: { - gte: from, - lte: to, - format: 'epoch_millis', - }, - }, - }; - - // For group by scenarios we'll pad the time range by 1 x the interval size on the left (lte) and right (gte), this is so - // a wider net is cast to "capture" the groups. This is to account for scenarios where we want ascertain if - // there were "no documents" (less than 1 for example). In these cases we may be missing documents to build the groups - // and match / not match the criteria. - const groupedRangeFilter = { - range: { - [timestampField]: { - gte: from - intervalAsMs, - lte: to + intervalAsMs, - format: 'epoch_millis', - }, - }, - }; - - return { rangeFilter, groupedRangeFilter, mustFilters, mustNotFilters }; -}; - export const getGroupedESQuery = ( params: Pick & { criteria: CountCriteria; @@ -865,107 +818,6 @@ export const getUngroupedESQuery = ( }; }; -const buildFiltersForCriteria = (criteria: CountCriteria) => { - let filters: estypes.QueryDslQueryContainer[] = []; - - criteria.forEach((criterion) => { - const criterionQuery = buildCriterionQuery(criterion); - if (criterionQuery) { - filters = [...filters, criterionQuery]; - } - }); - return filters; -}; - -const buildCriterionQuery = (criterion: Criterion): estypes.QueryDslQueryContainer | undefined => { - const { field, value, comparator } = criterion; - - const queryType = getQueryMappingForComparator(comparator); - - switch (queryType) { - case 'term': - return { - term: { - [field]: { - value, - }, - }, - }; - case 'match': { - return { - match: { - [field]: value, - }, - }; - } - case 'match_phrase': { - return { - match_phrase: { - [field]: String(value), - }, - }; - } - case 'range': { - const comparatorToRangePropertyMapping: { - [key: string]: string; - } = { - [Comparator.LT]: 'lt', - [Comparator.LT_OR_EQ]: 'lte', - [Comparator.GT]: 'gt', - [Comparator.GT_OR_EQ]: 'gte', - }; - - const rangeProperty = comparatorToRangePropertyMapping[comparator]; - - return { - range: { - [field]: { - [rangeProperty]: value, - }, - }, - }; - } - default: { - return undefined; - } - } -}; - -export const positiveComparators = [ - Comparator.GT, - Comparator.GT_OR_EQ, - Comparator.LT, - Comparator.LT_OR_EQ, - Comparator.EQ, - Comparator.MATCH, - Comparator.MATCH_PHRASE, -]; - -export const negativeComparators = [ - Comparator.NOT_EQ, - Comparator.NOT_MATCH, - Comparator.NOT_MATCH_PHRASE, -]; - -export const queryMappings: { - [key: string]: string; -} = { - [Comparator.GT]: 'range', - [Comparator.GT_OR_EQ]: 'range', - [Comparator.LT]: 'range', - [Comparator.LT_OR_EQ]: 'range', - [Comparator.EQ]: 'term', - [Comparator.MATCH]: 'match', - [Comparator.MATCH_PHRASE]: 'match_phrase', - [Comparator.NOT_EQ]: 'term', - [Comparator.NOT_MATCH]: 'match', - [Comparator.NOT_MATCH_PHRASE]: 'match_phrase', -}; - -const getQueryMappingForComparator = (comparator: Comparator) => { - return queryMappings[comparator]; -}; - const getUngroupedResults = async (query: object, esClient: ElasticsearchClient) => { return decodeOrThrow(UngroupedSearchQueryResponseRT)(await esClient.search(query)); }; diff --git a/x-pack/plugins/infra/tsconfig.json b/x-pack/plugins/infra/tsconfig.json index 73caa71b4665f..8ad10f4222fcb 100644 --- a/x-pack/plugins/infra/tsconfig.json +++ b/x-pack/plugins/infra/tsconfig.json @@ -64,6 +64,8 @@ "@kbn/observability-shared-plugin", "@kbn/ui-theme", "@kbn/ml-anomaly-utils", + "@kbn/aiops-plugin", + "@kbn/field-formats-plugin", "@kbn/core-http-server", ], "exclude": ["target/**/*"] diff --git a/x-pack/plugins/observability/common/co_pilot.ts b/x-pack/plugins/observability/common/co_pilot.ts index 77f7dd98b0c3e..a8c775dd7fc3c 100644 --- a/x-pack/plugins/observability/common/co_pilot.ts +++ b/x-pack/plugins/observability/common/co_pilot.ts @@ -22,6 +22,7 @@ export enum CoPilotPromptId { ApmExplainError = 'apmExplainError', LogsExplainMessage = 'logsExplainMessage', LogsFindSimilar = 'logsFindSimilar', + ExplainLogSpike = 'explainLogSpike', } const PERF_GPT_SYSTEM_MESSAGE = { @@ -64,6 +65,15 @@ const logEntryRt = t.type({ ), }); +const significantFieldValuesRt = t.type({ + fields: t.array( + t.type({ + field: t.string, + value: t.string, + }) + ), +}); + export const coPilotPrompts = { [CoPilotPromptId.ProfilingOptimizeFunction]: prompt({ params: t.type({ @@ -221,6 +231,29 @@ export const coPilotPrompts = { ]; }, }), + [CoPilotPromptId.ExplainLogSpike]: prompt({ + params: t.type({ + significantFieldValues: significantFieldValuesRt, + }), + messages: ({ significantFieldValues }) => { + const customMessageForPrompt = + significantFieldValues.fields.length === 1 + ? `There has been an alert on spike of logs. The spike mainly consists of logs with field ${significantFieldValues.fields[0]?.field} with value "${significantFieldValues.fields[0]?.value}".` + : significantFieldValues.fields.length > 1 + ? `There has been an alert on spike of logs. The spike mainly consists of logs with field ${significantFieldValues.fields[0]?.field} with value "${significantFieldValues.fields[0]?.value}" and field ${significantFieldValues.fields[1]?.field} with value "${significantFieldValues.fields[1]?.value}".` + : ''; + return [ + LOGS_SYSTEM_MESSAGE, + { + content: `You are an observability expert being consulted about an alert raised on elastic observability suite. + ${customMessageForPrompt} + Please advice on what could be the 3 top causes and remediations for this alert. Format your response on bullets. + `, + role: 'user', + }, + ]; + }, + }), }; export type CoPilotPromptMap = typeof coPilotPrompts; From 2fba1b651e146b2e232258d6b07c1bc236399548 Mon Sep 17 00:00:00 2001 From: Artem Shelkovnikov Date: Wed, 14 Jun 2023 13:50:23 +0200 Subject: [PATCH 16/89] Add Sharepoint Online native connector + change previous Sharepoint connector (#159570) ## Summary - Adding Sharepoint Online as Native connector to Enterprise Search - Renaming old Sharepoint Online & Server connector to Sharepoint Server connector; changing its icon; making it Beta instead of Tech Preview ### 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] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [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)) ### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- packages/kbn-doc-links/src/get_doc_links.ts | 1 + packages/kbn-doc-links/src/types.ts | 1 + .../common/connectors/connectors.ts | 19 ++- .../common/connectors/native_connectors.ts | 121 ++++++++++++++++++ .../search_index/connector/constants.ts | 7 + .../shared/doc_links/doc_links.ts | 3 + .../shared/icons/connector_icons.ts | 2 + .../public/assets/source_icons/sharepoint.svg | 3 + 8 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 x-pack/plugins/enterprise_search/public/assets/source_icons/sharepoint.svg diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index 4acfea150634b..77ab585491a46 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -145,6 +145,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { connectorsPostgreSQL: `${ENTERPRISE_SEARCH_DOCS}connectors-postgresql.html`, connectorsS3: `${ENTERPRISE_SEARCH_DOCS}connectors-s3.html`, connectorsSharepoint: `${ENTERPRISE_SEARCH_DOCS}connectors-sharepoint.html`, + connectorsSharepointOnline: `${ENTERPRISE_SEARCH_DOCS}connectors-sharepoint-online.html`, connectorsWorkplaceSearch: `${ENTERPRISE_SEARCH_DOCS}connectors.html#connectors-workplace-search`, crawlerExtractionRules: `${ENTERPRISE_SEARCH_DOCS}crawler-extraction-rules.html`, crawlerManaging: `${ENTERPRISE_SEARCH_DOCS}crawler-managing.html`, diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts index 819a6f0f4123b..f279dd29e6e12 100644 --- a/packages/kbn-doc-links/src/types.ts +++ b/packages/kbn-doc-links/src/types.ts @@ -130,6 +130,7 @@ export interface DocLinks { readonly connectorsPostgreSQL: string; readonly connectorsS3: string; readonly connectorsSharepoint: string; + readonly connectorsSharepointOnline: string; readonly connectorsWorkplaceSearch: string; readonly crawlerExtractionRules: string; readonly crawlerManaging: string; diff --git a/x-pack/plugins/enterprise_search/common/connectors/connectors.ts b/x-pack/plugins/enterprise_search/common/connectors/connectors.ts index 5cbc2a466f4fa..ba366cec67a03 100644 --- a/x-pack/plugins/enterprise_search/common/connectors/connectors.ts +++ b/x-pack/plugins/enterprise_search/common/connectors/connectors.ts @@ -129,16 +129,27 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 's3', }, { - iconPath: 'sharepoint_online.svg', - isBeta: false, + iconPath: 'sharepoint.svg', + isBeta: true, isNative: false, - isTechPreview: true, + isTechPreview: false, keywords: ['sharepoint', 'cloud', 'connector'], name: i18n.translate('xpack.enterpriseSearch.content.nativeConnectors.sharepoint.name', { - defaultMessage: 'Sharepoint Online & Server', + defaultMessage: 'Sharepoint Server', }), serviceType: 'sharepoint', }, + { + iconPath: 'sharepoint_online.svg', + isBeta: false, + isNative: true, + isTechPreview: false, + keywords: ['sharepoint', 'office365', 'cloud', 'connector'], + name: i18n.translate('xpack.enterpriseSearch.content.nativeConnectors.sharepoint_online.name', { + defaultMessage: 'Sharepoint Online', + }), + serviceType: 'sharepoint_online', + }, { iconPath: 'custom.svg', isBeta: true, diff --git a/x-pack/plugins/enterprise_search/common/connectors/native_connectors.ts b/x-pack/plugins/enterprise_search/common/connectors/native_connectors.ts index 101045e28dac7..30aa4e98e7a68 100644 --- a/x-pack/plugins/enterprise_search/common/connectors/native_connectors.ts +++ b/x-pack/plugins/enterprise_search/common/connectors/native_connectors.ts @@ -828,4 +828,125 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record = { docsUrl: docLinks.connectorsSharepoint, externalAuthDocsUrl: '', externalDocsUrl: '', + icon: CONNECTOR_ICONS.sharepoint, + platinumOnly: true, + }, + sharepoint_online: { + docsUrl: docLinks.connectorsSharepointOnline, + externalAuthDocsUrl: '', + externalDocsUrl: '', icon: CONNECTOR_ICONS.sharepoint_online, platinumOnly: true, }, diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts index d948ff53bf851..297c8d4b054f9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts @@ -76,6 +76,7 @@ class DocLinks { public connectorsPostgreSQL: string; public connectorsS3: string; public connectorsSharepoint: string; + public connectorsSharepointOnline: string; public connectorsWorkplaceSearch: string; public crawlerExtractionRules: string; public crawlerManaging: string; @@ -214,6 +215,7 @@ class DocLinks { this.connectorsPostgreSQL = ''; this.connectorsS3 = ''; this.connectorsSharepoint = ''; + this.connectorsSharepointOnline = ''; this.connectorsWorkplaceSearch = ''; this.crawlerExtractionRules = ''; this.crawlerManaging = ''; @@ -354,6 +356,7 @@ class DocLinks { this.connectorsPostgreSQL = docLinks.links.enterpriseSearch.connectorsPostgreSQL; this.connectorsS3 = docLinks.links.enterpriseSearch.connectorsS3; this.connectorsSharepoint = docLinks.links.enterpriseSearch.connectorsSharepoint; + this.connectorsSharepointOnline = docLinks.links.enterpriseSearch.connectorsSharepointOnline; this.connectorsWorkplaceSearch = docLinks.links.enterpriseSearch.connectorsWorkplaceSearch; this.crawlerExtractionRules = docLinks.links.enterpriseSearch.crawlerExtractionRules; this.crawlerManaging = docLinks.links.enterpriseSearch.crawlerManaging; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/icons/connector_icons.ts b/x-pack/plugins/enterprise_search/public/applications/shared/icons/connector_icons.ts index 85c3958fb0d0b..71c6647ada170 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/icons/connector_icons.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/icons/connector_icons.ts @@ -17,6 +17,7 @@ import network_drive from '../../../assets/source_icons/network_drive.svg'; import oracle from '../../../assets/source_icons/oracle.svg'; import postgresql from '../../../assets/source_icons/postgresql.svg'; import amazon_s3 from '../../../assets/source_icons/s3.svg'; +import sharepoint from '../../../assets/source_icons/sharepoint.svg'; import sharepoint_online from '../../../assets/source_icons/sharepoint_online.svg'; export const CONNECTOR_ICONS = { @@ -32,5 +33,6 @@ export const CONNECTOR_ICONS = { network_drive, oracle, postgresql, + sharepoint, sharepoint_online, }; diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/sharepoint.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/sharepoint.svg new file mode 100644 index 0000000000000..991493563e242 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/sharepoint.svg @@ -0,0 +1,3 @@ + + + From 09577fa0af71c41f15a7597cc0d61b45353145ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Kopyci=C5=84ski?= Date: Wed, 14 Jun 2023 14:13:15 +0200 Subject: [PATCH 17/89] Add react-router-dom-v5-compat (#159173) ## Summary Prep work for bumping react-router to v6 Following https://github.com/remix-run/react-router/discussions/8753 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../public/containers/app/index.tsx | 17 +-- .../public/examples/index.tsx | 89 +++++++------- examples/embeddable_explorer/public/app.tsx | 15 ++- .../public/components/app.tsx | 41 ++++--- .../public/components/step_four.tsx | 13 +-- .../public/app.tsx | 25 ++-- .../public/containers/app/index.tsx | 17 +-- .../public/components/app.tsx | 107 ++++++++--------- .../search_examples/public/application.tsx | 49 ++++---- .../public/todo/todo.tsx | 105 +++++++++-------- .../public/with_data_services/app.tsx | 5 +- package.json | 11 +- .../src/ui/app_router.tsx | 107 ++++++++--------- .../src/ui/project/header.tsx | 73 +++++++----- .../template/public/components/app.tsx.ejs | 109 +++++++++--------- .../src/router_provider.tsx | 5 +- packages/kbn-ui-shared-deps-npm/BUILD.bazel | 1 + .../kbn-ui-shared-deps-npm/webpack.config.js | 1 + .../kbn-ui-shared-deps-src/src/definitions.js | 1 + packages/kbn-ui-shared-deps-src/src/entry.js | 1 + packages/shared-ux/router/impl/router.tsx | 7 +- .../mount_management_section.tsx | 52 +++++---- .../public/dashboard_app/dashboard_router.tsx | 25 ++-- .../mount_management_section.tsx | 33 +++--- src/plugins/dev_tools/public/application.tsx | 53 +++++---- .../public/application/discover_router.tsx | 51 ++++---- .../alerting_example/public/application.tsx | 6 +- .../transaction_action_menu.test.tsx | 8 +- .../workpad/hooks/use_restore_history.ts | 2 +- .../workpad/hooks/use_workpad_history.ts | 2 +- .../cases/public/common/navigation/paths.ts | 20 +++- .../management/users/users_management_app.tsx | 7 +- .../cypress/tasks/common/filter_group.ts | 12 +- .../public/explore/network/pages/index.tsx | 2 +- .../public/application/app.tsx | 5 +- .../app/rum_dashboard/utils/test_helper.tsx | 13 ++- .../url_params_context.test.tsx | 41 ++++--- .../watcher/public/application/app.tsx | 13 ++- .../plugins/alerts/public/application.tsx | 29 ++--- .../plugins/cases/public/application.tsx | 9 +- .../applications/resolver_test/index.tsx | 29 ++--- yarn.lock | 107 +++++++++-------- 42 files changed, 710 insertions(+), 608 deletions(-) diff --git a/examples/bfetch_explorer/public/containers/app/index.tsx b/examples/bfetch_explorer/public/containers/app/index.tsx index 383ff6fa3000f..25678b2128d1c 100644 --- a/examples/bfetch_explorer/public/containers/app/index.tsx +++ b/examples/bfetch_explorer/public/containers/app/index.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { BrowserRouter as Router, Redirect, Switch } from 'react-router-dom'; +import { CompatRouter } from 'react-router-dom-v5-compat'; import { Route } from '@kbn/shared-ux-router'; import { EuiPage } from '@elastic/eui'; import { useDeps } from '../../hooks/use_deps'; @@ -26,13 +27,15 @@ export const App: React.FC = () => { return ( - - - - {routeElements} - - - + + + + + {routeElements} + + + + ); }; diff --git a/examples/content_management_examples/public/examples/index.tsx b/examples/content_management_examples/public/examples/index.tsx index 611bcde59d445..bb002510cb88a 100644 --- a/examples/content_management_examples/public/examples/index.tsx +++ b/examples/content_management_examples/public/examples/index.tsx @@ -10,6 +10,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; // eslint-disable-next-line no-restricted-imports import { Router, Switch, Route, Redirect } from 'react-router-dom'; +import { CompatRouter } from 'react-router-dom-v5-compat'; import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; import { EuiPageTemplate, EuiSideNav } from '@elastic/eui'; import { AppMountParameters, CoreStart } from '@kbn/core/public'; @@ -24,50 +25,52 @@ export const renderApp = ( ) => { ReactDOM.render( - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + , element ); diff --git a/examples/embeddable_explorer/public/app.tsx b/examples/embeddable_explorer/public/app.tsx index ac24e45818bf5..20b8c024849b3 100644 --- a/examples/embeddable_explorer/public/app.tsx +++ b/examples/embeddable_explorer/public/app.tsx @@ -9,6 +9,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter as Router, withRouter, RouteComponentProps } from 'react-router-dom'; +import { CompatRouter } from 'react-router-dom-v5-compat'; import { Route } from '@kbn/shared-ux-router'; import { EuiPage, EuiPageSideBar_Deprecated as EuiPageSideBar, EuiSideNav } from '@elastic/eui'; @@ -126,12 +127,14 @@ const EmbeddableExplorerApp = ({ return ( - - -