diff --git a/.buildkite/pull_requests.json b/.buildkite/pull_requests.json index 3c1380927fe6b..1c6e1ae3ce7bc 100644 --- a/.buildkite/pull_requests.json +++ b/.buildkite/pull_requests.json @@ -35,7 +35,10 @@ "^src/dev/prs/kibana_qa_pr_list\\.json$", "^\\.buildkite/pull_requests\\.json$" ], - "always_require_ci_on_changed": ["^docs/developer/plugin-list.asciidoc$"], + "always_require_ci_on_changed": [ + "^docs/developer/plugin-list.asciidoc$", + "/plugins/[^/]+/readme\\.(md|asciidoc)$" + ], "kibana_versions_check": true, "kibana_build_reuse": true, "kibana_build_reuse_pipeline_slugs": ["kibana-pull-request", "kibana-on-merge"], diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5c69f33b0f6c0..ea68df6a8bd8c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -17,6 +17,7 @@ /x-pack/plugins/graph/ @elastic/kibana-data-discovery /x-pack/test/functional/apps/graph @elastic/kibana-data-discovery /src/plugins/unified_field_list/ @elastic/kibana-data-discovery +/src/plugins/saved_objects_finder/ @elastic/kibana-data-discovery # Vis Editors /x-pack/plugins/lens/ @elastic/kibana-vis-editors diff --git a/.github/workflows/docs-preview-links.yml b/.github/workflows/docs-preview-links.yml new file mode 100644 index 0000000000000..79ea1de7748a9 --- /dev/null +++ b/.github/workflows/docs-preview-links.yml @@ -0,0 +1,26 @@ +name: Docs Preview Links + +on: + pull_request_target: + types: [opened] + paths: + - '**.asciidoc' + +jobs: + doc-preview: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v6 + name: Add doc preview links + with: + script: | + const pr = context.payload.pull_request; + const comment = `Documentation preview: + - ✨ [Changed pages](https://${context.repo.repo}_${pr.number}.docs-preview.app.elstc.co/diff)`; + + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: comment, + }); \ No newline at end of file diff --git a/.i18nrc.json b/.i18nrc.json index 2a301de5e7edf..3d223732dddaf 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -64,6 +64,7 @@ "newsfeed": "src/plugins/newsfeed", "presentationUtil": "src/plugins/presentation_util", "savedObjects": "src/plugins/saved_objects", + "savedObjectsFinder": "src/plugins/saved_objects_finder", "savedObjectsManagement": "src/plugins/saved_objects_management", "server": "src/legacy/server", "share": "src/plugins/share", diff --git a/api_docs/actions.devdocs.json b/api_docs/actions.devdocs.json index 12c93b9127a2f..598753b29af80 100644 --- a/api_docs/actions.devdocs.json +++ b/api_docs/actions.devdocs.json @@ -1810,7 +1810,7 @@ }, "<", "ActionTypeConfig", - ">[]>; getOAuthAccessToken: ({ type, options }: Readonly<{} & { options: Readonly<{} & { config: Readonly<{} & { clientId: string; jwtKeyId: string; userIdentifierValue: string; }>; tokenUrl: string; secrets: Readonly<{ privateKeyPassword?: string | undefined; } & { clientSecret: string; privateKey: string; }>; }> | Readonly<{} & { scope: string; config: Readonly<{} & { clientId: string; tenantId: string; }>; tokenUrl: string; secrets: Readonly<{} & { clientSecret: string; }>; }>; type: \"client\" | \"jwt\"; }>, configurationUtilities: ", + ">[]>; getOAuthAccessToken: ({ type, options }: Readonly<{} & { options: Readonly<{} & { config: Readonly<{} & { clientId: string; jwtKeyId: string; userIdentifierValue: string; }>; tokenUrl: string; secrets: Readonly<{ privateKeyPassword?: string | undefined; } & { clientSecret: string; privateKey: string; }>; }> | Readonly<{} & { scope: string; config: Readonly<{} & { clientId: string; tenantId: string; }>; tokenUrl: string; secrets: Readonly<{} & { clientSecret: string; }>; }>; type: \"jwt\" | \"client\"; }>, configurationUtilities: ", "ActionsConfigurationUtilities", ") => Promise<{ accessToken: string | null; }>; enqueueExecution: (options: ", "ExecuteOptions", diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index d37c0775ca4d9..fd159586d1394 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2022-09-01 +date: 2022-09-05 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 fe9893f3b017b..e8c147d3251fa 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 1462837c57f35..bba4554bee566 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index c57dc2d5086c9..077495a14b13c 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index efa8759a71aea..4a87a009eb3f2 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index a2d2635b4edd2..a16267ba36e6f 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2022-09-01 +date: 2022-09-05 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 c63c361dbc02f..12bfadbc6983d 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2022-09-01 +date: 2022-09-05 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 b001193302640..511fb6d718b45 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 84e6ec13ab95b..afae89f5e215c 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2022-09-01 +date: 2022-09-05 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 6358ba30a1706..9914b389bcd12 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index b957c054cb7d2..7aead5b437507 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index b3cc3b920d2a6..89fca19c761cd 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2022-09-01 +date: 2022-09-05 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 7fcde22a6297a..a537cfc353e26 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index ed57f9e4d13c1..ba26efb1724ff 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json index 4f7fe8ae25c55..a2e9624061590 100644 --- a/api_docs/core.devdocs.json +++ b/api_docs/core.devdocs.json @@ -2013,6 +2013,1715 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "core", + "id": "def-public.ChromeBadge", + "type": "Interface", + "tags": [], + "label": "ChromeBadge", + "description": [], + "signature": [ + "ChromeBadge" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeBadge.text", + "type": "string", + "tags": [], + "label": "text", + "description": [], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeBadge.tooltip", + "type": "string", + "tags": [], + "label": "tooltip", + "description": [], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeBadge.iconType", + "type": "CompoundType", + "tags": [], + "label": "iconType", + "description": [], + "signature": [ + "IconType", + " | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeDocTitle", + "type": "Interface", + "tags": [], + "label": "ChromeDocTitle", + "description": [ + "\nAPIs for accessing and updating the document title.\n" + ], + "signature": [ + "ChromeDocTitle" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeDocTitle.change", + "type": "Function", + "tags": [], + "label": "change", + "description": [ + "\nChanges the current document title.\n" + ], + "signature": [ + "(newTitle: string | string[]) => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeDocTitle.change.$1", + "type": "CompoundType", + "tags": [], + "label": "newTitle", + "description": [ + "The new title to set, either a string or string array" + ], + "signature": [ + "string | string[]" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeDocTitle.reset", + "type": "Function", + "tags": [], + "label": "reset", + "description": [ + "\nResets the document title to it's initial value.\n(meaning the one present in the title meta at application load.)" + ], + "signature": [ + "() => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtension", + "type": "Interface", + "tags": [], + "label": "ChromeHelpExtension", + "description": [], + "signature": [ + "ChromeHelpExtension" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtension.appName", + "type": "string", + "tags": [], + "label": "appName", + "description": [ + "\nProvide your plugin's name to create a header for separation" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtension.links", + "type": "Array", + "tags": [], + "label": "links", + "description": [ + "\nCreates unified links for sending users to documentation, GitHub, Discuss, or a custom link/button" + ], + "signature": [ + "ChromeHelpExtensionMenuLink", + "[] | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtension.content", + "type": "Function", + "tags": [], + "label": "content", + "description": [ + "\nCustom content to occur below the list of links" + ], + "signature": [ + "((element: HTMLDivElement, menuActions: ", + "ChromeHelpMenuActions", + ") => () => void) | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtension.content.$1", + "type": "Object", + "tags": [], + "label": "element", + "description": [], + "signature": [ + "HTMLDivElement" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtension.content.$2", + "type": "Object", + "tags": [], + "label": "menuActions", + "description": [], + "signature": [ + "ChromeHelpMenuActions" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuCustomLink", + "type": "Interface", + "tags": [], + "label": "ChromeHelpExtensionMenuCustomLink", + "description": [], + "signature": [ + "ChromeHelpExtensionMenuCustomLink", + " extends ", + "ChromeHelpExtensionLinkBase" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuCustomLink.linkType", + "type": "string", + "tags": [], + "label": "linkType", + "description": [ + "\nExtend EuiButtonEmpty to provide extra functionality" + ], + "signature": [ + "\"custom\"" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuCustomLink.href", + "type": "string", + "tags": [], + "label": "href", + "description": [ + "\nURL of the link" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuCustomLink.content", + "type": "CompoundType", + "tags": [], + "label": "content", + "description": [ + "\nContent of the button (in lieu of `children`)" + ], + "signature": [ + "boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuDiscussLink", + "type": "Interface", + "tags": [], + "label": "ChromeHelpExtensionMenuDiscussLink", + "description": [], + "signature": [ + "ChromeHelpExtensionMenuDiscussLink", + " extends ", + "ChromeHelpExtensionLinkBase" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuDiscussLink.linkType", + "type": "string", + "tags": [], + "label": "linkType", + "description": [ + "\nCreates a generic give feedback link with comment icon" + ], + "signature": [ + "\"discuss\"" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuDiscussLink.href", + "type": "string", + "tags": [], + "label": "href", + "description": [ + "\nURL to discuss page.\ni.e. `https://discuss.elastic.co/c/${appName}`" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuDocumentationLink", + "type": "Interface", + "tags": [], + "label": "ChromeHelpExtensionMenuDocumentationLink", + "description": [], + "signature": [ + "ChromeHelpExtensionMenuDocumentationLink", + " extends ", + "ChromeHelpExtensionLinkBase" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuDocumentationLink.linkType", + "type": "string", + "tags": [], + "label": "linkType", + "description": [ + "\nCreates a deep-link to app-specific documentation" + ], + "signature": [ + "\"documentation\"" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuDocumentationLink.href", + "type": "string", + "tags": [], + "label": "href", + "description": [ + "\nURL to documentation page.\ni.e. `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/${appName}.html`," + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuGitHubLink", + "type": "Interface", + "tags": [], + "label": "ChromeHelpExtensionMenuGitHubLink", + "description": [], + "signature": [ + "ChromeHelpExtensionMenuGitHubLink", + " extends ", + "ChromeHelpExtensionLinkBase" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuGitHubLink.linkType", + "type": "string", + "tags": [], + "label": "linkType", + "description": [ + "\nCreates a link to a new github issue in the Kibana repo" + ], + "signature": [ + "\"github\"" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuGitHubLink.labels", + "type": "Array", + "tags": [], + "label": "labels", + "description": [ + "\nInclude at least one app-specific label to be applied to the new github issue" + ], + "signature": [ + "string[]" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuGitHubLink.title", + "type": "string", + "tags": [], + "label": "title", + "description": [ + "\nProvides initial text for the title of the issue" + ], + "signature": [ + "string | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpMenuActions", + "type": "Interface", + "tags": [], + "label": "ChromeHelpMenuActions", + "description": [], + "signature": [ + "ChromeHelpMenuActions" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpMenuActions.hideHelpMenu", + "type": "Function", + "tags": [], + "label": "hideHelpMenu", + "description": [], + "signature": [ + "() => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControl", + "type": "Interface", + "tags": [], + "label": "ChromeNavControl", + "description": [], + "signature": [ + "ChromeNavControl" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControl.order", + "type": "number", + "tags": [], + "label": "order", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControl.mount", + "type": "Function", + "tags": [], + "label": "mount", + "description": [], + "signature": [ + "(element: HTMLElement) => ", + "UnmountCallback" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControl.mount.$1", + "type": "Uncategorized", + "tags": [], + "label": "element", + "description": [], + "signature": [ + "T" + ], + "path": "node_modules/@types/kbn__core-mount-utils-browser/index.d.ts", + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControls", + "type": "Interface", + "tags": [], + "label": "ChromeNavControls", + "description": [ + "\n{@link ChromeNavControls | APIs} for registering new controls to be displayed in the navigation bar.\n" + ], + "signature": [ + "ChromeNavControls" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControls.registerLeft", + "type": "Function", + "tags": [], + "label": "registerLeft", + "description": [ + "Register a nav control to be presented on the bottom-left side of the chrome header." + ], + "signature": [ + "(navControl: ", + "ChromeNavControl", + ") => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControls.registerLeft.$1", + "type": "Object", + "tags": [], + "label": "navControl", + "description": [], + "signature": [ + "ChromeNavControl" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControls.registerRight", + "type": "Function", + "tags": [], + "label": "registerRight", + "description": [ + "Register a nav control to be presented on the top-right side of the chrome header." + ], + "signature": [ + "(navControl: ", + "ChromeNavControl", + ") => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControls.registerRight.$1", + "type": "Object", + "tags": [], + "label": "navControl", + "description": [], + "signature": [ + "ChromeNavControl" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControls.registerCenter", + "type": "Function", + "tags": [], + "label": "registerCenter", + "description": [ + "Register a nav control to be presented on the top-center side of the chrome header." + ], + "signature": [ + "(navControl: ", + "ChromeNavControl", + ") => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeNavControls.registerCenter.$1", + "type": "Object", + "tags": [], + "label": "navControl", + "description": [], + "signature": [ + "ChromeNavControl" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink", + "type": "Interface", + "tags": [], + "label": "ChromeNavLink", + "description": [], + "signature": [ + "ChromeNavLink" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.id", + "type": "string", + "tags": [], + "label": "id", + "description": [ + "\nA unique identifier for looking up links." + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.title", + "type": "string", + "tags": [], + "label": "title", + "description": [ + "\nThe title of the application." + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.category", + "type": "Object", + "tags": [], + "label": "category", + "description": [ + "\nThe category the app lives in" + ], + "signature": [ + "AppCategory", + " | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.baseUrl", + "type": "string", + "tags": [], + "label": "baseUrl", + "description": [ + "\nThe base route used to open the root of an application." + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.url", + "type": "string", + "tags": [], + "label": "url", + "description": [ + "\nThe route used to open the default path and the deep links of an application." + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.order", + "type": "number", + "tags": [], + "label": "order", + "description": [ + "\nAn ordinal used to sort nav links relative to one another for display." + ], + "signature": [ + "number | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.tooltip", + "type": "string", + "tags": [], + "label": "tooltip", + "description": [ + "\nA tooltip shown when hovering over an app link." + ], + "signature": [ + "string | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.euiIconType", + "type": "string", + "tags": [], + "label": "euiIconType", + "description": [ + "\nA EUI iconType that will be used for the app's icon. This icon\ntakes precedence over the `icon` property." + ], + "signature": [ + "string | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [ + "\nA URL to an image file used as an icon. Used as a fallback\nif `euiIconType` is not provided." + ], + "signature": [ + "string | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.href", + "type": "string", + "tags": [], + "label": "href", + "description": [ + "\nSettled state between `url`, `baseUrl`, and `active`" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.disabled", + "type": "CompoundType", + "tags": [], + "label": "disabled", + "description": [ + "\nDisables a link from being clickable.\n" + ], + "signature": [ + "boolean | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLink.hidden", + "type": "CompoundType", + "tags": [], + "label": "hidden", + "description": [ + "\nHides a link from the navigation." + ], + "signature": [ + "boolean | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLinks", + "type": "Interface", + "tags": [], + "label": "ChromeNavLinks", + "description": [ + "\n{@link ChromeNavLinks | APIs} for manipulating nav links.\n" + ], + "signature": [ + "ChromeNavLinks" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLinks.getNavLinks$", + "type": "Function", + "tags": [], + "label": "getNavLinks$", + "description": [ + "\nGet an observable for a sorted list of navlinks." + ], + "signature": [ + "() => ", + "Observable", + "[]>" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLinks.get", + "type": "Function", + "tags": [], + "label": "get", + "description": [ + "\nGet the state of a navlink at this point in time." + ], + "signature": [ + "(id: string) => ", + "ChromeNavLink", + " | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLinks.get.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLinks.getAll", + "type": "Function", + "tags": [], + "label": "getAll", + "description": [ + "\nGet the current state of all navlinks." + ], + "signature": [ + "() => Readonly<", + "ChromeNavLink", + ">[]" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLinks.has", + "type": "Function", + "tags": [], + "label": "has", + "description": [ + "\nCheck whether or not a navlink exists." + ], + "signature": [ + "(id: string) => boolean" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLinks.has.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLinks.enableForcedAppSwitcherNavigation", + "type": "Function", + "tags": [], + "label": "enableForcedAppSwitcherNavigation", + "description": [ + "\nEnable forced navigation mode, which will trigger a page refresh\nwhen a nav link is clicked and only the hash is updated.\n" + ], + "signature": [ + "() => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeNavLinks.getForceAppSwitcherNavigation$", + "type": "Function", + "tags": [], + "label": "getForceAppSwitcherNavigation$", + "description": [ + "\nAn observable of the forced app switcher state." + ], + "signature": [ + "() => ", + "Observable", + "" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessed", + "type": "Interface", + "tags": [], + "label": "ChromeRecentlyAccessed", + "description": [ + "\n{@link ChromeRecentlyAccessed | APIs} for recently accessed history." + ], + "signature": [ + "ChromeRecentlyAccessed" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessed.add", + "type": "Function", + "tags": [], + "label": "add", + "description": [ + "\nAdds a new item to the recently accessed history.\n" + ], + "signature": [ + "(link: string, label: string, id: string) => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessed.add.$1", + "type": "string", + "tags": [], + "label": "link", + "description": [ + "a relative URL to the resource (not including the {@link HttpStart.basePath | `http.basePath`})" + ], + "signature": [ + "string" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessed.add.$2", + "type": "string", + "tags": [], + "label": "label", + "description": [ + "the label to display in the UI" + ], + "signature": [ + "string" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessed.add.$3", + "type": "string", + "tags": [], + "label": "id", + "description": [ + "a unique string used to de-duplicate the recently accessed list." + ], + "signature": [ + "string" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessed.get", + "type": "Function", + "tags": [], + "label": "get", + "description": [ + "\nGets an Array of the current recently accessed history.\n" + ], + "signature": [ + "() => ", + "ChromeRecentlyAccessedHistoryItem", + "[]" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessed.get$", + "type": "Function", + "tags": [], + "label": "get$", + "description": [ + "\nGets an Observable of the array of recently accessed history.\n" + ], + "signature": [ + "() => ", + "Observable", + "<", + "ChromeRecentlyAccessedHistoryItem", + "[]>" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessedHistoryItem", + "type": "Interface", + "tags": [], + "label": "ChromeRecentlyAccessedHistoryItem", + "description": [], + "signature": [ + "ChromeRecentlyAccessedHistoryItem" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessedHistoryItem.link", + "type": "string", + "tags": [], + "label": "link", + "description": [], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessedHistoryItem.label", + "type": "string", + "tags": [], + "label": "label", + "description": [], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeRecentlyAccessedHistoryItem.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart", + "type": "Interface", + "tags": [], + "label": "ChromeStart", + "description": [ + "\nChromeStart allows plugins to customize the global chrome header UI and\nenrich the UX with additional information about the current location of the\nbrowser.\n" + ], + "signature": [ + "ChromeStart" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.navLinks", + "type": "Object", + "tags": [], + "label": "navLinks", + "description": [ + "{@inheritdoc ChromeNavLinks}" + ], + "signature": [ + "ChromeNavLinks" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.navControls", + "type": "Object", + "tags": [], + "label": "navControls", + "description": [ + "{@inheritdoc ChromeNavControls}" + ], + "signature": [ + "ChromeNavControls" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.recentlyAccessed", + "type": "Object", + "tags": [], + "label": "recentlyAccessed", + "description": [ + "{@inheritdoc ChromeRecentlyAccessed}" + ], + "signature": [ + "ChromeRecentlyAccessed" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.docTitle", + "type": "Object", + "tags": [], + "label": "docTitle", + "description": [ + "{@inheritdoc ChromeDocTitle}" + ], + "signature": [ + "ChromeDocTitle" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.getIsVisible$", + "type": "Function", + "tags": [], + "label": "getIsVisible$", + "description": [ + "\nGet an observable of the current visibility state of the chrome." + ], + "signature": [ + "() => ", + "Observable", + "" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setIsVisible", + "type": "Function", + "tags": [], + "label": "setIsVisible", + "description": [ + "\nSet the temporary visibility for the chrome. This does nothing if the chrome is hidden\nby default and should be used to hide the chrome for things like full-screen modes\nwith an exit button." + ], + "signature": [ + "(isVisible: boolean) => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setIsVisible.$1", + "type": "boolean", + "tags": [], + "label": "isVisible", + "description": [], + "signature": [ + "boolean" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.getBadge$", + "type": "Function", + "tags": [], + "label": "getBadge$", + "description": [ + "\nGet an observable of the current badge" + ], + "signature": [ + "() => ", + "Observable", + "<", + "ChromeBadge", + " | undefined>" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setBadge", + "type": "Function", + "tags": [], + "label": "setBadge", + "description": [ + "\nOverride the current badge" + ], + "signature": [ + "(badge?: ", + "ChromeBadge", + " | undefined) => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setBadge.$1", + "type": "Object", + "tags": [], + "label": "badge", + "description": [], + "signature": [ + "ChromeBadge", + " | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.getBreadcrumbs$", + "type": "Function", + "tags": [], + "label": "getBreadcrumbs$", + "description": [ + "\nGet an observable of the current list of breadcrumbs" + ], + "signature": [ + "() => ", + "Observable", + "<", + "EuiBreadcrumbProps", + "[]>" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setBreadcrumbs", + "type": "Function", + "tags": [], + "label": "setBreadcrumbs", + "description": [ + "\nOverride the current set of breadcrumbs" + ], + "signature": [ + "(newBreadcrumbs: ", + "EuiBreadcrumbProps", + "[]) => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setBreadcrumbs.$1", + "type": "Array", + "tags": [], + "label": "newBreadcrumbs", + "description": [], + "signature": [ + "EuiBreadcrumbProps", + "[]" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.getBreadcrumbsAppendExtension$", + "type": "Function", + "tags": [], + "label": "getBreadcrumbsAppendExtension$", + "description": [ + "\nGet an observable of the current extension appended to breadcrumbs" + ], + "signature": [ + "() => ", + "Observable", + "<", + "ChromeBreadcrumbsAppendExtension", + " | undefined>" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setBreadcrumbsAppendExtension", + "type": "Function", + "tags": [], + "label": "setBreadcrumbsAppendExtension", + "description": [ + "\nMount an element next to the last breadcrumb" + ], + "signature": [ + "(breadcrumbsAppendExtension?: ", + "ChromeBreadcrumbsAppendExtension", + " | undefined) => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setBreadcrumbsAppendExtension.$1", + "type": "Object", + "tags": [], + "label": "breadcrumbsAppendExtension", + "description": [], + "signature": [ + "ChromeBreadcrumbsAppendExtension", + " | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.getCustomNavLink$", + "type": "Function", + "tags": [], + "label": "getCustomNavLink$", + "description": [ + "\nGet an observable of the current custom nav link" + ], + "signature": [ + "() => ", + "Observable", + " | undefined>" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setCustomNavLink", + "type": "Function", + "tags": [], + "label": "setCustomNavLink", + "description": [ + "\nOverride the current set of custom nav link" + ], + "signature": [ + "(newCustomNavLink?: Partial<", + "ChromeNavLink", + "> | undefined) => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setCustomNavLink.$1", + "type": "Object", + "tags": [], + "label": "newCustomNavLink", + "description": [], + "signature": [ + "Partial<", + "ChromeNavLink", + "> | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.getHelpExtension$", + "type": "Function", + "tags": [], + "label": "getHelpExtension$", + "description": [ + "\nGet an observable of the current custom help conttent" + ], + "signature": [ + "() => ", + "Observable", + "<", + "ChromeHelpExtension", + " | undefined>" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setHelpExtension", + "type": "Function", + "tags": [], + "label": "setHelpExtension", + "description": [ + "\nOverride the current set of custom help content" + ], + "signature": [ + "(helpExtension?: ", + "ChromeHelpExtension", + " | undefined) => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setHelpExtension.$1", + "type": "Object", + "tags": [], + "label": "helpExtension", + "description": [], + "signature": [ + "ChromeHelpExtension", + " | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setHelpSupportUrl", + "type": "Function", + "tags": [], + "label": "setHelpSupportUrl", + "description": [ + "\nOverride the default support URL shown in the help menu" + ], + "signature": [ + "(url: string) => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setHelpSupportUrl.$1", + "type": "string", + "tags": [], + "label": "url", + "description": [ + "The updated support URL" + ], + "signature": [ + "string" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.getIsNavDrawerLocked$", + "type": "Function", + "tags": [], + "label": "getIsNavDrawerLocked$", + "description": [ + "\nGet an observable of the current locked state of the nav drawer." + ], + "signature": [ + "() => ", + "Observable", + "" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setHeaderBanner", + "type": "Function", + "tags": [], + "label": "setHeaderBanner", + "description": [ + "\nSet the banner that will appear on top of the chrome header.\n" + ], + "signature": [ + "(headerBanner?: ", + "ChromeUserBanner", + " | undefined) => void" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.setHeaderBanner.$1", + "type": "Object", + "tags": [], + "label": "headerBanner", + "description": [], + "signature": [ + "ChromeUserBanner", + " | undefined" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeStart.hasHeaderBanner$", + "type": "Function", + "tags": [], + "label": "hasHeaderBanner$", + "description": [ + "\nGet an observable of the current header banner presence state." + ], + "signature": [ + "() => ", + "Observable", + "" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeUserBanner", + "type": "Interface", + "tags": [], + "label": "ChromeUserBanner", + "description": [], + "signature": [ + "ChromeUserBanner" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeUserBanner.content", + "type": "Function", + "tags": [], + "label": "content", + "description": [], + "signature": [ + "(element: HTMLDivElement) => ", + "UnmountCallback" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "core", + "id": "def-public.ChromeUserBanner.content.$1", + "type": "Uncategorized", + "tags": [], + "label": "element", + "description": [], + "signature": [ + "T" + ], + "path": "node_modules/@types/kbn__core-mount-utils-browser/index.d.ts", + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-public.ContextProviderOpts", @@ -2336,13 +4045,7 @@ "{@link ChromeStart}" ], "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeStart", - "text": "ChromeStart" - } + "ChromeStart" ], "path": "src/core/public/index.ts", "deprecated": false @@ -11435,6 +13138,58 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "core", + "id": "def-public.ChromeBreadcrumb", + "type": "Type", + "tags": [], + "label": "ChromeBreadcrumb", + "description": [], + "signature": [ + "Omit, \"color\" | \"aria-current\"> & ", + "CommonProps", + " & { href?: string | undefined; rel?: string | undefined; onClick?: React.MouseEventHandler | undefined; text: React.ReactNode; truncate?: boolean | undefined; color?: \"warning\" | \"subdued\" | \"primary\" | \"accent\" | \"success\" | \"danger\" | \"text\" | \"ghost\" | undefined; 'aria-current'?: boolean | \"date\" | \"location\" | \"time\" | \"page\" | \"false\" | \"true\" | \"step\" | undefined; }" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionLinkBase", + "type": "Type", + "tags": [], + "label": "ChromeHelpExtensionLinkBase", + "description": [], + "signature": [ + "{ iconType?: ", + "IconType", + " | undefined; 'data-test-subj'?: string | undefined; rel?: string | undefined; target?: string | (string & {}) | undefined; }" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.ChromeHelpExtensionMenuLink", + "type": "Type", + "tags": [], + "label": "ChromeHelpExtensionMenuLink", + "description": [], + "signature": [ + "ChromeHelpExtensionMenuGitHubLink", + " | ", + "ChromeHelpExtensionMenuDiscussLink", + " | ", + "ChromeHelpExtensionMenuDocumentationLink", + " | ", + "ChromeHelpExtensionMenuCustomLink" + ], + "path": "node_modules/@types/kbn__core-chrome-browser/index.d.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-public.DomainDeprecationDetails", @@ -17474,13 +19229,7 @@ "{@link I18nServiceSetup}" ], "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.I18nServiceSetup", - "text": "I18nServiceSetup" - } + "I18nServiceSetup" ], "path": "src/core/server/index.ts", "deprecated": false @@ -22202,7 +23951,10 @@ "tags": [], "label": "I18nServiceSetup", "description": [], - "path": "src/core/server/i18n/i18n_service.ts", + "signature": [ + "I18nServiceSetup" + ], + "path": "node_modules/@types/kbn__core-i18n-server/index.d.ts", "deprecated": false, "children": [ { @@ -22217,7 +23969,7 @@ "signature": [ "() => string" ], - "path": "src/core/server/i18n/i18n_service.ts", + "path": "node_modules/@types/kbn__core-i18n-server/index.d.ts", "deprecated": false, "children": [], "returnComment": [] @@ -22234,7 +23986,7 @@ "signature": [ "() => string[]" ], - "path": "src/core/server/i18n/i18n_service.ts", + "path": "node_modules/@types/kbn__core-i18n-server/index.d.ts", "deprecated": false, "children": [], "returnComment": [] diff --git a/api_docs/core.mdx b/api_docs/core.mdx index 4916c693c0a81..eb65d083535d0 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github description: API docs for the core plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] --- import coreObj from './core.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2656 | 1 | 101 | 3 | +| 2655 | 1 | 61 | 2 | ## Client diff --git a/api_docs/core_chrome.mdx b/api_docs/core_chrome.mdx deleted file mode 100644 index c7139a7f3a2db..0000000000000 --- a/api_docs/core_chrome.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -#### -#### 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: kibCoreChromePluginApi -slug: /kibana-dev-docs/api/core-chrome -title: "core.chrome" -image: https://source.unsplash.com/400x175/?github -description: API docs for the core.chrome plugin -date: 2022-09-01 -tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.chrome'] ---- -import coreChromeObj from './core_chrome.devdocs.json'; - - - -Contact [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 | -|-------------------|-----------|------------------------|-----------------| -| 2656 | 1 | 101 | 3 | - -## Client - -### Interfaces - - -### Consts, variables and types - - diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 8e0385dff45f4..6a37d9fbfd101 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2022-09-01 +date: 2022-09-05 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 df5b8c9cf9a12..642275cd67aac 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2022-09-01 +date: 2022-09-05 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 f4a26590c617b..5e26707389312 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2022-09-01 +date: 2022-09-05 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 175d515c6c6cf..6bfc1b0a442f8 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -8724,7 +8724,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined; }" + " | undefined; disableShardWarnings?: boolean | undefined; }" ], "path": "src/plugins/data/common/search/expressions/kibana_context_type.ts", "deprecated": false, diff --git a/api_docs/data.mdx b/api_docs/data.mdx index bff383645a9ca..5fac8adb791c2 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; @@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3130 | 34 | 2440 | 23 | +| 3131 | 34 | 2441 | 23 | ## Client diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 1502fc1e91ca8..a9911d5e38323 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; @@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3130 | 34 | 2440 | 23 | +| 3131 | 34 | 2441 | 23 | ## Client diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index 261178aea2113..0864af82f6d7f 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -13895,7 +13895,7 @@ "label": "handleRequest", "description": [], "signature": [ - "({ abortSignal, aggs, filters, indexPattern, inspectorAdapters, query, searchSessionId, searchSourceService, timeFields, timeRange, getNow, executionContext, }: ", + "({ abortSignal, aggs, filters, indexPattern, inspectorAdapters, query, searchSessionId, searchSourceService, timeFields, timeRange, disableShardWarnings, getNow, executionContext, }: ", { "pluginId": "data", "scope": "common", @@ -13923,7 +13923,7 @@ "id": "def-common.handleRequest.$1", "type": "Object", "tags": [], - "label": "{\n abortSignal,\n aggs,\n filters,\n indexPattern,\n inspectorAdapters,\n query,\n searchSessionId,\n searchSourceService,\n timeFields,\n timeRange,\n getNow,\n executionContext,\n}", + "label": "{\n abortSignal,\n aggs,\n filters,\n indexPattern,\n inspectorAdapters,\n query,\n searchSessionId,\n searchSourceService,\n timeFields,\n timeRange,\n disableShardWarnings,\n getNow,\n executionContext,\n}", "description": [], "signature": [ { @@ -24764,6 +24764,19 @@ "path": "src/plugins/data/common/search/expressions/esaggs/request_handler.ts", "deprecated": false }, + { + "parentPluginId": "data", + "id": "def-common.RequestHandlerParams.disableShardWarnings", + "type": "CompoundType", + "tags": [], + "label": "disableShardWarnings", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data/common/search/expressions/esaggs/request_handler.ts", + "deprecated": false + }, { "parentPluginId": "data", "id": "def-common.RequestHandlerParams.getNow", @@ -27560,7 +27573,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined; }" + " | undefined; disableShardWarnings?: boolean | undefined; }" ], "path": "src/plugins/data/common/search/expressions/kibana_context_type.ts", "deprecated": false, @@ -35203,7 +35216,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined; }" + " | undefined; disableShardWarnings?: boolean | undefined; }" ], "path": "src/plugins/data/common/search/expressions/remove_filter.ts", "deprecated": false, @@ -35506,7 +35519,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined; }" + " | undefined; disableShardWarnings?: boolean | undefined; }" ], "path": "src/plugins/data/common/search/expressions/select_filter.ts", "deprecated": false, diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index d779eeb341f46..ba61613880798 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; @@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3130 | 34 | 2440 | 23 | +| 3131 | 34 | 2441 | 23 | ## Client diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index cf8ca4a119868..e592a8a1ca832 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2022-09-01 +date: 2022-09-05 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 9c588fdd8c4ec..b9d7a398467f9 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2022-09-01 +date: 2022-09-05 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 7383bf7184ffb..c01cf995f9029 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index b127495ae8d45..8a0eba9b9f425 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2022-09-01 +date: 2022-09-05 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 eca2c39f0c36c..bade0c329b102 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2022-09-01 +date: 2022-09-05 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 f035fa7121272..9db1cb901a31d 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -47,7 +47,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | dataViewManagement | - | | | dataViewManagement | - | | | lens, observability, dataVisualizer, fleet, cloudSecurityPosture, discoverEnhanced, osquery, synthetics | - | -| | esUiShared, home, data, spaces, fleet, observability, ml, apm, indexLifecycleManagement, synthetics, upgradeAssistant, ux, savedObjectsManagement, kibanaOverview | - | +| | esUiShared, home, data, spaces, savedObjectsManagement, fleet, observability, ml, apm, indexLifecycleManagement, synthetics, upgradeAssistant, ux, kibanaOverview | - | | | management, spaces, ml, canvas, osquery, home | - | | | canvas | - | | | canvas | - | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index e5787ffe99055..f50b5b3c13eac 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index a88119d877913..5bd81a70f0649 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 0dd6600d0a2f4..cd20de4016f66 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.devdocs.json b/api_docs/discover.devdocs.json index 32a7594127216..26647daf615d6 100644 --- a/api_docs/discover.devdocs.json +++ b/api_docs/discover.devdocs.json @@ -985,6 +985,19 @@ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.tags", + "type": "Array", + "tags": [], + "label": "tags", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false + }, { "parentPluginId": "discover", "id": "def-public.SavedSearch.grid", diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index ca543b4f3d880..becc1a323b489 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 93 | 0 | 76 | 4 | +| 94 | 0 | 77 | 4 | ## Client diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 4f92ee261c6b5..a2d7a07ae49a5 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 4a09b14ffc334..1393f240b688c 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2022-09-01 +date: 2022-09-05 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 0931f3ac9e2e8..a5a4d99cd995f 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2022-09-01 +date: 2022-09-05 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 66e0cd382aaeb..3ce9a0ec247ad 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2022-09-01 +date: 2022-09-05 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 dfed4347cb1f5..f7e1687260975 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2022-09-01 +date: 2022-09-05 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 159234741e3f5..22e67fffb1b9d 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 89b3852de939d..b129e7b45acfd 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 0b88b48ab96f8..a5f3cdbd69668 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index b1171c4f7eddf..4afc972974d27 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2022-09-01 +date: 2022-09-05 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 b76481b526568..140651b1cd629 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2022-09-01 +date: 2022-09-05 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 7756fe7a6b248..79658f01632eb 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2022-09-01 +date: 2022-09-05 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 54847c7e75874..9a5e2cd685e68 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2022-09-01 +date: 2022-09-05 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 5661b94eaee43..980c44172b913 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2022-09-01 +date: 2022-09-05 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 bf0ff46e8976a..4bed9d1bd26fe 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2022-09-01 +date: 2022-09-05 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 fd5e1068954ff..77d45f83b6c25 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2022-09-01 +date: 2022-09-05 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 01d2a61ce0161..ba0de1a06fe7d 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2022-09-01 +date: 2022-09-05 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 988437a7c0f2d..09fffe72b458f 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2022-09-01 +date: 2022-09-05 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 69310da0cc4e3..6b937d1fc421b 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2022-09-01 +date: 2022-09-05 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 f758fb1b3a99c..6e09d6d3e27af 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2022-09-01 +date: 2022-09-05 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 e871d7fe47e97..b1eb05d85b946 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2022-09-01 +date: 2022-09-05 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 164230ac0324b..3090e2ca5ae36 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2022-09-01 +date: 2022-09-05 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 2c8c6126952c2..dd9f2dd9ca414 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2022-09-01 +date: 2022-09-05 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 8511967652973..bdc8e583f61a1 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2022-09-01 +date: 2022-09-05 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 3ad115a7055ce..bf827c90f00d7 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2022-09-01 +date: 2022-09-05 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 308c1c0d8c93a..504dc53aac8ad 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2022-09-01 +date: 2022-09-05 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 73da383d6b952..239c2196e6633 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index ab500a6ef26a1..248d4f279793b 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -4875,7 +4875,15 @@ "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, - " | undefined; bumpRevision?: boolean | undefined; force?: boolean | undefined; skipEnsureInstalled?: boolean | undefined; skipUniqueNameVerification?: boolean | undefined; overwrite?: boolean | undefined; } | undefined) => Promise<", + " | undefined; bumpRevision?: boolean | undefined; force?: boolean | undefined; skipEnsureInstalled?: boolean | undefined; skipUniqueNameVerification?: boolean | undefined; overwrite?: boolean | undefined; packageInfo?: ", + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.PackageInfo", + "text": "PackageInfo" + }, + " | undefined; } | undefined) => Promise<", { "pluginId": "fleet", "scope": "common", @@ -5056,6 +5064,26 @@ ], "path": "x-pack/plugins/fleet/server/services/package_policy.ts", "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-server.PackagePolicyServiceInterface.create.$4.packageInfo", + "type": "CompoundType", + "tags": [], + "label": "packageInfo", + "description": [], + "signature": [ + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.PackageInfo", + "text": "PackageInfo" + }, + " | undefined" + ], + "path": "x-pack/plugins/fleet/server/services/package_policy.ts", + "deprecated": false } ] } @@ -8725,6 +8753,21 @@ ], "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.FleetServerAgent.components", + "type": "Array", + "tags": [], + "label": "components", + "description": [ + "\nComponents array" + ], + "signature": [ + "FleetServerAgentComponent[] | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent.ts", + "deprecated": false } ], "initialIsOpen": false @@ -13242,6 +13285,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.FleetServerAgentComponentStatus", + "type": "Type", + "tags": [], + "label": "FleetServerAgentComponentStatus", + "description": [], + "signature": [ + "\"degraded\" | \"starting\" | \"configuring\" | \"healthy\" | \"failed\" | \"stopping\" | \"stopped\"" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.FullAgentPolicyOutput", @@ -15683,6 +15740,20 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.FleetServerAgentComponentStatuses", + "type": "Object", + "tags": [], + "label": "FleetServerAgentComponentStatuses", + "description": [], + "signature": [ + "readonly [\"starting\", \"configuring\", \"healthy\", \"degraded\", \"failed\", \"stopping\", \"stopped\"]" + ], + "path": "x-pack/plugins/fleet/common/constants/agent.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.fleetSetupRouteService", diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 48a80eb69c00e..a91815e1237e8 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 965 | 3 | 870 | 10 | +| 969 | 3 | 873 | 10 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 3d613ff7869fa..6103a7b82ab4b 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 2dc98931b03e6..a7a4e2c588e7b 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 3229a251e07f6..b5ad96a5f2a19 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2022-09-01 +date: 2022-09-05 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 644dbfcda89c9..270b8a847f2a5 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2022-09-01 +date: 2022-09-05 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 f7fd5898e0572..7b5c9c58bda66 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2022-09-01 +date: 2022-09-05 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 1e192892a4a47..bf4099a93cda9 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2022-09-01 +date: 2022-09-05 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 a3fcc57893402..fada03848b9cf 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2022-09-01 +date: 2022-09-05 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 e3ad091f606c8..ad1e1862df361 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2022-09-01 +date: 2022-09-05 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 d9d6a190c92e9..eb40373a982c1 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2022-09-01 +date: 2022-09-05 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 e5932c76bd156..8c607c84520a7 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 67e188a4937b7..ea63d7589fc45 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] --- import kbnAlertsObj from './kbn_alerts.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 8203d3dbfc46f..8198f9302590e 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2022-09-01 +date: 2022-09-05 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 2f6633447cd8e..62ed5ab1ae750 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2022-09-01 +date: 2022-09-05 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 40bc01ca40cba..1795ffeb73cb2 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 838eafa293192..f888bba14b79e 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2022-09-01 +date: 2022-09-05 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 ef2ee6cab8f45..68ae12af77e72 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2022-09-01 +date: 2022-09-05 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 631aa639cef16..42723f81eee51 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index c0bf17b9b52f4..3dc263cc741db 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2022-09-01 +date: 2022-09-05 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 db1697719b527..fd8d3a5798e80 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index a312c9d1b1055..605cde20f7a0c 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2022-09-01 +date: 2022-09-05 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 43d2749dc378a..5c9b60a3fd900 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 14b1978d7c966..5ad4a4144f792 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2022-09-01 +date: 2022-09-05 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 6fa1692fe5840..5eabeb9f04706 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2022-09-01 +date: 2022-09-05 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 4c32cc74f1bab..3332fa7884c1d 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2022-09-01 +date: 2022-09-05 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 6f90e3c6075dd..dc5e8c79acab8 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2022-09-01 +date: 2022-09-05 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 d0db5f798032c..fd34dab65f093 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index d8354f616a496..4101d97d0ec4d 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2022-09-01 +date: 2022-09-05 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 472d3fed3bef2..746a5597925b1 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2022-09-01 +date: 2022-09-05 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 31733070906f1..8b824f59c015e 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 5c3c7c9910fe7..91e6c6678e960 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 8decde88fe7d9..11517290237d5 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 e34b55c5db7f5..2e9299cd6baf0 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 b518c1f4e1c05..9b85445dbd003 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 62689aac0210e..14ee4919b6014 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2022-09-01 +date: 2022-09-05 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 95348fde0535a..efd24de4dc261 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 86a9761146095..dc16cc9b5b539 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index d67729cb7a182..f46981e8a2324 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 ebcbf21e0bec3..df7e0d2a9ec2f 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 e8a12979266c5..9b2d6dd168399 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 3ed864a662430..3eb490e8495b4 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2022-09-01 +date: 2022-09-05 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_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index dcd6888128983..23b7115cc6c75 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 92c07ba06f121..ea484edd1e612 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2022-09-01 +date: 2022-09-05 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 3df6ebf57cee3..eb7393556f063 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 0f759499c4c0a..242026e8a64d4 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 f69aa2db6c37c..c0f81de5033ea 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 008e1d8bf02b3..1dbf215025d8c 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2022-09-01 +date: 2022-09-05 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 7185603cedb1f..8c001d9c448a4 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2022-09-01 +date: 2022-09-05 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 8c5fe9c7d0f9e..05acb611809e0 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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/core_chrome.devdocs.json b/api_docs/kbn_core_chrome_browser.devdocs.json similarity index 56% rename from api_docs/core_chrome.devdocs.json rename to api_docs/kbn_core_chrome_browser.devdocs.json index 1928cb999d09a..040c18b5f0b0b 100644 --- a/api_docs/core_chrome.devdocs.json +++ b/api_docs/kbn_core_chrome_browser.devdocs.json @@ -1,42 +1,58 @@ { - "id": "core.chrome", + "id": "@kbn/core-chrome-browser", "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { "classes": [], "functions": [], "interfaces": [ { - "parentPluginId": "core", - "id": "def-public.ChromeBadge", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeBadge", "type": "Interface", "tags": [], "label": "ChromeBadge", "description": [], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/types.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeBadge.text", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeBadge.text", "type": "string", "tags": [], "label": "text", "description": [], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/types.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeBadge.tooltip", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeBadge.tooltip", "type": "string", "tags": [], "label": "tooltip", "description": [], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/types.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeBadge.iconType", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeBadge.iconType", "type": "CompoundType", "tags": [], "label": "iconType", @@ -45,27 +61,70 @@ "IconType", " | undefined" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/types.ts", "deprecated": false } ], "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeDocTitle", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeBreadcrumbsAppendExtension", + "type": "Interface", + "tags": [], + "label": "ChromeBreadcrumbsAppendExtension", + "description": [], + "path": "packages/core/chrome/core-chrome-browser/src/breadcrumb.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeBreadcrumbsAppendExtension.content", + "type": "Function", + "tags": [], + "label": "content", + "description": [], + "signature": [ + "(element: HTMLDivElement) => ", + "UnmountCallback" + ], + "path": "packages/core/chrome/core-chrome-browser/src/breadcrumb.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeBreadcrumbsAppendExtension.content.$1", + "type": "Uncategorized", + "tags": [], + "label": "element", + "description": [], + "signature": [ + "T" + ], + "path": "node_modules/@types/kbn__core-mount-utils-browser/index.d.ts", + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeDocTitle", "type": "Interface", "tags": [], "label": "ChromeDocTitle", "description": [ "\nAPIs for accessing and updating the document title.\n" ], - "path": "src/core/public/chrome/doc_title/doc_title_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/doc_title.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeDocTitle.change", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeDocTitle.change", "type": "Function", "tags": [], "label": "change", @@ -75,12 +134,12 @@ "signature": [ "(newTitle: string | string[]) => void" ], - "path": "src/core/public/chrome/doc_title/doc_title_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/doc_title.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeDocTitle.change.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeDocTitle.change.$1", "type": "CompoundType", "tags": [], "label": "newTitle", @@ -90,7 +149,7 @@ "signature": [ "string | string[]" ], - "path": "src/core/public/chrome/doc_title/doc_title_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/doc_title.ts", "deprecated": false, "isRequired": true } @@ -98,8 +157,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeDocTitle.reset", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeDocTitle.reset", "type": "Function", "tags": [], "label": "reset", @@ -109,7 +168,7 @@ "signature": [ "() => void" ], - "path": "src/core/public/chrome/doc_title/doc_title_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/doc_title.ts", "deprecated": false, "children": [], "returnComment": [] @@ -118,30 +177,30 @@ "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtension", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtension", "type": "Interface", "tags": [], "label": "ChromeHelpExtension", "description": [], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtension.appName", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtension.appName", "type": "string", "tags": [], "label": "appName", "description": [ "\nProvide your plugin's name to create a header for separation" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtension.links", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtension.links", "type": "Array", "tags": [], "label": "links", @@ -150,20 +209,20 @@ ], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionMenuLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionMenuLink", "text": "ChromeHelpExtensionMenuLink" }, "[] | undefined" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtension.content", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtension.content", "type": "Function", "tags": [], "label": "content", @@ -173,20 +232,20 @@ "signature": [ "((element: HTMLDivElement, menuActions: ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpMenuActions", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpMenuActions", "text": "ChromeHelpMenuActions" }, ") => () => void) | undefined" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtension.content.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtension.content.$1", "type": "Object", "tags": [], "label": "element", @@ -194,27 +253,27 @@ "signature": [ "HTMLDivElement" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "isRequired": true }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtension.content.$2", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtension.content.$2", "type": "Object", "tags": [], "label": "menuActions", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpMenuActions", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpMenuActions", "text": "ChromeHelpMenuActions" } ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "isRequired": true } @@ -225,35 +284,35 @@ "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuCustomLink", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuCustomLink", "type": "Interface", "tags": [], "label": "ChromeHelpExtensionMenuCustomLink", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionMenuCustomLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionMenuCustomLink", "text": "ChromeHelpExtensionMenuCustomLink" }, " extends ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionLinkBase", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionLinkBase", "text": "ChromeHelpExtensionLinkBase" } ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuCustomLink.linkType", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuCustomLink.linkType", "type": "string", "tags": [], "label": "linkType", @@ -263,24 +322,24 @@ "signature": [ "\"custom\"" ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuCustomLink.href", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuCustomLink.href", "type": "string", "tags": [], "label": "href", "description": [ "\nURL of the link" ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuCustomLink.content", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuCustomLink.content", "type": "CompoundType", "tags": [], "label": "content", @@ -290,42 +349,42 @@ "signature": [ "boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined" ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false } ], "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuDiscussLink", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuDiscussLink", "type": "Interface", "tags": [], "label": "ChromeHelpExtensionMenuDiscussLink", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionMenuDiscussLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionMenuDiscussLink", "text": "ChromeHelpExtensionMenuDiscussLink" }, " extends ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionLinkBase", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionLinkBase", "text": "ChromeHelpExtensionLinkBase" } ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuDiscussLink.linkType", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuDiscussLink.linkType", "type": "string", "tags": [], "label": "linkType", @@ -335,54 +394,54 @@ "signature": [ "\"discuss\"" ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuDiscussLink.href", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuDiscussLink.href", "type": "string", "tags": [], "label": "href", "description": [ "\nURL to discuss page.\ni.e. `https://discuss.elastic.co/c/${appName}`" ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false } ], "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuDocumentationLink", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuDocumentationLink", "type": "Interface", "tags": [], "label": "ChromeHelpExtensionMenuDocumentationLink", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionMenuDocumentationLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionMenuDocumentationLink", "text": "ChromeHelpExtensionMenuDocumentationLink" }, " extends ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionLinkBase", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionLinkBase", "text": "ChromeHelpExtensionLinkBase" } ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuDocumentationLink.linkType", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuDocumentationLink.linkType", "type": "string", "tags": [], "label": "linkType", @@ -392,54 +451,54 @@ "signature": [ "\"documentation\"" ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuDocumentationLink.href", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuDocumentationLink.href", "type": "string", "tags": [], "label": "href", "description": [ "\nURL to documentation page.\ni.e. `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/${appName}.html`," ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false } ], "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuGitHubLink", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuGitHubLink", "type": "Interface", "tags": [], "label": "ChromeHelpExtensionMenuGitHubLink", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionMenuGitHubLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionMenuGitHubLink", "text": "ChromeHelpExtensionMenuGitHubLink" }, " extends ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionLinkBase", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionLinkBase", "text": "ChromeHelpExtensionLinkBase" } ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuGitHubLink.linkType", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuGitHubLink.linkType", "type": "string", "tags": [], "label": "linkType", @@ -449,12 +508,12 @@ "signature": [ "\"github\"" ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuGitHubLink.labels", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuGitHubLink.labels", "type": "Array", "tags": [], "label": "labels", @@ -464,12 +523,12 @@ "signature": [ "string[]" ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuGitHubLink.title", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuGitHubLink.title", "type": "string", "tags": [], "label": "title", @@ -479,25 +538,25 @@ "signature": [ "string | undefined" ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false } ], "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpMenuActions", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpMenuActions", "type": "Interface", "tags": [], "label": "ChromeHelpMenuActions", "description": [], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeHelpMenuActions.hideHelpMenu", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpMenuActions.hideHelpMenu", "type": "Function", "tags": [], "label": "hideHelpMenu", @@ -505,7 +564,7 @@ "signature": [ "() => void" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "children": [], "returnComment": [] @@ -514,18 +573,18 @@ "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavControl", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControl", "type": "Interface", "tags": [], "label": "ChromeNavControl", "description": [], - "path": "src/core/public/chrome/nav_controls/nav_controls_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_controls.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeNavControl.order", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControl.order", "type": "number", "tags": [], "label": "order", @@ -533,12 +592,12 @@ "signature": [ "number | undefined" ], - "path": "src/core/public/chrome/nav_controls/nav_controls_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_controls.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavControl.mount", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControl.mount", "type": "Function", "tags": [], "label": "mount", @@ -547,13 +606,13 @@ "(element: HTMLElement) => ", "UnmountCallback" ], - "path": "src/core/public/chrome/nav_controls/nav_controls_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_controls.ts", "deprecated": false, "returnComment": [], "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeNavControl.mount.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControl.mount.$1", "type": "Uncategorized", "tags": [], "label": "element", @@ -570,20 +629,20 @@ "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavControls", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControls", "type": "Interface", "tags": [], "label": "ChromeNavControls", "description": [ "\n{@link ChromeNavControls | APIs} for registering new controls to be displayed in the navigation bar.\n" ], - "path": "src/core/public/chrome/nav_controls/nav_controls_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_controls.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeNavControls.registerLeft", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControls.registerLeft", "type": "Function", "tags": [], "label": "registerLeft", @@ -593,34 +652,34 @@ "signature": [ "(navControl: ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavControl", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavControl", "text": "ChromeNavControl" }, ") => void" ], - "path": "src/core/public/chrome/nav_controls/nav_controls_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_controls.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeNavControls.registerLeft.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControls.registerLeft.$1", "type": "Object", "tags": [], "label": "navControl", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavControl", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavControl", "text": "ChromeNavControl" } ], - "path": "src/core/public/chrome/nav_controls/nav_controls_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_controls.ts", "deprecated": false, "isRequired": true } @@ -628,8 +687,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavControls.registerRight", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControls.registerRight", "type": "Function", "tags": [], "label": "registerRight", @@ -639,34 +698,34 @@ "signature": [ "(navControl: ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavControl", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavControl", "text": "ChromeNavControl" }, ") => void" ], - "path": "src/core/public/chrome/nav_controls/nav_controls_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_controls.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeNavControls.registerRight.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControls.registerRight.$1", "type": "Object", "tags": [], "label": "navControl", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavControl", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavControl", "text": "ChromeNavControl" } ], - "path": "src/core/public/chrome/nav_controls/nav_controls_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_controls.ts", "deprecated": false, "isRequired": true } @@ -674,8 +733,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavControls.registerCenter", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControls.registerCenter", "type": "Function", "tags": [], "label": "registerCenter", @@ -685,34 +744,34 @@ "signature": [ "(navControl: ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavControl", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavControl", "text": "ChromeNavControl" }, ") => void" ], - "path": "src/core/public/chrome/nav_controls/nav_controls_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_controls.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeNavControls.registerCenter.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavControls.registerCenter.$1", "type": "Object", "tags": [], "label": "navControl", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavControl", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavControl", "text": "ChromeNavControl" } ], - "path": "src/core/public/chrome/nav_controls/nav_controls_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_controls.ts", "deprecated": false, "isRequired": true } @@ -723,42 +782,42 @@ "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink", "type": "Interface", "tags": [], "label": "ChromeNavLink", "description": [], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.id", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.id", "type": "string", "tags": [], "label": "id", "description": [ "\nA unique identifier for looking up links." ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.title", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.title", "type": "string", "tags": [], "label": "title", "description": [ "\nThe title of the application." ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.category", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.category", "type": "Object", "tags": [], "label": "category", @@ -769,36 +828,36 @@ "AppCategory", " | undefined" ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.baseUrl", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.baseUrl", "type": "string", "tags": [], "label": "baseUrl", "description": [ "\nThe base route used to open the root of an application." ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.url", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.url", "type": "string", "tags": [], "label": "url", "description": [ "\nThe route used to open the default path and the deep links of an application." ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.order", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.order", "type": "number", "tags": [], "label": "order", @@ -808,12 +867,12 @@ "signature": [ "number | undefined" ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.tooltip", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.tooltip", "type": "string", "tags": [], "label": "tooltip", @@ -823,12 +882,12 @@ "signature": [ "string | undefined" ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.euiIconType", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.euiIconType", "type": "string", "tags": [], "label": "euiIconType", @@ -838,12 +897,12 @@ "signature": [ "string | undefined" ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.icon", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.icon", "type": "string", "tags": [], "label": "icon", @@ -853,24 +912,24 @@ "signature": [ "string | undefined" ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.href", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.href", "type": "string", "tags": [], "label": "href", "description": [ "\nSettled state between `url`, `baseUrl`, and `active`" ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.disabled", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.disabled", "type": "CompoundType", "tags": [], "label": "disabled", @@ -880,12 +939,12 @@ "signature": [ "boolean | undefined" ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLink.hidden", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLink.hidden", "type": "CompoundType", "tags": [], "label": "hidden", @@ -895,27 +954,27 @@ "signature": [ "boolean | undefined" ], - "path": "src/core/public/chrome/nav_links/nav_link.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false } ], "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLinks", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLinks", "type": "Interface", "tags": [], "label": "ChromeNavLinks", "description": [ "\n{@link ChromeNavLinks | APIs} for manipulating nav links.\n" ], - "path": "src/core/public/chrome/nav_links/nav_links_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeNavLinks.getNavLinks$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLinks.getNavLinks$", "type": "Function", "tags": [], "label": "getNavLinks$", @@ -927,22 +986,22 @@ "Observable", "[]>" ], - "path": "src/core/public/chrome/nav_links/nav_links_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLinks.get", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLinks.get", "type": "Function", "tags": [], "label": "get", @@ -952,20 +1011,20 @@ "signature": [ "(id: string) => ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavLink", "text": "ChromeNavLink" }, " | undefined" ], - "path": "src/core/public/chrome/nav_links/nav_links_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeNavLinks.get.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLinks.get.$1", "type": "string", "tags": [], "label": "id", @@ -973,7 +1032,7 @@ "signature": [ "string" ], - "path": "src/core/public/chrome/nav_links/nav_links_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false, "isRequired": true } @@ -981,8 +1040,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLinks.getAll", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLinks.getAll", "type": "Function", "tags": [], "label": "getAll", @@ -992,22 +1051,22 @@ "signature": [ "() => Readonly<", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavLink", "text": "ChromeNavLink" }, ">[]" ], - "path": "src/core/public/chrome/nav_links/nav_links_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLinks.has", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLinks.has", "type": "Function", "tags": [], "label": "has", @@ -1017,12 +1076,12 @@ "signature": [ "(id: string) => boolean" ], - "path": "src/core/public/chrome/nav_links/nav_links_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeNavLinks.has.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLinks.has.$1", "type": "string", "tags": [], "label": "id", @@ -1030,7 +1089,7 @@ "signature": [ "string" ], - "path": "src/core/public/chrome/nav_links/nav_links_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false, "isRequired": true } @@ -1038,8 +1097,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLinks.enableForcedAppSwitcherNavigation", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLinks.enableForcedAppSwitcherNavigation", "type": "Function", "tags": [], "label": "enableForcedAppSwitcherNavigation", @@ -1049,14 +1108,14 @@ "signature": [ "() => void" ], - "path": "src/core/public/chrome/nav_links/nav_links_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeNavLinks.getForceAppSwitcherNavigation$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeNavLinks.getForceAppSwitcherNavigation$", "type": "Function", "tags": [], "label": "getForceAppSwitcherNavigation$", @@ -1068,7 +1127,7 @@ "Observable", "" ], - "path": "src/core/public/chrome/nav_links/nav_links_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/nav_links.ts", "deprecated": false, "children": [], "returnComment": [] @@ -1077,20 +1136,20 @@ "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessed", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessed", "type": "Interface", "tags": [], "label": "ChromeRecentlyAccessed", "description": [ "\n{@link ChromeRecentlyAccessed | APIs} for recently accessed history." ], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessed.add", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessed.add", "type": "Function", "tags": [], "label": "add", @@ -1100,12 +1159,12 @@ "signature": [ "(link: string, label: string, id: string) => void" ], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessed.add.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessed.add.$1", "type": "string", "tags": [], "label": "link", @@ -1115,13 +1174,13 @@ "signature": [ "string" ], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false, "isRequired": true }, { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessed.add.$2", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessed.add.$2", "type": "string", "tags": [], "label": "label", @@ -1131,13 +1190,13 @@ "signature": [ "string" ], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false, "isRequired": true }, { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessed.add.$3", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessed.add.$3", "type": "string", "tags": [], "label": "id", @@ -1147,7 +1206,7 @@ "signature": [ "string" ], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false, "isRequired": true } @@ -1155,8 +1214,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessed.get", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessed.get", "type": "Function", "tags": [], "label": "get", @@ -1166,22 +1225,22 @@ "signature": [ "() => ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeRecentlyAccessedHistoryItem", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeRecentlyAccessedHistoryItem", "text": "ChromeRecentlyAccessedHistoryItem" }, "[]" ], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessed.get$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessed.get$", "type": "Function", "tags": [], "label": "get$", @@ -1193,15 +1252,15 @@ "Observable", "<", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeRecentlyAccessedHistoryItem", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeRecentlyAccessedHistoryItem", "text": "ChromeRecentlyAccessedHistoryItem" }, "[]>" ], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false, "children": [], "returnComment": [] @@ -1210,63 +1269,63 @@ "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessedHistoryItem", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessedHistoryItem", "type": "Interface", "tags": [], "label": "ChromeRecentlyAccessedHistoryItem", "description": [], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessedHistoryItem.link", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessedHistoryItem.link", "type": "string", "tags": [], "label": "link", "description": [], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessedHistoryItem.label", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessedHistoryItem.label", "type": "string", "tags": [], "label": "label", "description": [], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeRecentlyAccessedHistoryItem.id", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeRecentlyAccessedHistoryItem.id", "type": "string", "tags": [], "label": "id", "description": [], - "path": "src/core/public/chrome/recently_accessed/recently_accessed_service.ts", + "path": "packages/core/chrome/core-chrome-browser/src/recently_accessed.ts", "deprecated": false } ], "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart", "type": "Interface", "tags": [], "label": "ChromeStart", "description": [ "\nChromeStart allows plugins to customize the global chrome header UI and\nenrich the UX with additional information about the current location of the\nbrowser.\n" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeStart.navLinks", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.navLinks", "type": "Object", "tags": [], "label": "navLinks", @@ -1275,19 +1334,19 @@ ], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavLinks", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavLinks", "text": "ChromeNavLinks" } ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.navControls", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.navControls", "type": "Object", "tags": [], "label": "navControls", @@ -1296,19 +1355,19 @@ ], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavControls", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavControls", "text": "ChromeNavControls" } ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.recentlyAccessed", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.recentlyAccessed", "type": "Object", "tags": [], "label": "recentlyAccessed", @@ -1317,19 +1376,19 @@ ], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeRecentlyAccessed", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeRecentlyAccessed", "text": "ChromeRecentlyAccessed" } ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.docTitle", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.docTitle", "type": "Object", "tags": [], "label": "docTitle", @@ -1338,19 +1397,19 @@ ], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeDocTitle", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeDocTitle", "text": "ChromeDocTitle" } ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.getIsVisible$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.getIsVisible$", "type": "Function", "tags": [], "label": "getIsVisible$", @@ -1362,14 +1421,14 @@ "Observable", "" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setIsVisible", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setIsVisible", "type": "Function", "tags": [], "label": "setIsVisible", @@ -1379,12 +1438,12 @@ "signature": [ "(isVisible: boolean) => void" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setIsVisible.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setIsVisible.$1", "type": "boolean", "tags": [], "label": "isVisible", @@ -1392,7 +1451,7 @@ "signature": [ "boolean" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "isRequired": true } @@ -1400,8 +1459,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.getBadge$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.getBadge$", "type": "Function", "tags": [], "label": "getBadge$", @@ -1413,22 +1472,22 @@ "Observable", "<", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeBadge", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeBadge", "text": "ChromeBadge" }, " | undefined>" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setBadge", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setBadge", "type": "Function", "tags": [], "label": "setBadge", @@ -1438,35 +1497,35 @@ "signature": [ "(badge?: ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeBadge", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeBadge", "text": "ChromeBadge" }, " | undefined) => void" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setBadge.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setBadge.$1", "type": "Object", "tags": [], "label": "badge", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeBadge", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeBadge", "text": "ChromeBadge" }, " | undefined" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "isRequired": false } @@ -1474,8 +1533,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.getBreadcrumbs$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.getBreadcrumbs$", "type": "Function", "tags": [], "label": "getBreadcrumbs$", @@ -1489,14 +1548,14 @@ "EuiBreadcrumbProps", "[]>" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setBreadcrumbs", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setBreadcrumbs", "type": "Function", "tags": [], "label": "setBreadcrumbs", @@ -1508,12 +1567,12 @@ "EuiBreadcrumbProps", "[]) => void" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setBreadcrumbs.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setBreadcrumbs.$1", "type": "Array", "tags": [], "label": "newBreadcrumbs", @@ -1522,7 +1581,7 @@ "EuiBreadcrumbProps", "[]" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "isRequired": true } @@ -1530,8 +1589,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.getBreadcrumbsAppendExtension$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.getBreadcrumbsAppendExtension$", "type": "Function", "tags": [], "label": "getBreadcrumbsAppendExtension$", @@ -1542,17 +1601,23 @@ "() => ", "Observable", "<", - "ChromeBreadcrumbsAppendExtension", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeBreadcrumbsAppendExtension", + "text": "ChromeBreadcrumbsAppendExtension" + }, " | undefined>" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setBreadcrumbsAppendExtension", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setBreadcrumbsAppendExtension", "type": "Function", "tags": [], "label": "setBreadcrumbsAppendExtension", @@ -1561,24 +1626,36 @@ ], "signature": [ "(breadcrumbsAppendExtension?: ", - "ChromeBreadcrumbsAppendExtension", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeBreadcrumbsAppendExtension", + "text": "ChromeBreadcrumbsAppendExtension" + }, " | undefined) => void" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setBreadcrumbsAppendExtension.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setBreadcrumbsAppendExtension.$1", "type": "Object", "tags": [], "label": "breadcrumbsAppendExtension", "description": [], "signature": [ - "ChromeBreadcrumbsAppendExtension", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeBreadcrumbsAppendExtension", + "text": "ChromeBreadcrumbsAppendExtension" + }, " | undefined" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "isRequired": false } @@ -1586,8 +1663,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.getCustomNavLink$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.getCustomNavLink$", "type": "Function", "tags": [], "label": "getCustomNavLink$", @@ -1599,22 +1676,22 @@ "Observable", " | undefined>" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setCustomNavLink", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setCustomNavLink", "type": "Function", "tags": [], "label": "setCustomNavLink", @@ -1624,20 +1701,20 @@ "signature": [ "(newCustomNavLink?: Partial<", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavLink", "text": "ChromeNavLink" }, "> | undefined) => void" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setCustomNavLink.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setCustomNavLink.$1", "type": "Object", "tags": [], "label": "newCustomNavLink", @@ -1645,15 +1722,15 @@ "signature": [ "Partial<", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeNavLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeNavLink", "text": "ChromeNavLink" }, "> | undefined" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "isRequired": false } @@ -1661,8 +1738,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.getHelpExtension$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.getHelpExtension$", "type": "Function", "tags": [], "label": "getHelpExtension$", @@ -1674,22 +1751,22 @@ "Observable", "<", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtension", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtension", "text": "ChromeHelpExtension" }, " | undefined>" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setHelpExtension", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setHelpExtension", "type": "Function", "tags": [], "label": "setHelpExtension", @@ -1699,35 +1776,35 @@ "signature": [ "(helpExtension?: ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtension", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtension", "text": "ChromeHelpExtension" }, " | undefined) => void" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setHelpExtension.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setHelpExtension.$1", "type": "Object", "tags": [], "label": "helpExtension", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtension", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtension", "text": "ChromeHelpExtension" }, " | undefined" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "isRequired": false } @@ -1735,8 +1812,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setHelpSupportUrl", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setHelpSupportUrl", "type": "Function", "tags": [], "label": "setHelpSupportUrl", @@ -1746,12 +1823,12 @@ "signature": [ "(url: string) => void" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setHelpSupportUrl.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setHelpSupportUrl.$1", "type": "string", "tags": [], "label": "url", @@ -1761,7 +1838,7 @@ "signature": [ "string" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "isRequired": true } @@ -1769,8 +1846,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.getIsNavDrawerLocked$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.getIsNavDrawerLocked$", "type": "Function", "tags": [], "label": "getIsNavDrawerLocked$", @@ -1782,14 +1859,14 @@ "Observable", "" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [], "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setHeaderBanner", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setHeaderBanner", "type": "Function", "tags": [], "label": "setHeaderBanner", @@ -1799,35 +1876,35 @@ "signature": [ "(headerBanner?: ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeUserBanner", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeUserBanner", "text": "ChromeUserBanner" }, " | undefined) => void" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeStart.setHeaderBanner.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.setHeaderBanner.$1", "type": "Object", "tags": [], "label": "headerBanner", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeUserBanner", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeUserBanner", "text": "ChromeUserBanner" }, " | undefined" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "isRequired": false } @@ -1835,8 +1912,8 @@ "returnComment": [] }, { - "parentPluginId": "core", - "id": "def-public.ChromeStart.hasHeaderBanner$", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.hasHeaderBanner$", "type": "Function", "tags": [], "label": "hasHeaderBanner$", @@ -1848,7 +1925,7 @@ "Observable", "" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", "deprecated": false, "children": [], "returnComment": [] @@ -1857,18 +1934,18 @@ "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeUserBanner", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeUserBanner", "type": "Interface", "tags": [], "label": "ChromeUserBanner", "description": [], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/types.ts", "deprecated": false, "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeUserBanner.content", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeUserBanner.content", "type": "Function", "tags": [], "label": "content", @@ -1877,13 +1954,13 @@ "(element: HTMLDivElement) => ", "UnmountCallback" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/types.ts", "deprecated": false, "returnComment": [], "children": [ { - "parentPluginId": "core", - "id": "def-public.ChromeUserBanner.content.$1", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeUserBanner.content.$1", "type": "Uncategorized", "tags": [], "label": "element", @@ -1903,8 +1980,8 @@ "enums": [], "misc": [ { - "parentPluginId": "core", - "id": "def-public.ChromeBreadcrumb", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeBreadcrumb", "type": "Type", "tags": [], "label": "ChromeBreadcrumb", @@ -1914,13 +1991,13 @@ "CommonProps", " & { href?: string | undefined; rel?: string | undefined; onClick?: React.MouseEventHandler | undefined; text: React.ReactNode; truncate?: boolean | undefined; color?: \"warning\" | \"subdued\" | \"primary\" | \"accent\" | \"success\" | \"danger\" | \"text\" | \"ghost\" | undefined; 'aria-current'?: boolean | \"date\" | \"location\" | \"time\" | \"page\" | \"false\" | \"true\" | \"step\" | undefined; }" ], - "path": "src/core/public/chrome/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/breadcrumb.ts", "deprecated": false, "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionLinkBase", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionLinkBase", "type": "Type", "tags": [], "label": "ChromeHelpExtensionLinkBase", @@ -1930,85 +2007,55 @@ "IconType", " | undefined; 'data-test-subj'?: string | undefined; rel?: string | undefined; target?: string | (string & {}) | undefined; }" ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "initialIsOpen": false }, { - "parentPluginId": "core", - "id": "def-public.ChromeHelpExtensionMenuLink", + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeHelpExtensionMenuLink", "type": "Type", "tags": [], "label": "ChromeHelpExtensionMenuLink", "description": [], "signature": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionMenuGitHubLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionMenuGitHubLink", "text": "ChromeHelpExtensionMenuGitHubLink" }, " | ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionMenuDiscussLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionMenuDiscussLink", "text": "ChromeHelpExtensionMenuDiscussLink" }, " | ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionMenuDocumentationLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionMenuDocumentationLink", "text": "ChromeHelpExtensionMenuDocumentationLink" }, " | ", { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeHelpExtensionMenuCustomLink", + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.ChromeHelpExtensionMenuCustomLink", "text": "ChromeHelpExtensionMenuCustomLink" } ], - "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "core", - "id": "def-public.NavType", - "type": "Type", - "tags": [], - "label": "NavType", - "description": [], - "signature": [ - "\"modern\" | \"legacy\"" - ], - "path": "src/core/public/chrome/ui/header/types.ts", + "path": "packages/core/chrome/core-chrome-browser/src/help_extension.ts", "deprecated": false, "initialIsOpen": false } ], "objects": [] - }, - "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/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx new file mode 100644 index 0000000000000..d565769a0e368 --- /dev/null +++ b/api_docs/kbn_core_chrome_browser.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: kibKbnCoreChromeBrowserPluginApi +slug: /kibana-dev-docs/api/kbn-core-chrome-browser +title: "@kbn/core-chrome-browser" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/core-chrome-browser plugin +date: 2022-09-05 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] +--- +import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; + + + +Contact Kibana Core for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 112 | 0 | 40 | 0 | + +## Common + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_chrome_browser_mocks.devdocs.json b/api_docs/kbn_core_chrome_browser_mocks.devdocs.json new file mode 100644 index 0000000000000..cd4f096310f3d --- /dev/null +++ b/api_docs/kbn_core_chrome_browser_mocks.devdocs.json @@ -0,0 +1,75 @@ +{ + "id": "@kbn/core-chrome-browser-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/core-chrome-browser-mocks", + "id": "def-common.chromeServiceMock", + "type": "Object", + "tags": [], + "label": "chromeServiceMock", + "description": [], + "path": "packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-chrome-browser-mocks", + "id": "def-common.chromeServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => jest.Mocked" + ], + "path": "packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-chrome-browser-mocks", + "id": "def-common.chromeServiceMock.createStartContract", + "type": "Function", + "tags": [], + "label": "createStartContract", + "description": [], + "signature": [ + "() => ", + "DeeplyMockedKeys", + "<", + "InternalChromeStart", + ">" + ], + "path": "packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx new file mode 100644 index 0000000000000..be2bfabe18faa --- /dev/null +++ b/api_docs/kbn_core_chrome_browser_mocks.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: kibKbnCoreChromeBrowserMocksPluginApi +slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks +title: "@kbn/core-chrome-browser-mocks" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/core-chrome-browser-mocks plugin +date: 2022-09-05 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] +--- +import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; + + + +Contact Kibana Core for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3 | 0 | 3 | 0 | + +## Common + +### Objects + + diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 6e788f384b49c..51726a44bcdf1 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 6db0f37517eb1..b92f4d129337e 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 194b0e30bd26b..e8f8aefb2dcba 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 e4d8ace6d077d..e33e001b3d7e3 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 88c859e1b818e..16ea53a84a35f 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2022-09-01 +date: 2022-09-05 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 da2da1cde1a57..797c8710a4854 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2022-09-01 +date: 2022-09-05 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 a0e22eb8b0609..1a8f03748613b 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 3bbe47d7ad454..811c353240bdd 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 7020547771cb1..13b8628d0aa52 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 ef6be08e0c129..41c5659acb7d5 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 cbbbcd93c1dc0..41ca0a2030dda 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2022-09-01 +date: 2022-09-05 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 4e3fd5640c247..7b9d8863990e5 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 d0efd6a747315..25d6956065b73 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 b49c004cc0fd3..7508f4967be7a 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 c201f5123d189..2ee2bd1b32c26 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2022-09-01 +date: 2022-09-05 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 39cb38a37760c..b073fa10c1fc1 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 79c6455637f8c..afd9f96edd1fc 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 d7f16ae8303a6..17c755f1b3da4 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 fe6a647c90fe5..242fffe768385 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 acc880cdff3d0..632c8dc42ff55 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 a5693a9d070d1..6cf56a4e0935d 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 e3f5321f5925c..0f08d61188f92 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 966c66ff27f04..240e08ba655da 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2022-09-01 +date: 2022-09-05 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 81af608c0bed4..6189b5d0badec 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2022-09-01 +date: 2022-09-05 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 c18374f6b73af..10955fdbf2ac2 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 2fa07663b5d46..cde6a0af36494 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 e7372a5c699f2..9b6c7182ff689 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 65a36b38dd5bd..737d4f1a60ddc 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 ffaa763084cae..167485947df34 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 e982f7287d5b5..81d932b59e51b 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 133a4bee0dc33..9e0959b2fa8c8 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 18c5b043ce652..0eba2291dc0ff 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2022-09-01 +date: 2022-09-05 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 eb60c484a17e4..24d4eea1ec581 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index eb7274e990742..ca731c3f84b0f 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 2ca6ea338ad24..b04405ed94b61 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index d9fbc780849ba..d05b1875e9daa 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 1a23f978a5c14..e6371b18af1bb 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index fcc41a00814c4..a0addab8321d7 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index ce991673e74c9..eb958abf289c8 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 abe6f1afe1140..00890f3383472 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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.devdocs.json b/api_docs/kbn_core_i18n_server.devdocs.json new file mode 100644 index 0000000000000..152af276cadb5 --- /dev/null +++ b/api_docs/kbn_core_i18n_server.devdocs.json @@ -0,0 +1,75 @@ +{ + "id": "@kbn/core-i18n-server", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-i18n-server", + "id": "def-common.I18nServiceSetup", + "type": "Interface", + "tags": [], + "label": "I18nServiceSetup", + "description": [], + "path": "packages/core/i18n/core-i18n-server/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-i18n-server", + "id": "def-common.I18nServiceSetup.getLocale", + "type": "Function", + "tags": [], + "label": "getLocale", + "description": [ + "\nReturn the locale currently in use." + ], + "signature": [ + "() => string" + ], + "path": "packages/core/i18n/core-i18n-server/src/types.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-i18n-server", + "id": "def-common.I18nServiceSetup.getTranslationFiles", + "type": "Function", + "tags": [], + "label": "getTranslationFiles", + "description": [ + "\nReturn the absolute paths to translation files currently in use." + ], + "signature": [ + "() => string[]" + ], + "path": "packages/core/i18n/core-i18n-server/src/types.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx new file mode 100644 index 0000000000000..077b7ab241202 --- /dev/null +++ b/api_docs/kbn_core_i18n_server.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: kibKbnCoreI18nServerPluginApi +slug: /kibana-dev-docs/api/kbn-core-i18n-server +title: "@kbn/core-i18n-server" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/core-i18n-server plugin +date: 2022-09-05 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] +--- +import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; + + + +Contact Kibana Core for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3 | 0 | 1 | 0 | + +## Common + +### Interfaces + + diff --git a/api_docs/kbn_core_i18n_server_internal.devdocs.json b/api_docs/kbn_core_i18n_server_internal.devdocs.json new file mode 100644 index 0000000000000..ebfd4c8e7238f --- /dev/null +++ b/api_docs/kbn_core_i18n_server_internal.devdocs.json @@ -0,0 +1,152 @@ +{ + "id": "@kbn/core-i18n-server-internal", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [ + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-server.I18nService", + "type": "Class", + "tags": [], + "label": "I18nService", + "description": [], + "path": "packages/core/i18n/core-i18n-server-internal/src/i18n_service.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-server.I18nService.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/i18n_service.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-server.I18nService.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "coreContext", + "description": [], + "signature": [ + "CoreContext" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/i18n_service.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-server.I18nService.preboot", + "type": "Function", + "tags": [], + "label": "preboot", + "description": [], + "signature": [ + "({ pluginPaths, http }: ", + "PrebootDeps", + ") => Promise" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/i18n_service.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-server.I18nService.preboot.$1", + "type": "Object", + "tags": [], + "label": "{ pluginPaths, http }", + "description": [], + "signature": [ + "PrebootDeps" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/i18n_service.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-server.I18nService.setup", + "type": "Function", + "tags": [], + "label": "setup", + "description": [], + "signature": [ + "({ pluginPaths, http }: ", + "SetupDeps", + ") => Promise<", + "I18nServiceSetup", + ">" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/i18n_service.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-server.I18nService.setup.$1", + "type": "Object", + "tags": [], + "label": "{ pluginPaths, http }", + "description": [], + "signature": [ + "SetupDeps" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/i18n_service.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-server.I18nConfigType", + "type": "Type", + "tags": [], + "label": "I18nConfigType", + "description": [], + "signature": [ + "{ readonly locale: string; }" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/i18n_config.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx new file mode 100644 index 0000000000000..3f01b8d4d79d6 --- /dev/null +++ b/api_docs/kbn_core_i18n_server_internal.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: kibKbnCoreI18nServerInternalPluginApi +slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal +title: "@kbn/core-i18n-server-internal" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/core-i18n-server-internal plugin +date: 2022-09-05 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] +--- +import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; + + + +Contact Kibana Core for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 8 | 0 | 8 | 2 | + +## Server + +### Classes + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_i18n_server_mocks.devdocs.json b/api_docs/kbn_core_i18n_server_mocks.devdocs.json new file mode 100644 index 0000000000000..c095bf6858389 --- /dev/null +++ b/api_docs/kbn_core_i18n_server_mocks.devdocs.json @@ -0,0 +1,73 @@ +{ + "id": "@kbn/core-i18n-server-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/core-i18n-server-mocks", + "id": "def-common.i18nServiceMock", + "type": "Object", + "tags": [], + "label": "i18nServiceMock", + "description": [], + "path": "packages/core/i18n/core-i18n-server-mocks/src/i18n_service.mock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-i18n-server-mocks", + "id": "def-common.i18nServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => jest.Mocked" + ], + "path": "packages/core/i18n/core-i18n-server-mocks/src/i18n_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-i18n-server-mocks", + "id": "def-common.i18nServiceMock.createSetupContract", + "type": "Function", + "tags": [], + "label": "createSetupContract", + "description": [], + "signature": [ + "() => jest.Mocked<", + "I18nServiceSetup", + ">" + ], + "path": "packages/core/i18n/core-i18n-server-mocks/src/i18n_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx new file mode 100644 index 0000000000000..909ba500c0ee3 --- /dev/null +++ b/api_docs/kbn_core_i18n_server_mocks.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: kibKbnCoreI18nServerMocksPluginApi +slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks +title: "@kbn/core-i18n-server-mocks" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/core-i18n-server-mocks plugin +date: 2022-09-05 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] +--- +import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; + + + +Contact Kibana Core for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3 | 0 | 3 | 0 | + +## Common + +### Objects + + diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx index 8dcfacd6656d4..3d3d86d82551d 100644 --- a/api_docs/kbn_core_injected_metadata_browser.mdx +++ b/api_docs/kbn_core_injected_metadata_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser title: "@kbn/core-injected-metadata-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser'] --- import kbnCoreInjectedMetadataBrowserObj from './kbn_core_injected_metadata_browser.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 6fbe19d8ed5a9..1d19c040a9b8e 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 cbc4872be7212..8e1ab8dee3a9a 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 ac38f8a5f7b68..adae045a69703 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index d62151239ab1c..998db5f733cf6 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2022-09-01 +date: 2022-09-05 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 fc16522e7463c..1486b7ba0e762 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 cc616529df50e..71354e2870770 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 c8d8be1985856..e808057ca7eb7 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 a9543b3cd75dc..0b16b6b14d30b 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 4767ce4935f97..383d5e8ffc5f2 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2022-09-01 +date: 2022-09-05 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 c3b72ddf2dd1a..5589ee1a634aa 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 254f3ace26bc2..aa57cb12b437b 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 00e41a9abb66f..8e4f49c436798 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 c98395751f932..39ac1b3728ce0 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2022-09-01 +date: 2022-09-05 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 4e2e2237a16cf..0aebc7859ae25 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 e2e50482f1f10..97956606e45b9 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 e98367a1c40a9..1f7b599459778 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 f861338129743..6bf04c4318e32 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 73b974ad994bf..dfa26291ec9d6 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 20297a833e8c5..26ba6e163fab2 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 e8533037e7f36..aff79e25f8c29 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 1e14eb5d0cd99..ae78e9ae201f7 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index b0cd8c7a7b1ff..ad7ca8d6baf2c 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2022-09-01 +date: 2022-09-05 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 d55482eb0d939..03b1aeef59ed9 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 8aec68a1eaf22..55d556d5ec2db 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 81a101904da30..81964bd4a7ab6 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_internal.mdx b/api_docs/kbn_core_saved_objects_api_server_internal.mdx index 9250a13f1fd0d..29da857be4195 100644 --- a/api_docs/kbn_core_saved_objects_api_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-internal title: "@kbn/core-saved-objects-api-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-internal'] --- import kbnCoreSavedObjectsApiServerInternalObj from './kbn_core_saved_objects_api_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index cbdeb911bacbc..b17f74de394f2 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 b9775118de21a..5f898d506565e 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 29590495b0173..f3d209fa7fcd7 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 e119b26de5b2d..df165fa793a29 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 77a1128ffddc7..207247df9b326 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 17f356987e986..1d14b94cea5ce 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index f9831414de842..8bde1f0b8f9ce 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2022-09-01 +date: 2022-09-05 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 96a375b0394c6..a4ce97d02a8cf 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 b3f8e91bd6a20..0498f759a4aea 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 a7a5330970812..336564df0c9d2 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 194e946a81f03..a880e410beb84 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 0469151523737..60209bd509c07 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2022-09-01 +date: 2022-09-05 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 ceda3ee60aeab..a079db4f12f55 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 a82be5fdc7c20..e527c49a20b12 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 0d8967f260d7a..b38c05f678ca9 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2022-09-01 +date: 2022-09-05 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_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 95a1bada7f1cd..f4870e83a7bd0 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2022-09-01 +date: 2022-09-05 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 e251ffe514406..7e1d9513f5925 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2022-09-01 +date: 2022-09-05 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_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 4cb232d98ce51..77f61ecd7d1f2 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 6c798843f686b..9306898d97e01 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 b0bae93a0d2b3..88422e45883a9 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 512e8cf76918b..5cc52e9379915 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2022-09-01 +date: 2022-09-05 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 c99b8d4e25c60..f92eeb74596c7 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2022-09-01 +date: 2022-09-05 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 ef8ca8de3bc44..89a23ba867e2c 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 7910d89957b36..32804e518a3ee 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2022-09-01 +date: 2022-09-05 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_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index f1c528846ef98..eebe7a2022bdf 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2022-09-01 +date: 2022-09-05 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_crypto.mdx b/api_docs/kbn_crypto.mdx index 59c5d516ceeb9..2080716063487 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2022-09-01 +date: 2022-09-05 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 22a140165316a..89c7bfb6074e2 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 24ab392a00bfc..4886547d2eba9 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 07fce0646726c..1696ba58be6d6 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2022-09-01 +date: 2022-09-05 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 fdca31d6e6266..b04f764deb1fb 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2022-09-01 +date: 2022-09-05 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 49e71460cf67a..1827fe0a88d7c 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2022-09-01 +date: 2022-09-05 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 63e26d1323e5e..a06d8856b2240 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2022-09-01 +date: 2022-09-05 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 2c9e924d7271f..6ce07c42072e3 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2022-09-01 +date: 2022-09-05 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 9095999484c98..9454579a52140 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 52540c8a55de0..88dfae4059edc 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 874fadb8f4e02..2c3f41f62c8cd 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2022-09-01 +date: 2022-09-05 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 6ee9850638243..24bb6e2989b08 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2022-09-01 +date: 2022-09-05 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 ed623c8dbe42c..93f1631c408cf 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 5b932884973b2..2a6ec74ef9761 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index b4c82b7c2e061..0139707633d71 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2022-09-01 +date: 2022-09-05 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 b2c7ab0eb7396..5d588ab9af4f4 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2022-09-01 +date: 2022-09-05 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_generate.mdx b/api_docs/kbn_generate.mdx index 9291eb79ae92a..8f85c8f515a54 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_get_repo_files.mdx b/api_docs/kbn_get_repo_files.mdx index 643b2c043f65b..c6aa49cad60c6 100644 --- a/api_docs/kbn_get_repo_files.mdx +++ b/api_docs/kbn_get_repo_files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-get-repo-files title: "@kbn/get-repo-files" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/get-repo-files plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files'] --- import kbnGetRepoFilesObj from './kbn_get_repo_files.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index c5f008824fa3b..d387670444058 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2022-09-01 +date: 2022-09-05 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 ab097904e5f53..840231863e22a 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index 1f97039f9465a..ab3c66c660cdb 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2022-09-01 +date: 2022-09-05 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 356e43bfacdba..c236fbd46cae1 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2022-09-01 +date: 2022-09-05 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 7179f0334c7c2..df02e3458d94a 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 0ed27d4422696..6d22b5a14aa19 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index e0b74435c1c3f..3e118ec1e7b51 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2022-09-01 +date: 2022-09-05 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 6fa7b98fa3cd5..20f5830a558b1 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2022-09-01 +date: 2022-09-05 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 8b06cd38b74a4..4966b9c345bbf 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_parser.mdx b/api_docs/kbn_kibana_manifest_parser.mdx index dbdf4864a2b5e..18c04020ea98c 100644 --- a/api_docs/kbn_kibana_manifest_parser.mdx +++ b/api_docs/kbn_kibana_manifest_parser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-parser title: "@kbn/kibana-manifest-parser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-parser plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-parser'] --- import kbnKibanaManifestParserObj from './kbn_kibana_manifest_parser.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 30094c1093430..17371606561c6 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 65e939e79442b..ddfeed376c25c 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2022-09-01 +date: 2022-09-05 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 cd0f62e7f0d35..754e1a09fa163 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 b963d0d69cc59..d164d8905e3a6 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2022-09-01 +date: 2022-09-05 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 4ff97ef7d4ffb..b9e787849484f 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index bef9d5b7ff4a7..a8c5473158f5b 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 0c2918a808ad8..132e2891c775f 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index afe711e7f9374..0ee6cf82d7365 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 80022e0029f33..22207d9971196 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index b1d128e853351..2f3e23c36b910 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2022-09-01 +date: 2022-09-05 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 90f42389a0b79..6b3cb7c4f2d42 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 23ef501facc29..8a04538f6e747 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2022-09-01 +date: 2022-09-05 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 5ed7f8a46a27f..c2720c3e82640 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2022-09-01 +date: 2022-09-05 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 8fe5d5e6e5516..f1f6a205cad77 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 42106a38d8f27..50ce740f0aec3 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 54db067fca0c9..501a4efd88967 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 543e3bf3c613f..dff52f46deb36 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 6781ea2f7f74d..592f0ccb7f053 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 544c711e0117d..62256641f9a22 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2022-09-01 +date: 2022-09-05 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_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 2991140fb0cb5..26f258dc04bd6 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2022-09-01 +date: 2022-09-05 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 732af0db97e4c..6b90554741883 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2022-09-01 +date: 2022-09-05 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.devdocs.json b/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json index 5261280f27b3f..e47182c7e171b 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json +++ b/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json @@ -205,7 +205,7 @@ "label": "list", "description": [], "signature": [ - "{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; }" + "{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false @@ -820,7 +820,7 @@ "section": "def-common.ExceptionList", "text": "ExceptionList" }, - " extends { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }" + " extends { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false, @@ -967,7 +967,7 @@ "label": "type", "description": [], "signature": [ - "\"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"" + "\"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false @@ -1268,7 +1268,7 @@ "label": "list", "description": [], "signature": [ - "{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { _version?: string | undefined; id?: string | undefined; list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; }" + "{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { _version?: string | undefined; id?: string | undefined; list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false @@ -1657,7 +1657,7 @@ "label": "exceptions", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[]" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false @@ -1757,7 +1757,7 @@ "label": "AddExceptionList", "description": [], "signature": [ - "({ description: string; name: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; }) | ({ description: string; name: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { _version?: string | undefined; id?: string | undefined; list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; })" + "({ description: string; name: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; }) | ({ description: string; name: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { _version?: string | undefined; id?: string | undefined; list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; })" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false, @@ -1911,7 +1911,7 @@ "label": "CreateEndpointListSchema", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | {}" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | {}" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.ts", "deprecated": false, @@ -1953,7 +1953,7 @@ "label": "CreateExceptionListSchema", "description": [], "signature": [ - "{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; }" + "{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.ts", "deprecated": false, @@ -1967,7 +1967,7 @@ "label": "CreateExceptionListSchemaDecoded", "description": [], "signature": [ - "Omit<{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; version: number | undefined; }, \"tags\" | \"list_id\" | \"namespace_type\" | \"os_types\"> & { tags: string[]; list_id: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; version: number; }" + "Omit<{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; version: number | undefined; }, \"tags\" | \"list_id\" | \"namespace_type\" | \"os_types\"> & { tags: string[]; list_id: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; version: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.ts", "deprecated": false, @@ -2029,6 +2029,34 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/securitysolution-io-ts-list-types", + "id": "def-common.CreateRuleExceptionListItemSchema", + "type": "Type", + "tags": [], + "label": "CreateRuleExceptionListItemSchema", + "description": [], + "signature": [ + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"text\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; list_id?: undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + ], + "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/securitysolution-io-ts-list-types", + "id": "def-common.CreateRuleExceptionListItemSchemaDecoded", + "type": "Type", + "tags": [], + "label": "CreateRuleExceptionListItemSchemaDecoded", + "description": [], + "signature": [ + "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"text\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; comments: { comment: string; }[] | undefined; item_id: string | undefined; list_id: undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\" | \"item_id\" | \"namespace_type\"> & { comments: { comment: string; }[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"text\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + ], + "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/securitysolution-io-ts-list-types", "id": "def-common.Cursor", @@ -2485,7 +2513,7 @@ "label": "ExceptionListSchema", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.ts", "deprecated": false, @@ -2513,7 +2541,7 @@ "label": "ExceptionListType", "description": [], "signature": [ - "\"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"" + "\"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts", "deprecated": false, @@ -2527,7 +2555,7 @@ "label": "ExceptionListTypeOrUndefined", "description": [], "signature": [ - "\"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\" | undefined" + "\"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\" | undefined" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts", "deprecated": false, @@ -2779,7 +2807,7 @@ "label": "FoundExceptionListSchema", "description": [], "signature": [ - "{ data: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }" + "{ data: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.ts", "deprecated": false, @@ -2947,7 +2975,7 @@ "label": "ImportExceptionListSchemaDecoded", "description": [], "signature": [ - "Omit<{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; } & { id?: string | undefined; immutable?: boolean | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; created_at?: string | undefined; updated_at?: string | undefined; created_by?: string | undefined; updated_by?: string | undefined; _version?: string | undefined; tie_breaker_id?: string | undefined; version?: number | undefined; }, \"tags\" | \"list_id\" | \"namespace_type\" | \"os_types\" | \"immutable\"> & { immutable: false; tags: string[]; list_id: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; version: number; }" + "Omit<{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; } & { id?: string | undefined; immutable?: boolean | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; created_at?: string | undefined; updated_at?: string | undefined; created_by?: string | undefined; updated_by?: string | undefined; _version?: string | undefined; tie_breaker_id?: string | undefined; version?: number | undefined; }, \"tags\" | \"list_id\" | \"namespace_type\" | \"os_types\" | \"immutable\"> & { immutable: false; tags: string[]; list_id: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; version: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.ts", "deprecated": false, @@ -2961,7 +2989,7 @@ "label": "ImportExceptionsListSchema", "description": [], "signature": [ - "{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; } & { id?: string | undefined; immutable?: boolean | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; created_at?: string | undefined; updated_at?: string | undefined; created_by?: string | undefined; updated_by?: string | undefined; _version?: string | undefined; tie_breaker_id?: string | undefined; version?: number | undefined; }" + "{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; } & { id?: string | undefined; immutable?: boolean | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; created_at?: string | undefined; updated_at?: string | undefined; created_by?: string | undefined; updated_by?: string | undefined; _version?: string | undefined; tie_breaker_id?: string | undefined; version?: number | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.ts", "deprecated": false, @@ -3073,7 +3101,7 @@ "label": "List", "description": [], "signature": [ - "{ id: string; list_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; namespace_type: \"single\" | \"agnostic\"; }" + "{ id: string; list_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; namespace_type: \"single\" | \"agnostic\"; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.ts", "deprecated": false, @@ -3087,7 +3115,7 @@ "label": "ListArray", "description": [], "signature": [ - "{ id: string; list_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; namespace_type: \"single\" | \"agnostic\"; }[]" + "{ id: string; list_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; namespace_type: \"single\" | \"agnostic\"; }[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.ts", "deprecated": false, @@ -3101,7 +3129,7 @@ "label": "ListArrayOrUndefined", "description": [], "signature": [ - "{ id: string; list_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; namespace_type: \"single\" | \"agnostic\"; }[] | undefined" + "{ id: string; list_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; namespace_type: \"single\" | \"agnostic\"; }[] | undefined" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.ts", "deprecated": false, @@ -4109,7 +4137,7 @@ "label": "UpdateExceptionListSchema", "description": [], "signature": [ - "{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { _version?: string | undefined; id?: string | undefined; list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; }" + "{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; } & { _version?: string | undefined; id?: string | undefined; list_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; version?: number | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.ts", "deprecated": false, @@ -4123,7 +4151,7 @@ "label": "UpdateExceptionListSchemaDecoded", "description": [], "signature": [ - "Omit<{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; _version: string | undefined; id: string | undefined; list_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; version: number | undefined; }, \"os_types\" | \"tags | namespace_type\"> & { tags: string[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + "Omit<{ description: string; name: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; _version: string | undefined; id: string | undefined; list_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; version: number | undefined; }, \"os_types\" | \"tags | namespace_type\"> & { tags: string[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.ts", "deprecated": false, @@ -4595,7 +4623,7 @@ "StringC", "; type: ", "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; updated_at: ", + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; updated_at: ", "StringC", "; updated_by: ", "StringC", @@ -4679,7 +4707,7 @@ "StringC", "; type: ", "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; }>>, ", + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; }>>, ", "ExactC", "<", "PartialC", @@ -4775,6 +4803,55 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/securitysolution-io-ts-list-types", + "id": "def-common.createRuleExceptionListItemSchema", + "type": "Object", + "tags": [], + "label": "createRuleExceptionListItemSchema", + "description": [], + "signature": [ + "IntersectionC", + "<[", + "ExactC", + "<", + "TypeC", + "<{ description: ", + "StringC", + "; entries: ", + "Type", + "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"text\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"text\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; name: ", + "StringC", + "; type: ", + "KeyofC", + "<{ simple: null; }>; }>>, ", + "ExactC", + "<", + "PartialC", + "<{ comments: ", + "Type", + "<{ comment: string; }[], { comment: string; }[], unknown>; item_id: ", + "Type", + "; list_id: ", + "UndefinedC", + "; meta: ", + "ObjectC", + "; namespace_type: ", + "KeyofC", + "<{ agnostic: null; single: null; }>; os_types: ", + "UnionC", + "<[", + "Type", + "<(\"windows\" | \"linux\" | \"macos\")[], (\"windows\" | \"linux\" | \"macos\")[] | undefined, unknown>, ", + "UndefinedC", + "]>; tags: ", + "Type", + "; }>>]>" + ], + "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/securitysolution-io-ts-list-types", "id": "def-common.cursor", @@ -4808,6 +4885,23 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/securitysolution-io-ts-list-types", + "id": "def-common.DefaultCreateCommentsArray", + "type": "Object", + "tags": [], + "label": "DefaultCreateCommentsArray", + "description": [ + "\nTypes the DefaultCreateComments as:\n - If null or undefined, then a default array of type entry will be set" + ], + "signature": [ + "Type", + "<{ comment: string; }[], { comment: string; }[], unknown>" + ], + "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/securitysolution-io-ts-list-types", "id": "def-common.DefaultImportCommentsArray", @@ -4836,7 +4930,7 @@ ], "signature": [ "Type", - "<{ id: string; list_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; namespace_type: \"single\" | \"agnostic\"; }[], { id: string; list_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; namespace_type: \"single\" | \"agnostic\"; }[] | undefined, unknown>" + "<{ id: string; list_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; namespace_type: \"single\" | \"agnostic\"; }[], { id: string; list_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; namespace_type: \"single\" | \"agnostic\"; }[] | undefined, unknown>" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.ts", "deprecated": false, @@ -5832,7 +5926,7 @@ "StringC", "; type: ", "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; updated_at: ", + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; updated_at: ", "StringC", "; updated_by: ", "StringC", @@ -5878,7 +5972,7 @@ "description": [], "signature": [ "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>" + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts", "deprecated": false, @@ -5895,7 +5989,7 @@ "UnionC", "<[", "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>, ", + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>, ", "UndefinedC", "]>" ], @@ -6517,7 +6611,7 @@ "StringC", "; type: ", "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; updated_at: ", + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; updated_at: ", "StringC", "; updated_by: ", "StringC", @@ -6981,7 +7075,7 @@ "StringC", "; type: ", "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; list_id: ", + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; list_id: ", "Type", "; }>>, ", "ExactC", @@ -7171,7 +7265,7 @@ "Type", "; type: ", "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; namespace_type: ", + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; namespace_type: ", "KeyofC", "<{ agnostic: null; single: null; }>; }>>" ], @@ -7247,7 +7341,7 @@ "Type", "; type: ", "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; namespace_type: ", + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; namespace_type: ", "KeyofC", "<{ agnostic: null; single: null; }>; }>>>" ], @@ -7276,7 +7370,7 @@ "Type", "; type: ", "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; namespace_type: ", + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; namespace_type: ", "KeyofC", "<{ agnostic: null; single: null; }>; }>>>, ", "UndefinedC", @@ -8890,7 +8984,7 @@ "StringC", "; type: ", "KeyofC", - "<{ detection: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; }>>, ", + "<{ detection: null; rule_default: null; endpoint: null; endpoint_trusted_apps: null; endpoint_events: null; endpoint_host_isolation_exceptions: null; endpoint_blocklists: null; }>; }>>, ", "ExactC", "<", "PartialC", diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 9e40e036a2ef8..d0b362d717ef1 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 458 | 1 | 446 | 0 | +| 462 | 1 | 449 | 0 | ## Common diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index f5194499114f9..7f2550bdccca0 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2022-09-01 +date: 2022-09-05 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 f83f1cf08e4c7..1ce75c27b58a3 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2022-09-01 +date: 2022-09-05 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.devdocs.json b/api_docs/kbn_securitysolution_list_api.devdocs.json index 53a9d300892b8..187cd30854976 100644 --- a/api_docs/kbn_securitysolution_list_api.devdocs.json +++ b/api_docs/kbn_securitysolution_list_api.devdocs.json @@ -29,7 +29,7 @@ "signature": [ "({ http, signal, }: ", "AddEndpointExceptionListProps", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | {}>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | {}>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -95,7 +95,7 @@ "signature": [ "({ http, list, signal, }: ", "AddExceptionListProps", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -173,7 +173,7 @@ "signature": [ "({ http, id, namespaceType, signal, }: ", "ApiCallByIdProps", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -366,7 +366,7 @@ "signature": [ "({ http, id, namespaceType, signal, }: ", "ApiCallByIdProps", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -465,7 +465,7 @@ "signature": [ "({ filters, http, namespaceTypes, pagination, signal, }: ", "ApiCallFetchExceptionListsProps", - ") => Promise<{ data: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }>" + ") => Promise<{ data: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -776,7 +776,7 @@ "signature": [ "({ http, list, signal, }: ", "UpdateExceptionListProps", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 2f95cc7a1ba08..eb06f98d8444c 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2022-09-01 +date: 2022-09-05 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 6bcdfd23ecc31..882ec26b4ba46 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2022-09-01 +date: 2022-09-05 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.devdocs.json b/api_docs/kbn_securitysolution_list_hooks.devdocs.json index ad642ef094b12..4524abffb5cf3 100644 --- a/api_docs/kbn_securitysolution_list_hooks.devdocs.json +++ b/api_docs/kbn_securitysolution_list_hooks.devdocs.json @@ -804,7 +804,7 @@ "signature": [ "(arg: ", "ApiCallMemoProps", - " & { onSuccess: (arg: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }) => void; }) => Promise" + " & { onSuccess: (arg: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }) => void; }) => Promise" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false, @@ -818,7 +818,7 @@ "description": [], "signature": [ "ApiCallMemoProps", - " & { onSuccess: (arg: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }) => void; }" + " & { onSuccess: (arg: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }) => void; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false, @@ -970,7 +970,7 @@ "label": "ReturnExceptionLists", "description": [], "signature": [ - "[loading: boolean, exceptionLists: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[], pagination: ", + "[loading: boolean, exceptionLists: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[], pagination: ", "Pagination", ", setPagination: React.Dispatch ", + ", t: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\", o?: (\"windows\" | \"linux\" | \"macos\")[] | undefined) => ", "DataViewBase", ") | undefined, osTypes?: (\"windows\" | \"linux\" | \"macos\")[] | undefined) => ", "DataViewBase" @@ -1718,7 +1718,7 @@ "label": "type", "description": [], "signature": [ - "\"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"" + "\"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -1734,7 +1734,7 @@ "signature": [ "((i: ", "DataViewBase", - ", t: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\", o?: (\"windows\" | \"linux\" | \"macos\")[] | undefined) => ", + ", t: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\", o?: (\"windows\" | \"linux\" | \"macos\")[] | undefined) => ", "DataViewBase", ") | undefined" ], @@ -2245,7 +2245,7 @@ "section": "def-common.FormattedBuilderEntry", "text": "FormattedBuilderEntry" }, - ", listType: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\", isBoolean: boolean, includeValueListOperators?: boolean) => ", + ", listType: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\", isBoolean: boolean, includeValueListOperators?: boolean) => ", { "pluginId": "@kbn/securitysolution-list-utils", "scope": "common", @@ -2286,7 +2286,7 @@ "label": "listType", "description": [], "signature": [ - "\"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"" + "\"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 1d793d984dd3f..bcc92919fc42f 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2022-09-01 +date: 2022-09-05 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 be35765379e21..628693c12e1bc 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2022-09-01 +date: 2022-09-05 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 590c5d9f06ed0..f7e73ae7cd871 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2022-09-01 +date: 2022-09-05 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 731697b88dd15..8a8455f409a81 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2022-09-01 +date: 2022-09-05 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 6bf3875b9bb54..595386c6c73ac 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2022-09-01 +date: 2022-09-05 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 1c65c403f881c..67aed36b05747 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index a6e0038b033b6..83c8971c8ce53 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.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 66ecd2b9cc0f3..bdc1537cc16ad 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen-mocks title: "@kbn/shared-ux-button-exit-full-screen-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 3b7dfa354564e..67fd3dcaf41bd 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2022-09-01 +date: 2022-09-05 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 269d8a80a5e1d..e22142c4797dd 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2022-09-01 +date: 2022-09-05 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 d4b62d814cd34..7573591c49224 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index dfd0af5792367..c6e48451635c8 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index 0765719ced449..9180867f3820d 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2022-09-01 +date: 2022-09-05 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 1f880944f26f8..575e935118416 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 c5d8d8beb9b4c..9656ef1e132a1 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2022-09-01 +date: 2022-09-05 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 5aba8008d159e..4aa81c27affd1 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 1d8bbb84239ed..5243ea27703be 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2022-09-01 +date: 2022-09-05 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 28eb3874246bd..8102f035e450e 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 c83196c3fb270..4747677f63999 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2022-09-01 +date: 2022-09-05 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 c48974921967c..90e5a801476fe 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2022-09-01 +date: 2022-09-05 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 66a07cde1c7f5..148e0a16da6ce 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 40245f8dfeec5..69f30ffcb9d4f 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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 a8323002e7762..9e52f0dcc4aae 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2022-09-01 +date: 2022-09-05 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 173f8bf6acbf0..a28d5265c4c53 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2022-09-01 +date: 2022-09-05 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 f06a06b4ab05f..08b1b725b4fc4 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2022-09-01 +date: 2022-09-05 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_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index e5c5a91f01c7b..abb12d940cba3 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2022-09-01 +date: 2022-09-05 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 66586b8575bb8..0673efbd47724 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2022-09-01 +date: 2022-09-05 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 e1ab24d836f16..fad51bdf83a34 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index c2c2319308ab5..ef9b5db71faab 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx index ed97c7656e677..2aa601aa28789 100644 --- a/api_docs/kbn_sort_package_json.mdx +++ b/api_docs/kbn_sort_package_json.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json title: "@kbn/sort-package-json" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-package-json plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json'] --- import kbnSortPackageJsonObj from './kbn_sort_package_json.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 382a55bd58cbd..fa9c18da6ba81 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2022-09-01 +date: 2022-09-05 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 61fa449fef005..4e56019253eaa 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2022-09-01 +date: 2022-09-05 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 b151acffd2ecc..70b0801d02a34 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2022-09-01 +date: 2022-09-05 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 42d0dbb77b107..ae1b9679d9963 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2022-09-01 +date: 2022-09-05 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 339beeeae6893..e5ec44f07c73c 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 68c72682ada07..6730704439384 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index be0a5528bde11..9bdd26028c73e 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx index df6a33cacd7d7..e9438cc5e26fe 100644 --- a/api_docs/kbn_type_summarizer.mdx +++ b/api_docs/kbn_type_summarizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer title: "@kbn/type-summarizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer'] --- import kbnTypeSummarizerObj from './kbn_type_summarizer.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx index 06f7a03baa0ad..c1bb4dfbcf4d2 100644 --- a/api_docs/kbn_type_summarizer_core.mdx +++ b/api_docs/kbn_type_summarizer_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core title: "@kbn/type-summarizer-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer-core plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core'] --- import kbnTypeSummarizerCoreObj from './kbn_type_summarizer_core.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 41a82c868a4e7..4626ee5aa0bb6 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 6b8f8d71a1848..6cb38b2bf38b2 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 7c6c96ab672ee..a784ca24e8c01 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2022-09-01 +date: 2022-09-05 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 6d89be257d980..96a34a6fd9755 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2022-09-01 +date: 2022-09-05 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 36cfdc13e345c..6dd7435ed38e2 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2022-09-01 +date: 2022-09-05 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 df5afd03b1605..1d0476d4a53cf 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2022-09-01 +date: 2022-09-05 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 de4021dc1b786..7f716cb7167a0 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2022-09-01 +date: 2022-09-05 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 e6c5dd0ff48db..50c292e38cce3 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2022-09-01 +date: 2022-09-05 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 e28e32bdfa0eb..50d19c7a6843d 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -1699,6 +1699,30 @@ "plugin": "spaces", "path": "x-pack/plugins/spaces/public/management/spaces_management_app.tsx" }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/saved_objects_edition_page.tsx" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/saved_objects_edition_page.tsx" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/saved_objects_edition_page.tsx" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" + }, { "plugin": "fleet", "path": "x-pack/plugins/fleet/public/components/home_integration/tutorial_directory_header_link.tsx" @@ -1887,30 +1911,6 @@ "plugin": "ux", "path": "x-pack/plugins/ux/public/application/ux_app.tsx" }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/saved_objects_edition_page.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/saved_objects_edition_page.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/saved_objects_edition_page.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, - { - "plugin": "savedObjectsManagement", - "path": "src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx" - }, { "plugin": "kibanaOverview", "path": "src/plugins/kibana_overview/public/components/add_data/add_data.tsx" @@ -2547,13 +2547,7 @@ "label": "chrome", "description": [], "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeStart", - "text": "ChromeStart" - } + "ChromeStart" ], "path": "src/plugins/kibana_react/public/exit_full_screen_button/exit_full_screen_button.tsx", "deprecated": false @@ -3960,13 +3954,7 @@ " | undefined; application?: ", "ApplicationStart", " | undefined; chrome?: ", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreChromePluginApi", - "section": "def-public.ChromeStart", - "text": "ChromeStart" - }, + "ChromeStart", " | undefined; docLinks?: ", "DocLinksStart", " | undefined; executionContext?: ", diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 4ff8f2d25573d..c5af554c552b5 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 6b3fabf14d7ba..9aa4bf9f082f2 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2022-09-01 +date: 2022-09-05 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 7f829607ffbe8..9c007e6bda4b4 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2022-09-01 +date: 2022-09-05 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 664dfe98a2a80..d1035af59444c 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2022-09-01 +date: 2022-09-05 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 67f8994a9d5f1..4cdea2f4f41b2 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2022-09-01 +date: 2022-09-05 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 ea2db4cd09b29..e23389f5d16d2 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2022-09-01 +date: 2022-09-05 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 4462e3317d76f..230ea8da59f74 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/lists.devdocs.json b/api_docs/lists.devdocs.json index 5d10e9c1761df..db68612d2451e 100644 --- a/api_docs/lists.devdocs.json +++ b/api_docs/lists.devdocs.json @@ -513,7 +513,7 @@ "signature": [ "({ listId, id, namespaceType, }: ", "GetExceptionListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -619,7 +619,7 @@ "\nThis creates an agnostic space endpoint list if it does not exist. This tries to be\nas fast as possible by ignoring conflict errors and not returning the contents of the\nlist if it already exists." ], "signature": [ - "() => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | null>" + "() => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -638,7 +638,7 @@ "\nCreate the Trusted Apps Agnostic list if it does not yet exist (`null` is returned if it does exist)" ], "signature": [ - "() => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | null>" + "() => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -767,7 +767,7 @@ "signature": [ "({ description, immutable, listId, meta, name, namespaceType, tags, type, version, }: ", "CreateExceptionListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -803,7 +803,7 @@ "signature": [ "({ _version, id, description, listId, meta, name, namespaceType, tags, type, version, }: ", "UpdateExceptionListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -839,7 +839,7 @@ "signature": [ "({ id, listId, namespaceType, }: ", "DeleteExceptionListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -1183,7 +1183,7 @@ "signature": [ "({ filter, perPage, page, pit, searchAfter, sortField, sortOrder, namespaceType, }: ", "FindExceptionListOptions", - ") => Promise<{ data: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }>" + ") => Promise<{ data: { _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 783631d522939..a7e09aed225b5 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2022-09-01 +date: 2022-09-05 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 c958d19da82e3..22302785607ef 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2022-09-01 +date: 2022-09-05 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 cd1b8bce91218..1ddc893f195bb 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2022-09-01 +date: 2022-09-05 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 0212dba8cb6f0..194314de963f5 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index a829bf1ce21da..5db609bd87d0b 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2022-09-01 +date: 2022-09-05 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 25d44ee07368b..4e4bad6bf5c87 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2022-09-01 +date: 2022-09-05 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 08b6a6ca54acb..ea699661c7b36 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2022-09-01 +date: 2022-09-05 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 13772ebe3fbd3..87341a3ab0b57 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2022-09-01 +date: 2022-09-05 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 9160b078da16c..f29d5f5b672d9 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index a259acf8a7519..b29d510fb5cd0 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 91b243d63cbbe..c9f6dc7219810 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2022-09-01 +date: 2022-09-05 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 4e3b3df534e98..9b6047bf3b073 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2022-09-01 +date: 2022-09-05 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 | |--------------|----------|------------------------| -| 433 | 360 | 36 | +| 440 | 366 | 36 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 30377 | 180 | 20348 | 969 | +| 30537 | 180 | 20393 | 970 | ## Plugin Directory @@ -41,19 +41,19 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 18 | 0 | 2 | 3 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 13 | 0 | 13 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 204 | 0 | 196 | 7 | -| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2656 | 1 | 101 | 3 | +| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2655 | 1 | 61 | 2 | | crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 102 | 0 | 83 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 146 | 0 | 141 | 12 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 52 | 0 | 51 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3130 | 34 | 2440 | 23 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3131 | 34 | 2441 | 23 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout inside Kibana apps | 15 | 0 | 7 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 49 | 0 | 29 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data view management app | 2 | 0 | 2 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 963 | 0 | 206 | 1 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 28 | 3 | 24 | 1 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 10 | 0 | 8 | 2 | -| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 93 | 0 | 76 | 4 | +| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 94 | 0 | 77 | 4 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 37 | 0 | 35 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 514 | 0 | 414 | 4 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends embeddable plugin with more functionality | 14 | 0 | 14 | 0 | @@ -80,7 +80,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Index pattern fields and ambiguous values formatters | 288 | 5 | 249 | 3 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | 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/kibana-app-services](https://github.com/orgs/elastic/teams/team:AppServicesUx) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 243 | 0 | 6 | 2 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 965 | 3 | 870 | 10 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 969 | 3 | 873 | 10 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | globalSearchProviders | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | @@ -123,10 +123,11 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 208 | 0 | 180 | 10 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 24 | 0 | 19 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 193 | 2 | 152 | 5 | -| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 125 | 0 | 112 | 0 | +| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 16 | 0 | 16 | 0 | +| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 130 | 0 | 117 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 78 | 0 | 72 | 3 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 91 | 0 | 46 | 1 | -| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the definition and helper methods around saved searches, used by discover and visualizations. | 42 | 0 | 42 | 1 | +| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the definition and helper methods around saved searches, used by discover and visualizations. | 43 | 0 | 43 | 1 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 32 | 0 | 13 | 0 | | | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 27 | 0 | 8 | 4 | | searchprofiler | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | @@ -218,6 +219,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 5 | 0 | 0 | 0 | | | Kibana Core | - | 16 | 0 | 7 | 0 | | | Kibana Core | - | 6 | 0 | 6 | 0 | +| | Kibana Core | - | 112 | 0 | 40 | 0 | +| | Kibana Core | - | 3 | 0 | 3 | 0 | | | Kibana Core | - | 4 | 0 | 4 | 0 | | | Kibana Core | - | 9 | 0 | 3 | 0 | | | Kibana Core | - | 6 | 0 | 6 | 0 | @@ -258,6 +261,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 41 | 0 | 37 | 0 | | | Kibana Core | - | 4 | 0 | 2 | 0 | | | Kibana Core | - | 3 | 0 | 3 | 0 | +| | Kibana Core | - | 3 | 0 | 1 | 0 | +| | Kibana Core | - | 8 | 0 | 8 | 2 | +| | Kibana Core | - | 3 | 0 | 3 | 0 | | | Kibana Core | - | 8 | 2 | 6 | 0 | | | Kibana Core | - | 4 | 0 | 4 | 0 | | | Kibana Core | - | 2 | 0 | 2 | 0 | @@ -359,7 +365,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | security solution elastic search utilities to use across plugins such lists, security_solution, cases, etc... | 67 | 0 | 61 | 1 | | | [Owner missing] | Security Solution utilities for React hooks | 15 | 0 | 7 | 0 | | | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 148 | 0 | 129 | 0 | -| | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 458 | 1 | 446 | 0 | +| | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 462 | 1 | 449 | 0 | | | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 61 | 0 | 32 | 0 | | | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 28 | 0 | 21 | 0 | | | [Owner missing] | security solution list REST API | 61 | 0 | 60 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index acb45c4f8d233..d5400c3d0eae6 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index c99e15889f27e..ce14622834d01 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2022-09-01 +date: 2022-09-05 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 d7e36b2064f09..bcccf4ec1dc95 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 95a9aa836b0d5..ae1b00f5dd7b7 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index e32df2278762c..9a81cc141a22f 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index de8f589035c07..95a2a9a38f9e4 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2022-09-01 +date: 2022-09-05 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 3f996fe565bd3..8dc8d6422f9dd 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.devdocs.json b/api_docs/saved_objects_finder.devdocs.json new file mode 100644 index 0000000000000..e64b6f25499a6 --- /dev/null +++ b/api_docs/saved_objects_finder.devdocs.json @@ -0,0 +1,291 @@ +{ + "id": "savedObjectsFinder", + "client": { + "classes": [], + "functions": [ + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectFinder", + "type": "Function", + "tags": [], + "label": "SavedObjectFinder", + "description": [], + "signature": [ + "(props: ", + { + "pluginId": "savedObjectsFinder", + "scope": "public", + "docId": "kibSavedObjectsFinderPluginApi", + "section": "def-public.SavedObjectFinderProps", + "text": "SavedObjectFinderProps" + }, + ") => JSX.Element" + ], + "path": "src/plugins/saved_objects_finder/public/finder/index.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectFinder.$1", + "type": "CompoundType", + "tags": [], + "label": "props", + "description": [], + "signature": [ + { + "pluginId": "savedObjectsFinder", + "scope": "public", + "docId": "kibSavedObjectsFinderPluginApi", + "section": "def-public.SavedObjectFinderProps", + "text": "SavedObjectFinderProps" + } + ], + "path": "src/plugins/saved_objects_finder/public/finder/index.tsx", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData", + "type": "Interface", + "tags": [], + "label": "SavedObjectMetaData", + "description": [], + "signature": [ + { + "pluginId": "savedObjectsFinder", + "scope": "public", + "docId": "kibSavedObjectsFinderPluginApi", + "section": "def-public.SavedObjectMetaData", + "text": "SavedObjectMetaData" + }, + "" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false + }, + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false + }, + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.getIconForSavedObject", + "type": "Function", + "tags": [], + "label": "getIconForSavedObject", + "description": [], + "signature": [ + "(savedObject: ", + "SimpleSavedObject", + ") => ", + "IconType" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.getIconForSavedObject.$1", + "type": "Object", + "tags": [], + "label": "savedObject", + "description": [], + "signature": [ + "SimpleSavedObject", + "" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.getTooltipForSavedObject", + "type": "Function", + "tags": [], + "label": "getTooltipForSavedObject", + "description": [], + "signature": [ + "((savedObject: ", + "SimpleSavedObject", + ") => string) | undefined" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.getTooltipForSavedObject.$1", + "type": "Object", + "tags": [], + "label": "savedObject", + "description": [], + "signature": [ + "SimpleSavedObject", + "" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.showSavedObject", + "type": "Function", + "tags": [], + "label": "showSavedObject", + "description": [], + "signature": [ + "((savedObject: ", + "SimpleSavedObject", + ") => boolean) | undefined" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.showSavedObject.$1", + "type": "Object", + "tags": [], + "label": "savedObject", + "description": [], + "signature": [ + "SimpleSavedObject", + "" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.getSavedObjectSubType", + "type": "Function", + "tags": [], + "label": "getSavedObjectSubType", + "description": [], + "signature": [ + "((savedObject: ", + "SimpleSavedObject", + ") => string) | undefined" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.getSavedObjectSubType.$1", + "type": "Object", + "tags": [], + "label": "savedObject", + "description": [], + "signature": [ + "SimpleSavedObject", + "" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.includeFields", + "type": "Array", + "tags": [], + "label": "includeFields", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false + }, + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectMetaData.defaultSearchField", + "type": "string", + "tags": [], + "label": "defaultSearchField", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "savedObjectsFinder", + "id": "def-public.SavedObjectFinderProps", + "type": "Type", + "tags": [], + "label": "SavedObjectFinderProps", + "description": [], + "signature": [ + "SavedObjectFinderFixedPage | SavedObjectFinderInitialPageSize" + ], + "path": "src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [] + }, + "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/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx new file mode 100644 index 0000000000000..452dc0234d866 --- /dev/null +++ b/api_docs/saved_objects_finder.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: kibSavedObjectsFinderPluginApi +slug: /kibana-dev-docs/api/savedObjectsFinder +title: "savedObjectsFinder" +image: https://source.unsplash.com/400x175/?github +description: API docs for the savedObjectsFinder plugin +date: 2022-09-05 +tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] +--- +import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; + + + +Contact [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 | +|-------------------|-----------|------------------------|-----------------| +| 16 | 0 | 16 | 0 | + +## Client + +### Functions + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/saved_objects_management.devdocs.json b/api_docs/saved_objects_management.devdocs.json index 2bc8ed195a7a1..a2946c15d50dd 100644 --- a/api_docs/saved_objects_management.devdocs.json +++ b/api_docs/saved_objects_management.devdocs.json @@ -1434,6 +1434,112 @@ "deprecated": false } ] + }, + { + "parentPluginId": "savedObjectsManagement", + "id": "def-public.SavedObjectsManagementPluginStart.parseQuery", + "type": "Function", + "tags": [], + "label": "parseQuery", + "description": [], + "signature": [ + "(query: ", + "Query", + ", types: ", + { + "pluginId": "savedObjectsManagement", + "scope": "common", + "docId": "kibSavedObjectsManagementPluginApi", + "section": "def-common.SavedObjectManagementTypeInfo", + "text": "SavedObjectManagementTypeInfo" + }, + "[]) => ParsedQuery" + ], + "path": "src/plugins/saved_objects_management/public/plugin.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "savedObjectsManagement", + "id": "def-public.SavedObjectsManagementPluginStart.parseQuery.$1", + "type": "Object", + "tags": [], + "label": "query", + "description": [], + "signature": [ + "Query" + ], + "path": "src/plugins/saved_objects_management/public/lib/parse_query.ts", + "deprecated": false + }, + { + "parentPluginId": "savedObjectsManagement", + "id": "def-public.SavedObjectsManagementPluginStart.parseQuery.$2", + "type": "Array", + "tags": [], + "label": "types", + "description": [], + "signature": [ + { + "pluginId": "savedObjectsManagement", + "scope": "common", + "docId": "kibSavedObjectsManagementPluginApi", + "section": "def-common.SavedObjectManagementTypeInfo", + "text": "SavedObjectManagementTypeInfo" + }, + "[]" + ], + "path": "src/plugins/saved_objects_management/public/lib/parse_query.ts", + "deprecated": false + } + ] + }, + { + "parentPluginId": "savedObjectsManagement", + "id": "def-public.SavedObjectsManagementPluginStart.getTagFindReferences", + "type": "Function", + "tags": [], + "label": "getTagFindReferences", + "description": [], + "signature": [ + "({ selectedTags, taggingApi, }: { selectedTags?: string[] | undefined; taggingApi?: ", + { + "pluginId": "savedObjectsTaggingOss", + "scope": "public", + "docId": "kibSavedObjectsTaggingOssPluginApi", + "section": "def-public.SavedObjectsTaggingApi", + "text": "SavedObjectsTaggingApi" + }, + " | undefined; }) => ", + "SavedObjectsFindOptionsReference", + "[] | undefined" + ], + "path": "src/plugins/saved_objects_management/public/plugin.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "savedObjectsManagement", + "id": "def-public.SavedObjectsManagementPluginStart.getTagFindReferences.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ selectedTags?: string[] | undefined; taggingApi?: ", + { + "pluginId": "savedObjectsTaggingOss", + "scope": "public", + "docId": "kibSavedObjectsTaggingOssPluginApi", + "section": "def-public.SavedObjectsTaggingApi", + "text": "SavedObjectsTaggingApi" + }, + " | undefined; }" + ], + "path": "src/plugins/saved_objects_management/public/lib/get_tag_references.ts", + "deprecated": false + } + ] } ], "lifecycle": "start", diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 9071daf4e32ee..47f9040a3cd73 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 125 | 0 | 112 | 0 | +| 130 | 0 | 117 | 0 | ## Client diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 688966a939b85..cf4eeeb7902bf 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2022-09-01 +date: 2022-09-05 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 44056c4275e68..8410b8fac9e46 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.devdocs.json b/api_docs/saved_search.devdocs.json index 4e3b1bb38f261..c4c6187deedad 100644 --- a/api_docs/saved_search.devdocs.json +++ b/api_docs/saved_search.devdocs.json @@ -581,6 +581,19 @@ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false }, + { + "parentPluginId": "savedSearch", + "id": "def-public.SavedSearch.tags", + "type": "Array", + "tags": [], + "label": "tags", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false + }, { "parentPluginId": "savedSearch", "id": "def-public.SavedSearch.grid", diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 0fa68d9855689..618334dacae51 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 42 | 0 | 42 | 1 | +| 43 | 0 | 43 | 1 | ## Client diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index aed8f206ad1ea..66b60801f9e34 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2022-09-01 +date: 2022-09-05 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 2dc0b2389c6f4..8e3fb91fc41fa 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2022-09-01 +date: 2022-09-05 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 01f12ed005aea..c391fb9991628 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 4df55c88e545b..d09f514b7e4ee 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index ae9955ab764ec..169446dc6ec80 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2022-09-01 +date: 2022-09-05 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 c1891a6e404eb..4c81970ae5edb 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2022-09-01 +date: 2022-09-05 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 adf01fa7ae1a3..784231b75edba 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2022-09-01 +date: 2022-09-05 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 96c5959156580..3178ef1c79314 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2022-09-01 +date: 2022-09-05 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 56c501cd6cf61..c37d18d3f2e87 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 27dd97951e683..912955764e527 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2022-09-01 +date: 2022-09-05 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 b8cf06d03871b..62003ca58f54c 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2022-09-01 +date: 2022-09-05 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 3af46a02898db..ee49e142b544c 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2022-09-01 +date: 2022-09-05 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 2180e46a6d5fd..b08f8b839f720 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2022-09-01 +date: 2022-09-05 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 3e865851efd01..1ce287369ce0d 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 38fcd0fc458a3..917b972b988da 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 5badb0617a211..36b368f2b1c57 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2022-09-01 +date: 2022-09-05 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 446f4e031d8c5..1ee7ab7da3ffd 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 934c0115034d9..8b76e74217a0d 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2022-09-01 +date: 2022-09-05 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 024108a7abf30..16fd284e7b4bf 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2022-09-01 +date: 2022-09-05 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 caf337adefeb6..bdce3b410e87e 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2022-09-01 +date: 2022-09-05 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 73a00372f148e..bd0fe3cb03859 100644 --- a/api_docs/unified_field_list.mdx +++ b/api_docs/unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList title: "unifiedFieldList" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedFieldList plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList'] --- import unifiedFieldListObj from './unified_field_list.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index f499aa6e5419f..ae4d3f6a3cc1b 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2022-09-01 +date: 2022-09-05 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 23e6ad5c13b7a..cc370d0fc516a 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2022-09-01 +date: 2022-09-05 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 8eaccc16b7db9..c407c87eee119 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2022-09-01 +date: 2022-09-05 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 1258057381b72..5cd4c2791d9fa 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2022-09-01 +date: 2022-09-05 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 b3ad14a92a64f..69792bea430d3 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2022-09-01 +date: 2022-09-05 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 67487afd9e936..1d0cb712c018d 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2022-09-01 +date: 2022-09-05 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 bca3babfaec87..f955df7c34b5f 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2022-09-01 +date: 2022-09-05 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 0f0a6533527ec..86b790e243847 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2022-09-01 +date: 2022-09-05 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 56a1e28faad63..4a3d2f896113c 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2022-09-01 +date: 2022-09-05 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 cf1a0917d64e4..4f56ac03deb41 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2022-09-01 +date: 2022-09-05 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 175ebc9dbce07..d5b0858ae2fff 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2022-09-01 +date: 2022-09-05 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 8a711c3712210..6207672a1d799 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2022-09-01 +date: 2022-09-05 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 0069808b3e41a..bede45034b249 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2022-09-01 +date: 2022-09-05 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 a2d7c684a31a1..7e4937b15697f 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2022-09-01 +date: 2022-09-05 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 134fcae41051b..3fa382e2dded5 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 9a878c4576cc2..824e92becc855 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2022-09-01 +date: 2022-09-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/dev_docs/operations/ci_stats.mdx b/dev_docs/operations/ci_stats.mdx index 01cc426369f5c..5d7d13ee83d70 100644 --- a/dev_docs/operations/ci_stats.mdx +++ b/dev_docs/operations/ci_stats.mdx @@ -12,4 +12,4 @@ The service implementation is available at https://github.com/elastic/kibana-ci- The service is run on Google Cloud Run, which allows us to build a container, push it to GCR, define a memory limit, vCPU count, and concurrent request limit per container, and Google will automatically scale the container for us. It works pretty well and hides a lot of the complexity of running the service. The repo uses Buildkite CI to build and deploy the container when pushing to the main branch. All changes to the main branch must come from PRs, but at this time we don't require review for PRs. -The website at https://ci-stats.kibana.dev uses EUI and Elastic Charts, and currently has users powered by Github OAuth. When someone authenticates with ci-stats they are first redirected to Github for authentication, then their membership in the Elastic org is checked. Users in the Elastic org will be able to do things that other users can't, like [trigger flaky test runner jobs](https://ci-stats.kibana.dev/trigger_flaky_test_runner). \ No newline at end of file +The website at https://ci-stats.kibana.dev uses EUI and Elastic Charts, and currently has users powered by Github OAuth. When someone authenticates with ci-stats they are first redirected to Github for authentication, then their membership in the Elastic org is checked. Users in the Elastic org will be able to do things that other users can't, like trigger the . \ No newline at end of file diff --git a/dev_docs/operations/flaky_test_runner.mdx b/dev_docs/operations/flaky_test_runner.mdx new file mode 100644 index 0000000000000..3ee0f3517b5a4 --- /dev/null +++ b/dev_docs/operations/flaky_test_runner.mdx @@ -0,0 +1,21 @@ +--- +id: kibDevDocsOpsFlakyTestRunner +slug: /kibana-dev-docs/ops/flaky-test-runner +title: "Flaky Test Runner" +description: A tool which runs specific tests many times to spot flakiness +tags: ['kibana', 'dev', 'contributor', 'operations', 'ci', 'tests', 'flaky'] +--- + +The Flaky Test Runner is a tool that can be used to gauge the flakiness of a test. It is triggered using the form at https://ci-stats.kibana.dev/trigger_flaky_test_runner. Follow the instructions in the wizard to pick a PR, then a test which will run and the number of executions for that test, and finally start that job at Buildkite. + +After starting the job you will be sent to buildkite to view the progress of the job. + +## How many successful runs do I need to know if my test is flaky? + +Most of the time flakiness should be resolved by starting with the error that's occurring in CI, then applying the suggestions in to find places where flakiness is likely being introduced. When working this way the flaky test runner can be used to debug a failure by running it many times to trigger the flakiness, or used to verify at the end that flakiness isn't increased by the changes. + +If you did want to prove that your test wasn't flaky anymore, the number of runs that you would need is based on the flakiness of the test you are dealing with. We execute tests about 300 times a day, on average, so if your test is only failing a few times a week then you might need over 1000 successful test runs to prove that it's no longer flaky. If a test is failing several times a day, then you would need way fewer. + +Ultimately, running the flaky test runner enough times to validate that a test isn't flaky just isn't an economically responsible way to fix flakiness so should be a last resort strategy. + +If there is reason to believe that a test which was previously flaky is no longer flaky, then the test can just be unskipped. If the test is still flaky then that will be proven shortly enough in CI and Operations will skip the test again. diff --git a/dev_docs/operations/flaky_tests.mdx b/dev_docs/operations/flaky_tests.mdx new file mode 100644 index 0000000000000..dde5267ab8602 --- /dev/null +++ b/dev_docs/operations/flaky_tests.mdx @@ -0,0 +1,65 @@ +--- +id: kibDevDocsOpsFlakyTests +slug: /kibana-dev-docs/ops/flaky-tests +title: "Flaky Tests" +description: A description of how the operations team helps manage flaky tests in Kibana +tags: ['kibana', 'dev', 'contributor', 'operations', 'ci', 'tests', 'flaky'] +--- + +The Kibana repository contains hundreds of thousands of test cases, and on every PR and commit to the repository we run every one of those test cases. We need to do this because so many parts of Kibana are interconnected and we don't currently have the ability to only run the tests that are necessary based on the changes in a PR/commit. This has the side effect of running each test hundreds of times a day, which means that tests need to be very reliable. + +Because of the high reliability requirements for our tests it is common for tests to become "flaky", meaning that something changes which causes their reliability to drop and causes them to fail when they should be passing. When a test becomes flaky the Operations team will skip that test, meaning it will no longer run until the team owning that test investigates the flakiness, and unskips the test. + +## How is test ownership determined? + +In many cases ownership is relatively obvious based on the location of the test. In cases where it's more ambiguous we will normally trace back to when the test was added, or look at the PRs which edit the functionality of the tests the most (ignoring repo-wide edits like ESLint upgrades, etc). The authors/teams that are labeled on these PRs or the teams of the authors of these PRs are treated as the "owner" of tests. + +In the we will be improving this by putting all code, including functional tests, into packages which have a specific and verified owner. + +## When is a test flaky enough to skip? + +Identifying when tests are flaky enough that they should be skipped is the responsibility of members of the Operations team. When making that decision we consider a few different questions: + +### Is this a very new test? + +When a test is very new (~ 3-4 business days) and has already started failing, then the test is likely flaky enough to skip. While we don't know how flaky this test really is, we know that it didn't take long for it to start failing. Additionally, we assume that the author of the test is still familiar with the context of the change and not deep in the middle of some other complicated work. In these cases we will assign and ping the author directly and expect the test to not be skipped for long. + +This is an ideal case for flaky tests, but isn't very common. + +### How often is this test failing? + +The frequency of failures is judged uniquely based on the type of test that is failing: + +*Jest Unit/Integration tests:* These tests are not retried, and shouldn't be doing anything complicated enough to introduce flakiness. Any number of failures in these tests will lead to them being skipped. + +*Functional/API Integration tests:* (aka. FTR configs) These tests involve running full Kibana and Elasticsearch instances and usually require interacting with the product through web browser automation. Because of this 100% stability is really unattainable, so any time there is a failure in an FTR config the tests in that config will be re-run automatically. If the test passes on the second time then the CI succeeds, but is "unstable" and requires that PR authors triage and interpret the failure to make sure their changes didn't cause this instability. + +Our goal is to balance reducing this overhead for "innocent" PR authors without creating too much work on teams who need to unskip flaky tests. To achieve this goal, one of these tests is "flaky enough to be skipped" when it is _failing at least four times in the last week or shows a consistent, and recent, historical pattern of failing_. + +To understand how many times a test has failed we use a [Kibana dashboard](https://ops.kibana.dev/s/ci/app/dashboards#/view/cb7380fb-67fe-5c41-873d-003d1a407dad) which records all of the failures in Kibana CI. This allows us to see the pattern of failures and investigate if a test which has only failed once on a tracked branch is actually failing regularly in different PRs. + +Since PRs don't always contain complete code we don't immediately treat failures in PRs as failures, we try to verify that they're spread out over time and that they aren't all on the same PR or consistently triggered by the same PR author (indications that these failures might be change based, not caused by flakiness). + +### Are the owning teams able to fix this source of flakiness? + +There are cases where tests will fail because of something that is outside of the test-authors' control. + +A recent example of this is issues caused by the way that the supported archiving Kibana saved object indices. This was a "best practice" that started failing as we worked to make the migration process more resilient, and caused flakiness that individual test owners couldn't really fix. + +To fix this specific example the Operations, Core, and QA teams worked together to find a better solution, and the QA team has been assisting other teams by migrating their tests from the to the new `KbnArchiver` + +Now the majority of Kibana indexes stored in ES Archives have been migrated and this is no longer a major source of flakiness. When another case pops-up we usually just ping the QA team and ask them to migrate the specific usage rather than skip the test rather than skip the test. + +## How do I know when my team's tests are skipped? + +Every test that fails on a tracked branch is logged in a Github issue. On subsequent failures of the same test a comment is added to the issue, to help us get an idea of flakiness and help us find instances of the failure on CI. These issues require `team:` labels just like all other issues, and many people work to make sure that all these issues are labels correctly. Following these issues will allow you to see tests which are likely flaky. + +When a test is determined to be flaky enough to be skipped the issue will get the `blocker`, `skipped test`, and at least the version label of the first upcoming version that the test was skipped for. The goal here is to highlight that there is functionality in that upcoming version which might be broken because it is untested, and teams should look at them as quickly as possible to deal with the blocker. + +## How do I get my tests unskipped? + +Unskipping tests is the responsibility of the test owner. To unskip a test the flaky failures should be analyzed in order to determine the cause for the flakiness, or the problematic tests should be scanned for issues described in the section ("How do I write tests that aren't flaky?")[#how-do-i-write-tests-that-arent-flaky]. When the cause of the flakiness has been identified, open a PR with the changes necessary and validate that the flakiness is reduced using the . See the docs for more information about how to use it. + +## How do I write functional tests that aren't flaky? + +Checkout \ No newline at end of file diff --git a/dev_docs/operations/operations_landing.mdx b/dev_docs/operations/operations_landing.mdx index 49325b5babb57..3a80faa90c501 100644 --- a/dev_docs/operations/operations_landing.mdx +++ b/dev_docs/operations/operations_landing.mdx @@ -22,6 +22,9 @@ layout: landing @@ -74,5 +77,6 @@ layout: landing { pageId: "kibDevDocsOpsManagedVscodeConfig" }, { pageId: "kibDevDocsOpsManagedVscodeConfigCli" }, { pageId: "kibDevDocsOpsTest" }, + { pageId: "kibDevDocsOpsEsArchiver" }, ]} /> \ No newline at end of file diff --git a/dev_docs/operations/writing_stable_functional_tests.mdx b/dev_docs/operations/writing_stable_functional_tests.mdx new file mode 100644 index 0000000000000..f2d6f8de468df --- /dev/null +++ b/dev_docs/operations/writing_stable_functional_tests.mdx @@ -0,0 +1,84 @@ +--- +id: kibDevDocsOpsWritingStableFunctionalTests +slug: /kibana-dev-docs/ops/writing-stable-functional-tests +title: "Writing Stable Functional Tests" +description: Some best-practices for writing stable functional tests +tags: ['kibana', 'dev', 'contributor', 'operations', 'ci', 'tests', 'flaky'] +--- + +Consistently writing functional tests that aren't flaky is impossible. There are too many variables that can't be reproduced reliably, and those variables change over time, so instead we have to focus on how we can reduce the flakiness in our tests as much as possible, making them more resilient to changing conditions. + +When you watch tests execute locally it can be tempting to think "after I click this button I can click this other button" but this assumes that the first button click will always execute its click handler immediately, or that the render of the second button will be done immediately. The reality is that user interfaces are super complex and these types of assumptions are by far the most common cause of flakiness in tests. + +There are all sorts of things that can happen to delay a click handler, or react render, and we need to be prepared for those in our tests. We can do this using appropriate timeouts for specific actions, retry logic, and validating our assumptions with code. + +## Become familiar with the retry/timing logic of each common service method + +Services like the `testSubjects` or `find` service will usually do some amount of retries/timeouts based on the intention of a specific method. Check the documentation of the method to understand how the method is supposed to be used, for instance: + + + The intended usage/retry/timeout behavior of each method in all services is not well documented. Things in these common services have grown very stable now, so if you spend the time to analyze how a method works please help others by improving the method description. Thank you! + + + - `testSubjects.exists()`: this method is intended to quickly answer the question about if something exists and has a default timeout of 2.5 seconds. This is ideal for determining, based on the current state of Kibana, if something should be done or not. + + ```ts + if (await testSubjects.exists('someModal')) { + // close the modal if it is open + } + ``` + + - `testSubjects.existsOrFail()`: this method is intended to be used as a success or fail point, where a specific element is expected to be visible and if it isn't an error will be thrown. This is ideal for when you click a button and want to make sure the success state is reached. + + ```ts + await testSubjects.click('mySubmitButton') + await testSubjects.existsOrFail('mySuccessMessage') + ``` + +## Use services for reusing functionality and implementing it correctly once + +When you are writing functional tests for your application or feature it is probably appropriate to create a new service for the specific component of Kibana that you will be interacting with. Additionally, there are many other services which you might be able to reuse based on what you're trying to do. + +Your service should define the proper way to interact with your components/app and prevent people from needing to encode specific testSubjects, or success criteria, into their apps. + +## Service methods which trigger an async process should verify success or failure + +Many service methods will be used for reading the state of specific elements in the Kibana UI so that tests can understand what's going on and assert functionality, but some of the methods in our services will trigger asynchronous actions in the UI. Examples of such service methods are: + + - `SettingsPage.toggleAdvancedSettingCheckbox()` + - `CommonPage.navigate()` + - `LoginPage.login()` + +All of these methods interact with the UI and start an async process (a process which takes some time to complete). All of them should do more than just interact with the UI, they should encode validation of the success/failure of the action they started and only resolve when the action is +completed successfully, or reject when it's unable to be completed for some reason. + +## Never use a "sleep" or rely on a timer to wait for something to complete + +Using methods like `sleep()` or `setTimeout()` to pause test execution for some amount of time is an appropriate tool when used sparingly, but it should never be used to wait for some action to complete. Instead, a method like `retry.waitFor()` should be used to define the success state we are waiting for. + +***Don't*** do this: +```ts +await myService.clickSave() +// wait for the save to complete and redirect to the detail page +await sleep() +``` + +Do this instead: +```ts +await myService.clickSave() +await testSubjects.existsOrFail('savedItemDetailPage') +``` + +## Do as little work in the UI as possible to validate your test case + +Even if you are very careful, the more UI automation you do the more likely you are to make a mistake and write a flaky test. If there is any way to do setup work for your test via the Kibana or Elasticsearch APIs rather than interacting with the UI, then take advantage of that opportunity to write less UI automation. + +## Do you really need a functional test for this? + +Once you've invested a lot of time and energy into figuring out how to write functional tests well it can be tempting to use them for all sorts of things which might not justify the cost of a functional test. Make sure that your test is validating something that couldn't be validated by a series of unit tests on a component+store+API. + +API integration tests can test many integrations with Elasticsearch in a way that's far more efficient and also is far less likely to be flaky. + +Unit tests are the cheapest tests and can even be run locally by people with a normal amount of patience! + +If you could write your test using either Jest Unit, Jest Integration, or API Integration tests (in that order) then it is definitely best to write those instead of a functional test. diff --git a/dev_docs/tutorials/adding_performance_metrics.mdx b/dev_docs/tutorials/adding_performance_metrics.mdx index a6faac70b6ed3..ad74ef83eaf77 100644 --- a/dev_docs/tutorials/adding_performance_metrics.mdx +++ b/dev_docs/tutorials/adding_performance_metrics.mdx @@ -7,76 +7,157 @@ date: 2022-07-07 tags: ['kibana', 'onboarding', 'setup', 'performance', 'development', 'telemetry'] --- -Reporting performance events is as easy as shown below. However, it's highly suggested to follow guidelines for what to report in certain fields: +## Reporting performance events -```typescript -import { reportPerformanceMetricEvent } from '@kbn/ebt-tools'; +### Simple performance events + +Let's assume we intend to report the performance of a specific action called `APP_ACTION`. +In order to do so, we need to first measure the timing of that action. +Once we have the time measurement, we can use the `reportPerformanceMetricEvent` API to report it. + +The most basic form of reporting would be: +```typescript reportPerformanceMetricEvent(analytics, { - eventName: KIBANA_LOADED_EVENT, - meta: { - // fields that are searchable-as-keywords but not aggregateable - kibana_version: this.coreContext.env.packageInfo.version, - protocol : window.location.protocol, - }, - duration: timing[LOAD_FIRST_NAV], - key1 : LOAD_START, - value1 : timing[LOAD_START], - key2 : LOAD_BOOTSTRAP_START, - value2 : timing[LOAD_BOOTSTRAP_START], - key3 : LOAD_CORE_CREATED, - value3 : timing[LOAD_CORE_CREATED], - key4 : LOAD_SETUP_DONE, - value4 : timing[LOAD_SETUP_DONE], - key5 : LOAD_START_DONE, - value5 : timing[LOAD_START_DONE], + eventName: APP_ACTION, + duration, // Duration in milliseconds }); +``` + +Once executed, the metric would be delivered to the `stack-telemetry` cluster, alongside with the event's context. +The data is updated periodically, so you might have to wait up to 30 minutes to see your data in the index. + +Once indexed, this metric will appear in `ebt-kibana` index. It is also mapped into an additional index, dedicated to performance metrics. +We recommend using the `Kibana Peformance` space on the telemetry cluster, where you get an `index patten` to easily access this data. +Each document in the index has the following structure: + +```typescript +{ + "_index": "backing-ebt-kibana-browser-performance-metrics-000001", // Performance metrics are stored at a dedicated simplified index (browser \ server). + "_source": { + "timestamp": "2022-08-31T11:29:58.275Z" + "event_type": "performance_metric", // All events share a common event type to simplify mapping + "eventName": "dashboard_loaded", // Event name as specified when reporting it + "duration": 736, // Event duration as specified when reporting it + "context": { // Context holds information identifying the deployment, version, application and page that generated the event + "version": "8.5.0-SNAPSHOT", + "applicationId": "dashboards", + "page": "app", + "entityId": "61c58ad0-3dd3-11e8-b2b9-5d5dc1715159", + "branch": "main", + "labels": { + "journeyName": "flight_dashboard", + ... + } + ... + }, + ... + }, +} +``` + +### Performance events with breakdowns and metadata + +Lets assume we are interested in benchmarking the performance of a more complex event `COMPLEX_APP_ACTION`, that is made up of two steps: + - `INSPECT_DATA` measures the time it takes to retrieve a user's profile and check if there is a cached version of their data. + - If the cached data is fresh it proceeds with a flow `use-local-data` + - If data needs to be refreshed, it proceeds with a flow `load-data-from-api`. + - `PROCESS_DATA` loads and processes the data depending on the flow chosen in the previous step. + +We could utilise the additional options supported by the `reportPerformanceMetricEvent` API: + +```typescript +import { reportPerformanceMetricEvent } from '@kbn/ebt-tools'; reportPerformanceMetricEvent(analytics, { - eventName: "dashboard_loaded", + eventName: COMPLEX_APP_ACTION, + duration, // Total duration in milliseconds + key1 : INSPECT_DATA, // Claiming free key1 to be used for INSPECT_DATA + value1 : durationOfStepA, // Total duration of step INSPECT_DATA in milliseconds + key2 : PROCESS_DATA, // Claiming free key2 to be used for PROCESS_DATA + value2 : durationOfStepB, // Total duration of step PROCESS_DATA in milliseconds meta: { - // fields that are searchable-as-keywords but not aggregateable - kibana_version: this.coreContext.env.packageInfo.version, - protocol : window.location.protocol, + dataSource: 'flow2', // Providing event specific context. This can be useful to create meaningful aggregations. }, - duration: 2265, - key1 : "time_to_data", - value1 : 1801, - key2 : "num_of_panels", - value2 : 7, }); ``` -Normally reporting an event requires a registration of event type however since we want -performance metrics to be uniform across all kibana we already summarized it with the structure above. -We welcome all the feedback based on your usecases. - -# Guidelines of What to report in Performance Metric Events +This event will be indexed with the following structure: +```typescript +{ + "_index": "backing-ebt-kibana-browser-performance-metrics-000001", // Performance metrics are stored in a dedicated simplified index (browser \ server). + "_source": { + "timestamp": "2022-08-31T11:29:58.275Z" + "event_type": "performance_metric", // All events share a common event type to simplify mapping + "eventName": COMPLEX_APP_ACTION, // Event name as specified when reporting it + "duration": 736, // Event duration as specified when reporting it + "key1": INSPECT_DATA, // The key name of INSPECT_DATA + "value1": 250, // The duration of step INSPECT_DATA + "key2": PROCESS_DATA, // The key name of PROCESS_DATA + "value2": 520, // The duration of step PROCESS_DATA + "meta": { + "dataSource": 'load-data-from-api', + }, + "context": { // Context holds information identifying the deployment, version, application and page that generated the event + "version": "8.5.0-SNAPSHOT", + "cluster_name": "job-ftr_configs_2-cluster-ftr", + "pageName": "application:dashboards:app", + "applicationId": "dashboards", + "page": "app", + "entityId": "61c58ad0-3dd3-11e8-b2b9-5d5dc1715159", + "branch": "main", + "labels": { + "journeyName": "flight_dashboard", + } + ... + }, + ... + }, +} +``` -In order to simplify the consumption of performance telemetry, we'd like to standardize the shape of events. This requires considering the following aspects: -- `Performance` - amount and size of events being sent -- `Discoverability` - how easy it is to find different events, dimensions and metrics -- `Queriability` - we would like to have the ability to write complex queries on top of telemetry data; for example getting all dashboard load events that took over 10 seconds for dashboards that contain less than 5 panels. -- `Flexibility` - Teams should be able to flexibly design their event structure without having to define custom mappings (except for edge cases). I.e. a team can decide that the first free field is always used for that page load. -- `Ease of visualization` - it should be easy to visualize the data -- `Index field explosion` - having too many field names in the index, damages the performance when visualizing the data. +The performance metrics API supports **5 numbered free fields** that can be used to report numeric metrics that you intend to analyze. +Note that they can be used for any type of numeric information you may want to report and use to create your own flexible schema, +without having to add custom mappings. -And event schema is composed of fields which is designed for specific purposes: +If you want to provide event specific context, you can add properties to the `meta` field. +The `meta` object is stored as a [flattened field](https://www.elastic.co/guide/en/elasticsearch/reference/current/flattened.html) hence +it's searchable and can be used to further breakdown event metrics. -- `Event name` We decided to report all metric events under a single event_type, so that we can avoid registering it multiple times. This requires us to add a special standard field for eventName. -- `Standardized fields` (duration) these fields represent common values that might be reported for performance. This can include duration for time based reports, status, heapSize, memorySize, etc. Standardized fields will be mapped as is to the index, so they can be visualized. -- `Free fields` (key1, value1, key2, value2, ..., key5, value5) A limited set of integer-numbered free key-value pairs that can be used to report additional use-case specific fields. Teams may use them to create their own internal sub-schema. For example, a team may choose to use key1 to always report the loading time of a certain component that is always present on the page. Free fields will be mapped, if present, to the index, so they can be visualized. If a free field becomes popular, it can be promoted to a standardized field, freeing up the free field for other use. -- `Non-standard fields` (kibana_version, protocol ...) - additional fields may be added to an event by extending them to the `meta` object. However, those won't be automatically mapped to the index. Since the `meta` field is a Flattened Field, this means those fields will be searchable by default, but an additional field mapping would be required to visualize them. +**Note**: It's important to keep in mind `free field` values are integers and floating point values will be rounded. -**Note**: It's important to keep in mind `Free Field` values are integer otherwise they will be rounded. +### How to choose and measure events -Events should be meaningful and can have multiple sub metrics which will give specific information of certain action. For example -page-load event can be composed of render time, data load time during the page-load and so on. It's important to understand these +Events should be meaningful and can have multiple sub metrics which will give specific information of certain actions. For example +page-load events can be composed of render time, data load time during the page-load and so on. It's important to understand these events will have meaning for performance investigations and that can be used in visualizations, aggregations. Considering this, creating an event for cpuUsage does not bring any value because it doesn't bring any context with itself and reporting multiple of these events in different places of code will have so much variability during performance analysis of your code. However it can be nice attribute -to follow if it's important for you to look inside of specific event e.g. page-load. +to follow if it's important for you to look inside of a specific event e.g. `page-load`. + +- Understand your events + **Make sure that the event is clearly defined and consistent** (i.e. same code flow is executed each time). + Consider the start point and endpoint of the measurement and what happens between those points. + For example: a `app-data-load` event should not include the time it takes to render the data. +- **Choose event names wisely**. + Try to balance event names specificity. Calling an event `load` is too generic, calling an event `tsvb-data-load` is too specific (instead the visualization + type can be specified in a `meta` field) +- **Distinguish between flows with event context**. + If a function that loads data is called when an app loads, when the user changes filters and when the refresh button is clicked, you should distinguish between + these flows by specifying a `meta` field. +- **Avoid duplicate events**. + Make sure that measurement and reporting happens in a point of the code that is executed only once. + For example, make sure that refresh events are reported only once per button click. +- **Measure as close to the event as possible**. + For example, if you're measuring the execution of a specific React Effect execution, place the measurement code inside the effect. + try to place the measurement start right before the navigation is performed and stop measuring as soon as all resources are loaded +- **Use the `window.performance` API**. + The [`performance.now()`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now) API can be used to accurate way to receive timestamps + The [`performance.mark()`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) API can be used to track performance without having to pollute the + code. +- **Keep performance in mind**. Reporting the performance of Kibana should never harm its own performance. + Avoid sending events too frequently (`onMouseMove`) or adding serialized JSON objects (whole `SavedObjects`) into the meta object. # Analytics Client diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 2de6729e3ea4f..46159c7daa90b 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -237,6 +237,10 @@ Content is fetched from the remote (https://feeds.elastic.co) once a day, with p |NOTE: This plugin is deprecated and will be removed in 8.0. See https://github.com/elastic/kibana/issues/46435 for more information. +|{kib-repo}blob/{branch}/src/plugins/saved_objects_finder/README.md[savedObjectsFinder] +|The savedObjectsFinder plugin exposes a UI for finding saved objects on the client side. + + |{kib-repo}blob/{branch}/src/plugins/saved_objects_management/README.md[savedObjectsManagement] |The savedObjectsManagement plugin manages the Saved Objects management section. diff --git a/docs/user/security/audit-logging.asciidoc b/docs/user/security/audit-logging.asciidoc index 8cd293654c29c..ce1e63c20d1c6 100644 --- a/docs/user/security/audit-logging.asciidoc +++ b/docs/user/security/audit-logging.asciidoc @@ -2,7 +2,7 @@ [[xpack-security-audit-logging]] === Audit logs -Audit logging is a https://www.elastic.co/subscriptions[subscription feature] that you can enable to keep track of security-related events, +Audit logging is a {subscriptions}[subscription feature] that you can enable to keep track of security-related events, such as authorization success and failures. Logging these events enables you to monitor {kib} for suspicious activity and provides evidence in the event of an attack. @@ -410,7 +410,7 @@ Example: `[marketing]` Example: `get`, `post`, `put`, `delete` | `url.domain` -| Domain of the url. +| Domain of the URL. Example: `www.elastic.co` @@ -440,7 +440,7 @@ Example: `https` | *Description* | [[field-trace-id]] `trace.id` -| Unique identifier allowing events of the same transaction from {kib} and {es} to be be correlated. +| Unique identifier allowing events of the same transaction from {kib} and {es} to be correlated. |====== diff --git a/fleet_packages.json b/fleet_packages.json index 96b3928379c47..c4a7f87127f10 100644 --- a/fleet_packages.json +++ b/fleet_packages.json @@ -4,6 +4,12 @@ on disk rather than only in the configured package registry service. This allows Kibana to install "stack-aligned" packages or those that are installed by default in an airgapped or offline environment. + The `forceAlignStackVersion` option is available for packages who wish to opt into having their + versions forcibly rewritten to the current version of Kibana. This is useful for packages that + deploy multiple, version-aligned stack components like APM. When this option is enabled, Kibana + will fetch the latest available version of the package from EPR (including prerelease versions), + download that version, and rewrite its version to align with Kibana's. + Packages will be fetched from https://epr-snapshot.elastic.co by default. This can be overridden via the `--epr-registry=production` command line argument when building Kibana. Fetching from the snapshot registry allows Kibana to bundle packages that have yet to be published to production in @@ -14,7 +20,8 @@ [ { "name": "apm", - "version": "8.4.0" + "version": "8.4.0", + "forceAlignStackVersion": true }, { "name": "elastic_agent", diff --git a/nav-kibana-dev.docnav.json b/nav-kibana-dev.docnav.json index 9c548a30a1480..7e00c8378e5c8 100644 --- a/nav-kibana-dev.docnav.json +++ b/nav-kibana-dev.docnav.json @@ -25,6 +25,15 @@ } ] }, + { + "label": "Operations", + "items": [ + { + "id": "kibDevDocsOpsOverview", + "label": "Overview" + } + ] + }, { "label": "Contributing", "items": [ @@ -236,9 +245,6 @@ { "id": "kibCorePluginApi" }, - { - "id": "kibCoreChromePluginApi" - }, { "id": "kibFieldFormatsPluginApi" }, @@ -438,145 +444,6 @@ "id": "kibDevDocsOpsTest" } ] - }, - { - "label": "Operations", - "items": [ - { - "id": "kibDevDocsOpsOverview", - "label": "Overview" - }, - { - "label": "Initiatives", - "items": [ - { - "id": "kibDevDocsOpsPackages" - } - ] - }, - { - "label": "CI", - "items": [ - { - "id": "kibDevDocsOpsCiStats" - } - ] - }, - { - "label": "Build tooling", - "items": [ - { - "id": "kibDevDocsOpsKbnPm" - }, - { - "id": "kibDevDocsOpsOptimizer" - }, - { - "id": "kibDevDocsOpsBabelPreset" - }, - { - "id": "kibDevDocsOpsTypeSummarizer" - }, - { - "id": "kibDevDocsOpsBabelPluginSyntheticPackages" - }, - { - "id": "kibDevDocsOpsUiSharedDepsNpm" - }, - { - "id": "kibDevDocsOpsUiSharedDepsSrc" - }, - { - "id": "kibDevDocsOpsPluginDiscovery" - } - ] - }, - { - "label": "Linting & Validation", - "items": [ - { - "id": "kibDevDocsOpsEslintConfig" - }, - { - "id": "kibDevDocsOpsEslintPluginEslint" - }, - { - "id": "kibDevDocsOpsEslintWithTypes" - }, - { - "id": "kibDevDocsOpsEslintPluginImports" - }, - { - "id": "kibDevDocsOpsEslintPluginDisable" - }, - { - "id": "kibDevDocsOpsKbnYarnLockValidator" - } - ] - }, - { - "label": "Utilities", - "items": [ - { - "id": "kibDevDocsToolingLog" - }, - { - "id": "kibDevDocsOpsJestSerializers" - }, - { - "id": "kibDevDocsOpsExpect" - }, - { - "id": "kibDevDocsOpsAmbientStorybookTypes" - }, - { - "id": "kibDevDocsOpsAmbientUiTypes" - }, - { - "id": "kibDevDocsOpsTestSubjSelector" - }, - { - "id": "kibDevDocsOpsBazelRunner" - }, - { - "id": "kibDevDocsOpsCliDevMode" - }, - { - "id": "kibDevDocsOpsEs" - }, - { - "id": "kibDevDocsOpsSomeDevLog" - }, - { - "id": "kibDevDocsOpsDevCliRunner" - }, - { - "id": "kibDevDocsOpsGetRepoFiles" - }, - { - "id": "kibDevDocsOpsRepoSourceClassifier" - }, - { - "id": "kibDevDocsOpsJsonc" - }, - { - "id": "kibDevDocsOpsKibanaManifestParser" - }, - { - "id": "kibDevDocsOpsKibanaManifestSchema" - }, - { - "id": "kibDevDocsOpsManagedVscodeConfig" - }, - { - "id": "kibDevDocsOpsManagedVscodeConfigCli" - }, - { - "id": "kibDevDocsOpsTest" - } - ] - } - ] } ] } diff --git a/package.json b/package.json index ea5749c3ab202..c2c7469a58eaa 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "**/use-composed-ref": "^1.3.0", "**/use-latest": "^1.2.1", "@tanstack/query-core": "^4.2.1", - "globby/fast-glob": "3.2.7", + "globby/fast-glob": "^3.2.11", "puppeteer/node-fetch": "^2.6.7" }, "dependencies": { @@ -169,6 +169,9 @@ "@kbn/core-capabilities-server": "link:bazel-bin/packages/core/capabilities/core-capabilities-server", "@kbn/core-capabilities-server-internal": "link:bazel-bin/packages/core/capabilities/core-capabilities-server-internal", "@kbn/core-capabilities-server-mocks": "link:bazel-bin/packages/core/capabilities/core-capabilities-server-mocks", + "@kbn/core-chrome-browser": "link:bazel-bin/packages/core/chrome/core-chrome-browser", + "@kbn/core-chrome-browser-internal": "link:bazel-bin/packages/core/chrome/core-chrome-browser-internal", + "@kbn/core-chrome-browser-mocks": "link:bazel-bin/packages/core/chrome/core-chrome-browser-mocks", "@kbn/core-config-server-internal": "link:bazel-bin/packages/core/config/core-config-server-internal", "@kbn/core-config-server-mocks": "link:bazel-bin/packages/core/config/core-config-server-mocks", "@kbn/core-deprecations-browser": "link:bazel-bin/packages/core/deprecations/core-deprecations-browser", @@ -216,6 +219,9 @@ "@kbn/core-i18n-browser": "link:bazel-bin/packages/core/i18n/core-i18n-browser", "@kbn/core-i18n-browser-internal": "link:bazel-bin/packages/core/i18n/core-i18n-browser-internal", "@kbn/core-i18n-browser-mocks": "link:bazel-bin/packages/core/i18n/core-i18n-browser-mocks", + "@kbn/core-i18n-server": "link:bazel-bin/packages/core/i18n/core-i18n-server", + "@kbn/core-i18n-server-internal": "link:bazel-bin/packages/core/i18n/core-i18n-server-internal", + "@kbn/core-i18n-server-mocks": "link:bazel-bin/packages/core/i18n/core-i18n-server-mocks", "@kbn/core-injected-metadata-browser": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser", "@kbn/core-injected-metadata-browser-internal": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-internal", "@kbn/core-injected-metadata-browser-mocks": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-mocks", @@ -435,7 +441,7 @@ "dedent": "^0.7.0", "deep-freeze-strict": "^1.1.1", "deepmerge": "^4.2.2", - "del": "^5.1.0", + "del": "^6.1.0", "elastic-apm-node": "^3.38.0", "email-addresses": "^5.0.0", "execa": "^4.0.2", @@ -451,9 +457,7 @@ "get-port": "^5.0.0", "getopts": "^2.2.5", "getos": "^3.1.0", - "glob": "^7.1.2", - "glob-all": "^3.2.1", - "globby": "^11.0.3", + "globby": "^11.1.0", "handlebars": "4.7.7", "he": "^1.2.0", "history": "^4.9.0", @@ -613,7 +617,8 @@ "xml2js": "^0.4.22", "xterm": "^4.18.0", "xterm-addon-fit": "^0.5.0", - "yauzl": "^2.10.0" + "yauzl": "^2.10.0", + "yazl": "^2.5.1" }, "devDependencies": { "@apidevtools/swagger-parser": "^10.0.3", @@ -769,7 +774,6 @@ "@types/flot": "^0.0.31", "@types/geojson": "7946.0.7", "@types/getos": "^3.0.0", - "@types/glob": "^7.1.2", "@types/gulp": "^4.0.6", "@types/gulp-zip": "^4.0.1", "@types/hapi__cookie": "^10.1.3", @@ -845,6 +849,9 @@ "@types/kbn__core-capabilities-server": "link:bazel-bin/packages/core/capabilities/core-capabilities-server/npm_module_types", "@types/kbn__core-capabilities-server-internal": "link:bazel-bin/packages/core/capabilities/core-capabilities-server-internal/npm_module_types", "@types/kbn__core-capabilities-server-mocks": "link:bazel-bin/packages/core/capabilities/core-capabilities-server-mocks/npm_module_types", + "@types/kbn__core-chrome-browser": "link:bazel-bin/packages/core/chrome/core-chrome-browser/npm_module_types", + "@types/kbn__core-chrome-browser-internal": "link:bazel-bin/packages/core/chrome/core-chrome-browser-internal/npm_module_types", + "@types/kbn__core-chrome-browser-mocks": "link:bazel-bin/packages/core/chrome/core-chrome-browser-mocks/npm_module_types", "@types/kbn__core-common-internal-base": "link:bazel-bin/packages/core/common/internal-base/npm_module_types", "@types/kbn__core-config-server-internal": "link:bazel-bin/packages/core/config/core-config-server-internal/npm_module_types", "@types/kbn__core-config-server-mocks": "link:bazel-bin/packages/core/config/core-config-server-mocks/npm_module_types", @@ -893,6 +900,9 @@ "@types/kbn__core-i18n-browser": "link:bazel-bin/packages/core/i18n/core-i18n-browser/npm_module_types", "@types/kbn__core-i18n-browser-internal": "link:bazel-bin/packages/core/i18n/core-i18n-browser-internal/npm_module_types", "@types/kbn__core-i18n-browser-mocks": "link:bazel-bin/packages/core/i18n/core-i18n-browser-mocks/npm_module_types", + "@types/kbn__core-i18n-server": "link:bazel-bin/packages/core/i18n/core-i18n-server/npm_module_types", + "@types/kbn__core-i18n-server-internal": "link:bazel-bin/packages/core/i18n/core-i18n-server-internal/npm_module_types", + "@types/kbn__core-i18n-server-mocks": "link:bazel-bin/packages/core/i18n/core-i18n-server-mocks/npm_module_types", "@types/kbn__core-injected-metadata-browser": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser/npm_module_types", "@types/kbn__core-injected-metadata-browser-internal": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-internal/npm_module_types", "@types/kbn__core-injected-metadata-browser-mocks": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-mocks/npm_module_types", @@ -1164,6 +1174,7 @@ "@types/xml2js": "^0.4.5", "@types/yargs": "^15.0.0", "@types/yauzl": "^2.9.1", + "@types/yazl": "^2.4.2", "@types/zen-observable": "^0.8.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", @@ -1251,7 +1262,6 @@ "html": "1.0.0", "html-loader": "^1.3.2", "http-proxy": "^1.18.1", - "is-glob": "^4.0.1", "is-path-inside": "^3.0.2", "jest": "^26.6.3", "jest-axe": "^5.0.0", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index 74fb75b384224..d8076e30d463c 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -36,6 +36,9 @@ filegroup( "//packages/core/capabilities/core-capabilities-server:build", "//packages/core/capabilities/core-capabilities-server-internal:build", "//packages/core/capabilities/core-capabilities-server-mocks:build", + "//packages/core/chrome/core-chrome-browser:build", + "//packages/core/chrome/core-chrome-browser-internal:build", + "//packages/core/chrome/core-chrome-browser-mocks:build", "//packages/core/config/core-config-server-internal:build", "//packages/core/deprecations/core-deprecations-browser:build", "//packages/core/deprecations/core-deprecations-browser-internal:build", @@ -81,6 +84,9 @@ filegroup( "//packages/core/i18n/core-i18n-browser:build", "//packages/core/i18n/core-i18n-browser-internal:build", "//packages/core/i18n/core-i18n-browser-mocks:build", + "//packages/core/i18n/core-i18n-server:build", + "//packages/core/i18n/core-i18n-server-internal:build", + "//packages/core/i18n/core-i18n-server-mocks:build", "//packages/core/injected-metadata/core-injected-metadata-browser:build", "//packages/core/injected-metadata/core-injected-metadata-browser-internal:build", "//packages/core/injected-metadata/core-injected-metadata-browser-mocks:build", @@ -331,6 +337,9 @@ filegroup( "//packages/core/capabilities/core-capabilities-server:build_types", "//packages/core/capabilities/core-capabilities-server-internal:build_types", "//packages/core/capabilities/core-capabilities-server-mocks:build_types", + "//packages/core/chrome/core-chrome-browser:build_types", + "//packages/core/chrome/core-chrome-browser-internal:build_types", + "//packages/core/chrome/core-chrome-browser-mocks:build_types", "//packages/core/config/core-config-server-internal:build_types", "//packages/core/deprecations/core-deprecations-browser:build_types", "//packages/core/deprecations/core-deprecations-browser-internal:build_types", @@ -376,6 +385,9 @@ filegroup( "//packages/core/i18n/core-i18n-browser:build_types", "//packages/core/i18n/core-i18n-browser-internal:build_types", "//packages/core/i18n/core-i18n-browser-mocks:build_types", + "//packages/core/i18n/core-i18n-server:build_types", + "//packages/core/i18n/core-i18n-server-internal:build_types", + "//packages/core/i18n/core-i18n-server-mocks:build_types", "//packages/core/injected-metadata/core-injected-metadata-browser:build_types", "//packages/core/injected-metadata/core-injected-metadata-browser-internal:build_types", "//packages/core/injected-metadata/core-injected-metadata-browser-mocks:build_types", diff --git a/packages/core/chrome/core-chrome-browser-internal/BUILD.bazel b/packages/core/chrome/core-chrome-browser-internal/BUILD.bazel new file mode 100644 index 0000000000000..9bedba788e958 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/BUILD.bazel @@ -0,0 +1,144 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-chrome-browser-internal" +PKG_REQUIRE_NAME = "@kbn/core-chrome-browser-internal" + +SOURCE_FILES = glob( + [ + "**/*.ts", + "**/*.tsx", + "**/*.scss", + ], + exclude = [ + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/mocks/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//react", + "@npm//lodash", + "@npm//rxjs", + "@npm//classnames", + "@npm//react-use", + "@npm//@elastic/eui", + "//packages/kbn-i18n:npm_module_types", + "//packages/kbn-i18n-react", + "//packages/core/mount-utils/core-mount-utils-browser-internal", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/react", + "@npm//@types/classnames", + "@npm//react-use", + "@npm//lodash", + "@npm//rxjs", + "@npm//@elastic/eui", + "//packages/kbn-crypto-browser:npm_module_types", + "//packages/kbn-i18n:npm_module_types", + "//packages/kbn-i18n-react:npm_module_types", + "//packages/core/injected-metadata/core-injected-metadata-browser-internal:npm_module_types", + "//packages/core/doc-links/core-doc-links-browser:npm_module_types", + "//packages/core/http/core-http-browser:npm_module_types", + "//packages/core/notifications/core-notifications-browser:npm_module_types", + "//packages/core/mount-utils/core-mount-utils-browser-internal:npm_module_types", + "//packages/core/application/core-application-browser:npm_module_types", + "//packages/core/application/core-application-browser-internal:npm_module_types", + "//packages/core/chrome/core-chrome-browser:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, + additional_args = [ + "--copy-files", + "--quiet" + ] +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/chrome/core-chrome-browser-internal/README.md b/packages/core/chrome/core-chrome-browser-internal/README.md new file mode 100644 index 0000000000000..f9f7eab633d2b --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/README.md @@ -0,0 +1,3 @@ +# @kbn/core-chrome-browser-internal + +Contains the internal implementation and types of Core's browser-side `chrome` service. diff --git a/src/core/server/i18n/fs.ts b/packages/core/chrome/core-chrome-browser-internal/index.ts similarity index 77% rename from src/core/server/i18n/fs.ts rename to packages/core/chrome/core-chrome-browser-internal/index.ts index 2530e195c615a..facd27510b8cf 100644 --- a/src/core/server/i18n/fs.ts +++ b/packages/core/chrome/core-chrome-browser-internal/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -import Fs from 'fs'; -import { promisify } from 'util'; - -export const readFile = promisify(Fs.readFile); +export { ChromeService } from './src'; +export type { InternalChromeStart } from './src'; diff --git a/packages/core/chrome/core-chrome-browser-internal/jest.config.js b/packages/core/chrome/core-chrome-browser-internal/jest.config.js new file mode 100644 index 0000000000000..76ab1d2c62481 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/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/core/chrome/core-chrome-browser-internal'], +}; diff --git a/packages/core/chrome/core-chrome-browser-internal/package.json b/packages/core/chrome/core-chrome-browser-internal/package.json new file mode 100644 index 0000000000000..b5005295ddbaa --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/package.json @@ -0,0 +1,9 @@ +{ + "name": "@kbn/core-chrome-browser-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "author": "Kibana Core", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/public/chrome/chrome_service.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.test.ts similarity index 100% rename from src/core/public/chrome/chrome_service.test.ts rename to packages/core/chrome/core-chrome-browser-internal/src/chrome_service.test.ts diff --git a/src/core/public/chrome/chrome_service.tsx b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx similarity index 96% rename from src/core/public/chrome/chrome_service.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx index 16dfe4fff1041..5a4183eb88fc9 100644 --- a/src/core/public/chrome/chrome_service.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx @@ -18,22 +18,21 @@ import type { HttpStart } from '@kbn/core-http-browser'; import { mountReactNode } from '@kbn/core-mount-utils-browser-internal'; import type { NotificationsStart } from '@kbn/core-notifications-browser'; import type { InternalApplicationStart } from '@kbn/core-application-browser-internal'; -import { KIBANA_ASK_ELASTIC_LINK } from './constants'; -import { type ChromeDocTitle, DocTitleService } from './doc_title'; -import { type ChromeNavControls, NavControlsService } from './nav_controls'; -import { type ChromeNavLink, NavLinksService } from './nav_links'; -import { type ChromeRecentlyAccessed, RecentlyAccessedService } from './recently_accessed'; -import { Header } from './ui'; import type { + ChromeNavLink, ChromeBadge, ChromeBreadcrumb, ChromeBreadcrumbsAppendExtension, ChromeHelpExtension, - InternalChromeStart, ChromeUserBanner, -} from './types'; - -export type { ChromeNavControls, ChromeRecentlyAccessed, ChromeDocTitle }; +} from '@kbn/core-chrome-browser'; +import { KIBANA_ASK_ELASTIC_LINK } from './constants'; +import { DocTitleService } from './doc_title'; +import { NavControlsService } from './nav_controls'; +import { NavLinksService } from './nav_links'; +import { RecentlyAccessedService } from './recently_accessed'; +import { Header } from './ui'; +import type { InternalChromeStart } from './types'; const IS_LOCKED_KEY = 'core.chrome.isLocked'; const SNAPSHOT_REGEX = /-snapshot/i; diff --git a/src/core/public/chrome/constants.ts b/packages/core/chrome/core-chrome-browser-internal/src/constants.ts similarity index 100% rename from src/core/public/chrome/constants.ts rename to packages/core/chrome/core-chrome-browser-internal/src/constants.ts diff --git a/src/core/public/chrome/doc_title/doc_title_service.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/doc_title/doc_title_service.test.ts similarity index 100% rename from src/core/public/chrome/doc_title/doc_title_service.test.ts rename to packages/core/chrome/core-chrome-browser-internal/src/doc_title/doc_title_service.test.ts diff --git a/src/core/public/chrome/doc_title/doc_title_service.ts b/packages/core/chrome/core-chrome-browser-internal/src/doc_title/doc_title_service.ts similarity index 59% rename from src/core/public/chrome/doc_title/doc_title_service.ts rename to packages/core/chrome/core-chrome-browser-internal/src/doc_title/doc_title_service.ts index a0c6eef619f64..ee884b59d8122 100644 --- a/src/core/public/chrome/doc_title/doc_title_service.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/doc_title/doc_title_service.ts @@ -7,49 +7,12 @@ */ import { compact, flattenDeep, isString } from 'lodash'; +import type { ChromeDocTitle } from '@kbn/core-chrome-browser'; interface StartDeps { document: { title: string }; } -/** - * APIs for accessing and updating the document title. - * - * @example - * How to change the title of the document - * ```ts - * chrome.docTitle.change('My application') - * ``` - * - * @example - * How to reset the title of the document to it's initial value - * ```ts - * chrome.docTitle.reset() - * ``` - * - * @public - * */ -export interface ChromeDocTitle { - /** - * Changes the current document title. - * - * @example - * How to change the title of the document - * ```ts - * chrome.docTitle.change('My application title') - * chrome.docTitle.change(['My application', 'My section']) - * ``` - * - * @param newTitle The new title to set, either a string or string array - */ - change(newTitle: string | string[]): void; - /** - * Resets the document title to it's initial value. - * (meaning the one present in the title meta at application load.) - */ - reset(): void; -} - const defaultTitle: string[] = []; const titleSeparator = ' - '; diff --git a/packages/core/chrome/core-chrome-browser-internal/src/doc_title/index.ts b/packages/core/chrome/core-chrome-browser-internal/src/doc_title/index.ts new file mode 100644 index 0000000000000..a62a6b7977ccc --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/src/doc_title/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 { DocTitleService } from './doc_title_service'; diff --git a/packages/core/chrome/core-chrome-browser-internal/src/index.ts b/packages/core/chrome/core-chrome-browser-internal/src/index.ts new file mode 100644 index 0000000000000..b28f6d598e5d0 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/src/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { ChromeService } from './chrome_service'; +export type { InternalChromeStart } from './types'; diff --git a/packages/core/chrome/core-chrome-browser-internal/src/nav_controls/index.ts b/packages/core/chrome/core-chrome-browser-internal/src/nav_controls/index.ts new file mode 100644 index 0000000000000..dcf0c23ae3b28 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/src/nav_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 { NavControlsService } from './nav_controls_service'; diff --git a/src/core/public/chrome/nav_controls/nav_controls_service.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/nav_controls/nav_controls_service.test.ts similarity index 100% rename from src/core/public/chrome/nav_controls/nav_controls_service.test.ts rename to packages/core/chrome/core-chrome-browser-internal/src/nav_controls/nav_controls_service.test.ts index 4f1cc0c43f75f..2019658aaa3e0 100644 --- a/src/core/public/chrome/nav_controls/nav_controls_service.test.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/nav_controls/nav_controls_service.test.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import { NavControlsService } from './nav_controls_service'; import { take } from 'rxjs/operators'; +import { NavControlsService } from './nav_controls_service'; describe('RecentlyAccessed#start()', () => { const getStart = () => { diff --git a/src/core/public/chrome/nav_controls/nav_controls_service.ts b/packages/core/chrome/core-chrome-browser-internal/src/nav_controls/nav_controls_service.ts similarity index 59% rename from src/core/public/chrome/nav_controls/nav_controls_service.ts rename to packages/core/chrome/core-chrome-browser-internal/src/nav_controls/nav_controls_service.ts index f9dc7ef72c7bf..b38cfb76cb3be 100644 --- a/src/core/public/chrome/nav_controls/nav_controls_service.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/nav_controls/nav_controls_service.ts @@ -7,52 +7,15 @@ */ import { sortBy } from 'lodash'; -import { BehaviorSubject, ReplaySubject, Observable } from 'rxjs'; +import { BehaviorSubject, ReplaySubject } from 'rxjs'; import { map, takeUntil } from 'rxjs/operators'; -import type { MountPoint } from '@kbn/core-mount-utils-browser'; - -/** @public */ -export interface ChromeNavControl { - order?: number; - mount: MountPoint; -} - -/** - * {@link ChromeNavControls | APIs} for registering new controls to be displayed in the navigation bar. - * - * @example - * Register a left-side nav control rendered with React. - * ```jsx - * chrome.navControls.registerLeft({ - * mount(targetDomElement) { - * ReactDOM.mount(, targetDomElement); - * return () => ReactDOM.unmountComponentAtNode(targetDomElement); - * } - * }) - * ``` - * - * @public - */ -export interface ChromeNavControls { - /** Register a nav control to be presented on the bottom-left side of the chrome header. */ - registerLeft(navControl: ChromeNavControl): void; - /** Register a nav control to be presented on the top-right side of the chrome header. */ - registerRight(navControl: ChromeNavControl): void; - /** Register a nav control to be presented on the top-center side of the chrome header. */ - registerCenter(navControl: ChromeNavControl): void; - /** @internal */ - getLeft$(): Observable; - /** @internal */ - getRight$(): Observable; - /** @internal */ - getCenter$(): Observable; -} +import type { ChromeNavControl, ChromeNavControls } from '@kbn/core-chrome-browser'; /** @internal */ export class NavControlsService { private readonly stop$ = new ReplaySubject(1); - public start() { + public start(): ChromeNavControls { const navControlsLeft$ = new BehaviorSubject>(new Set()); const navControlsRight$ = new BehaviorSubject>(new Set()); const navControlsCenter$ = new BehaviorSubject>(new Set()); diff --git a/src/core/public/chrome/nav_links/index.ts b/packages/core/chrome/core-chrome-browser-internal/src/nav_links/index.ts similarity index 79% rename from src/core/public/chrome/nav_links/index.ts rename to packages/core/chrome/core-chrome-browser-internal/src/nav_links/index.ts index e41799b9918a3..7274bd5089fc5 100644 --- a/src/core/public/chrome/nav_links/index.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/nav_links/index.ts @@ -5,7 +5,5 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -export { NavLinksService } from './nav_links_service'; -export type { ChromeNavLink } from './nav_link'; -export type { ChromeNavLinks } from './nav_links_service'; +export { NavLinksService } from './nav_links_service'; diff --git a/packages/core/chrome/core-chrome-browser-internal/src/nav_links/nav_link.ts b/packages/core/chrome/core-chrome-browser-internal/src/nav_links/nav_link.ts new file mode 100644 index 0000000000000..0d82c952b8037 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/src/nav_links/nav_link.ts @@ -0,0 +1,23 @@ +/* + * 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 { ChromeNavLink } from '@kbn/core-chrome-browser'; + +export class NavLinkWrapper { + public readonly id: string; + public readonly properties: Readonly; + + constructor(properties: ChromeNavLink) { + if (!properties || !properties.id) { + throw new Error('`id` is required.'); + } + + this.id = properties.id; + this.properties = Object.freeze(properties); + } +} diff --git a/src/core/public/chrome/nav_links/nav_links_service.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/nav_links/nav_links_service.test.ts similarity index 100% rename from src/core/public/chrome/nav_links/nav_links_service.test.ts rename to packages/core/chrome/core-chrome-browser-internal/src/nav_links/nav_links_service.test.ts diff --git a/src/core/public/chrome/nav_links/nav_links_service.ts b/packages/core/chrome/core-chrome-browser-internal/src/nav_links/nav_links_service.ts similarity index 69% rename from src/core/public/chrome/nav_links/nav_links_service.ts rename to packages/core/chrome/core-chrome-browser-internal/src/nav_links/nav_links_service.ts index 6649fd23443ad..e55e8cd0307a9 100644 --- a/src/core/public/chrome/nav_links/nav_links_service.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/nav_links/nav_links_service.ts @@ -7,13 +7,13 @@ */ import { sortBy } from 'lodash'; -import { BehaviorSubject, type Observable, ReplaySubject } from 'rxjs'; +import { BehaviorSubject, ReplaySubject } from 'rxjs'; import { map, takeUntil } from 'rxjs/operators'; import type { HttpStart, IBasePath } from '@kbn/core-http-browser'; import type { PublicAppDeepLinkInfo, PublicAppInfo } from '@kbn/core-application-browser'; import type { InternalApplicationStart } from '@kbn/core-application-browser-internal'; - -import type { ChromeNavLink, NavLinkWrapper } from './nav_link'; +import type { ChromeNavLinks } from '@kbn/core-chrome-browser'; +import type { NavLinkWrapper } from './nav_link'; import { toNavLink } from './to_nav_link'; interface StartDeps { @@ -21,54 +21,6 @@ interface StartDeps { http: HttpStart; } -/** - * {@link ChromeNavLinks | APIs} for manipulating nav links. - * - * @public - */ -export interface ChromeNavLinks { - /** - * Get an observable for a sorted list of navlinks. - */ - getNavLinks$(): Observable>>; - - /** - * Get the state of a navlink at this point in time. - * @param id - */ - get(id: string): ChromeNavLink | undefined; - - /** - * Get the current state of all navlinks. - */ - getAll(): Array>; - - /** - * Check whether or not a navlink exists. - * @param id - */ - has(id: string): boolean; - - /** - * Enable forced navigation mode, which will trigger a page refresh - * when a nav link is clicked and only the hash is updated. - * - * @remarks - * This is only necessary when rendering the status page in place of another - * app, as links to that app will set the current URL and change the hash, but - * the routes for the correct are not loaded so nothing will happen. - * https://github.com/elastic/kibana/pull/29770 - * - * Used only by status_page plugin - */ - enableForcedAppSwitcherNavigation(): void; - - /** - * An observable of the forced app switcher state. - */ - getForceAppSwitcherNavigation$(): Observable; -} - export class NavLinksService { private readonly stop$ = new ReplaySubject(1); diff --git a/src/core/public/chrome/nav_links/to_nav_link.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/nav_links/to_nav_link.test.ts similarity index 98% rename from src/core/public/chrome/nav_links/to_nav_link.test.ts rename to packages/core/chrome/core-chrome-browser-internal/src/nav_links/to_nav_link.test.ts index b7ae64f9b751f..fec003f4f6e04 100644 --- a/src/core/public/chrome/nav_links/to_nav_link.test.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/nav_links/to_nav_link.test.ts @@ -12,10 +12,9 @@ import { type PublicAppInfo, type PublicAppDeepLinkInfo, } from '@kbn/core-application-browser'; +import { httpServiceMock } from '@kbn/core-http-browser-mocks'; import { toNavLink } from './to_nav_link'; -import { httpServiceMock } from '../../mocks'; - const app = (props: Partial = {}): PublicAppInfo => ({ id: 'some-id', title: 'some-title', diff --git a/src/core/public/chrome/nav_links/to_nav_link.ts b/packages/core/chrome/core-chrome-browser-internal/src/nav_links/to_nav_link.ts similarity index 100% rename from src/core/public/chrome/nav_links/to_nav_link.ts rename to packages/core/chrome/core-chrome-browser-internal/src/nav_links/to_nav_link.ts diff --git a/src/core/public/chrome/recently_accessed/create_log_key.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/create_log_key.test.ts similarity index 100% rename from src/core/public/chrome/recently_accessed/create_log_key.test.ts rename to packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/create_log_key.test.ts diff --git a/src/core/public/chrome/recently_accessed/create_log_key.ts b/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/create_log_key.ts similarity index 99% rename from src/core/public/chrome/recently_accessed/create_log_key.ts rename to packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/create_log_key.ts index 27de0020a024f..a9b0c5cdcf7d4 100644 --- a/src/core/public/chrome/recently_accessed/create_log_key.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/create_log_key.ts @@ -7,6 +7,7 @@ */ import { Sha256 } from '@kbn/crypto-browser'; + export async function createLogKey(type: string, optionalIdentifier?: string) { const baseKey = `kibana.history.${type}`; diff --git a/src/core/public/chrome/recently_accessed/index.ts b/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/index.ts similarity index 78% rename from src/core/public/chrome/recently_accessed/index.ts rename to packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/index.ts index d4494edbf9bcf..2256f60061b87 100644 --- a/src/core/public/chrome/recently_accessed/index.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/index.ts @@ -5,8 +5,5 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ + export { RecentlyAccessedService } from './recently_accessed_service'; -export type { - ChromeRecentlyAccessed, - ChromeRecentlyAccessedHistoryItem, -} from './recently_accessed_service'; diff --git a/src/core/public/chrome/recently_accessed/persisted_log.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/persisted_log.test.ts similarity index 100% rename from src/core/public/chrome/recently_accessed/persisted_log.test.ts rename to packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/persisted_log.test.ts diff --git a/src/core/public/chrome/recently_accessed/persisted_log.ts b/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/persisted_log.ts similarity index 100% rename from src/core/public/chrome/recently_accessed/persisted_log.ts rename to packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/persisted_log.ts diff --git a/src/core/public/chrome/recently_accessed/recently_accessed_service.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.test.ts similarity index 100% rename from src/core/public/chrome/recently_accessed/recently_accessed_service.test.ts rename to packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.test.ts diff --git a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.ts b/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.ts new file mode 100644 index 0000000000000..414f0c796d1bd --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.ts @@ -0,0 +1,47 @@ +/* + * 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 { HttpSetup } from '@kbn/core-http-browser'; +import type { + ChromeRecentlyAccessed, + ChromeRecentlyAccessedHistoryItem, +} from '@kbn/core-chrome-browser'; +import { PersistedLog } from './persisted_log'; +import { createLogKey } from './create_log_key'; + +interface StartDeps { + http: HttpSetup; +} + +/** @internal */ +export class RecentlyAccessedService { + async start({ http }: StartDeps): Promise { + const logKey = await createLogKey('recentlyAccessed', http.basePath.get()); + const history = new PersistedLog(logKey, { + maxLength: 20, + isEqual: (oldItem, newItem) => oldItem.id === newItem.id, + }); + + return { + /** Adds a new item to the history. */ + add: (link: string, label: string, id: string) => { + history.add({ + link, + label, + id, + }); + }, + + /** Gets the current array of history items. */ + get: () => history.get(), + + /** Gets an observable of the current array of history items. */ + get$: () => history.get$(), + }; + } +} diff --git a/packages/core/chrome/core-chrome-browser-internal/src/types.ts b/packages/core/chrome/core-chrome-browser-internal/src/types.ts new file mode 100644 index 0000000000000..45089ca70cf39 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/src/types.ts @@ -0,0 +1,26 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { Observable } from 'rxjs'; +import type { ChromeStart } from '@kbn/core-chrome-browser'; + +/** @internal */ +export interface InternalChromeStart extends ChromeStart { + /** + * Used only by the rendering service to render the header UI + * @internal + */ + getHeaderComponent(): JSX.Element; + + /** + * Used only by the rendering service to retrieve the set of classNames + * that will be set on the body element. + * @internal + */ + getBodyClasses$(): Observable; +} diff --git a/src/core/public/chrome/ui/__snapshots__/loading_indicator.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/__snapshots__/loading_indicator.test.tsx.snap similarity index 100% rename from src/core/public/chrome/ui/__snapshots__/loading_indicator.test.tsx.snap rename to packages/core/chrome/core-chrome-browser-internal/src/ui/__snapshots__/loading_indicator.test.tsx.snap diff --git a/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap similarity index 100% rename from src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap diff --git a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap similarity index 100% rename from src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap diff --git a/src/core/public/chrome/ui/header/__snapshots__/header_breadcrumbs.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header_breadcrumbs.test.tsx.snap similarity index 100% rename from src/core/public/chrome/ui/header/__snapshots__/header_breadcrumbs.test.tsx.snap rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header_breadcrumbs.test.tsx.snap diff --git a/src/core/public/chrome/ui/header/collapsible_nav.scss b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/collapsible_nav.scss similarity index 100% rename from src/core/public/chrome/ui/header/collapsible_nav.scss rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/collapsible_nav.scss diff --git a/src/core/public/chrome/ui/header/collapsible_nav.test.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/collapsible_nav.test.tsx similarity index 97% rename from src/core/public/chrome/ui/header/collapsible_nav.test.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/collapsible_nav.test.tsx index 5d9036102f2be..840f8b38e4678 100644 --- a/src/core/public/chrome/ui/header/collapsible_nav.test.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/collapsible_nav.test.tsx @@ -12,8 +12,8 @@ import { BehaviorSubject } from 'rxjs'; import sinon from 'sinon'; import { StubBrowserStorage } from '@kbn/test-jest-helpers'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; -import { ChromeNavLink, DEFAULT_APP_CATEGORIES } from '../../..'; -import { ChromeRecentlyAccessedHistoryItem } from '../../recently_accessed'; +import { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common'; +import type { ChromeNavLink, ChromeRecentlyAccessedHistoryItem } from '@kbn/core-chrome-browser'; import { CollapsibleNav } from './collapsible_nav'; const { kibana, observability, security, management } = DEFAULT_APP_CATEGORIES; diff --git a/src/core/public/chrome/ui/header/collapsible_nav.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/collapsible_nav.tsx similarity index 99% rename from src/core/public/chrome/ui/header/collapsible_nav.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/collapsible_nav.tsx index 7e6a69dedf82b..4a9ac3a624486 100644 --- a/src/core/public/chrome/ui/header/collapsible_nav.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/collapsible_nav.tsx @@ -25,9 +25,8 @@ import * as Rx from 'rxjs'; import type { HttpStart } from '@kbn/core-http-browser'; import type { InternalApplicationStart } from '@kbn/core-application-browser-internal'; import type { AppCategory } from '@kbn/core-application-common'; - -import type { ChromeNavLink, ChromeRecentlyAccessedHistoryItem } from '../..'; -import type { OnIsLockedUpdate } from '.'; +import type { ChromeNavLink, ChromeRecentlyAccessedHistoryItem } from '@kbn/core-chrome-browser'; +import type { OnIsLockedUpdate } from './types'; import { createEuiListItem, createRecentNavLink, diff --git a/src/core/public/chrome/ui/header/elastic_mark.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/elastic_mark.tsx similarity index 100% rename from src/core/public/chrome/ui/header/elastic_mark.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/elastic_mark.tsx diff --git a/src/core/public/chrome/ui/header/header.test.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header.test.tsx similarity index 96% rename from src/core/public/chrome/ui/header/header.test.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header.test.tsx index 10cca7ad9cd9a..ac317b1262f55 100644 --- a/src/core/public/chrome/ui/header/header.test.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header.test.tsx @@ -11,9 +11,9 @@ import { act } from 'react-dom/test-utils'; import { BehaviorSubject } from 'rxjs'; import { StubBrowserStorage, mountWithIntl } from '@kbn/test-jest-helpers'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; -import { applicationServiceMock } from '../../../mocks'; +import { applicationServiceMock } from '@kbn/core-application-browser-mocks'; +import type { ChromeBreadcrumbsAppendExtension } from '@kbn/core-chrome-browser'; import { Header } from './header'; -import type { ChromeBreadcrumbsAppendExtension } from '../../types'; function mockProps() { const http = httpServiceMock.createSetupContract({ basePath: '/test' }); diff --git a/src/core/public/chrome/ui/header/header.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header.tsx similarity index 98% rename from src/core/public/chrome/ui/header/header.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header.tsx index 27d539d2bf4e5..94933dcbcf3ff 100644 --- a/src/core/public/chrome/ui/header/header.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header.tsx @@ -24,21 +24,18 @@ import useObservable from 'react-use/lib/useObservable'; import type { Observable } from 'rxjs'; import type { HttpStart } from '@kbn/core-http-browser'; import type { InternalApplicationStart } from '@kbn/core-application-browser-internal'; - -import { LoadingIndicator } from '..'; import type { ChromeBadge, ChromeBreadcrumb, ChromeNavControl, ChromeNavLink, ChromeRecentlyAccessedHistoryItem, -} from '../..'; -import type { ChromeBreadcrumbsAppendExtension, ChromeHelpExtension, ChromeUserBanner, -} from '../../types'; -import type { OnIsLockedUpdate } from '.'; +} from '@kbn/core-chrome-browser'; +import { LoadingIndicator } from '../loading_indicator'; +import type { OnIsLockedUpdate } from './types'; import { CollapsibleNav } from './collapsible_nav'; import { HeaderBadge } from './header_badge'; import { HeaderBreadcrumbs } from './header_breadcrumbs'; diff --git a/src/core/public/chrome/ui/header/header_action_menu.test.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_action_menu.test.tsx similarity index 100% rename from src/core/public/chrome/ui/header/header_action_menu.test.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_action_menu.test.tsx index 7f291a5e810d4..a582091145cac 100644 --- a/src/core/public/chrome/ui/header/header_action_menu.test.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_action_menu.test.tsx @@ -8,10 +8,10 @@ import React from 'react'; import { mount, ReactWrapper } from 'enzyme'; -import { act } from 'react-dom/test-utils'; import { BehaviorSubject } from 'rxjs'; -import { HeaderActionMenu } from './header_action_menu'; +import { act } from 'react-dom/test-utils'; import type { MountPoint, UnmountCallback } from '@kbn/core-mount-utils-browser'; +import { HeaderActionMenu } from './header_action_menu'; type MockedUnmount = jest.MockedFunction; diff --git a/src/core/public/chrome/ui/header/header_action_menu.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_action_menu.tsx similarity index 100% rename from src/core/public/chrome/ui/header/header_action_menu.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_action_menu.tsx diff --git a/src/core/public/chrome/ui/header/header_badge.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_badge.tsx similarity index 96% rename from src/core/public/chrome/ui/header/header_badge.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_badge.tsx index 019688f2e2917..d7496c9771ccd 100644 --- a/src/core/public/chrome/ui/header/header_badge.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_badge.tsx @@ -6,11 +6,10 @@ * Side Public License, v 1. */ -import { EuiBetaBadge } from '@elastic/eui'; import React, { Component } from 'react'; import * as Rx from 'rxjs'; - -import { ChromeBadge } from '../../types'; +import { EuiBetaBadge } from '@elastic/eui'; +import type { ChromeBadge } from '@kbn/core-chrome-browser'; interface Props { badge$: Rx.Observable; diff --git a/src/core/public/chrome/ui/header/header_breadcrumbs.test.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_breadcrumbs.test.tsx similarity index 100% rename from src/core/public/chrome/ui/header/header_breadcrumbs.test.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_breadcrumbs.test.tsx diff --git a/src/core/public/chrome/ui/header/header_breadcrumbs.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_breadcrumbs.tsx similarity index 94% rename from src/core/public/chrome/ui/header/header_breadcrumbs.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_breadcrumbs.tsx index a90ceed32dcce..17a2f46cd441e 100644 --- a/src/core/public/chrome/ui/header/header_breadcrumbs.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_breadcrumbs.tsx @@ -11,7 +11,7 @@ import classNames from 'classnames'; import React from 'react'; import useObservable from 'react-use/lib/useObservable'; import { Observable } from 'rxjs'; -import { ChromeBreadcrumb } from '../../types'; +import type { ChromeBreadcrumb } from '@kbn/core-chrome-browser'; interface Props { breadcrumbs$: Observable; diff --git a/src/core/public/chrome/ui/header/header_extension.test.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_extension.test.tsx similarity index 97% rename from src/core/public/chrome/ui/header/header_extension.test.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_extension.test.tsx index acfc40df9230b..abc83974c5411 100644 --- a/src/core/public/chrome/ui/header/header_extension.test.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_extension.test.tsx @@ -8,6 +8,7 @@ import { mount } from 'enzyme'; import React from 'react'; +import '@testing-library/jest-dom'; import { HeaderExtension } from './header_extension'; describe('HeaderExtension', () => { diff --git a/src/core/public/chrome/ui/header/header_extension.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_extension.tsx similarity index 100% rename from src/core/public/chrome/ui/header/header_extension.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_extension.tsx diff --git a/src/core/public/chrome/ui/header/header_help_menu.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_help_menu.tsx similarity index 83% rename from src/core/public/chrome/ui/header/header_help_menu.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_help_menu.tsx index ef91a3471085c..4e797df335543 100644 --- a/src/core/public/chrome/ui/header/header_help_menu.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_help_menu.tsx @@ -25,82 +25,11 @@ import { } from '@elastic/eui'; import type { InternalApplicationStart } from '@kbn/core-application-browser-internal'; +import type { ChromeHelpExtension } from '@kbn/core-chrome-browser'; import { GITHUB_CREATE_ISSUE_LINK, KIBANA_FEEDBACK_LINK } from '../../constants'; -import { ChromeHelpExtension } from '../../types'; import { HeaderExtension } from './header_extension'; import { isModifiedOrPrevented } from './nav_link'; -/** @public */ -export type ChromeHelpExtensionLinkBase = Pick< - EuiButtonEmptyProps, - 'iconType' | 'target' | 'rel' | 'data-test-subj' ->; - -/** @public */ -export interface ChromeHelpExtensionMenuGitHubLink extends ChromeHelpExtensionLinkBase { - /** - * Creates a link to a new github issue in the Kibana repo - */ - linkType: 'github'; - /** - * Include at least one app-specific label to be applied to the new github issue - */ - labels: string[]; - /** - * Provides initial text for the title of the issue - */ - title?: string; -} - -/** @public */ -export interface ChromeHelpExtensionMenuDiscussLink extends ChromeHelpExtensionLinkBase { - /** - * Creates a generic give feedback link with comment icon - */ - linkType: 'discuss'; - /** - * URL to discuss page. - * i.e. `https://discuss.elastic.co/c/${appName}` - */ - href: string; -} - -/** @public */ -export interface ChromeHelpExtensionMenuDocumentationLink extends ChromeHelpExtensionLinkBase { - /** - * Creates a deep-link to app-specific documentation - */ - linkType: 'documentation'; - /** - * URL to documentation page. - * i.e. `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/${appName}.html`, - */ - href: string; -} - -/** @public */ -export interface ChromeHelpExtensionMenuCustomLink extends ChromeHelpExtensionLinkBase { - /** - * Extend EuiButtonEmpty to provide extra functionality - */ - linkType: 'custom'; - /** - * URL of the link - */ - href: string; - /** - * Content of the button (in lieu of `children`) - */ - content: React.ReactNode; -} - -/** @public */ -export type ChromeHelpExtensionMenuLink = - | ChromeHelpExtensionMenuGitHubLink - | ChromeHelpExtensionMenuDiscussLink - | ChromeHelpExtensionMenuDocumentationLink - | ChromeHelpExtensionMenuCustomLink; - interface Props { navigateToUrl: InternalApplicationStart['navigateToUrl']; helpExtension$: Observable; diff --git a/src/core/public/chrome/ui/header/header_logo.scss b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_logo.scss similarity index 100% rename from src/core/public/chrome/ui/header/header_logo.scss rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_logo.scss diff --git a/src/core/public/chrome/ui/header/header_logo.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_logo.tsx similarity index 98% rename from src/core/public/chrome/ui/header/header_logo.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_logo.tsx index 5513b16557e09..14d50fe6a6073 100644 --- a/src/core/public/chrome/ui/header/header_logo.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_logo.tsx @@ -13,7 +13,7 @@ import useObservable from 'react-use/lib/useObservable'; import { Observable } from 'rxjs'; import Url from 'url'; import type { HttpStart } from '@kbn/core-http-browser'; -import type { ChromeNavLink } from '../..'; +import type { ChromeNavLink } from '@kbn/core-chrome-browser'; import { ElasticMark } from './elastic_mark'; import { LoadingIndicator } from '../loading_indicator'; diff --git a/src/core/public/chrome/ui/header/header_nav_controls.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_nav_controls.tsx similarity index 95% rename from src/core/public/chrome/ui/header/header_nav_controls.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_nav_controls.tsx index 9ac26c339682e..4d411beb181ee 100644 --- a/src/core/public/chrome/ui/header/header_nav_controls.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_nav_controls.tsx @@ -10,7 +10,7 @@ import { EuiHeaderSectionItem } from '@elastic/eui'; import React from 'react'; import useObservable from 'react-use/lib/useObservable'; import { Observable } from 'rxjs'; -import { ChromeNavControl } from '../../nav_controls'; +import type { ChromeNavControl } from '@kbn/core-chrome-browser'; import { HeaderExtension } from './header_extension'; interface Props { diff --git a/src/core/public/chrome/ui/header/header_top_banner.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_top_banner.tsx similarity index 94% rename from src/core/public/chrome/ui/header/header_top_banner.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_top_banner.tsx index 667cf9025880f..04efeadd74636 100644 --- a/src/core/public/chrome/ui/header/header_top_banner.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_top_banner.tsx @@ -9,7 +9,7 @@ import React, { FC } from 'react'; import useObservable from 'react-use/lib/useObservable'; import { Observable } from 'rxjs'; -import { ChromeUserBanner } from '../../types'; +import type { ChromeUserBanner } from '@kbn/core-chrome-browser'; import { HeaderExtension } from './header_extension'; export interface HeaderTopBannerProps { diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/index.ts b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/index.ts new file mode 100644 index 0000000000000..8c9ae4e3153f1 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/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 { Header } from './header'; +export type { HeaderProps } from './header'; +export type { OnIsLockedUpdate, NavType } from './types'; diff --git a/src/core/public/chrome/ui/header/nav_link.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/nav_link.tsx similarity index 99% rename from src/core/public/chrome/ui/header/nav_link.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/nav_link.tsx index 5dfd95a814e4f..9ffc884c1d151 100644 --- a/src/core/public/chrome/ui/header/nav_link.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/nav_link.tsx @@ -12,8 +12,7 @@ import React from 'react'; import type { HttpStart } from '@kbn/core-http-browser'; import type { ApplicationStart } from '@kbn/core-application-browser'; import type { InternalApplicationStart } from '@kbn/core-application-browser-internal'; - -import type { ChromeNavLink, ChromeRecentlyAccessedHistoryItem } from '../..'; +import type { ChromeNavLink, ChromeRecentlyAccessedHistoryItem } from '@kbn/core-chrome-browser'; import { relativeToAbsolute } from '../../nav_links/to_nav_link'; export const isModifiedOrPrevented = (event: React.MouseEvent) => diff --git a/src/core/public/chrome/ui/header/types.ts b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/types.ts similarity index 100% rename from src/core/public/chrome/ui/header/types.ts rename to packages/core/chrome/core-chrome-browser-internal/src/ui/header/types.ts diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/index.ts b/packages/core/chrome/core-chrome-browser-internal/src/ui/index.ts new file mode 100644 index 0000000000000..5afd3e0f587bb --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/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 { Header } from './header'; +export { LoadingIndicator } from './loading_indicator'; +export type { NavType } from './header'; diff --git a/src/core/public/chrome/ui/_loading_indicator.scss b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.scss similarity index 100% rename from src/core/public/chrome/ui/_loading_indicator.scss rename to packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.scss diff --git a/src/core/public/chrome/ui/loading_indicator.test.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.test.tsx similarity index 100% rename from src/core/public/chrome/ui/loading_indicator.test.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.test.tsx diff --git a/src/core/public/chrome/ui/loading_indicator.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.tsx similarity index 98% rename from src/core/public/chrome/ui/loading_indicator.tsx rename to packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.tsx index f542431d80809..5b92b4c15c19f 100644 --- a/src/core/public/chrome/ui/loading_indicator.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.tsx @@ -13,6 +13,8 @@ import classNames from 'classnames'; import type { Subscription } from 'rxjs'; import type { HttpStart } from '@kbn/core-http-browser'; +import './loading_indicator.scss'; + export interface LoadingIndicatorProps { loadingCount$: ReturnType; showAsBar?: boolean; diff --git a/packages/core/chrome/core-chrome-browser-internal/tsconfig.json b/packages/core/chrome/core-chrome-browser-internal/tsconfig.json new file mode 100644 index 0000000000000..9f2708fb14528 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "stripInternal": false, + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ] +} diff --git a/packages/core/chrome/core-chrome-browser-mocks/BUILD.bazel b/packages/core/chrome/core-chrome-browser-mocks/BUILD.bazel new file mode 100644 index 0000000000000..fc64579bbe4fd --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-mocks/BUILD.bazel @@ -0,0 +1,119 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-chrome-browser-mocks" +PKG_REQUIRE_NAME = "@kbn/core-chrome-browser-mocks" + +SOURCE_FILES = glob( + [ + "**/*.ts", + "**/*.tsx", + ], + exclude = [ + "**/*.config.js", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/mocks/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//rxjs", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/react", + "@npm//rxjs", + "//packages/kbn-utility-types:npm_module_types", + "//packages/kbn-utility-types-jest:npm_module_types", + "//packages/core/chrome/core-chrome-browser:npm_module_types", + "//packages/core/chrome/core-chrome-browser-internal:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/chrome/core-chrome-browser-mocks/README.md b/packages/core/chrome/core-chrome-browser-mocks/README.md new file mode 100644 index 0000000000000..f952dece6b49a --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-mocks/README.md @@ -0,0 +1,5 @@ +# @kbn/core-chrome-browser-mocks + +Contains the mocks for Core's browser-side `chrome` service. + +- `chromeServiceMock` diff --git a/src/core/public/chrome/doc_title/index.ts b/packages/core/chrome/core-chrome-browser-mocks/index.ts similarity index 89% rename from src/core/public/chrome/doc_title/index.ts rename to packages/core/chrome/core-chrome-browser-mocks/index.ts index 9098264706abf..3af99aaf76075 100644 --- a/src/core/public/chrome/doc_title/index.ts +++ b/packages/core/chrome/core-chrome-browser-mocks/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export * from './doc_title_service'; +export { chromeServiceMock } from './src'; diff --git a/packages/core/chrome/core-chrome-browser-mocks/jest.config.js b/packages/core/chrome/core-chrome-browser-mocks/jest.config.js new file mode 100644 index 0000000000000..fa6564d1e2dd3 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-mocks/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/core/chrome/core-chrome-browser-mocks'], +}; diff --git a/packages/core/chrome/core-chrome-browser-mocks/package.json b/packages/core/chrome/core-chrome-browser-mocks/package.json new file mode 100644 index 0000000000000..30dff70a53dfe --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-mocks/package.json @@ -0,0 +1,9 @@ +{ + "name": "@kbn/core-chrome-browser-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "author": "Kibana Core", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/public/chrome/chrome_service.mock.ts b/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts similarity index 94% rename from src/core/public/chrome/chrome_service.mock.ts rename to packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts index ec1cfca7d65d1..12f6625734d2f 100644 --- a/src/core/public/chrome/chrome_service.mock.ts +++ b/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts @@ -9,7 +9,8 @@ import { BehaviorSubject } from 'rxjs'; import type { PublicMethodsOf } from '@kbn/utility-types'; import type { DeeplyMockedKeys } from '@kbn/utility-types-jest'; -import { ChromeBadge, ChromeBreadcrumb, ChromeService, InternalChromeStart } from '.'; +import type { ChromeBadge, ChromeBreadcrumb } from '@kbn/core-chrome-browser'; +import type { ChromeService, InternalChromeStart } from '@kbn/core-chrome-browser-internal'; const createStartContractMock = () => { const startContract: DeeplyMockedKeys = { diff --git a/packages/core/chrome/core-chrome-browser-mocks/src/index.ts b/packages/core/chrome/core-chrome-browser-mocks/src/index.ts new file mode 100644 index 0000000000000..6076e7cf2059f --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-mocks/src/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 { chromeServiceMock } from './chrome_service.mock'; diff --git a/packages/core/chrome/core-chrome-browser-mocks/tsconfig.json b/packages/core/chrome/core-chrome-browser-mocks/tsconfig.json new file mode 100644 index 0000000000000..26b4c7aca3a67 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-mocks/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ] +} diff --git a/packages/core/chrome/core-chrome-browser/BUILD.bazel b/packages/core/chrome/core-chrome-browser/BUILD.bazel new file mode 100644 index 0000000000000..f3cede656b502 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser/BUILD.bazel @@ -0,0 +1,118 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-chrome-browser" +PKG_REQUIRE_NAME = "@kbn/core-chrome-browser" + +SOURCE_FILES = glob( + [ + "**/*.ts", + "**/*.tsx", + ], + exclude = [ + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/mocks/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/react", + "@npm//@elastic/eui", + "@npm//rxjs", + "//packages/core/mount-utils/core-mount-utils-browser:npm_module_types", + "//packages/core/application/core-application-common:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/chrome/core-chrome-browser/README.md b/packages/core/chrome/core-chrome-browser/README.md new file mode 100644 index 0000000000000..cf3065a7926c2 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser/README.md @@ -0,0 +1,3 @@ +# @kbn/core-chrome-browser + +Contains the public types of Core's browser-side `chrome` service. diff --git a/src/core/public/chrome/ui/index.ts b/packages/core/chrome/core-chrome-browser/index.ts similarity index 64% rename from src/core/public/chrome/ui/index.ts rename to packages/core/chrome/core-chrome-browser/index.ts index da66d3eeacc75..16f0134afb7bb 100644 --- a/src/core/public/chrome/ui/index.ts +++ b/packages/core/chrome/core-chrome-browser/index.ts @@ -6,14 +6,25 @@ * Side Public License, v 1. */ -export { Header } from './header'; -export { LoadingIndicator } from './loading_indicator'; export type { - ChromeHelpExtensionLinkBase, + ChromeUserBanner, + ChromeBreadcrumb, + ChromeHelpExtension, ChromeHelpExtensionMenuLink, - ChromeHelpExtensionMenuCustomLink, - ChromeHelpExtensionMenuDiscussLink, - ChromeHelpExtensionMenuDocumentationLink, + ChromeHelpExtensionLinkBase, + ChromeHelpMenuActions, + ChromeNavLink, + ChromeBreadcrumbsAppendExtension, + ChromeNavLinks, + ChromeNavControl, + ChromeNavControls, + ChromeBadge, ChromeHelpExtensionMenuGitHubLink, - NavType, -} from './header'; + ChromeHelpExtensionMenuDocumentationLink, + ChromeHelpExtensionMenuDiscussLink, + ChromeHelpExtensionMenuCustomLink, + ChromeDocTitle, + ChromeStart, + ChromeRecentlyAccessed, + ChromeRecentlyAccessedHistoryItem, +} from './src'; diff --git a/packages/core/chrome/core-chrome-browser/jest.config.js b/packages/core/chrome/core-chrome-browser/jest.config.js new file mode 100644 index 0000000000000..6af17e68eb7eb --- /dev/null +++ b/packages/core/chrome/core-chrome-browser/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/core/chrome/core-chrome-browser'], +}; diff --git a/packages/core/chrome/core-chrome-browser/package.json b/packages/core/chrome/core-chrome-browser/package.json new file mode 100644 index 0000000000000..d17be5c1a6710 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser/package.json @@ -0,0 +1,9 @@ +{ + "name": "@kbn/core-chrome-browser", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "author": "Kibana Core", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/chrome/core-chrome-browser/src/breadcrumb.ts b/packages/core/chrome/core-chrome-browser/src/breadcrumb.ts new file mode 100644 index 0000000000000..68a75b4db36af --- /dev/null +++ b/packages/core/chrome/core-chrome-browser/src/breadcrumb.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 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 { EuiBreadcrumb } from '@elastic/eui'; +import type { MountPoint } from '@kbn/core-mount-utils-browser'; + +/** @public */ +export type ChromeBreadcrumb = EuiBreadcrumb; + +/** @public */ +export interface ChromeBreadcrumbsAppendExtension { + content: MountPoint; +} diff --git a/src/core/public/chrome/types.ts b/packages/core/chrome/core-chrome-browser/src/contracts.ts similarity index 68% rename from src/core/public/chrome/types.ts rename to packages/core/chrome/core-chrome-browser/src/contracts.ts index 72c134957615a..e3a4f09c2cbb7 100644 --- a/src/core/public/chrome/types.ts +++ b/packages/core/chrome/core-chrome-browser/src/contracts.ts @@ -6,55 +6,14 @@ * Side Public License, v 1. */ -import { EuiBreadcrumb, IconType } from '@elastic/eui'; -import { Observable } from 'rxjs'; -import type { MountPoint } from '@kbn/core-mount-utils-browser'; -import { ChromeDocTitle } from './doc_title'; -import { ChromeNavControls } from './nav_controls'; -import { ChromeNavLinks, ChromeNavLink } from './nav_links'; -import { ChromeRecentlyAccessed } from './recently_accessed'; -import { ChromeHelpExtensionMenuLink } from './ui/header/header_help_menu'; - -/** @public */ -export interface ChromeBadge { - text: string; - tooltip: string; - iconType?: IconType; -} - -/** @public */ -export type ChromeBreadcrumb = EuiBreadcrumb; - -/** @public */ -export interface ChromeBreadcrumbsAppendExtension { - content: MountPoint; -} - -/** @public */ -export interface ChromeUserBanner { - content: MountPoint; -} - -/** @public */ -export interface ChromeHelpMenuActions { - hideHelpMenu: () => void; -} - -/** @public */ -export interface ChromeHelpExtension { - /** - * Provide your plugin's name to create a header for separation - */ - appName: string; - /** - * Creates unified links for sending users to documentation, GitHub, Discuss, or a custom link/button - */ - links?: ChromeHelpExtensionMenuLink[]; - /** - * Custom content to occur below the list of links - */ - content?: (element: HTMLDivElement, menuActions: ChromeHelpMenuActions) => () => void; -} +import type { Observable } from 'rxjs'; +import type { ChromeNavLink, ChromeNavLinks } from './nav_links'; +import type { ChromeRecentlyAccessed } from './recently_accessed'; +import type { ChromeDocTitle } from './doc_title'; +import type { ChromeNavControls } from './nav_controls'; +import type { ChromeHelpExtension } from './help_extension'; +import type { ChromeBreadcrumb, ChromeBreadcrumbsAppendExtension } from './breadcrumb'; +import type { ChromeBadge, ChromeUserBanner } from './types'; /** * ChromeStart allows plugins to customize the global chrome header UI and @@ -179,19 +138,3 @@ export interface ChromeStart { */ hasHeaderBanner$(): Observable; } - -/** @internal */ -export interface InternalChromeStart extends ChromeStart { - /** - * Used only by the rendering service to render the header UI - * @internal - */ - getHeaderComponent(): JSX.Element; - - /** - * Used only by the rendering service to retrieve the set of classNames - * that will be set on the body element. - * @internal - */ - getBodyClasses$(): Observable; -} diff --git a/packages/core/chrome/core-chrome-browser/src/doc_title.ts b/packages/core/chrome/core-chrome-browser/src/doc_title.ts new file mode 100644 index 0000000000000..809cd2806569c --- /dev/null +++ b/packages/core/chrome/core-chrome-browser/src/doc_title.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + +/** + * APIs for accessing and updating the document title. + * + * @example + * How to change the title of the document + * ```ts + * chrome.docTitle.change('My application') + * ``` + * + * @example + * How to reset the title of the document to it's initial value + * ```ts + * chrome.docTitle.reset() + * ``` + * + * @public + * */ +export interface ChromeDocTitle { + /** + * Changes the current document title. + * + * @example + * How to change the title of the document + * ```ts + * chrome.docTitle.change('My application title') + * chrome.docTitle.change(['My application', 'My section']) + * ``` + * + * @param newTitle The new title to set, either a string or string array + */ + change(newTitle: string | string[]): void; + /** + * Resets the document title to it's initial value. + * (meaning the one present in the title meta at application load.) + */ + reset(): void; +} diff --git a/packages/core/chrome/core-chrome-browser/src/help_extension.ts b/packages/core/chrome/core-chrome-browser/src/help_extension.ts new file mode 100644 index 0000000000000..3acebd168f49a --- /dev/null +++ b/packages/core/chrome/core-chrome-browser/src/help_extension.ts @@ -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 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 React from 'react'; +import type { EuiButtonEmptyProps } from '@elastic/eui'; + +/** @public */ +export interface ChromeHelpMenuActions { + hideHelpMenu: () => void; +} + +/** @public */ +export interface ChromeHelpExtension { + /** + * Provide your plugin's name to create a header for separation + */ + appName: string; + /** + * Creates unified links for sending users to documentation, GitHub, Discuss, or a custom link/button + */ + links?: ChromeHelpExtensionMenuLink[]; + /** + * Custom content to occur below the list of links + */ + content?: (element: HTMLDivElement, menuActions: ChromeHelpMenuActions) => () => void; +} + +/** @public */ +export type ChromeHelpExtensionLinkBase = Pick< + EuiButtonEmptyProps, + 'iconType' | 'target' | 'rel' | 'data-test-subj' +>; + +/** @public */ +export interface ChromeHelpExtensionMenuGitHubLink extends ChromeHelpExtensionLinkBase { + /** + * Creates a link to a new github issue in the Kibana repo + */ + linkType: 'github'; + /** + * Include at least one app-specific label to be applied to the new github issue + */ + labels: string[]; + /** + * Provides initial text for the title of the issue + */ + title?: string; +} + +/** @public */ +export interface ChromeHelpExtensionMenuDiscussLink extends ChromeHelpExtensionLinkBase { + /** + * Creates a generic give feedback link with comment icon + */ + linkType: 'discuss'; + /** + * URL to discuss page. + * i.e. `https://discuss.elastic.co/c/${appName}` + */ + href: string; +} + +/** @public */ +export interface ChromeHelpExtensionMenuDocumentationLink extends ChromeHelpExtensionLinkBase { + /** + * Creates a deep-link to app-specific documentation + */ + linkType: 'documentation'; + /** + * URL to documentation page. + * i.e. `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/${appName}.html`, + */ + href: string; +} + +/** @public */ +export interface ChromeHelpExtensionMenuCustomLink extends ChromeHelpExtensionLinkBase { + /** + * Extend EuiButtonEmpty to provide extra functionality + */ + linkType: 'custom'; + /** + * URL of the link + */ + href: string; + /** + * Content of the button (in lieu of `children`) + */ + content: React.ReactNode; +} + +/** @public */ +export type ChromeHelpExtensionMenuLink = + | ChromeHelpExtensionMenuGitHubLink + | ChromeHelpExtensionMenuDiscussLink + | ChromeHelpExtensionMenuDocumentationLink + | ChromeHelpExtensionMenuCustomLink; diff --git a/src/core/public/chrome/index.ts b/packages/core/chrome/core-chrome-browser/src/index.ts similarity index 66% rename from src/core/public/chrome/index.ts rename to packages/core/chrome/core-chrome-browser/src/index.ts index a2e60d6241caf..8414de3193c41 100644 --- a/src/core/public/chrome/index.ts +++ b/packages/core/chrome/core-chrome-browser/src/index.ts @@ -6,30 +6,23 @@ * Side Public License, v 1. */ -export { ChromeService } from './chrome_service'; +export type { ChromeBreadcrumbsAppendExtension, ChromeBreadcrumb } from './breadcrumb'; +export type { ChromeStart } from './contracts'; +export type { ChromeDocTitle } from './doc_title'; export type { + ChromeHelpExtension, + ChromeHelpMenuActions, ChromeHelpExtensionLinkBase, ChromeHelpExtensionMenuLink, ChromeHelpExtensionMenuCustomLink, ChromeHelpExtensionMenuDiscussLink, ChromeHelpExtensionMenuDocumentationLink, ChromeHelpExtensionMenuGitHubLink, -} from './ui/header/header_help_menu'; -export type { NavType } from './ui'; -export type { ChromeNavLink, ChromeNavLinks } from './nav_links'; +} from './help_extension'; +export type { ChromeNavControls, ChromeNavControl } from './nav_controls'; +export type { ChromeNavLinks, ChromeNavLink } from './nav_links'; export type { ChromeRecentlyAccessed, ChromeRecentlyAccessedHistoryItem, } from './recently_accessed'; -export type { ChromeNavControl, ChromeNavControls } from './nav_controls'; -export type { ChromeDocTitle } from './doc_title'; -export type { - InternalChromeStart, - ChromeStart, - ChromeHelpExtension, - ChromeHelpMenuActions, - ChromeBreadcrumbsAppendExtension, - ChromeBreadcrumb, - ChromeBadge, - ChromeUserBanner, -} from './types'; +export type { ChromeBadge, ChromeUserBanner } from './types'; diff --git a/packages/core/chrome/core-chrome-browser/src/nav_controls.ts b/packages/core/chrome/core-chrome-browser/src/nav_controls.ts new file mode 100644 index 0000000000000..354bd796c4af1 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser/src/nav_controls.ts @@ -0,0 +1,52 @@ +/* + * 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 { Observable } from 'rxjs'; +import type { MountPoint } from '@kbn/core-mount-utils-browser'; + +/** @public */ +export interface ChromeNavControl { + order?: number; + mount: MountPoint; +} + +/** + * {@link ChromeNavControls | APIs} for registering new controls to be displayed in the navigation bar. + * + * @example + * Register a left-side nav control rendered with React. + * ```jsx + * chrome.navControls.registerLeft({ + * mount(targetDomElement) { + * ReactDOM.mount(, targetDomElement); + * return () => ReactDOM.unmountComponentAtNode(targetDomElement); + * } + * }) + * ``` + * + * @public + */ +export interface ChromeNavControls { + /** Register a nav control to be presented on the bottom-left side of the chrome header. */ + registerLeft(navControl: ChromeNavControl): void; + + /** Register a nav control to be presented on the top-right side of the chrome header. */ + registerRight(navControl: ChromeNavControl): void; + + /** Register a nav control to be presented on the top-center side of the chrome header. */ + registerCenter(navControl: ChromeNavControl): void; + + /** @internal */ + getLeft$(): Observable; + + /** @internal */ + getRight$(): Observable; + + /** @internal */ + getCenter$(): Observable; +} diff --git a/src/core/public/chrome/nav_links/nav_link.ts b/packages/core/chrome/core-chrome-browser/src/nav_links.ts similarity index 57% rename from src/core/public/chrome/nav_links/nav_link.ts rename to packages/core/chrome/core-chrome-browser/src/nav_links.ts index f80a07a91865d..4bcc225168d01 100644 --- a/src/core/public/chrome/nav_links/nav_link.ts +++ b/packages/core/chrome/core-chrome-browser/src/nav_links.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import { AppCategory } from '../..'; +import type { Observable } from 'rxjs'; +import type { AppCategory } from '@kbn/core-application-common'; /** * @public @@ -79,16 +80,50 @@ export interface ChromeNavLink { readonly hidden?: boolean; } -export class NavLinkWrapper { - public readonly id: string; - public readonly properties: Readonly; +/** + * {@link ChromeNavLinks | APIs} for manipulating nav links. + * + * @public + */ +export interface ChromeNavLinks { + /** + * Get an observable for a sorted list of navlinks. + */ + getNavLinks$(): Observable>>; + + /** + * Get the state of a navlink at this point in time. + * @param id + */ + get(id: string): ChromeNavLink | undefined; + + /** + * Get the current state of all navlinks. + */ + getAll(): Array>; - constructor(properties: ChromeNavLink) { - if (!properties || !properties.id) { - throw new Error('`id` is required.'); - } + /** + * Check whether or not a navlink exists. + * @param id + */ + has(id: string): boolean; + + /** + * Enable forced navigation mode, which will trigger a page refresh + * when a nav link is clicked and only the hash is updated. + * + * @remarks + * This is only necessary when rendering the status page in place of another + * app, as links to that app will set the current URL and change the hash, but + * the routes for the correct are not loaded so nothing will happen. + * https://github.com/elastic/kibana/pull/29770 + * + * Used only by status_page plugin + */ + enableForcedAppSwitcherNavigation(): void; - this.id = properties.id; - this.properties = Object.freeze(properties); - } + /** + * An observable of the forced app switcher state. + */ + getForceAppSwitcherNavigation$(): Observable; } diff --git a/src/core/public/chrome/recently_accessed/recently_accessed_service.ts b/packages/core/chrome/core-chrome-browser/src/recently_accessed.ts similarity index 59% rename from src/core/public/chrome/recently_accessed/recently_accessed_service.ts rename to packages/core/chrome/core-chrome-browser/src/recently_accessed.ts index 4819fd74a47b8..043995b467be2 100644 --- a/src/core/public/chrome/recently_accessed/recently_accessed_service.ts +++ b/packages/core/chrome/core-chrome-browser/src/recently_accessed.ts @@ -6,11 +6,7 @@ * Side Public License, v 1. */ -import { Observable } from 'rxjs'; -import type { HttpSetup } from '@kbn/core-http-browser'; - -import { PersistedLog } from './persisted_log'; -import { createLogKey } from './create_log_key'; +import type { Observable } from 'rxjs'; /** @public */ export interface ChromeRecentlyAccessedHistoryItem { @@ -19,38 +15,6 @@ export interface ChromeRecentlyAccessedHistoryItem { id: string; } -interface StartDeps { - http: HttpSetup; -} - -/** @internal */ -export class RecentlyAccessedService { - async start({ http }: StartDeps): Promise { - const logKey = await createLogKey('recentlyAccessed', http.basePath.get()); - const history = new PersistedLog(logKey, { - maxLength: 20, - isEqual: (oldItem, newItem) => oldItem.id === newItem.id, - }); - - return { - /** Adds a new item to the history. */ - add: (link: string, label: string, id: string) => { - history.add({ - link, - label, - id, - }); - }, - - /** Gets the current array of history items. */ - get: () => history.get(), - - /** Gets an observable of the current array of history items. */ - get$: () => history.get$(), - }; - } -} - /** * {@link ChromeRecentlyAccessed | APIs} for recently accessed history. * @public diff --git a/packages/core/chrome/core-chrome-browser/src/types.ts b/packages/core/chrome/core-chrome-browser/src/types.ts new file mode 100644 index 0000000000000..81b8c32a1a04c --- /dev/null +++ b/packages/core/chrome/core-chrome-browser/src/types.ts @@ -0,0 +1,22 @@ +/* + * 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 { IconType } from '@elastic/eui'; +import type { MountPoint } from '@kbn/core-mount-utils-browser'; + +/** @public */ +export interface ChromeBadge { + text: string; + tooltip: string; + iconType?: IconType; +} + +/** @public */ +export interface ChromeUserBanner { + content: MountPoint; +} diff --git a/packages/core/chrome/core-chrome-browser/tsconfig.json b/packages/core/chrome/core-chrome-browser/tsconfig.json new file mode 100644 index 0000000000000..26b4c7aca3a67 --- /dev/null +++ b/packages/core/chrome/core-chrome-browser/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ] +} diff --git a/packages/core/i18n/core-i18n-server-internal/BUILD.bazel b/packages/core/i18n/core-i18n-server-internal/BUILD.bazel new file mode 100644 index 0000000000000..b315f479c4889 --- /dev/null +++ b/packages/core/i18n/core-i18n-server-internal/BUILD.bazel @@ -0,0 +1,130 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-i18n-server-internal" +PKG_REQUIRE_NAME = "@kbn/core-i18n-server-internal" + +SOURCE_FILES = glob( + [ + "**/*.ts", + ], + exclude = [ + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__", + "**/integration_tests", + "**/mocks", + "**/scripts", + "**/storybook", + "**/test_fixtures", + "**/test_helpers", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//json-stable-stringify", + "@npm//globby", + "@npm//rxjs", + "//packages/kbn-config-schema", + "//packages/core/base/core-base-common", + "//packages/kbn-i18n", + "//packages/kbn-utils", + "//packages/kbn-config-mocks", + "//packages/kbn-utility-types", + "//packages/core/base/core-base-server-mocks", + "//packages/core/http/core-http-server-mocks" +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/json-stable-stringify", + "//packages/kbn-config:npm_module_types", + "//packages/kbn-config-schema:npm_module_types", + "//packages/kbn-logging:npm_module_types", + "//packages/core/base/core-base-server-internal:npm_module_types", + "//packages/core/base/core-base-common:npm_module_types", + "//packages/core/deprecations/core-deprecations-common:npm_module_types", + "//packages/core/i18n/core-i18n-server:npm_module_types", + "//packages/core/http/core-http-server:npm_module_types", + "//packages/core/http/core-http-server-internal:npm_module_types", + "//packages/core/elasticsearch/core-elasticsearch-server:npm_module_types", + "//packages/core/usage-data/core-usage-data-base-server-internal:npm_module_types", + "//packages/core/deprecations/core-deprecations-server:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = ".", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/i18n/core-i18n-server-internal/README.md b/packages/core/i18n/core-i18n-server-internal/README.md new file mode 100644 index 0000000000000..d54bb990e2029 --- /dev/null +++ b/packages/core/i18n/core-i18n-server-internal/README.md @@ -0,0 +1,3 @@ +# @kbn/core-i18n-server-internal + +This package contains the internal implementation of Core's server-side i18n service. diff --git a/packages/core/i18n/core-i18n-server-internal/index.ts b/packages/core/i18n/core-i18n-server-internal/index.ts new file mode 100644 index 0000000000000..dbb51964c10e5 --- /dev/null +++ b/packages/core/i18n/core-i18n-server-internal/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { I18nConfigType } from './src'; +export { config, I18nService } from './src'; diff --git a/packages/core/i18n/core-i18n-server-internal/jest.config.js b/packages/core/i18n/core-i18n-server-internal/jest.config.js new file mode 100644 index 0000000000000..1a11773cd284c --- /dev/null +++ b/packages/core/i18n/core-i18n-server-internal/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/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/i18n/core-i18n-server-internal'], +}; diff --git a/packages/core/i18n/core-i18n-server-internal/package.json b/packages/core/i18n/core-i18n-server-internal/package.json new file mode 100644 index 0000000000000..a3510ea753b03 --- /dev/null +++ b/packages/core/i18n/core-i18n-server-internal/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-i18n-server-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "author": "Kibana Core", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/i18n/get_kibana_translation_files.test.ts b/packages/core/i18n/core-i18n-server-internal/src/get_kibana_translation_files.test.ts similarity index 100% rename from src/core/server/i18n/get_kibana_translation_files.test.ts rename to packages/core/i18n/core-i18n-server-internal/src/get_kibana_translation_files.test.ts diff --git a/src/core/server/i18n/get_kibana_translation_files.ts b/packages/core/i18n/core-i18n-server-internal/src/get_kibana_translation_files.ts similarity index 100% rename from src/core/server/i18n/get_kibana_translation_files.ts rename to packages/core/i18n/core-i18n-server-internal/src/get_kibana_translation_files.ts diff --git a/src/core/server/i18n/get_translation_paths.test.mocks.ts b/packages/core/i18n/core-i18n-server-internal/src/get_translation_paths.test.mocks.ts similarity index 93% rename from src/core/server/i18n/get_translation_paths.test.mocks.ts rename to packages/core/i18n/core-i18n-server-internal/src/get_translation_paths.test.mocks.ts index 7268d53e842a5..4931abfb038b5 100644 --- a/src/core/server/i18n/get_translation_paths.test.mocks.ts +++ b/packages/core/i18n/core-i18n-server-internal/src/get_translation_paths.test.mocks.ts @@ -10,6 +10,6 @@ export const globbyMock = jest.fn(); jest.doMock('globby', () => globbyMock); export const readFileMock = jest.fn(); -jest.doMock('./fs', () => ({ +jest.doMock('fs/promises', () => ({ readFile: readFileMock, })); diff --git a/src/core/server/i18n/get_translation_paths.test.ts b/packages/core/i18n/core-i18n-server-internal/src/get_translation_paths.test.ts similarity index 100% rename from src/core/server/i18n/get_translation_paths.test.ts rename to packages/core/i18n/core-i18n-server-internal/src/get_translation_paths.test.ts diff --git a/src/core/server/i18n/get_translation_paths.ts b/packages/core/i18n/core-i18n-server-internal/src/get_translation_paths.ts similarity index 97% rename from src/core/server/i18n/get_translation_paths.ts rename to packages/core/i18n/core-i18n-server-internal/src/get_translation_paths.ts index 8897786252d40..c0479208ba87e 100644 --- a/src/core/server/i18n/get_translation_paths.ts +++ b/packages/core/i18n/core-i18n-server-internal/src/get_translation_paths.ts @@ -8,7 +8,7 @@ import { resolve, dirname } from 'path'; import globby from 'globby'; -import { readFile } from './fs'; +import { readFile } from 'fs/promises'; interface I18NRCFileStructure { translations?: string[]; diff --git a/src/core/server/i18n/i18n_config.ts b/packages/core/i18n/core-i18n-server-internal/src/i18n_config.ts similarity index 100% rename from src/core/server/i18n/i18n_config.ts rename to packages/core/i18n/core-i18n-server-internal/src/i18n_config.ts diff --git a/src/core/server/i18n/i18n_service.test.mocks.ts b/packages/core/i18n/core-i18n-server-internal/src/i18n_service.test.mocks.ts similarity index 100% rename from src/core/server/i18n/i18n_service.test.mocks.ts rename to packages/core/i18n/core-i18n-server-internal/src/i18n_service.test.mocks.ts diff --git a/src/core/server/i18n/i18n_service.test.ts b/packages/core/i18n/core-i18n-server-internal/src/i18n_service.test.ts similarity index 98% rename from src/core/server/i18n/i18n_service.test.ts rename to packages/core/i18n/core-i18n-server-internal/src/i18n_service.test.ts index 4ec59783626e4..88ac8daac65e7 100644 --- a/src/core/server/i18n/i18n_service.test.ts +++ b/packages/core/i18n/core-i18n-server-internal/src/i18n_service.test.ts @@ -17,7 +17,7 @@ import { I18nService } from './i18n_service'; import { configServiceMock } from '@kbn/config-mocks'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; -import { httpServiceMock } from '../mocks'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; const getConfigService = (locale = 'en') => { const configService = configServiceMock.create(); diff --git a/src/core/server/i18n/i18n_service.ts b/packages/core/i18n/core-i18n-server-internal/src/i18n_service.ts similarity index 90% rename from src/core/server/i18n/i18n_service.ts rename to packages/core/i18n/core-i18n-server-internal/src/i18n_service.ts index 5d64095cc229a..7f48256479923 100644 --- a/src/core/server/i18n/i18n_service.ts +++ b/packages/core/i18n/core-i18n-server-internal/src/i18n_service.ts @@ -14,6 +14,7 @@ import type { InternalHttpServicePreboot, InternalHttpServiceSetup, } from '@kbn/core-http-server-internal'; +import type { I18nServiceSetup } from '@kbn/core-i18n-server'; import { config as i18nConfigDef, I18nConfigType } from './i18n_config'; import { getKibanaTranslationFiles } from './get_kibana_translation_files'; import { initTranslations } from './init_translations'; @@ -29,21 +30,6 @@ export interface SetupDeps { pluginPaths: string[]; } -/** - * @public - */ -export interface I18nServiceSetup { - /** - * Return the locale currently in use. - */ - getLocale(): string; - - /** - * Return the absolute paths to translation files currently in use. - */ - getTranslationFiles(): string[]; -} - export class I18nService { private readonly log: Logger; private readonly configService: IConfigService; diff --git a/src/core/server/i18n/index.ts b/packages/core/i18n/core-i18n-server-internal/src/index.ts similarity index 89% rename from src/core/server/i18n/index.ts rename to packages/core/i18n/core-i18n-server-internal/src/index.ts index 8bc01a598e0d0..a87d88ec28dd7 100644 --- a/src/core/server/i18n/index.ts +++ b/packages/core/i18n/core-i18n-server-internal/src/index.ts @@ -9,4 +9,3 @@ export { config } from './i18n_config'; export type { I18nConfigType } from './i18n_config'; export { I18nService } from './i18n_service'; -export type { I18nServiceSetup } from './i18n_service'; diff --git a/src/core/server/i18n/init_translations.ts b/packages/core/i18n/core-i18n-server-internal/src/init_translations.ts similarity index 100% rename from src/core/server/i18n/init_translations.ts rename to packages/core/i18n/core-i18n-server-internal/src/init_translations.ts diff --git a/src/core/server/i18n/routes/index.ts b/packages/core/i18n/core-i18n-server-internal/src/routes/index.ts similarity index 100% rename from src/core/server/i18n/routes/index.ts rename to packages/core/i18n/core-i18n-server-internal/src/routes/index.ts diff --git a/src/core/server/i18n/routes/translations.ts b/packages/core/i18n/core-i18n-server-internal/src/routes/translations.ts similarity index 100% rename from src/core/server/i18n/routes/translations.ts rename to packages/core/i18n/core-i18n-server-internal/src/routes/translations.ts diff --git a/packages/core/i18n/core-i18n-server-internal/tsconfig.json b/packages/core/i18n/core-i18n-server-internal/tsconfig.json new file mode 100644 index 0000000000000..ff8b3da96b4db --- /dev/null +++ b/packages/core/i18n/core-i18n-server-internal/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": ".", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + ] +} diff --git a/packages/core/i18n/core-i18n-server-mocks/BUILD.bazel b/packages/core/i18n/core-i18n-server-mocks/BUILD.bazel new file mode 100644 index 0000000000000..d324c377b6adf --- /dev/null +++ b/packages/core/i18n/core-i18n-server-mocks/BUILD.bazel @@ -0,0 +1,115 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-i18n-server-mocks" +PKG_REQUIRE_NAME = "@kbn/core-i18n-server-mocks" + +SOURCE_FILES = glob( + [ + "**/*.ts", + "**/*.tsx", + ], + exclude = [ + "**/*.config.js", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "//packages/core/i18n/core-i18n-server-internal", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "//packages/kbn-utility-types:npm_module_types", + "//packages/core/i18n/core-i18n-server:npm_module_types", + "//packages/core/i18n/core-i18n-server-internal:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/i18n/core-i18n-server-mocks/README.md b/packages/core/i18n/core-i18n-server-mocks/README.md new file mode 100644 index 0000000000000..b69c4474c979e --- /dev/null +++ b/packages/core/i18n/core-i18n-server-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-i18n-server-mocks + +This package contains the mocks for Core's server-side i18n service. diff --git a/packages/core/i18n/core-i18n-server-mocks/index.ts b/packages/core/i18n/core-i18n-server-mocks/index.ts new file mode 100644 index 0000000000000..69d54181b0267 --- /dev/null +++ b/packages/core/i18n/core-i18n-server-mocks/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 { i18nServiceMock } from './src/i18n_service.mock'; diff --git a/packages/core/i18n/core-i18n-server-mocks/jest.config.js b/packages/core/i18n/core-i18n-server-mocks/jest.config.js new file mode 100644 index 0000000000000..5ba3839ea4054 --- /dev/null +++ b/packages/core/i18n/core-i18n-server-mocks/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/core/i18n/core-i18n-server-mocks'], +}; diff --git a/packages/core/i18n/core-i18n-server-mocks/package.json b/packages/core/i18n/core-i18n-server-mocks/package.json new file mode 100644 index 0000000000000..92368578109cb --- /dev/null +++ b/packages/core/i18n/core-i18n-server-mocks/package.json @@ -0,0 +1,9 @@ +{ + "name": "@kbn/core-i18n-server-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "author": "Kibana Core", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/i18n/i18n_service.mock.ts b/packages/core/i18n/core-i18n-server-mocks/src/i18n_service.mock.ts similarity index 84% rename from src/core/server/i18n/i18n_service.mock.ts rename to packages/core/i18n/core-i18n-server-mocks/src/i18n_service.mock.ts index a199acd00eff5..41c6dadea85b9 100644 --- a/src/core/server/i18n/i18n_service.mock.ts +++ b/packages/core/i18n/core-i18n-server-mocks/src/i18n_service.mock.ts @@ -6,8 +6,9 @@ * Side Public License, v 1. */ -import { PublicMethodsOf } from '@kbn/utility-types'; -import type { I18nServiceSetup, I18nService } from './i18n_service'; +import type { PublicMethodsOf } from '@kbn/utility-types'; +import type { I18nService } from '@kbn/core-i18n-server-internal'; +import type { I18nServiceSetup } from '@kbn/core-i18n-server'; const createSetupContractMock = () => { const mock: jest.Mocked = { diff --git a/packages/core/i18n/core-i18n-server-mocks/tsconfig.json b/packages/core/i18n/core-i18n-server-mocks/tsconfig.json new file mode 100644 index 0000000000000..49e920b0a461a --- /dev/null +++ b/packages/core/i18n/core-i18n-server-mocks/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts" + ] +} diff --git a/packages/core/i18n/core-i18n-server/BUILD.bazel b/packages/core/i18n/core-i18n-server/BUILD.bazel new file mode 100644 index 0000000000000..c3b9d8fec6241 --- /dev/null +++ b/packages/core/i18n/core-i18n-server/BUILD.bazel @@ -0,0 +1,106 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-i18n-server" +PKG_REQUIRE_NAME = "@kbn/core-i18n-server" + +SOURCE_FILES = glob( + [ + "**/*.ts", + ], + exclude = [ + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__", + "**/integration_tests", + "**/mocks", + "**/scripts", + "**/storybook", + "**/test_fixtures", + "**/test_helpers", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = ".", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/i18n/core-i18n-server/README.md b/packages/core/i18n/core-i18n-server/README.md new file mode 100644 index 0000000000000..fde5bf953f9eb --- /dev/null +++ b/packages/core/i18n/core-i18n-server/README.md @@ -0,0 +1,3 @@ +# @kbn/core-i18n-browser + +This package contains the public types for Core's server-side i18n service. diff --git a/src/core/public/chrome/nav_controls/index.ts b/packages/core/i18n/core-i18n-server/index.ts similarity index 87% rename from src/core/public/chrome/nav_controls/index.ts rename to packages/core/i18n/core-i18n-server/index.ts index 64b8c24d0611c..95213026c1078 100644 --- a/src/core/public/chrome/nav_controls/index.ts +++ b/packages/core/i18n/core-i18n-server/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export * from './nav_controls_service'; +export type { I18nServiceSetup } from './src/types'; diff --git a/packages/core/i18n/core-i18n-server/jest.config.js b/packages/core/i18n/core-i18n-server/jest.config.js new file mode 100644 index 0000000000000..29befeabb6c73 --- /dev/null +++ b/packages/core/i18n/core-i18n-server/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/core/i18n/core-i18n-server'], +}; diff --git a/packages/core/i18n/core-i18n-server/package.json b/packages/core/i18n/core-i18n-server/package.json new file mode 100644 index 0000000000000..d2e327af8f3c4 --- /dev/null +++ b/packages/core/i18n/core-i18n-server/package.json @@ -0,0 +1,9 @@ +{ + "name": "@kbn/core-i18n-server", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "author": "Kibana Core", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/i18n/core-i18n-server/src/types.ts b/packages/core/i18n/core-i18n-server/src/types.ts new file mode 100644 index 0000000000000..9c640612c9034 --- /dev/null +++ b/packages/core/i18n/core-i18n-server/src/types.ts @@ -0,0 +1,22 @@ +/* + * 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. + */ + +/** + * @public + */ +export interface I18nServiceSetup { + /** + * Return the locale currently in use. + */ + getLocale(): string; + + /** + * Return the absolute paths to translation files currently in use. + */ + getTranslationFiles(): string[]; +} diff --git a/packages/core/i18n/core-i18n-server/tsconfig.json b/packages/core/i18n/core-i18n-server/tsconfig.json new file mode 100644 index 0000000000000..49e920b0a461a --- /dev/null +++ b/packages/core/i18n/core-i18n-server/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts" + ] +} diff --git a/packages/core/mount-utils/core-mount-utils-browser-internal/BUILD.bazel b/packages/core/mount-utils/core-mount-utils-browser-internal/BUILD.bazel index 10128f4a55a74..d08deae72386f 100644 --- a/packages/core/mount-utils/core-mount-utils-browser-internal/BUILD.bazel +++ b/packages/core/mount-utils/core-mount-utils-browser-internal/BUILD.bazel @@ -9,6 +9,7 @@ SOURCE_FILES = glob( [ "**/*.ts", "**/*.tsx", + "**/*.scss", ], exclude = [ "**/*.config.js", @@ -62,6 +63,10 @@ jsts_transpiler( srcs = SRCS, build_pkg_name = package_name(), web = True, + additional_args = [ + "--copy-files", + "--quiet" + ] ) ts_config( diff --git a/packages/core/mount-utils/core-mount-utils-browser-internal/src/mount.tsx b/packages/core/mount-utils/core-mount-utils-browser-internal/src/mount.tsx index 7b7ab47de620d..968816b812ae4 100644 --- a/packages/core/mount-utils/core-mount-utils-browser-internal/src/mount.tsx +++ b/packages/core/mount-utils/core-mount-utils-browser-internal/src/mount.tsx @@ -11,7 +11,10 @@ import { render, unmountComponentAtNode } from 'react-dom'; import { I18nProvider } from '@kbn/i18n-react'; import type { MountPoint } from '@kbn/core-mount-utils-browser'; +import './mount_wrapper.scss'; + const defaultWrapperClass = 'kbnMountWrapper'; + interface MountWrapperComponentProps { mount: MountPoint; className?: string; diff --git a/packages/core/overlays/core-overlays-browser-internal/src/_mount_wrapper.scss b/packages/core/mount-utils/core-mount-utils-browser-internal/src/mount_wrapper.scss similarity index 100% rename from packages/core/overlays/core-overlays-browser-internal/src/_mount_wrapper.scss rename to packages/core/mount-utils/core-mount-utils-browser-internal/src/mount_wrapper.scss diff --git a/packages/core/overlays/core-overlays-browser-internal/src/_index.scss b/packages/core/overlays/core-overlays-browser-internal/src/_index.scss deleted file mode 100644 index 368dc9b644ff9..0000000000000 --- a/packages/core/overlays/core-overlays-browser-internal/src/_index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import './banners/index'; -@import './mount_wrapper'; diff --git a/packages/core/overlays/core-overlays-browser-internal/src/banners/_index.scss b/packages/core/overlays/core-overlays-browser-internal/src/banners/_index.scss deleted file mode 100644 index c0c8056ff5d7d..0000000000000 --- a/packages/core/overlays/core-overlays-browser-internal/src/banners/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import './banners_list'; diff --git a/packages/core/overlays/core-overlays-browser-internal/src/banners/_banners_list.scss b/packages/core/overlays/core-overlays-browser-internal/src/banners/banners_list.scss similarity index 100% rename from packages/core/overlays/core-overlays-browser-internal/src/banners/_banners_list.scss rename to packages/core/overlays/core-overlays-browser-internal/src/banners/banners_list.scss diff --git a/packages/core/overlays/core-overlays-browser-internal/src/banners/banners_list.tsx b/packages/core/overlays/core-overlays-browser-internal/src/banners/banners_list.tsx index b8ef2d64b25bb..895c941d84010 100644 --- a/packages/core/overlays/core-overlays-browser-internal/src/banners/banners_list.tsx +++ b/packages/core/overlays/core-overlays-browser-internal/src/banners/banners_list.tsx @@ -10,6 +10,8 @@ import React, { useEffect, useRef, useState } from 'react'; import { Observable } from 'rxjs'; import type { OverlayBanner } from './banners_service'; +import './banners_list.scss'; + interface Props { banners$: Observable; } diff --git a/packages/kbn-docs-utils/BUILD.bazel b/packages/kbn-docs-utils/BUILD.bazel index d4e138ff347ca..33687685100e1 100644 --- a/packages/kbn-docs-utils/BUILD.bazel +++ b/packages/kbn-docs-utils/BUILD.bazel @@ -49,10 +49,13 @@ TYPES_DEPS = [ "//packages/kbn-plugin-discovery:npm_module_types", "//packages/kbn-dev-utils:npm_module_types", "//packages/kbn-utils:npm_module_types", + "//packages/kbn-tooling-log:npm_module_types", "@npm//ts-morph", "@npm//@types/dedent", "@npm//@types/jest", + "@npm//@types/js-yaml", "@npm//@types/node", + "@npm//globby", ] jsts_transpiler( diff --git a/packages/kbn-docs-utils/src/api_docs/build_api_docs_cli.ts b/packages/kbn-docs-utils/src/api_docs/build_api_docs_cli.ts index de9e14ed650fd..3c15968c4f5c1 100644 --- a/packages/kbn-docs-utils/src/api_docs/build_api_docs_cli.ts +++ b/packages/kbn-docs-utils/src/api_docs/build_api_docs_cli.ts @@ -7,6 +7,7 @@ */ import Fs from 'fs'; +import Fsp from 'fs/promises'; import Path from 'path'; import { run } from '@kbn/dev-cli-runner'; @@ -26,6 +27,8 @@ import { writePluginDirectoryDoc } from './mdx/write_plugin_directory_doc'; import { collectApiStatsForPlugin } from './stats'; import { countEslintDisableLine, EslintDisableCounts } from './count_eslint_disable'; import { writeDeprecationDueByTeam } from './mdx/write_deprecations_due_by_team'; +import { trimDeletedDocsFromNav } from './trim_deleted_docs_from_nav'; +import { getAllDocFileIds } from './mdx/get_all_doc_file_ids'; function isStringArray(arr: unknown | string[]): arr is string[] { return Array.isArray(arr) && arr.every((p) => typeof p === 'string'); @@ -53,30 +56,27 @@ export function runBuildApiDocsCli() { ); } + const outputFolder = Path.resolve(REPO_ROOT, 'api_docs'); + + const initialDocIds = + !pluginFilter && Fs.existsSync(outputFolder) + ? await getAllDocFileIds(outputFolder) + : undefined; + const project = getTsProject(REPO_ROOT); const plugins = findPlugins(); - const outputFolder = Path.resolve(REPO_ROOT, 'api_docs'); + // if the output folder already exists and we don't have a plugin filter, delete all the files in the output folder + if (Fs.existsSync(outputFolder) && !pluginFilter) { + await Fsp.rm(outputFolder, { recursive: true }); + } + + // if the output folder doesn't exist, create it if (!Fs.existsSync(outputFolder)) { - Fs.mkdirSync(outputFolder); - - // Don't delete all the files if a plugin filter is being used. - } else if (!pluginFilter) { - // Delete all files except the README that warns about the auto-generated nature of - // the folder. - const files = Fs.readdirSync(outputFolder); - await Promise.all( - files - .filter((file) => file.indexOf('README.md') < 0) - .map( - (file) => - new Promise((resolve, reject) => - Fs.rm(Path.resolve(outputFolder, file), (err) => (err ? reject(err) : resolve())) - ) - ) - ); + await Fsp.mkdir(outputFolder, { recursive: true }); } + const collectReferences = flags.references as boolean; const { pluginApiMap, missingApiItems, unreferencedDeprecations, referencedDeprecations } = @@ -264,10 +264,15 @@ export function runBuildApiDocsCli() { log ); }); + if (Object.values(pathsOutsideScopes).length > 0) { log.warning(`Found paths outside of normal scope folders:`); log.warning(pathsOutsideScopes); } + + if (initialDocIds) { + await trimDeletedDocsFromNav(log, initialDocIds, outputFolder); + } }, { log: { diff --git a/packages/kbn-docs-utils/src/api_docs/mdx/get_all_doc_file_ids.ts b/packages/kbn-docs-utils/src/api_docs/mdx/get_all_doc_file_ids.ts new file mode 100644 index 0000000000000..aa3f3827fa5ad --- /dev/null +++ b/packages/kbn-docs-utils/src/api_docs/mdx/get_all_doc_file_ids.ts @@ -0,0 +1,57 @@ +/* + * 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 Fsp from 'fs/promises'; + +import globby from 'globby'; +import { asyncMapWithLimit } from '@kbn/std'; +import Yaml from 'js-yaml'; + +const FM_SEP_RE = /^---$/m; + +export async function getAllDocFileIds(outputDir: string) { + const paths = await globby(['**/*.mdx'], { + cwd: outputDir, + absolute: true, + unique: true, + }); + + const ids = await asyncMapWithLimit(paths, 20, async (path) => { + const content = await Fsp.readFile(path, 'utf8'); + + const fmStart = content.match(FM_SEP_RE); + if (fmStart?.index === undefined) { + throw new Error(`unable to find start of frontmatter in ${path}`); + } + const fmYaml = content.slice(fmStart.index + fmStart[0].length); + + const fmEnd = fmYaml.match(FM_SEP_RE); + if (fmEnd?.index === undefined) { + throw new Error(`unable to find end of frontmatter in ${path}`); + } + + let fm; + try { + fm = Yaml.safeLoad(fmYaml.slice(0, fmEnd.index)); + if (typeof fm !== 'object' || fm === null) { + throw new Error('expected yaml to produce an object'); + } + } catch (err) { + throw new Error(`unable to parse frontmatter in ${path}: ${err.message}`); + } + + const id = fm.id; + if (typeof id !== 'string') { + throw new Error(`missing "id" in frontmatter in ${path}`); + } + + return id; + }); + + return ids.flat(); +} diff --git a/packages/kbn-docs-utils/src/api_docs/trim_deleted_docs_from_nav.ts b/packages/kbn-docs-utils/src/api_docs/trim_deleted_docs_from_nav.ts new file mode 100644 index 0000000000000..2aa7dbf58f6f8 --- /dev/null +++ b/packages/kbn-docs-utils/src/api_docs/trim_deleted_docs_from_nav.ts @@ -0,0 +1,71 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 Path from 'path'; +import Fsp from 'fs/promises'; + +import { REPO_ROOT } from '@kbn/utils'; +import { ToolingLog } from '@kbn/tooling-log'; + +import { getAllDocFileIds } from './mdx/get_all_doc_file_ids'; + +interface NavEntry { + id?: string; + items?: NavEntry[]; +} + +export async function trimDeletedDocsFromNav( + log: ToolingLog, + initialDocIds: string[], + outputDir: string +) { + const generatedDocIds = await getAllDocFileIds(outputDir); + const deleted = initialDocIds.filter((id) => !generatedDocIds.includes(id)); + if (!deleted.length) { + log.info('no deleted doc files detected'); + } + + const navPath = Path.resolve(REPO_ROOT, 'nav-kibana-dev.docnav.json'); + + let navJson; + try { + navJson = await Fsp.readFile(navPath, 'utf8'); + } catch (error) { + throw new Error(`unable to read dev-docs nav at ${navPath}: ${error.message}`); + } + + let nav; + try { + nav = JSON.parse(navJson); + } catch (error) { + throw new Error(`unable to parse nav at ${navPath}: ${error.message}`); + } + + let updatedNav = false; + (function recurse(entry: NavEntry, parent?: NavEntry): void { + if (parent && typeof entry.id === 'string' && deleted.includes(entry.id)) { + updatedNav = true; + parent.items = parent.items?.filter((i) => i !== entry); + return; + } + + if (entry.items) { + for (const item of entry.items) { + recurse(item, entry); + } + } + })(nav); + + if (updatedNav) { + log.info('updating docs nav to remove references to deleted pages'); + await Fsp.writeFile( + navPath, + JSON.stringify(nav, null, 2) + (navJson.endsWith('\n') ? '\n' : '') + ); + } +} diff --git a/packages/kbn-es-archiver/README.mdx b/packages/kbn-es-archiver/README.mdx new file mode 100644 index 0000000000000..5addecf2b64e2 --- /dev/null +++ b/packages/kbn-es-archiver/README.mdx @@ -0,0 +1,17 @@ +--- +id: kibDevDocsOpsEsArchiver +slug: /kibana-dev-docs/ops/es-archiver +title: "ES Archiver" +description: A tool which helps developers capture and restore ES indexes +tags: ['kibana', 'dev', 'contributor', 'operations', 'ci'] +--- + +The ES Archiver is a service primarily used by the Functional Tests to load up ES indexes using the bulk API which makes the archives more resilient to ES upgrades and easier to inspect/edit locally because they are just plain text files containing newline-delimited JSON (though they are sometimes compressed). + +## CLI + +This tool also has a CLI which can be used to save indexes to new archives or load additional archives into a specific ES instance. + +To teach the ES Archiver how to talk to ES and Kibana it is ideal to start ES and Kibana using `node scripts/functional_test_servers --config some/config/file.ts` and then use the same `--config` flag when running `node scripts/es_archiver` so that it can access the location and authorization information about the ES instace from the FTR config file. + +Additional information about what functionality the CLI provides can be found by running `node scripts/es_archiver --help` \ No newline at end of file diff --git a/packages/kbn-es/BUILD.bazel b/packages/kbn-es/BUILD.bazel index 4b590b144759e..23ddda10f36e5 100644 --- a/packages/kbn-es/BUILD.bazel +++ b/packages/kbn-es/BUILD.bazel @@ -44,7 +44,7 @@ RUNTIME_DEPS = [ "@npm//del", "@npm//execa", "@npm//getopts", - "@npm//glob", + "@npm//globby", "@npm//node-fetch", "@npm//simple-git", "@npm//tree-kill", diff --git a/packages/kbn-es/src/utils/find_most_recently_changed.test.ts b/packages/kbn-es/src/utils/find_most_recently_changed.test.ts index 721e5baba7513..f70a1097b46f7 100644 --- a/packages/kbn-es/src/utils/find_most_recently_changed.test.ts +++ b/packages/kbn-es/src/utils/find_most_recently_changed.test.ts @@ -28,8 +28,11 @@ jest.mock('fs', () => ({ }; } }), - readdirSync: jest.fn().mockImplementation(() => { - return ['oldest.yml', 'newest.yml', 'middle.yml']; +})); + +jest.mock('globby', () => ({ + sync: jest.fn().mockImplementation(() => { + return ['/data/oldest.yml', '/data/newest.yml', '/data/middle.yml']; }), })); diff --git a/packages/kbn-es/src/utils/find_most_recently_changed.ts b/packages/kbn-es/src/utils/find_most_recently_changed.ts index 29e1edcc5fcc9..65d56c24d4689 100644 --- a/packages/kbn-es/src/utils/find_most_recently_changed.ts +++ b/packages/kbn-es/src/utils/find_most_recently_changed.ts @@ -8,7 +8,7 @@ import path from 'path'; import fs from 'fs'; -import glob from 'glob'; +import globby from 'globby'; /** * Find the most recently modified file that matches the pattern pattern @@ -20,8 +20,8 @@ export function findMostRecentlyChanged(pattern: string) { const ctime = (p: string) => fs.statSync(p).ctime.getTime(); - return glob - .sync(pattern) + return globby + .sync(pattern, { onlyFiles: false }) .sort((a, b) => ctime(a) - ctime(b)) .pop(); } diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 7883acc833ad3..71abf16bb8fcd 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -135,3 +135,4 @@ pageLoadAssetSize: kubernetesSecurity: 77234 threatIntelligence: 29195 files: 22673 + savedObjectsFinder: 21691 diff --git a/packages/kbn-performance-testing-dataset-extractor/src/cli.ts b/packages/kbn-performance-testing-dataset-extractor/src/cli.ts index 37be456d66aa1..435f87bcd5818 100644 --- a/packages/kbn-performance-testing-dataset-extractor/src/cli.ts +++ b/packages/kbn-performance-testing-dataset-extractor/src/cli.ts @@ -17,7 +17,7 @@ import { createFlagError } from '@kbn/dev-cli-errors'; import { EsVersion, readConfigFile } from '@kbn/test'; import path from 'path'; import { extractor } from './extractor'; -import { ScalabilitySetup } from './types'; +import { ScalabilitySetup, TestData } from './types'; interface Vars { [key: string]: string; @@ -64,6 +64,8 @@ export async function runExtractor() { ); } + const testData: TestData = config.get('testData'); + const env = config.get(`kbnTestServer.env`); if ( typeof env !== 'object' || @@ -103,7 +105,7 @@ export async function runExtractor() { const withoutStaticResources = !!flags['without-static-resources'] || false; return extractor({ - param: { journeyName, scalabilitySetup, buildId, withoutStaticResources }, + param: { journeyName, scalabilitySetup, testData, buildId, withoutStaticResources }, client: { baseURL, username, password }, log, }); diff --git a/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts b/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts index 992c93b16922d..e53bc45a17f1b 100644 --- a/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts +++ b/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts @@ -42,7 +42,7 @@ export const extractor = async ({ param, client, log }: CLIParams) => { username: client.username, password: client.password, }; - const { journeyName, scalabilitySetup, buildId, withoutStaticResources } = param; + const { journeyName, scalabilitySetup, testData, buildId, withoutStaticResources } = param; log.info( `Searching transactions with 'labels.testBuildId=${buildId}' and 'labels.journeyName=${journeyName}'` ); @@ -89,6 +89,7 @@ export const extractor = async ({ param, client, log }: CLIParams) => { journeyName, kibanaVersion, scalabilitySetup, + testData, streams: kibanaStreams, }, path.resolve(outputDir, 'server'), @@ -101,6 +102,7 @@ export const extractor = async ({ param, client, log }: CLIParams) => { { journeyName, kibanaVersion, + testData, streams: esStreams, }, path.resolve(outputDir, 'es'), diff --git a/packages/kbn-performance-testing-dataset-extractor/src/types.ts b/packages/kbn-performance-testing-dataset-extractor/src/types.ts index 1cd51f3388a7c..c0dad9757a183 100644 --- a/packages/kbn-performance-testing-dataset-extractor/src/types.ts +++ b/packages/kbn-performance-testing-dataset-extractor/src/types.ts @@ -43,10 +43,16 @@ export interface ScalabilitySetup { maxDuration: string; } +export interface TestData { + kbnArchives?: string[]; + esArchives?: string[]; +} + export interface CLIParams { param: { journeyName: string; scalabilitySetup: ScalabilitySetup; + testData: TestData; buildId: string; withoutStaticResources: boolean; }; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts index f69c172c9b7fe..7e45892c1aa96 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts +++ b/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts @@ -22,6 +22,15 @@ describe('exceptionListType', () => { expect(message.schema).toEqual(payload); }); + test('it should validate for "rule_default"', () => { + const payload = 'rule_default'; + const decoded = exceptionListType.decode(payload); + const message = pipe(decoded, foldLeftRight); + + expect(getPaths(left(message.errors))).toEqual([]); + expect(message.schema).toEqual(payload); + }); + test('it should validate for "endpoint"', () => { const payload = 'endpoint'; const decoded = exceptionListType.decode(payload); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts index 2f59e868c354f..a5f9e95f0dcf7 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts +++ b/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts @@ -10,6 +10,7 @@ import * as t from 'io-ts'; export const exceptionListType = t.keyof({ detection: null, + rule_default: null, endpoint: null, endpoint_trusted_apps: null, endpoint_events: null, @@ -21,6 +22,7 @@ export type ExceptionListType = t.TypeOf; export type ExceptionListTypeOrUndefined = t.TypeOf; export enum ExceptionListTypeEnum { DETECTION = 'detection', + RULE_DEFAULT = 'rule_default', ENDPOINT = 'endpoint', ENDPOINT_TRUSTED_APPS = 'endpoint', ENDPOINT_EVENTS = 'endpoint_events', diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/index.ts index fadf00fa7a40b..730c1f2cd491d 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/index.ts +++ b/packages/kbn-securitysolution-io-ts-list-types/src/common/index.ts @@ -13,6 +13,7 @@ export * from './created_by'; export * from './cursor'; export * from './default_namespace'; export * from './default_namespace_array'; +export * from './default_create_comments_array'; export * from './default_import_comments_array'; export * from './description'; export * from './deserializer'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts index c8145307153f4..a3fe64cb34a53 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts +++ b/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts @@ -86,7 +86,7 @@ describe('Lists', () => { const message = pipe(decoded, foldLeftRight); expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "1" supplied to "Array<{| id: NonEmptyString, list_id: NonEmptyString, type: "detection" | "endpoint" | "endpoint_trusted_apps" | "endpoint_events" | "endpoint_host_isolation_exceptions" | "endpoint_blocklists", namespace_type: "agnostic" | "single" |}>"', + 'Invalid value "1" supplied to "Array<{| id: NonEmptyString, list_id: NonEmptyString, type: "detection" | "rule_default" | "endpoint" | "endpoint_trusted_apps" | "endpoint_events" | "endpoint_host_isolation_exceptions" | "endpoint_blocklists", namespace_type: "agnostic" | "single" |}>"', ]); expect(message.schema).toEqual({}); }); @@ -117,8 +117,8 @@ describe('Lists', () => { const message = pipe(decoded, foldLeftRight); expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "1" supplied to "(Array<{| id: NonEmptyString, list_id: NonEmptyString, type: "detection" | "endpoint" | "endpoint_trusted_apps" | "endpoint_events" | "endpoint_host_isolation_exceptions" | "endpoint_blocklists", namespace_type: "agnostic" | "single" |}> | undefined)"', - 'Invalid value "[1]" supplied to "(Array<{| id: NonEmptyString, list_id: NonEmptyString, type: "detection" | "endpoint" | "endpoint_trusted_apps" | "endpoint_events" | "endpoint_host_isolation_exceptions" | "endpoint_blocklists", namespace_type: "agnostic" | "single" |}> | undefined)"', + 'Invalid value "1" supplied to "(Array<{| id: NonEmptyString, list_id: NonEmptyString, type: "detection" | "rule_default" | "endpoint" | "endpoint_trusted_apps" | "endpoint_events" | "endpoint_host_isolation_exceptions" | "endpoint_blocklists", namespace_type: "agnostic" | "single" |}> | undefined)"', + 'Invalid value "[1]" supplied to "(Array<{| id: NonEmptyString, list_id: NonEmptyString, type: "detection" | "rule_default" | "endpoint" | "endpoint_trusted_apps" | "endpoint_events" | "endpoint_host_isolation_exceptions" | "endpoint_blocklists", namespace_type: "agnostic" | "single" |}> | undefined)"', ]); expect(message.schema).toEqual({}); }); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.test.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.test.ts new file mode 100644 index 0000000000000..dbac0e47991d4 --- /dev/null +++ b/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.test.ts @@ -0,0 +1,126 @@ +/* + * 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 { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; +import { pipe } from 'fp-ts/lib/pipeable'; +import { left } from 'fp-ts/lib/Either'; +import { CreateRuleExceptionListItemSchema, createRuleExceptionListItemSchema } from '.'; +import { CreateExceptionListItemSchema } from '../create_exception_list_item_schema'; + +const getCreateExceptionListItemSchemaMock = (): CreateExceptionListItemSchema => ({ + comments: [], + description: 'some description', + entries: [ + { + field: 'host.name', + operator: 'included', + type: 'match_any', + value: ['foo', 'bar'], + }, + ], + item_id: undefined, + list_id: 'some-list-id', + name: 'some name', + namespace_type: 'single', + os_types: [], + tags: [], + type: 'simple', +}); + +describe('createRuleExceptionListItemSchema', () => { + test('empty objects do not validate', () => { + const payload = {} as CreateRuleExceptionListItemSchema; + + const decoded = createRuleExceptionListItemSchema.decode(payload); + const checked = exactCheck(payload, decoded); + const message = pipe(checked, foldLeftRight); + expect(getPaths(left(message.errors))).toEqual([ + 'Invalid value "undefined" supplied to "description"', + 'Invalid value "undefined" supplied to "entries"', + 'Invalid value "undefined" supplied to "name"', + 'Invalid value "undefined" supplied to "type"', + ]); + expect(message.schema).toEqual({}); + }); + + test('items without list_id validate', () => { + const payload: CreateRuleExceptionListItemSchema = { + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + type: 'simple', + }; + + const decoded = createRuleExceptionListItemSchema.decode(payload); + const checked = exactCheck(payload, decoded); + const message = pipe(checked, foldLeftRight); + + expect(getPaths(left(message.errors))).toEqual([]); + expect(message.schema).toEqual( + expect.objectContaining({ + comments: [], + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + os_types: [], + tags: [], + type: 'simple', + }) + ); + }); + + test('items with list_id do not validate', () => { + const payload = + getCreateExceptionListItemSchemaMock() as unknown as CreateRuleExceptionListItemSchema; + + const decoded = createRuleExceptionListItemSchema.decode(payload); + const checked = exactCheck(payload, decoded); + const message = pipe(checked, foldLeftRight); + expect(getPaths(left(message.errors))).toEqual([ + 'Invalid value "some-list-id" supplied to "list_id"', + ]); + expect(message.schema).toEqual({}); + }); + + test('made up parameters do not validate', () => { + const payload: Partial & { madeUp: string } = { + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + type: 'simple', + madeUp: 'invalid value', + }; + + const decoded = createRuleExceptionListItemSchema.decode(payload); + const checked = exactCheck(payload, decoded); + const message = pipe(checked, foldLeftRight); + expect(getPaths(left(message.errors))).toEqual(['invalid keys "madeUp"']); + expect(message.schema).toEqual({}); + }); +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts new file mode 100644 index 0000000000000..b710ffde0a6d8 --- /dev/null +++ b/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts @@ -0,0 +1,68 @@ +/* + * 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 * as t from 'io-ts'; +import { DefaultUuid } from '@kbn/securitysolution-io-ts-types'; + +import { + CreateCommentsArray, + DefaultCreateCommentsArray, + description, + EntriesArray, + exceptionListItemType, + ItemId, + meta, + NamespaceType, + namespaceType, + nonEmptyEntriesArray, + OsTypeArray, + osTypeArrayOrUndefined, + Tags, + tags, + name, +} from '../../common'; +import { RequiredKeepUndefined } from '../../common/required_keep_undefined'; + +export const createRuleExceptionListItemSchema = t.intersection([ + t.exact( + t.type({ + description, + entries: nonEmptyEntriesArray, + name, + type: exceptionListItemType, + }) + ), + t.exact( + t.partial({ + comments: DefaultCreateCommentsArray, // defaults to empty array if not set during decode + item_id: DefaultUuid, // defaults to GUID (uuid v4) if not set during decode + list_id: t.undefined, + meta, // defaults to undefined if not set during decode + namespace_type: namespaceType, // defaults to 'single' if not set during decode + os_types: osTypeArrayOrUndefined, // defaults to empty array if not set during decode + tags, // defaults to empty array if not set during decode + }) + ), +]); + +export type CreateRuleExceptionListItemSchema = t.OutputOf< + typeof createRuleExceptionListItemSchema +>; + +// This type is used after a decode since some things are defaults after a decode. +export type CreateRuleExceptionListItemSchemaDecoded = Omit< + RequiredKeepUndefined>, + 'tags' | 'item_id' | 'entries' | 'namespace_type' | 'comments' +> & { + comments: CreateCommentsArray; + tags: Tags; + item_id: ItemId; + entries: EntriesArray; + namespace_type: NamespaceType; + os_types: OsTypeArray; +}; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/index.ts index da8bd7ed8306e..8697f684c9356 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/index.ts +++ b/packages/kbn-securitysolution-io-ts-list-types/src/request/index.ts @@ -8,6 +8,7 @@ export * from './create_endpoint_list_item_schema'; export * from './create_exception_list_item_schema'; export * from './create_exception_list_schema'; +export * from './create_rule_exception_item_schema'; export * from './create_list_item_schema'; export * from './create_list_schema'; export * from './delete_endpoint_list_item_schema'; diff --git a/packages/kbn-spec-to-console/BUILD.bazel b/packages/kbn-spec-to-console/BUILD.bazel index 5805c5a4975c3..ee046c6194f7f 100644 --- a/packages/kbn-spec-to-console/BUILD.bazel +++ b/packages/kbn-spec-to-console/BUILD.bazel @@ -28,7 +28,9 @@ NPM_MODULE_EXTRA_FILES = [ "README.md", ] -RUNTIME_DEPS = [] +RUNTIME_DEPS = [ + "@npm//globby", +] js_library( name = PKG_BASE_NAME, diff --git a/packages/kbn-spec-to-console/bin/spec_to_console.js b/packages/kbn-spec-to-console/bin/spec_to_console.js index 21922054696f1..f50e8b5015d8f 100644 --- a/packages/kbn-spec-to-console/bin/spec_to_console.js +++ b/packages/kbn-spec-to-console/bin/spec_to_console.js @@ -9,7 +9,7 @@ const fs = require('fs'); const path = require('path'); const program = require('commander'); -const glob = require('glob'); +const globby = require('globby'); const chalk = require('chalk'); const packageJSON = require('../package.json'); @@ -26,7 +26,7 @@ if (!program.glob) { process.exit(1); } -const files = glob.sync(program.glob); +const files = globby.sync(program.glob); const totalFilesCount = files.length; let convertedFilesCount = 0; diff --git a/packages/kbn-telemetry-tools/BUILD.bazel b/packages/kbn-telemetry-tools/BUILD.bazel index c11a98c2ee3bc..b234f2dd6ea45 100644 --- a/packages/kbn-telemetry-tools/BUILD.bazel +++ b/packages/kbn-telemetry-tools/BUILD.bazel @@ -42,7 +42,7 @@ RUNTIME_DEPS = [ "//packages/kbn-eslint-plugin-imports", "//packages/kbn-utility-types", "//packages/kbn-utils", - "@npm//glob", + "@npm//globby", "@npm//listr", "@npm//normalize-path", ] @@ -52,8 +52,8 @@ TYPES_DEPS = [ "//packages/kbn-eslint-plugin-imports:npm_module_types", "//packages/kbn-utility-types:npm_module_types", "//packages/kbn-utils:npm_module_types", + "@npm//globby", "@npm//tslib", - "@npm//@types/glob", "@npm//@types/jest", "@npm//@types/listr", "@npm//@types/lodash", diff --git a/packages/kbn-telemetry-tools/src/tools/extract_collectors.ts b/packages/kbn-telemetry-tools/src/tools/extract_collectors.ts index aa69abc555b18..b9c34f5c35b1c 100644 --- a/packages/kbn-telemetry-tools/src/tools/extract_collectors.ts +++ b/packages/kbn-telemetry-tools/src/tools/extract_collectors.ts @@ -6,10 +6,10 @@ * Side Public License, v 1. */ +import globby from 'globby'; import * as ts from 'typescript'; import * as path from 'path'; import { parseUsageCollection } from './ts_parser'; -import { globAsync } from './utils'; import { TelemetryRC } from './config'; import { compilerHost } from './compiler_host'; @@ -17,21 +17,24 @@ export async function getProgramPaths({ root, exclude, }: Pick): Promise { - const filePaths = await globAsync('**/*.ts', { - cwd: root, - ignore: [ - '**/node_modules/**', - '**/*.test.*', - '**/*.mock.*', - '**/mocks.*', - '**/__fixture__/**', - '**/__tests__/**', - '**/public/**', - '**/dist/**', - '**/target/**', - '**/*.d.ts', + const filePaths = await globby( + [ + '**/*.ts', + '!**/node_modules/**', + '!**/*.test.*', + '!**/*.mock.*', + '!**/mocks.*', + '!**/__fixture__/**', + '!**/__tests__/**', + '!**/public/**', + '!**/dist/**', + '!**/target/**', + '!**/*.d.ts', ], - }); + { + cwd: root, + } + ); if (filePaths.length === 0) { throw Error(`No files found in ${root}`); diff --git a/packages/kbn-telemetry-tools/src/tools/utils.ts b/packages/kbn-telemetry-tools/src/tools/utils.ts index 074f9ff2d5f29..d4022ea51dfdc 100644 --- a/packages/kbn-telemetry-tools/src/tools/utils.ts +++ b/packages/kbn-telemetry-tools/src/tools/utils.ts @@ -20,7 +20,6 @@ import { isEqual, } from 'lodash'; import * as path from 'path'; -import glob from 'glob'; import { readFile, writeFile } from 'fs'; import { promisify } from 'util'; import normalize from 'normalize-path'; @@ -28,7 +27,6 @@ import { Optional } from '@kbn/utility-types'; export const readFileAsync = promisify(readFile); export const writeFileAsync = promisify(writeFile); -export const globAsync = promisify(glob); export function isPropertyWithKey(property: ts.Node, identifierName: string) { if (ts.isPropertyAssignment(property) || ts.isMethodDeclaration(property)) { diff --git a/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts b/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts index b3fd56a81029e..24cd482352930 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts @@ -246,6 +246,14 @@ export class KbnClientSavedObjects { 'inventory-view', 'infrastructure-monitoring-log-view', 'apm-indices', + // Fleet saved object types + 'ingest-outputs', + 'ingest-download-sources', + 'ingest-agent-policies', + 'ingest-package-policies', + 'epm-packages', + 'epm-packages-assets', + 'fleet-preconfiguration-deletion-record', ]; const newOptions = { types, space: options?.space }; diff --git a/scripts/archive_migration_functions.sh b/scripts/archive_migration_functions.sh old mode 100644 new mode 100755 index be8300ec022a2..71260352982a2 --- a/scripts/archive_migration_functions.sh +++ b/scripts/archive_migration_functions.sh @@ -1,12 +1,24 @@ #!/bin/bash +# ??? Should we migrate +# x-pack/test/functional/es_archives/dashboard/feature_controls/spaces +# ### Yes, it needs migration +# ### Saved Object type(s) that we care about: +# dashboard +# index-pattern +# visualization +# ### Test file(s) that use it: +# x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_spaces.ts +# ### Config(s) that govern the test file(s): +# x-pack/test/functional/apps/dashboard/group1/config.ts + standard_list="url,index-pattern,query,graph-workspace,tag,visualization,canvas-element,canvas-workpad,dashboard,search,lens,map,cases,uptime-dynamic-settings,osquery-saved-query,osquery-pack,infrastructure-ui-source,metrics-explorer-view,inventory-view,infrastructure-monitoring-log-view,apm-indices" -orig_archive="x-pack/test/functional/es_archives/dashboard/session_in_space" -new_archive="x-pack/test/functional/fixtures/kbn_archiver/dashboard/session_in_space" -newArchives=("x-pack/test/functional/fixtures/kbn_archiver/dashboard/session_in_space") -newArchives+=("x-pack/test/functional/fixtures/kbn_archiver/dashboard/session_in_another_space") -test_config="x-pack/test/search_sessions_integration/config.ts" +orig_archive="x-pack/test/functional/es_archives/dashboard/feature_controls/spaces" +new_archive="x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/custom_space" +newArchives=("x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/custom_space") +newArchives+=("x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce_kibana_non_timezone_space") +test_config="x-pack/test/functional/apps/dashboard/group1/config.ts" curl_so_count() { local so=${1:-search-session} @@ -73,6 +85,11 @@ delete_space() { --user elastic:changeme http://localhost:5620/api/spaces/space/"$id" } +# Just a note that this is using Gnu date. +# On OSX if you don't install this, and instead use the native date you only get seconds. +# With gdate you can something like nanoseconds. +alias timestamp='while read line; do echo "[`gdate +%H:%M:%S.%N`] $line"; done' + arrayify_csv() { local xs=${1} echo "$xs" | tr ',' '\n' | uniq | sort @@ -339,29 +356,42 @@ save_kbn() { load_kbn() { local space=${1:-default} - local archive=${2:-${new_archive}} set -x - node scripts/kbn_archiver.js --config "$test_config" load "$archive" --space "$space" + node scripts/kbn_archiver.js --config "$test_config" load "$new_archive" --space "$space" set +x } -unload_kbn() { - local archive=${1:-${new_archive}} +load_kbns() { + local space=${1:-default} + + for x in "${newArchives[@]}"; do + set -x + node scripts/kbn_archiver.js --config "$test_config" load "$x" --space "$space" + set +x + done +} + +load_created_kbn_archive() { set -x - node scripts/kbn_archiver.js --config "$test_config" unload "$archive" + node scripts/kbn_archiver.js --config "$test_config" load "$new_archive" set +x } -load_kbn_custom() { - load_kbn default "${newArchives[1]}" - create_space another-space "Another Space" - load_kbn another-space "${newArchives[2]}" +unload_kbn() { + set -x + node scripts/kbn_archiver.js --config "$test_config" unload "$new_archive" + set +x } -unload_kbn_custom() { - unload_kbn "${newArchives[1]}" - delete_space another-space +unload_kbns() { + local space=${1:-default} + + for x in "${newArchives[@]}"; do + set -x + node scripts/kbn_archiver.js --config "$test_config" unload "$x" + set +x + done } ping_server() { diff --git a/src/cli_plugin/install/download.test.js b/src/cli_plugin/install/download.test.js index 1b20ebcd606ea..a0b5a2e1ad8e4 100644 --- a/src/cli_plugin/install/download.test.js +++ b/src/cli_plugin/install/download.test.js @@ -12,7 +12,7 @@ import http from 'http'; import sinon from 'sinon'; import nock from 'nock'; -import glob from 'glob-all'; +import globby from 'globby'; import del from 'del'; import { Logger } from '../lib/logger'; @@ -33,12 +33,12 @@ describe('kibana cli', function () { const logger = new Logger(settings); function expectWorkingPathEmpty() { - const files = glob.sync('**/*', { cwd: testWorkingPath }); + const files = globby.sync('**/*', { cwd: testWorkingPath, onlyFiles: false }); expect(files).toEqual([]); } function expectWorkingPathNotEmpty() { - const files = glob.sync('**/*', { cwd: testWorkingPath }); + const files = globby.sync('**/*', { cwd: testWorkingPath, onlyFiles: false }); const expected = ['archive.part']; expect(files.sort()).toEqual(expected.sort()); diff --git a/src/cli_plugin/install/pack.test.js b/src/cli_plugin/install/pack.test.js index ddaf2773f5dd3..cbb8438770f50 100644 --- a/src/cli_plugin/install/pack.test.js +++ b/src/cli_plugin/install/pack.test.js @@ -10,7 +10,7 @@ import Fs from 'fs'; import { join } from 'path'; import sinon from 'sinon'; -import glob from 'glob-all'; +import globby from 'globby'; import del from 'del'; import { Logger } from '../lib/logger'; @@ -71,7 +71,8 @@ describe('kibana cli', function () { await getPackData(settings, logger); await extract(settings, logger); - expect(glob.sync('**/*', { cwd: testWorkingPath })).toMatchInlineSnapshot(` + expect(globby.sync('**/*', { cwd: testWorkingPath, onlyFiles: false }).sort()) + .toMatchInlineSnapshot(` Array [ "archive.part", "bin", diff --git a/src/cli_plugin/install/zip.test.js b/src/cli_plugin/install/zip.test.js index aa65bd8846a3a..cdeb345951731 100644 --- a/src/cli_plugin/install/zip.test.js +++ b/src/cli_plugin/install/zip.test.js @@ -11,7 +11,7 @@ import os from 'os'; import fs from 'fs'; import del from 'del'; -import glob from 'glob'; +import globby from 'globby'; import { analyzeArchive, extractArchive } from './zip'; @@ -53,18 +53,18 @@ describe('kibana cli', function () { const archive = path.resolve(repliesPath, 'test_plugin.zip'); await extractArchive(archive, tempPath, 'kibana/test-plugin'); - expect(glob.sync('**/*', { cwd: tempPath })).toMatchInlineSnapshot(` + expect(globby.sync('**/*', { cwd: tempPath, onlyFiles: false })).toMatchInlineSnapshot(` Array [ "bin", - "bin/executable", - "bin/not-executable", "kibana.json", "node_modules", + "public", + "bin/executable", + "bin/not-executable", "node_modules/some-package", + "public/index.js", "node_modules/some-package/index.js", "node_modules/some-package/package.json", - "public", - "public/index.js", ] `); }); @@ -76,7 +76,7 @@ describe('kibana cli', function () { await extractArchive(archivePath, tempPath, 'kibana/test-plugin/bin'); - expect(glob.sync('**/*', { cwd: tempPath })).toMatchInlineSnapshot(` + expect(globby.sync('**/*', { cwd: tempPath, onlyFiles: false })).toMatchInlineSnapshot(` Array [ "executable", "not-executable", diff --git a/src/cli_plugin/remove/remove.test.js b/src/cli_plugin/remove/remove.test.js index 6a69519eccc7c..29309b7391b03 100644 --- a/src/cli_plugin/remove/remove.test.js +++ b/src/cli_plugin/remove/remove.test.js @@ -10,7 +10,7 @@ import { join } from 'path'; import { writeFileSync, existsSync, mkdirSync } from 'fs'; import sinon from 'sinon'; -import glob from 'glob-all'; +import globby from 'globby'; import del from 'del'; import { Logger } from '../lib/logger'; @@ -82,8 +82,7 @@ describe('kibana cli', function () { mkdirSync(join(pluginDir, 'bar'), { recursive: true }); remove(settings, logger); - - const files = glob.sync('**/*', { cwd: pluginDir }); + const files = globby.sync('**/*', { cwd: pluginDir, onlyFiles: false }); const expected = ['bar']; expect(files.sort()).toEqual(expected.sort()); }); diff --git a/src/core/public/_banners_list.scss b/src/core/public/_banners_list.scss deleted file mode 100644 index 3d10a71c84a95..0000000000000 --- a/src/core/public/_banners_list.scss +++ /dev/null @@ -1,3 +0,0 @@ -.kbnGlobalBannerList__item + .kbnGlobalBannerList__item { - margin-top: $euiSizeS; -} diff --git a/src/core/public/_mount_wrapper.scss b/src/core/public/_mount_wrapper.scss deleted file mode 100644 index aafcc4bbe87db..0000000000000 --- a/src/core/public/_mount_wrapper.scss +++ /dev/null @@ -1,5 +0,0 @@ -.kbnOverlayMountWrapper { - display: flex; - flex-direction: column; - height: 100%; -} diff --git a/src/core/public/chrome/_index.scss b/src/core/public/chrome/_index.scss deleted file mode 100644 index a51fde079f10b..0000000000000 --- a/src/core/public/chrome/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import './ui/index'; diff --git a/src/core/public/chrome/ui/_index.scss b/src/core/public/chrome/ui/_index.scss deleted file mode 100644 index ae15be89f2e93..0000000000000 --- a/src/core/public/chrome/ui/_index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import './header/index'; -@import './loading_indicator'; diff --git a/src/core/public/chrome/ui/header/index.ts b/src/core/public/chrome/ui/header/index.ts deleted file mode 100644 index 633555ced16d0..0000000000000 --- a/src/core/public/chrome/ui/header/index.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 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 { Header } from './header'; -export type { HeaderProps } from './header'; -export type { OnIsLockedUpdate, NavType } from './types'; -export type { - ChromeHelpExtensionLinkBase, - ChromeHelpExtensionMenuLink, - ChromeHelpExtensionMenuCustomLink, - ChromeHelpExtensionMenuDiscussLink, - ChromeHelpExtensionMenuDocumentationLink, - ChromeHelpExtensionMenuGitHubLink, -} from './header_help_menu'; diff --git a/src/core/public/core_system.test.mocks.ts b/src/core/public/core_system.test.mocks.ts index 8c89b21452472..6018e9765399a 100644 --- a/src/core/public/core_system.test.mocks.ts +++ b/src/core/public/core_system.test.mocks.ts @@ -11,7 +11,7 @@ import { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks'; import { themeServiceMock } from '@kbn/core-theme-browser-mocks'; import { analyticsServiceMock } from '@kbn/core-analytics-browser-mocks'; import { applicationServiceMock } from '@kbn/core-application-browser-mocks'; -import { chromeServiceMock } from './chrome/chrome_service.mock'; +import { chromeServiceMock } from '@kbn/core-chrome-browser-mocks'; import { fatalErrorsServiceMock } from '@kbn/core-fatal-errors-browser-mocks'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; @@ -82,7 +82,7 @@ jest.doMock('@kbn/core-ui-settings-browser-internal', () => ({ export const MockChromeService = chromeServiceMock.create(); export const ChromeServiceConstructor = jest.fn().mockImplementation(() => MockChromeService); -jest.doMock('./chrome', () => ({ +jest.doMock('@kbn/core-chrome-browser-internal', () => ({ ChromeService: ChromeServiceConstructor, })); diff --git a/src/core/public/core_system.ts b/src/core/public/core_system.ts index aa29d40e63830..98784292c7bf0 100644 --- a/src/core/public/core_system.ts +++ b/src/core/public/core_system.ts @@ -31,6 +31,7 @@ import { OverlayService } from '@kbn/core-overlays-browser-internal'; import { KBN_LOAD_MARKS } from '@kbn/core-mount-utils-browser-internal'; import { SavedObjectsService } from '@kbn/core-saved-objects-browser-internal'; import { NotificationsService } from '@kbn/core-notifications-browser-internal'; +import { ChromeService } from '@kbn/core-chrome-browser-internal'; import { ApplicationService, type InternalApplicationSetup, @@ -38,7 +39,6 @@ import { } from '@kbn/core-application-browser-internal'; import { fetchOptionalMemoryInfo } from './fetch_optional_memory_info'; import { CoreSetup, CoreStart } from '.'; -import { ChromeService } from './chrome'; import { PluginsService } from './plugins'; import { RenderingService } from './rendering'; import { CoreApp } from './core_app'; diff --git a/src/core/public/index.scss b/src/core/public/index.scss index cacca8e4ca2e7..325265c5c48b0 100644 --- a/src/core/public/index.scss +++ b/src/core/public/index.scss @@ -1,8 +1,5 @@ @import './variables'; @import './mixins'; @import './core'; -@import './chrome/index'; -@import './banners_list'; -@import './mount_wrapper'; @import './rendering/index'; @import './styles/index'; diff --git a/src/core/public/index.ts b/src/core/public/index.ts index ff9d1c085c43b..9eba054ab5302 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -68,9 +68,8 @@ import type { ChromeRecentlyAccessed, ChromeRecentlyAccessedHistoryItem, ChromeUserBanner, - NavType, ChromeHelpMenuActions, -} from './chrome'; +} from '@kbn/core-chrome-browser'; import type { Plugin, PluginInitializer, @@ -362,7 +361,6 @@ export type { PluginOpaqueId, IUiSettingsClient, UiSettingsState, - NavType, }; export { __kbnBootstrap__ } from './kbn_bootstrap'; diff --git a/src/core/public/mocks.ts b/src/core/public/mocks.ts index 0d5a2ed98a3a0..82c5662434271 100644 --- a/src/core/public/mocks.ts +++ b/src/core/public/mocks.ts @@ -24,15 +24,14 @@ import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { applicationServiceMock } from '@kbn/core-application-browser-mocks'; import { CoreScopedHistory } from '@kbn/core-application-browser-internal'; import type { AppMountParameters } from '@kbn/core-application-browser'; +import { chromeServiceMock } from '@kbn/core-chrome-browser-mocks'; import type { PluginInitializerContext } from '.'; -// Import values from their individual modules instead. -import { chromeServiceMock } from './chrome/chrome_service.mock'; export { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks'; export { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks'; export { themeServiceMock } from '@kbn/core-theme-browser-mocks'; export { analyticsServiceMock } from '@kbn/core-analytics-browser-mocks'; -export { chromeServiceMock } from './chrome/chrome_service.mock'; +export { chromeServiceMock } from '@kbn/core-chrome-browser-mocks'; export { executionContextServiceMock } from '@kbn/core-execution-context-browser-mocks'; export { fatalErrorsServiceMock } from '@kbn/core-fatal-errors-browser-mocks'; export { httpServiceMock } from '@kbn/core-http-browser-mocks'; diff --git a/src/core/public/plugins/plugins_service.test.ts b/src/core/public/plugins/plugins_service.test.ts index 29bda57479a61..78f27f0c31a54 100644 --- a/src/core/public/plugins/plugins_service.test.ts +++ b/src/core/public/plugins/plugins_service.test.ts @@ -32,7 +32,7 @@ import type { InjectedMetadataPlugin } from '@kbn/core-injected-metadata-common- import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { applicationServiceMock } from '@kbn/core-application-browser-mocks'; import { overlayServiceMock } from '@kbn/core-overlays-browser-mocks'; -import { chromeServiceMock } from '../chrome/chrome_service.mock'; +import { chromeServiceMock } from '@kbn/core-chrome-browser-mocks'; import { fatalErrorsServiceMock } from '@kbn/core-fatal-errors-browser-mocks'; import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; diff --git a/src/core/public/rendering/rendering_service.test.tsx b/src/core/public/rendering/rendering_service.test.tsx index 0056fa3da4ef0..9c63fea250c38 100644 --- a/src/core/public/rendering/rendering_service.test.tsx +++ b/src/core/public/rendering/rendering_service.test.tsx @@ -12,7 +12,7 @@ import { BehaviorSubject } from 'rxjs'; import { RenderingService } from './rendering_service'; import { applicationServiceMock } from '@kbn/core-application-browser-mocks'; -import { chromeServiceMock } from '../chrome/chrome_service.mock'; +import { chromeServiceMock } from '@kbn/core-chrome-browser-mocks'; import { overlayServiceMock } from '@kbn/core-overlays-browser-mocks'; import { themeServiceMock } from '@kbn/core-theme-browser-mocks'; import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; diff --git a/src/core/public/rendering/rendering_service.tsx b/src/core/public/rendering/rendering_service.tsx index 2cf7118dd130a..89397191a8b2b 100644 --- a/src/core/public/rendering/rendering_service.tsx +++ b/src/core/public/rendering/rendering_service.tsx @@ -15,7 +15,7 @@ import type { I18nStart } from '@kbn/core-i18n-browser'; import { CoreContextProvider } from '@kbn/core-theme-browser-internal'; import type { OverlayStart } from '@kbn/core-overlays-browser'; import type { InternalApplicationStart } from '@kbn/core-application-browser-internal'; -import type { InternalChromeStart } from '../chrome'; +import type { InternalChromeStart } from '@kbn/core-chrome-browser-internal'; import { AppWrapper } from './app_containers'; export interface StartDeps { diff --git a/src/core/public/styles/_index.scss b/src/core/public/styles/_index.scss index 600414402c278..324e238625683 100644 --- a/src/core/public/styles/_index.scss +++ b/src/core/public/styles/_index.scss @@ -1,2 +1,3 @@ @import './base'; @import './ace_overrides'; +@import './chrome/index'; diff --git a/src/core/public/chrome/ui/header/_banner.scss b/src/core/public/styles/chrome/_banner.scss similarity index 100% rename from src/core/public/chrome/ui/header/_banner.scss rename to src/core/public/styles/chrome/_banner.scss diff --git a/src/core/public/chrome/ui/header/_index.scss b/src/core/public/styles/chrome/_index.scss similarity index 100% rename from src/core/public/chrome/ui/header/_index.scss rename to src/core/public/styles/chrome/_index.scss diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 3a4452aebebd8..0df6254f728e8 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -66,12 +66,13 @@ import type { } from '@kbn/core-saved-objects-server'; import { DeprecationsServiceSetup } from '@kbn/core-deprecations-server'; +import { I18nServiceSetup } from '@kbn/core-i18n-server'; import { HttpResources } from './http_resources'; import { PluginsServiceSetup, PluginsServiceStart, PluginOpaqueId } from './plugins'; import { UiSettingsServiceSetup, UiSettingsServiceStart } from './ui_settings'; import { StatusServiceSetup } from './status'; import { CoreUsageDataStart, CoreUsageDataSetup } from './core_usage_data'; -import { I18nServiceSetup } from './i18n'; + // Because of #79265 we need to explicitly import, then export these types for // scripts/telemetry_check.js to work as expected import { @@ -425,7 +426,7 @@ export type { } from '@kbn/core-metrics-server'; export { EventLoopDelaysMonitor } from '@kbn/core-metrics-collectors-server-internal'; -export type { I18nServiceSetup } from './i18n'; +export type { I18nServiceSetup } from '@kbn/core-i18n-server'; export type { RegisterDeprecationsConfig, GetDeprecationsContext, diff --git a/src/core/server/internal_types.ts b/src/core/server/internal_types.ts index ac8cbed641da1..cf073cb50f320 100644 --- a/src/core/server/internal_types.ts +++ b/src/core/server/internal_types.ts @@ -49,6 +49,7 @@ import { InternalDeprecationsServiceSetup, InternalDeprecationsServiceStart, } from '@kbn/core-deprecations-server-internal'; +import { I18nServiceSetup } from '@kbn/core-i18n-server'; import { InternalUiSettingsServicePreboot, InternalUiSettingsServiceSetup, @@ -58,7 +59,6 @@ import { InternalRenderingServiceSetup } from './rendering'; import { InternalHttpResourcesPreboot, InternalHttpResourcesSetup } from './http_resources'; import { InternalStatusServiceSetup } from './status'; import { CoreUsageDataStart, InternalCoreUsageDataSetup } from './core_usage_data'; -import { I18nServiceSetup } from './i18n'; /** @internal */ export interface InternalCorePreboot { diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 6c1019e2cf77f..033aecba8ae26 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -27,6 +27,8 @@ import { typeRegistryMock as savedObjectsTypeRegistryMock } from '@kbn/core-save import { savedObjectsServiceMock } from '@kbn/core-saved-objects-server-mocks'; import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; import { deprecationsServiceMock } from '@kbn/core-deprecations-server-mocks'; +import { i18nServiceMock } from '@kbn/core-i18n-server-mocks'; + import type { PluginInitializerContext, CoreSetup, @@ -41,7 +43,6 @@ import { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock'; import { SharedGlobalConfig } from './plugins'; import { statusServiceMock } from './status/status_service.mock'; import { coreUsageDataServiceMock } from './core_usage_data/core_usage_data_service.mock'; -import { i18nServiceMock } from './i18n/i18n_service.mock'; export { configServiceMock, configDeprecationsMock } from '@kbn/config-mocks'; export { loggingSystemMock } from '@kbn/core-logging-server-mocks'; @@ -63,7 +64,7 @@ export { contextServiceMock } from '@kbn/core-http-context-server-mocks'; export { capabilitiesServiceMock } from '@kbn/core-capabilities-server-mocks'; export { deprecationsServiceMock } from '@kbn/core-deprecations-server-mocks'; export { coreUsageDataServiceMock } from './core_usage_data/core_usage_data_service.mock'; -export { i18nServiceMock } from './i18n/i18n_service.mock'; +export { i18nServiceMock } from '@kbn/core-i18n-server-mocks'; export { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; export { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks'; export { analyticsServiceMock } from '@kbn/core-analytics-server-mocks'; diff --git a/src/core/server/server.test.mocks.ts b/src/core/server/server.test.mocks.ts index f63e6bd2481e7..a6cce9aafde23 100644 --- a/src/core/server/server.test.mocks.ts +++ b/src/core/server/server.test.mocks.ts @@ -103,10 +103,10 @@ jest.doMock('@kbn/core-logging-server-internal', () => ({ LoggingService: jest.fn(() => mockLoggingService), })); -import { i18nServiceMock } from './i18n/i18n_service.mock'; +import { i18nServiceMock } from '@kbn/core-i18n-server-mocks'; export const mockI18nService = i18nServiceMock.create(); -jest.doMock('./i18n/i18n_service', () => ({ +jest.doMock('@kbn/core-i18n-server-internal', () => ({ I18nService: jest.fn(() => mockI18nService), })); diff --git a/src/core/server/server.ts b/src/core/server/server.ts index dbfbbe261da5e..d4fde1d875912 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -50,12 +50,12 @@ import { savedObjectsMigrationConfig, } from '@kbn/core-saved-objects-base-server-internal'; import { SavedObjectsService } from '@kbn/core-saved-objects-server-internal'; +import { I18nService, config as i18nConfig } from '@kbn/core-i18n-server-internal'; import { DeprecationsService, config as deprecationConfig, } from '@kbn/core-deprecations-server-internal'; import { CoreApp } from './core_app'; -import { I18nService } from './i18n'; import { HttpResourcesService } from './http_resources'; import { RenderingService } from './rendering'; import { UiSettingsService } from './ui_settings'; @@ -65,7 +65,6 @@ import { PluginsService, config as pluginsConfig } from './plugins'; import { StatusService } from './status/status_service'; import { config as uiSettingsConfig } from './ui_settings'; import { config as statusConfig } from './status'; -import { config as i18nConfig } from './i18n'; import { InternalCorePreboot, InternalCoreSetup, InternalCoreStart } from './internal_types'; import { CoreUsageDataService } from './core_usage_data'; import { CoreRouteHandlerContext } from './core_route_handler_context'; diff --git a/src/dev/build/lib/archive_utils.ts b/src/dev/build/lib/archive_utils.ts new file mode 100644 index 0000000000000..b1d79e58b6329 --- /dev/null +++ b/src/dev/build/lib/archive_utils.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 fs from 'fs'; +import yauzl from 'yauzl'; +import yazl from 'yazl'; + +// The utilities in this file are largely copied with minor modifications from +// `x-pack/plugins/fleet/server/services/epm/extract.ts`. We can't import them directly +// in the bundled package task due to tsconfig limitation, so they're copied here instead. + +export interface ZipEntry { + path: string; + buffer?: Buffer; +} + +export async function unzipBuffer(buffer: Buffer): Promise { + const zipEntries: ZipEntry[] = []; + const zipfile = await yauzlFromBuffer(buffer, { lazyEntries: true }); + + zipfile.readEntry(); + zipfile.on('entry', async (entry: yauzl.Entry) => { + const path = entry.fileName; + + // Only include files, not directories + if (path.endsWith('/')) { + return zipfile.readEntry(); + } + + const entryBuffer = await getZipReadStream(zipfile, entry).then(streamToBuffer); + zipEntries.push({ buffer: entryBuffer, path }); + + zipfile.readEntry(); + }); + + await new Promise((resolve, reject) => zipfile.on('end', resolve).on('error', reject)); + + return zipEntries; +} + +export async function createZipFile(entries: ZipEntry[], destination: string): Promise { + const zipfile = new yazl.ZipFile(); + + for (const entry of entries) { + zipfile.addBuffer(entry.buffer || Buffer.from(''), entry.path); + } + + return new Promise((resolve, reject) => { + zipfile.outputStream.on('error', reject); + + zipfile.end(); + + zipfile.outputStream + .pipe(fs.createWriteStream(destination)) + .on('close', resolve) + .on('error', reject); + }); +} + +// Copied over some utilities from x-pack/plugins/fleet/server/services/epm/archive/extract.ts since we can't +// import them directly due to `tsconfig` limitations in the `kibana/src/` directory. +function yauzlFromBuffer(buffer: Buffer, opts: yauzl.Options): Promise { + return new Promise((resolve, reject) => + yauzl.fromBuffer(buffer, opts, (err?: Error, handle?: yauzl.ZipFile) => + err ? reject(err) : resolve(handle!) + ) + ); +} + +function getZipReadStream( + zipfile: yauzl.ZipFile, + entry: yauzl.Entry +): Promise { + return new Promise((resolve, reject) => + zipfile.openReadStream(entry, (err?: Error, readStream?: NodeJS.ReadableStream) => + err ? reject(err) : resolve(readStream!) + ) + ); +} + +function streamToBuffer(stream: NodeJS.ReadableStream): Promise { + return new Promise((resolve, reject) => { + const chunks: Buffer[] = []; + stream.on('data', (chunk) => chunks.push(Buffer.from(chunk))); + stream.on('end', () => resolve(Buffer.concat(chunks))); + stream.on('error', reject); + }); +} diff --git a/src/dev/build/lib/index.ts b/src/dev/build/lib/index.ts index 4d8435c60824e..b8557981d9a1b 100644 --- a/src/dev/build/lib/index.ts +++ b/src/dev/build/lib/index.ts @@ -17,3 +17,4 @@ export * from './scan_delete'; export * from './scan_copy'; export * from './platform'; export * from './scan'; +export * from './archive_utils'; diff --git a/src/dev/build/tasks/bundle_fleet_packages.ts b/src/dev/build/tasks/bundle_fleet_packages.ts index b2faed818b55b..4ba5e79d29928 100644 --- a/src/dev/build/tasks/bundle_fleet_packages.ts +++ b/src/dev/build/tasks/bundle_fleet_packages.ts @@ -7,15 +7,18 @@ */ import JSON5 from 'json5'; +import fs from 'fs/promises'; +import { safeLoad, safeDump } from 'js-yaml'; import { readCliArgs } from '../args'; -import { Task, read, downloadToDisk } from '../lib'; +import { Task, read, downloadToDisk, unzipBuffer, createZipFile } from '../lib'; const BUNDLED_PACKAGES_DIR = 'x-pack/plugins/fleet/target/bundled_packages'; interface FleetPackage { name: string; version: string; + forceAlignStackVersion?: boolean; } export const BundleFleetPackages: Task = { @@ -25,8 +28,7 @@ export const BundleFleetPackages: Task = { log.info('Fetching fleet packages from package registry'); log.indent(4); - // Support the `--use-snapshot-epr` command line argument to fetch from the snapshot registry - // in development or test environments + // Support the `--epr-registry` command line argument to fetch from the snapshot or production registry const { buildOptions } = readCliArgs(process.argv); const eprUrl = buildOptions?.eprRegistry === 'snapshot' @@ -40,13 +42,28 @@ export const BundleFleetPackages: Task = { log.debug( `Found configured bundled packages: ${parsedFleetPackages - .map((fleetPackage) => `${fleetPackage.name}-${fleetPackage.version}`) + .map((fleetPackage) => `${fleetPackage.name}-${fleetPackage.version || 'latest'}`) .join(', ')}` ); await Promise.all( parsedFleetPackages.map(async (fleetPackage) => { - const archivePath = `${fleetPackage.name}-${fleetPackage.version}.zip`; + const stackVersion = config.getBuildVersion(); + + let versionToWrite = fleetPackage.version; + + // If `forceAlignStackVersion` is set, we will rewrite the version specified in the config + // to the version of the stack when writing the bundled package to disk. This allows us + // to support some unique package development workflows, e.g. APM. + if (fleetPackage.forceAlignStackVersion) { + versionToWrite = stackVersion; + + log.debug( + `Bundling ${fleetPackage.name}-${fleetPackage.version} as ${fleetPackage.name}-${stackVersion} to align with stack version` + ); + } + + const archivePath = `${fleetPackage.name}-${versionToWrite}.zip`; const archiveUrl = `${eprUrl}/epr/${fleetPackage.name}/${fleetPackage.name}-${fleetPackage.version}.zip`; const destination = build.resolvePath(BUNDLED_PACKAGES_DIR, archivePath); @@ -61,9 +78,42 @@ export const BundleFleetPackages: Task = { skipChecksumCheck: true, maxAttempts: 3, }); + + // If we're force aligning the version, we need to + // 1. Unzip the downloaded archive + // 2. Edit the `manifest.yml` file to include the updated `version` value + // 3. Re-zip the archive and replace it on disk + if (fleetPackage.forceAlignStackVersion) { + const buffer = await fs.readFile(destination); + const zipEntries = await unzipBuffer(buffer); + + const manifestPath = `${fleetPackage.name}-${fleetPackage.version}/manifest.yml`; + const manifestEntry = zipEntries.find((entry) => entry.path === manifestPath); + + if (!manifestEntry || !manifestEntry.buffer) { + log.debug( + `Unable to find manifest.yml for stack aligned package ${fleetPackage.name}` + ); + + return; + } + + const manifestYml = await safeLoad(manifestEntry.buffer.toString('utf8')); + manifestYml.version = stackVersion; + + const newManifestYml = safeDump(manifestYml); + manifestEntry.buffer = Buffer.from(newManifestYml, 'utf8'); + + // Update all paths to use the new version + zipEntries.forEach( + (entry) => (entry.path = entry.path.replace(fleetPackage.version, versionToWrite!)) + ); + + await createZipFile(zipEntries, destination); + } } catch (error) { - log.warning(`Failed to download bundled package archive ${archivePath}`); - log.warning(error); + log.error(`Failed to download bundled package archive ${archivePath}`); + throw error; } }) ); diff --git a/src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js b/src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js index 8ec97d3fbd385..6d5962f7f51e8 100644 --- a/src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js +++ b/src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js @@ -21,11 +21,8 @@ describe(`enumeratePatterns`, () => { new Map([['x-pack/plugins/screenshotting', ['kibana-screenshotting']]]) ); - expect(actual).toHaveProperty( - '0', - expect.arrayContaining([ - 'x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting', - ]) + expect(actual.flat()).toContain( + 'x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting' ); }); it(`should resolve src/plugins/charts/common/static/color_maps/color_maps.ts to kibana-app`, () => { @@ -33,18 +30,15 @@ describe(`enumeratePatterns`, () => { new Map([['src/plugins/charts/common/static/color_maps', ['kibana-app']]]) ); - expect(actual[0][0]).toBe( + expect(actual.flat()).toContain( 'src/plugins/charts/common/static/color_maps/color_maps.ts kibana-app' ); }); it(`should resolve x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout/translations.ts to kibana-security`, () => { - const short = 'x-pack/plugins/security_solution'; + const short = + 'x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout'; const actual = enumeratePatterns(REPO_ROOT)(log)(new Map([[short, ['kibana-security']]])); - expect( - actual[0].includes( - `${short}/public/common/components/exceptions/edit_exception_flyout/translations.ts kibana-security` - ) - ).toBe(true); + expect(actual.flat()).toContain(`${short}/translations.ts kibana-security`); }); }); diff --git a/src/dev/code_coverage/ingest_coverage/team_assignment/enumeration_helpers.js b/src/dev/code_coverage/ingest_coverage/team_assignment/enumeration_helpers.js index f7e74cc828290..2c1bee52bdef3 100644 --- a/src/dev/code_coverage/ingest_coverage/team_assignment/enumeration_helpers.js +++ b/src/dev/code_coverage/ingest_coverage/team_assignment/enumeration_helpers.js @@ -7,23 +7,21 @@ */ import { statSync } from 'fs'; -import isGlob from 'is-glob'; -import glob from 'glob'; +import globby from 'globby'; import { left, right, tryCatch } from '../either'; import { taMark } from '../utils'; export const push = (xs) => (x) => xs.push(x); export const pathExists = (x) => tryCatch(() => statSync(x)).fold(left, right); export const isDir = (x) => statSync(x).isDirectory(); -export const prokGlob = (x) => glob.sync(x, { nonull: true }); +export const prokGlob = (x) => globby.sync(x); export const trim = (ROOT) => (x) => x.replace(`${ROOT}/`, ''); export const isFileAllowed = (x) => /.(j|t)(s|sx)$/gm.test(x); export const isRejectedDir = (x) => /node_modules|__tests__|__fixture__|__fixtures__|build\//gm.test(x); -const isGlobFound = (x) => (xs) => x === xs[0] ? false : true; -export const globExpands = (x) => isGlobFound(x)(prokGlob(x)); +export const globExpands = (x) => Boolean(prokGlob(x).length); export const tryPath = (x) => { - const isAGlob = isGlob(x); + const isAGlob = globby.hasMagic(x); if (isAGlob) return globExpands(x) ? right(x) : left(x); diff --git a/src/dev/i18n/extract_default_translations.js b/src/dev/i18n/extract_default_translations.js index 59220a285d6f5..c52e14ca222d1 100644 --- a/src/dev/i18n/extract_default_translations.js +++ b/src/dev/i18n/extract_default_translations.js @@ -7,9 +7,10 @@ */ import path from 'path'; +import globby from 'globby'; import { extractCodeMessages } from './extractors'; -import { globAsync, readFileAsync, normalizePath } from './utils'; +import { readFileAsync, normalizePath } from './utils'; import { createFailError, isFailError } from '@kbn/dev-cli-errors'; @@ -58,13 +59,14 @@ export async function matchEntriesWithExctractors(inputPath, options = {}) { '**/build/**', '**/*.test.{js,jsx,ts,tsx}', '**/*.d.ts', - ].concat(additionalIgnore); + ] + .concat(additionalIgnore) + .map((i) => `!${i}`); - const entries = await globAsync('*.{js,jsx,ts,tsx}', { + const entries = await globby(['*.{js,jsx,ts,tsx}', ...ignore], { cwd: inputPath, - matchBase: true, - ignore, - mark, + baseNameMatch: true, + markDirectories: mark, absolute, }); diff --git a/src/dev/i18n/utils/index.ts b/src/dev/i18n/utils/index.ts index 38a472121fd65..f350999ba47cf 100644 --- a/src/dev/i18n/utils/index.ts +++ b/src/dev/i18n/utils/index.ts @@ -12,7 +12,6 @@ export { writeFileAsync, makeDirAsync, accessAsync, - globAsync, // functions normalizePath, difference, diff --git a/src/dev/i18n/utils/utils.js b/src/dev/i18n/utils/utils.js index ce688a0a2c07a..5d9338bf1e7b7 100644 --- a/src/dev/i18n/utils/utils.js +++ b/src/dev/i18n/utils/utils.js @@ -18,7 +18,6 @@ import { isBinaryExpression, } from '@babel/types'; import fs from 'fs'; -import glob from 'glob'; import { promisify } from 'util'; import normalize from 'normalize-path'; import path from 'path'; @@ -37,7 +36,6 @@ export const readFileAsync = promisify(fs.readFile); export const writeFileAsync = promisify(fs.writeFile); export const makeDirAsync = promisify(fs.mkdir); export const accessAsync = promisify(fs.access); -export const globAsync = promisify(glob); export function normalizePath(inputPath) { return normalize(path.relative('.', inputPath)); diff --git a/src/dev/notice/bundled_notices.js b/src/dev/notice/bundled_notices.js index 00b044e9053f7..8af0f74bf721c 100644 --- a/src/dev/notice/bundled_notices.js +++ b/src/dev/notice/bundled_notices.js @@ -8,15 +8,12 @@ import { resolve } from 'path'; import { readFile } from 'fs/promises'; -import { promisify } from 'util'; -import glob from 'glob'; - -const globAsync = promisify(glob); +import globby from 'globby'; export async function getBundledNotices(packageDirectory) { const pattern = resolve(packageDirectory, '*{LICENSE,NOTICE}*'); - const paths = await globAsync(pattern); + const paths = await globby(pattern); return Promise.all( paths.map(async (path) => ({ path, diff --git a/src/plugins/console/server/services/spec_definitions_service.ts b/src/plugins/console/server/services/spec_definitions_service.ts index e0af9422666af..b5515ed1308fa 100644 --- a/src/plugins/console/server/services/spec_definitions_service.ts +++ b/src/plugins/console/server/services/spec_definitions_service.ts @@ -7,7 +7,7 @@ */ import _, { merge } from 'lodash'; -import glob from 'glob'; +import globby from 'globby'; import { basename, join, resolve } from 'path'; import { readFileSync } from 'fs'; @@ -115,8 +115,8 @@ export class SpecDefinitionsService { } private loadJSONSpecInDir(dirname: string) { - const generatedFiles = glob.sync(join(dirname, 'generated', '*.json')); - const overrideFiles = glob.sync(join(dirname, 'overrides', '*.json')); + const generatedFiles = globby.sync(join(dirname, 'generated', '*.json')); + const overrideFiles = globby.sync(join(dirname, 'overrides', '*.json')); return generatedFiles.reduce((acc, file) => { const overrideFile = overrideFiles.find((f) => basename(f) === basename(file)); diff --git a/src/plugins/discover/kibana.json b/src/plugins/discover/kibana.json index 78e5265bcb3ac..b691962bb582e 100644 --- a/src/plugins/discover/kibana.json +++ b/src/plugins/discover/kibana.json @@ -13,11 +13,20 @@ "navigation", "uiActions", "savedObjects", + "savedObjectsFinder", + "savedObjectsManagement", "dataViewFieldEditor", "dataViewEditor", "expressions" ], - "optionalPlugins": ["home", "share", "usageCollection", "spaces", "triggersActionsUi"], + "optionalPlugins": [ + "home", + "share", + "usageCollection", + "spaces", + "triggersActionsUi", + "savedObjectsTaggingOss" + ], "requiredBundles": ["kibanaUtils", "kibanaReact", "dataViews", "unifiedSearch", "savedSearch"], "extraPublicDirs": ["common"], "owner": { diff --git a/src/plugins/discover/public/__mocks__/services.ts b/src/plugins/discover/public/__mocks__/services.ts index ae361d961a6e8..a6c95405ccd5d 100644 --- a/src/plugins/discover/public/__mocks__/services.ts +++ b/src/plugins/discover/public/__mocks__/services.ts @@ -113,4 +113,5 @@ export const discoverServiceMock = { addWarning: jest.fn(), }, expressions: expressionsPlugin, + savedObjectsTagging: {}, } as unknown as DiscoverServices; diff --git a/src/plugins/discover/public/application/main/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap b/src/plugins/discover/public/application/main/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap index 6043a5d382598..7153724203adb 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap +++ b/src/plugins/discover/public/application/main/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap @@ -22,7 +22,7 @@ exports[`OpenSearchPanel render 1`] = ` - diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx index e308b41219df8..66208e08c0ba0 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx @@ -6,37 +6,160 @@ * Side Public License, v 1. */ -import { showSaveModal } from '@kbn/saved-objects-plugin/public'; +import * as savedObjectsPlugin from '@kbn/saved-objects-plugin/public'; jest.mock('@kbn/saved-objects-plugin/public'); - +jest.mock('../../utils/persist_saved_search', () => ({ + persistSavedSearch: jest.fn(() => ({ id: 'the-saved-search-id' })), +})); import { onSaveSearch } from './on_save_search'; import { dataViewMock } from '../../../../__mocks__/data_view'; import { savedSearchMock } from '../../../../__mocks__/saved_search'; import { DiscoverServices } from '../../../../build_services'; import { GetStateReturn } from '../../services/discover_state'; import { i18nServiceMock } from '@kbn/core/public/mocks'; +import { ReactElement } from 'react'; +import { discoverServiceMock } from '../../../../__mocks__/services'; +import * as persistSavedSearchUtils from '../../utils/persist_saved_search'; +import { SavedSearch } from '@kbn/saved-search-plugin/public'; + +describe('onSaveSearch', () => { + it('should call showSaveModal', async () => { + const serviceMock = { + core: { + i18n: i18nServiceMock.create(), + }, + } as unknown as DiscoverServices; + const stateMock = { + appStateContainer: { + getState: () => ({ + rowsPerPage: 250, + }), + }, + } as unknown as GetStateReturn; -test('onSaveSearch', async () => { - const serviceMock = { - core: { - i18n: i18nServiceMock.create(), - }, - } as unknown as DiscoverServices; - const stateMock = { - appStateContainer: { - getState: () => ({ - rowsPerPage: 250, - }), - }, - } as unknown as GetStateReturn; + await onSaveSearch({ + dataView: dataViewMock, + navigateTo: jest.fn(), + savedSearch: savedSearchMock, + services: serviceMock, + state: stateMock, + }); + + expect(savedObjectsPlugin.showSaveModal).toHaveBeenCalled(); + }); - await onSaveSearch({ - dataView: dataViewMock, - navigateTo: jest.fn(), - savedSearch: savedSearchMock, - services: serviceMock, - state: stateMock, + it('should pass tags to the save modal', async () => { + const serviceMock = discoverServiceMock; + const stateMock = { + appStateContainer: { + getState: () => ({ + rowsPerPage: 250, + }), + }, + } as unknown as GetStateReturn; + let saveModal: ReactElement | undefined; + jest.spyOn(savedObjectsPlugin, 'showSaveModal').mockImplementationOnce((modal) => { + saveModal = modal; + }); + await onSaveSearch({ + dataView: dataViewMock, + navigateTo: jest.fn(), + savedSearch: { + ...savedSearchMock, + tags: ['tag1', 'tag2'], + }, + services: serviceMock, + state: stateMock, + }); + expect(saveModal?.props.tags).toEqual(['tag1', 'tag2']); }); - expect(showSaveModal).toHaveBeenCalled(); + it('should update the saved search tags', async () => { + const serviceMock = discoverServiceMock; + const stateMock = { + appStateContainer: { + getState: () => ({ + rowsPerPage: 250, + }), + }, + resetInitialAppState: jest.fn(), + } as unknown as GetStateReturn; + let saveModal: ReactElement | undefined; + jest.spyOn(savedObjectsPlugin, 'showSaveModal').mockImplementationOnce((modal) => { + saveModal = modal; + }); + let savedSearch: SavedSearch = { + ...savedSearchMock, + tags: ['tag1', 'tag2'], + }; + await onSaveSearch({ + dataView: dataViewMock, + navigateTo: jest.fn(), + savedSearch, + services: serviceMock, + state: stateMock, + }); + expect(savedSearch.tags).toEqual(['tag1', 'tag2']); + jest + .spyOn(persistSavedSearchUtils, 'persistSavedSearch') + .mockImplementationOnce((newSavedSearch, _) => { + savedSearch = newSavedSearch; + return Promise.resolve({ id: newSavedSearch.id }); + }); + saveModal?.props.onSave({ + newTitle: savedSearch.title, + newCopyOnSave: false, + newDescription: savedSearch.description, + newTags: ['tag3', 'tag4'], + isTitleDuplicateConfirmed: false, + onTitleDuplicate: jest.fn(), + }); + expect(savedSearch.tags).toEqual(['tag3', 'tag4']); + }); + + it('should not update tags if savedObjectsTagging is undefined', async () => { + const serviceMock = discoverServiceMock; + const stateMock = { + appStateContainer: { + getState: () => ({ + rowsPerPage: 250, + }), + }, + resetInitialAppState: jest.fn(), + } as unknown as GetStateReturn; + let saveModal: ReactElement | undefined; + jest.spyOn(savedObjectsPlugin, 'showSaveModal').mockImplementationOnce((modal) => { + saveModal = modal; + }); + let savedSearch: SavedSearch = { + ...savedSearchMock, + tags: ['tag1', 'tag2'], + }; + await onSaveSearch({ + dataView: dataViewMock, + navigateTo: jest.fn(), + savedSearch, + services: { + ...serviceMock, + savedObjectsTagging: undefined, + }, + state: stateMock, + }); + expect(savedSearch.tags).toEqual(['tag1', 'tag2']); + jest + .spyOn(persistSavedSearchUtils, 'persistSavedSearch') + .mockImplementationOnce((newSavedSearch, _) => { + savedSearch = newSavedSearch; + return Promise.resolve({ id: newSavedSearch.id }); + }); + saveModal?.props.onSave({ + newTitle: savedSearch.title, + newCopyOnSave: false, + newDescription: savedSearch.description, + newTags: ['tag3', 'tag4'], + isTitleDuplicateConfirmed: false, + onTitleDuplicate: jest.fn(), + }); + expect(savedSearch.tags).toEqual(['tag1', 'tag2']); + }); }); diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx index e99295fee9e97..06461be86bbce 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx @@ -106,12 +106,13 @@ export async function onSaveSearch({ onClose?: () => void; onSaveCb?: () => void; }) { - const { uiSettings } = services; + const { uiSettings, savedObjectsTagging } = services; const onSave = async ({ newTitle, newCopyOnSave, newTimeRestore, newDescription, + newTags, isTitleDuplicateConfirmed, onTitleDuplicate, }: { @@ -119,18 +120,24 @@ export async function onSaveSearch({ newTimeRestore: boolean; newCopyOnSave: boolean; newDescription: string; + newTags: string[]; isTitleDuplicateConfirmed: boolean; onTitleDuplicate: () => void; }) => { const currentTitle = savedSearch.title; const currentTimeRestore = savedSearch.timeRestore; const currentRowsPerPage = savedSearch.rowsPerPage; + const currentDescription = savedSearch.description; + const currentTags = savedSearch.tags; savedSearch.title = newTitle; savedSearch.description = newDescription; savedSearch.timeRestore = newTimeRestore; savedSearch.rowsPerPage = uiSettings.get(DOC_TABLE_LEGACY) ? currentRowsPerPage : state.appStateContainer.getState().rowsPerPage; + if (savedObjectsTagging) { + savedSearch.tags = newTags; + } const saveOptions: SaveSavedSearchOptions = { onTitleDuplicate, copyOnSave: newCopyOnSave, @@ -151,6 +158,10 @@ export async function onSaveSearch({ savedSearch.title = currentTitle; savedSearch.timeRestore = currentTimeRestore; savedSearch.rowsPerPage = currentRowsPerPage; + savedSearch.description = currentDescription; + if (savedObjectsTagging) { + savedSearch.tags = currentTags; + } } else { state.resetInitialAppState(); } @@ -160,10 +171,12 @@ export async function onSaveSearch({ const saveModal = ( {})} /> @@ -172,23 +185,46 @@ export async function onSaveSearch({ } const SaveSearchObjectModal: React.FC<{ + services: DiscoverServices; title: string; showCopyOnSave: boolean; description?: string; timeRestore?: boolean; - onSave: (props: OnSaveProps & { newTimeRestore: boolean }) => void; + tags: string[]; + onSave: (props: OnSaveProps & { newTimeRestore: boolean; newTags: string[] }) => void; onClose: () => void; -}> = ({ title, description, showCopyOnSave, timeRestore: savedTimeRestore, onSave, onClose }) => { +}> = ({ + services, + title, + description, + tags, + showCopyOnSave, + timeRestore: savedTimeRestore, + onSave, + onClose, +}) => { + const { savedObjectsTagging } = services; const [timeRestore, setTimeRestore] = useState(savedTimeRestore || false); + const [currentTags, setCurrentTags] = useState(tags); const onModalSave = (params: OnSaveProps) => { onSave({ ...params, newTimeRestore: timeRestore, + newTags: currentTags, }); }; - const options = ( + const tagSelector = savedObjectsTagging ? ( + { + setCurrentTags(newTags); + }} + /> + ) : undefined; + + const timeSwitch = ( ); + const options = tagSelector ? ( + <> + {tagSelector} + {timeSwitch} + + ) : ( + timeSwitch + ); + return ( { test('render', async () => { jest.doMock('../../../../hooks/use_discover_services', () => ({ useDiscoverServices: jest.fn().mockImplementation(() => ({ - core: { uiSettings: {}, savedObjects: {} }, addBasePath: (path: string) => path, capabilities: { savedObjectsManagement: { edit: true } }, + savedObjectsFinder: { Finder: jest.fn() }, + core: {}, })), })); const { OpenSearchPanel } = await import('./open_search_panel'); @@ -33,9 +34,10 @@ describe('OpenSearchPanel', () => { test('should not render manage searches button without permissions', async () => { jest.doMock('../../../../hooks/use_discover_services', () => ({ useDiscoverServices: jest.fn().mockImplementation(() => ({ - core: { uiSettings: {}, savedObjects: {} }, addBasePath: (path: string) => path, capabilities: { savedObjectsManagement: { edit: false, delete: false } }, + savedObjectsFinder: { Finder: jest.fn() }, + core: {}, })), })); const { OpenSearchPanel } = await import('./open_search_panel'); diff --git a/src/plugins/discover/public/application/main/components/top_nav/open_search_panel.tsx b/src/plugins/discover/public/application/main/components/top_nav/open_search_panel.tsx index 32668b99de0ed..81572cf1ebb53 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/open_search_panel.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/open_search_panel.tsx @@ -20,7 +20,7 @@ import { EuiFlyoutBody, EuiTitle, } from '@elastic/eui'; -import { SavedObjectFinderUi } from '@kbn/saved-objects-plugin/public'; +import { SavedObjectFinder } from '@kbn/saved-objects-finder-plugin/public'; import { useDiscoverServices } from '../../../../hooks/use_discover_services'; const SEARCH_OBJECT_TYPE = 'search'; @@ -32,11 +32,13 @@ interface OpenSearchPanelProps { export function OpenSearchPanel(props: OpenSearchPanelProps) { const { - core: { uiSettings, savedObjects }, addBasePath, capabilities, + core, + uiSettings, + savedObjectsManagement, + savedObjectsTagging, } = useDiscoverServices(); - const hasSavedObjectPermission = capabilities.savedObjectsManagement?.edit || capabilities.savedObjectsManagement?.delete; @@ -53,7 +55,13 @@ export function OpenSearchPanel(props: OpenSearchPanelProps) { - {hasSavedObjectPermission && ( diff --git a/src/plugins/discover/public/application/main/discover_main_route.tsx b/src/plugins/discover/public/application/main/discover_main_route.tsx index e8e1ec43bd42d..06727473771b3 100644 --- a/src/plugins/discover/public/application/main/discover_main_route.tsx +++ b/src/plugins/discover/public/application/main/discover_main_route.tsx @@ -118,6 +118,7 @@ export function DiscoverMainRoute(props: Props) { search: services.data.search, savedObjectsClient: core.savedObjects.client, spaces: services.spaces, + savedObjectsTagging: services.savedObjectsTagging, }); const currentDataView = await loadDefaultOrCurrentDataView(currentSavedSearch.searchSource); @@ -172,6 +173,7 @@ export function DiscoverMainRoute(props: Props) { services.data, services.spaces, services.timefilter, + services.savedObjectsTagging, core.savedObjects.client, core.application.navigateToApp, core.theme, diff --git a/src/plugins/discover/public/application/main/hooks/use_discover_state.ts b/src/plugins/discover/public/application/main/hooks/use_discover_state.ts index b3aaed0d880db..dc06163a5f2c1 100644 --- a/src/plugins/discover/public/application/main/hooks/use_discover_state.ts +++ b/src/plugins/discover/public/application/main/hooks/use_discover_state.ts @@ -184,6 +184,7 @@ export function useDiscoverState({ search: services.data.search, savedObjectsClient: services.core.savedObjects.client, spaces: services.spaces, + savedObjectsTagging: services.savedObjectsTagging, }); const newDataView = newSavedSearch.searchSource.getField('index') || dataView; diff --git a/src/plugins/discover/public/application/main/utils/persist_saved_search.ts b/src/plugins/discover/public/application/main/utils/persist_saved_search.ts index 488f9598aaae7..edc7d96f9decd 100644 --- a/src/plugins/discover/public/application/main/utils/persist_saved_search.ts +++ b/src/plugins/discover/public/application/main/utils/persist_saved_search.ts @@ -82,7 +82,12 @@ export async function persistSavedSearch( : undefined; try { - const id = await saveSavedSearch(savedSearch, saveOptions, services.core.savedObjects.client); + const id = await saveSavedSearch( + savedSearch, + saveOptions, + services.core.savedObjects.client, + services.savedObjectsTagging + ); if (id) { onSuccess(id); } diff --git a/src/plugins/discover/public/build_services.ts b/src/plugins/discover/public/build_services.ts index 3e83b149d351e..fe13516f85663 100644 --- a/src/plugins/discover/public/build_services.ts +++ b/src/plugins/discover/public/build_services.ts @@ -43,6 +43,8 @@ import { EmbeddableStart } from '@kbn/embeddable-plugin/public'; import type { SpacesApi } from '@kbn/spaces-plugin/public'; import { DataViewEditorStart } from '@kbn/data-view-editor-plugin/public'; import type { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; +import type { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; +import type { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; import { DiscoverAppLocator } from './locator'; import { getHistory } from './kibana_services'; import { DiscoverStartPlugins } from './plugin'; @@ -83,6 +85,8 @@ export interface DiscoverServices { triggersActionsUi: TriggersAndActionsUIPublicPluginStart; locator: DiscoverAppLocator; expressions: ExpressionsStart; + savedObjectsManagement: SavedObjectsManagementPluginStart; + savedObjectsTagging?: SavedObjectsTaggingApi; } export const buildServices = memoize(function ( @@ -128,5 +132,7 @@ export const buildServices = memoize(function ( triggersActionsUi: plugins.triggersActionsUi, locator, expressions: plugins.expressions, + savedObjectsTagging: plugins.savedObjectsTaggingOss?.getTaggingApi(), + savedObjectsManagement: plugins.savedObjectsManagement, }; }); diff --git a/src/plugins/discover/public/embeddable/search_embeddable_factory.ts b/src/plugins/discover/public/embeddable/search_embeddable_factory.ts index 331fa7103a825..185b0daf8055b 100644 --- a/src/plugins/discover/public/embeddable/search_embeddable_factory.ts +++ b/src/plugins/discover/public/embeddable/search_embeddable_factory.ts @@ -76,6 +76,7 @@ export class SearchEmbeddableFactory search: services.data.search, savedObjectsClient: services.core.savedObjects.client, spaces: services.spaces, + savedObjectsTagging: services.savedObjectsTagging, }); await throwErrorOnSavedSearchUrlConflict(savedSearch); diff --git a/src/plugins/discover/public/plugin.tsx b/src/plugins/discover/public/plugin.tsx index d89e7cbff5287..c06bdfaa1ca56 100644 --- a/src/plugins/discover/public/plugin.tsx +++ b/src/plugins/discover/public/plugin.tsx @@ -35,7 +35,9 @@ import { IndexPatternFieldEditorStart } from '@kbn/data-view-field-editor-plugin import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import { DataViewEditorStart } from '@kbn/data-view-editor-plugin/public'; -import type { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; +import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; +import type { SavedObjectTaggingOssPluginStart } from '@kbn/saved-objects-tagging-oss-plugin/public'; +import type { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; import { PLUGIN_ID } from '../common'; import { DocViewInput, DocViewInputFn } from './services/doc_views/doc_views_types'; import { DocViewsRegistry } from './services/doc_views/doc_views_registry'; @@ -176,6 +178,8 @@ export interface DiscoverStartPlugins { spaces?: SpacesPluginStart; triggersActionsUi: TriggersAndActionsUIPublicPluginStart; expressions: ExpressionsStart; + savedObjectsTaggingOss?: SavedObjectTaggingOssPluginStart; + savedObjectsManagement: SavedObjectsManagementPluginStart; } /** diff --git a/src/plugins/discover/tsconfig.json b/src/plugins/discover/tsconfig.json index efadcc88443a1..7915736dee994 100644 --- a/src/plugins/discover/tsconfig.json +++ b/src/plugins/discover/tsconfig.json @@ -17,6 +17,7 @@ { "path": "../inspector/tsconfig.json" }, { "path": "../url_forwarding/tsconfig.json" }, { "path": "../saved_objects/tsconfig.json" }, + { "path": "../saved_objects_finder/tsconfig.json" }, { "path": "../navigation/tsconfig.json" }, { "path": "../ui_actions/tsconfig.json" }, { "path": "../home/tsconfig.json" }, @@ -30,6 +31,7 @@ { "path": "../unified_search/tsconfig.json" }, { "path": "../../../x-pack/plugins/spaces/tsconfig.json" }, { "path": "../data_view_editor/tsconfig.json" }, - { "path": "../../../x-pack/plugins/triggers_actions_ui/tsconfig.json" } + { "path": "../../../x-pack/plugins/triggers_actions_ui/tsconfig.json" }, + { "path": "../saved_objects_tagging_oss/tsconfig.json" } ] } diff --git a/src/plugins/expressions/common/expression_functions/specs/tests/var_set.test.ts b/src/plugins/expressions/common/expression_functions/specs/tests/var_set.test.ts index cbe6406308251..0877680ac0ff1 100644 --- a/src/plugins/expressions/common/expression_functions/specs/tests/var_set.test.ts +++ b/src/plugins/expressions/common/expression_functions/specs/tests/var_set.test.ts @@ -47,7 +47,7 @@ describe('expression_functions', () => { }); it('stores context if value is not set', () => { - const actual = fn(input, { name: ['test'], value: [] }, context); + const actual = fn(input, { name: ['test'] }, context); expect(variables.test).toEqual(input); expect(actual).toEqual(input); }); diff --git a/src/plugins/expressions/common/expression_functions/specs/var_set.ts b/src/plugins/expressions/common/expression_functions/specs/var_set.ts index aa257940f9ad6..27d005506b42a 100644 --- a/src/plugins/expressions/common/expression_functions/specs/var_set.ts +++ b/src/plugins/expressions/common/expression_functions/specs/var_set.ts @@ -12,7 +12,7 @@ import { ExpressionFunctionDefinition } from '../types'; interface Arguments { name: string[]; - value: Serializable[]; + value?: Serializable[]; } export type ExpressionFunctionVarSet = ExpressionFunctionDefinition< @@ -49,7 +49,7 @@ export const variableSet: ExpressionFunctionVarSet = { fn(input, args, context) { const { variables } = context; args.name.forEach((name, i) => { - variables[name] = args.value[i] === undefined ? input : args.value[i]; + variables[name] = args.value?.[i] === undefined ? input : args.value[i]; }); return input; diff --git a/src/plugins/saved_objects_finder/README.md b/src/plugins/saved_objects_finder/README.md new file mode 100644 index 0000000000000..dcb56840fa5cd --- /dev/null +++ b/src/plugins/saved_objects_finder/README.md @@ -0,0 +1,3 @@ +# `savedObjectsFinder` plugin + +The `savedObjectsFinder` plugin exposes a UI for finding saved objects on the client side. diff --git a/src/plugins/saved_objects_finder/jest.config.js b/src/plugins/saved_objects_finder/jest.config.js new file mode 100644 index 0000000000000..64aae1035ae1d --- /dev/null +++ b/src/plugins/saved_objects_finder/jest.config.js @@ -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 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: ['/src/plugins/saved_objects_finder'], + coverageDirectory: '/target/kibana-coverage/jest/src/plugins/saved_objects_finder', + coverageReporters: ['text', 'html'], + collectCoverageFrom: [ + '/src/plugins/saved_objects_finder/{common,public,server}/**/*.{ts,tsx}', + ], +}; diff --git a/src/plugins/saved_objects_finder/kibana.json b/src/plugins/saved_objects_finder/kibana.json new file mode 100644 index 0000000000000..e50c2f1adeb0c --- /dev/null +++ b/src/plugins/saved_objects_finder/kibana.json @@ -0,0 +1,10 @@ +{ + "id": "savedObjectsFinder", + "owner": { + "name": "Data Discovery", + "githubTeam": "kibana-data-discovery" + }, + "version": "kibana", + "ui": true, + "requiredBundles": ["savedObjects"] +} diff --git a/src/plugins/saved_objects_finder/public/finder/index.tsx b/src/plugins/saved_objects_finder/public/finder/index.tsx new file mode 100644 index 0000000000000..0819ebf8141b6 --- /dev/null +++ b/src/plugins/saved_objects_finder/public/finder/index.tsx @@ -0,0 +1,27 @@ +/* + * 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 { EuiDelayRender, EuiLoadingContent } from '@elastic/eui'; +import React from 'react'; +import type { SavedObjectFinderProps } from './saved_object_finder'; + +const LazySavedObjectFinder = React.lazy(() => import('./saved_object_finder')); +const SavedObjectFinder = (props: SavedObjectFinderProps) => ( + + + + } + > + + +); + +export type { SavedObjectMetaData, SavedObjectFinderProps } from './saved_object_finder'; +export { SavedObjectFinder }; diff --git a/src/plugins/saved_objects_finder/public/finder/saved_object_finder.test.tsx b/src/plugins/saved_objects_finder/public/finder/saved_object_finder.test.tsx new file mode 100644 index 0000000000000..cde6ce1ac0aee --- /dev/null +++ b/src/plugins/saved_objects_finder/public/finder/saved_object_finder.test.tsx @@ -0,0 +1,1196 @@ +/* + * 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. + */ + +const nextTick = () => new Promise((res) => process.nextTick(res)); + +import lodash from 'lodash'; +jest.spyOn(lodash, 'debounce').mockImplementation((fn: any) => fn); +import { EuiInMemoryTable, EuiLink, EuiSearchBarProps, Query } from '@elastic/eui'; +import { IconType } from '@elastic/eui'; +import { mount, shallow } from 'enzyme'; +import React from 'react'; +import * as sinon from 'sinon'; +import { SavedObjectFinderUi as SavedObjectFinder } from './saved_object_finder'; +import { coreMock } from '@kbn/core/public/mocks'; +import { savedObjectsManagementPluginMock } from '@kbn/saved-objects-management-plugin/public/mocks'; +import { findTestSubject } from '@kbn/test-jest-helpers'; +import { SavedObjectManagementTypeInfo } from '@kbn/saved-objects-management-plugin/public'; +import { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; + +describe('SavedObjectsFinder', () => { + const doc = { + id: '1', + type: 'search', + attributes: { title: 'Example title' }, + }; + + const doc2 = { + id: '2', + type: 'search', + attributes: { title: 'Another title' }, + }; + + const doc3 = { type: 'vis', id: '3', attributes: { title: 'Vis' } }; + + const searchMetaData = [ + { + type: 'search', + name: 'Search', + getIconForSavedObject: () => 'search' as IconType, + showSavedObject: () => true, + defaultSearchField: 'name', + }, + ]; + + const metaDataConfig = [ + { + type: 'search', + name: 'Search', + getIconForSavedObject: () => 'search' as IconType, + }, + { + type: 'vis', + name: 'Vis', + getIconForSavedObject: () => 'document' as IconType, + }, + ]; + + const savedObjectsManagement = savedObjectsManagementPluginMock.createStartContract(); + savedObjectsManagement.parseQuery.mockImplementation( + (query: Query, types: SavedObjectManagementTypeInfo[]) => { + const queryTypes = query.ast.getFieldClauses('type')?.[0].value as string[] | undefined; + return { + queryText: query.ast + .getTermClauses() + .map((clause: any) => clause.value) + .join(' '), + visibleTypes: queryTypes?.filter((name) => types.some((type) => type.name === name)), + selectedTags: query.ast.getFieldClauses('tag')?.[0].value as string[] | undefined, + }; + } + ); + savedObjectsManagement.getTagFindReferences.mockImplementation( + ({ selectedTags }) => selectedTags as any + ); + + const savedObjectsTagging = { + ui: { + getTableColumnDefinition: jest.fn(() => ({ + field: 'references', + name: 'Tags', + description: 'Tags associated with this saved object', + 'data-test-subj': 'listingTableRowTags', + sortable: (item: any) => `tag-${item.id}`, + render: (_: any, item: any) => {`tag-${item.id}`}, + })), + getSearchBarFilter: jest.fn(() => ({ + type: 'field_value_selection', + field: 'tag', + name: 'Tags', + multiSelect: 'or', + options: [], + })), + }, + } as any as SavedObjectsTaggingApi; + + it('should call saved object client on startup', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = shallow( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + expect(core.savedObjects.client.find).toHaveBeenCalledWith({ + type: ['search'], + fields: ['title', 'name'], + search: undefined, + hasReference: undefined, + page: 1, + perPage: 10, + searchFields: ['title^3', 'description', 'name'], + defaultSearchOperator: 'AND', + }); + }); + + it('should list initial items', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = shallow( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + expect( + wrapper + .find(EuiInMemoryTable) + .prop('items') + .map((item: any) => item.attributes) + ).toEqual([doc.attributes]); + }); + + it('should call onChoose on item click', async () => { + const chooseStub = sinon.stub(); + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + findTestSubject(wrapper, 'savedObjectTitleExample-title').simulate('click'); + expect(chooseStub.calledWith('1', 'search', `${doc.attributes.title} (Search)`, doc)).toEqual( + true + ); + }); + + describe('sorting', () => { + it('should list items by type ascending', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc3, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + findTestSubject( + findTestSubject(wrapper, 'tableHeaderCell_type_0'), + 'tableHeaderSortButton' + ).simulate('click'); + const titleLinks = wrapper.find(EuiLink); + expect(titleLinks.at(0).text()).toEqual(doc.attributes.title); + expect(titleLinks.at(1).text()).toEqual(doc2.attributes.title); + expect(titleLinks.at(2).text()).toEqual(doc3.attributes.title); + }); + + it('should list items by type descending', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc3, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + findTestSubject( + findTestSubject(wrapper, 'tableHeaderCell_type_0'), + 'tableHeaderSortButton' + ).simulate('click'); + findTestSubject( + findTestSubject(wrapper, 'tableHeaderCell_type_0'), + 'tableHeaderSortButton' + ).simulate('click'); + const titleLinks = wrapper.find(EuiLink); + expect(titleLinks.at(0).text()).toEqual(doc3.attributes.title); + expect(titleLinks.at(1).text()).toEqual(doc.attributes.title); + expect(titleLinks.at(2).text()).toEqual(doc2.attributes.title); + }); + + it('should list items by title ascending', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + const titleLinks = wrapper.find(EuiLink); + expect(titleLinks.at(0).text()).toEqual(doc2.attributes.title); + expect(titleLinks.at(1).text()).toEqual(doc.attributes.title); + }); + + it('should list items by title descending', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + findTestSubject( + findTestSubject(wrapper, 'tableHeaderCell_title_0'), + 'tableHeaderSortButton' + ).simulate('click'); + const titleLinks = wrapper.find(EuiLink); + expect(titleLinks.at(0).text()).toEqual(doc.attributes.title); + expect(titleLinks.at(1).text()).toEqual(doc2.attributes.title); + }); + + it('should list items by tag ascending', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc3, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + findTestSubject( + findTestSubject(wrapper, 'tableHeaderCell_references_2'), + 'tableHeaderSortButton' + ).simulate('click'); + const titleLinks = wrapper.find(EuiLink); + expect(titleLinks.at(0).text()).toEqual(doc.attributes.title); + expect(titleLinks.at(1).text()).toEqual(doc2.attributes.title); + expect(titleLinks.at(2).text()).toEqual(doc3.attributes.title); + }); + + it('should list items by tag descending', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc3, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + findTestSubject( + findTestSubject(wrapper, 'tableHeaderCell_references_2'), + 'tableHeaderSortButton' + ).simulate('click'); + findTestSubject( + findTestSubject(wrapper, 'tableHeaderCell_references_2'), + 'tableHeaderSortButton' + ).simulate('click'); + const titleLinks = wrapper.find(EuiLink); + expect(titleLinks.at(0).text()).toEqual(doc3.attributes.title); + expect(titleLinks.at(1).text()).toEqual(doc2.attributes.title); + expect(titleLinks.at(2).text()).toEqual(doc.attributes.title); + }); + }); + + it('should not show the saved objects which get filtered by showSavedObject', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = shallow( + 'search', + showSavedObject: ({ id }) => id !== '1', + }, + ]} + /> + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + const items: any[] = wrapper.find(EuiInMemoryTable).prop('items'); + expect(items).toHaveLength(1); + expect(items[0].attributes.title).toBe(doc2.attributes.title); + }); + + describe('search', () => { + it('should request filtered list on search input', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper + .find('[data-test-subj="savedObjectFinderSearchInput"] input') + .simulate('keyup', { key: 'Enter', target: { value: 'abc' } }); + expect(core.savedObjects.client.find).toHaveBeenCalledWith({ + type: ['search'], + fields: ['title', 'name'], + search: 'abc*', + hasReference: undefined, + page: 1, + perPage: 10, + searchFields: ['title^3', 'description', 'name'], + defaultSearchOperator: 'AND', + }); + }); + + it('should include additional fields in search if listed in meta data', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as jest.Mock).mockResolvedValue({ savedObjects: [] }); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + 'search', + includeFields: ['field1', 'field2'], + }, + { + type: 'type2', + name: '', + getIconForSavedObject: () => 'search', + includeFields: ['field2', 'field3'], + }, + ]} + /> + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper + .find('[data-test-subj="savedObjectFinderSearchInput"] input') + .simulate('keyup', { key: 'Enter', target: { value: 'abc' } }); + expect(core.savedObjects.client.find).toHaveBeenCalledWith({ + type: ['type1', 'type2'], + fields: ['title', 'name', 'field1', 'field2', 'field3'], + search: 'abc*', + hasReference: undefined, + page: 1, + perPage: 10, + searchFields: ['title^3', 'description'], + defaultSearchOperator: 'AND', + }); + }); + + it('should respect response order on search input', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper + .find('[data-test-subj="savedObjectFinderSearchInput"] input') + .simulate('keyup', { key: 'Enter', target: { value: 'abc' } }); + const titleLinks = wrapper.find(EuiLink); + expect(titleLinks.at(0).text()).toEqual(doc.attributes.title); + expect(titleLinks.at(1).text()).toEqual(doc2.attributes.title); + }); + }); + + it('should request multiple saved object types at once', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = shallow( + 'search', + }, + { + type: 'vis', + name: 'Vis', + getIconForSavedObject: () => 'visLine', + }, + ]} + /> + ); + + wrapper.instance().componentDidMount!(); + + expect(core.savedObjects.client.find).toHaveBeenCalledWith({ + type: ['search', 'vis'], + fields: ['title', 'name'], + search: undefined, + page: 1, + perPage: 10, + searchFields: ['title^3', 'description'], + defaultSearchOperator: 'AND', + }); + }); + + describe('filter', () => { + it('should render filter buttons if enabled', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ + savedObjects: [doc, doc2, doc3], + }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + expect(wrapper.find('button.euiFilterButton')).toHaveLength(2); + expect(wrapper.find('button.euiFilterButton [data-text="Types"]')).toHaveLength(1); + expect(wrapper.find('button.euiFilterButton [data-text="Tags"]')).toHaveLength(1); + }); + + it('should not render filter buttons if disabled', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ + savedObjects: [doc, doc2, doc3], + }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + expect(wrapper.find('button.euiFilterButton')).toHaveLength(0); + }); + + it('should not render types filter button if there is only one type in the metadata list', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ + savedObjects: [doc, doc2], + }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + expect(wrapper.find('button.euiFilterButton [data-text="Types"]')).toHaveLength(0); + expect(wrapper.find('button.euiFilterButton')).toHaveLength(1); + }); + + it('should not render tags filter button if savedObjectsTagging is undefined', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ + savedObjects: [doc, doc2, doc3], + }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + expect(wrapper.find('button.euiFilterButton [data-text="Tags"]')).toHaveLength(0); + expect(wrapper.find('button.euiFilterButton')).toHaveLength(1); + }); + + it('should apply types filter if selected', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ + savedObjects: [doc, doc2, doc3], + }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + const table = wrapper.find>(EuiInMemoryTable); + const search = table.prop('search') as EuiSearchBarProps; + search.onChange?.({ query: Query.parse('type:(vis)'), queryText: '', error: null }); + expect(core.savedObjects.client.find).toHaveBeenLastCalledWith({ + type: ['vis'], + fields: ['title', 'name'], + search: undefined, + hasReference: undefined, + page: 1, + perPage: 10, + searchFields: ['title^3', 'description'], + defaultSearchOperator: 'AND', + }); + search.onChange?.({ query: Query.parse('type:(search or vis)'), queryText: '', error: null }); + expect(core.savedObjects.client.find).toHaveBeenLastCalledWith({ + type: ['search', 'vis'], + fields: ['title', 'name'], + search: undefined, + hasReference: undefined, + page: 1, + perPage: 10, + searchFields: ['title^3', 'description'], + defaultSearchOperator: 'AND', + }); + }); + + it('should apply tags filter if selected', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ + savedObjects: [doc, doc2, doc3], + }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + const table = wrapper.find>(EuiInMemoryTable); + const search = table.prop('search') as EuiSearchBarProps; + search.onChange?.({ query: Query.parse('tag:(tag1)'), queryText: '', error: null }); + expect(core.savedObjects.client.find).toHaveBeenLastCalledWith({ + type: ['search', 'vis'], + fields: ['title', 'name'], + search: undefined, + hasReference: ['tag1'], + page: 1, + perPage: 10, + searchFields: ['title^3', 'description'], + defaultSearchOperator: 'AND', + }); + search.onChange?.({ query: Query.parse('tag:(tag1 or tag2)'), queryText: '', error: null }); + expect(core.savedObjects.client.find).toHaveBeenLastCalledWith({ + type: ['search', 'vis'], + fields: ['title', 'name'], + search: undefined, + hasReference: ['tag1', 'tag2'], + page: 1, + perPage: 10, + searchFields: ['title^3', 'description'], + defaultSearchOperator: 'AND', + }); + }); + }); + + it('should display no items message if there are no items', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const noItemsMessage = ; + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + + expect(wrapper.find(EuiInMemoryTable).prop('message')).toEqual(noItemsMessage); + }); + + describe('pagination', () => { + const longItemList = new Array(50).fill(undefined).map((_, i) => ({ + id: String(i), + type: 'search', + attributes: { + title: `Title ${i < 10 ? '0' : ''}${i}`, + }, + })); + + it('should show a table pagination with initial per page', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: longItemList }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + const pagination = wrapper.find(EuiInMemoryTable).prop('pagination') as any; + expect(pagination.showPerPageOptions).toBe(true); + expect(pagination.initialPageSize).toEqual(15); + expect(wrapper.find(EuiInMemoryTable).find('tbody tr')).toHaveLength(15); + }); + + it('should allow switching the page size', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: longItemList }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + const table = wrapper.find>(EuiInMemoryTable); + const sort = table.prop('sorting'); + table.instance().onTableChange({ + page: { + index: 0, + size: 5, + }, + sort: typeof sort === 'object' ? sort?.sort : undefined, + }); + wrapper.update(); + expect(wrapper.find(EuiInMemoryTable).find('tbody tr')).toHaveLength(5); + }); + + it('should switch page correctly', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: longItemList }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + expect(wrapper.find(EuiInMemoryTable).find('tbody tr')).toHaveLength(15); + const table = wrapper.find>(EuiInMemoryTable); + const pagination = table.prop('pagination') as any; + const sort = table.prop('sorting'); + table.instance().onTableChange({ + page: { + index: 3, + size: pagination.initialPageSize, + }, + sort: typeof sort === 'object' ? sort?.sort : undefined, + }); + wrapper.update(); + expect(wrapper.find(EuiInMemoryTable).find('tbody tr')).toHaveLength(5); + }); + + it('should show an ordinary pagination for fixed page sizes', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: longItemList }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + const pagination = wrapper.find(EuiInMemoryTable).prop('pagination') as any; + expect(pagination.showPerPageOptions).toBe(false); + expect(pagination.initialPageSize).toEqual(33); + expect(wrapper.find(EuiInMemoryTable).find('tbody tr')).toHaveLength(33); + }); + + it('should switch page correctly for fixed page sizes', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: longItemList }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + expect(wrapper.find(EuiInMemoryTable).find('tbody tr')).toHaveLength(33); + const table = wrapper.find>(EuiInMemoryTable); + const pagination = table.prop('pagination') as any; + const sort = table.prop('sorting'); + table.instance().onTableChange({ + page: { + index: 1, + size: pagination.initialPageSize, + }, + sort: typeof sort === 'object' ? sort?.sort : undefined, + }); + wrapper.update(); + expect(wrapper.find(EuiInMemoryTable).find('tbody tr')).toHaveLength(17); + }); + }); + + describe('loading state', () => { + it('should display a loading indicator during initial loading', () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as jest.Mock).mockResolvedValue({ savedObjects: [] }); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + expect(wrapper.find('.euiBasicTable-loading')).toHaveLength(1); + }); + + it('should hide the loading indicator if data is shown', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + 'search', + }, + ]} + /> + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + expect(wrapper.find('.euiBasicTable-loading')).toHaveLength(0); + }); + + it('should show the loading indicator if there are already items and the search is updated', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + expect(wrapper.find('.euiBasicTable-loading')).toHaveLength(0); + wrapper + .find('[data-test-subj="savedObjectFinderSearchInput"] input') + .simulate('keyup', { key: 'Enter', target: { value: 'abc' } }); + wrapper.update(); + expect(wrapper.find('.euiBasicTable-loading')).toHaveLength(1); + }); + }); + + it('should render with children', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + 'search', + }, + { + type: 'vis', + name: 'Vis', + getIconForSavedObject: () => 'visLine', + }, + ]} + > + + + ); + expect(wrapper.exists('#testChildButton')).toBe(true); + }); + + describe('columns', () => { + it('should show all columns', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc2, doc3] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + expect(wrapper.find(EuiInMemoryTable).find('th')).toHaveLength(3); + expect(findTestSubject(wrapper, 'tableHeaderCell_type_0')).toHaveLength(1); + expect(findTestSubject(wrapper, 'tableHeaderCell_title_1')).toHaveLength(1); + expect(findTestSubject(wrapper, 'tableHeaderCell_references_2')).toHaveLength(1); + }); + + it('should hide the type column if there is only one type in the metadata list', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc2] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + expect(wrapper.find(EuiInMemoryTable).find('th')).toHaveLength(2); + expect(findTestSubject(wrapper, 'tableHeaderCell_type_0')).toHaveLength(0); + expect(findTestSubject(wrapper, 'tableHeaderCell_title_0')).toHaveLength(1); + expect(findTestSubject(wrapper, 'tableHeaderCell_references_1')).toHaveLength(1); + }); + + it('should hide the tags column if savedObjectsTagging is undefined', async () => { + const core = coreMock.createStart(); + (core.savedObjects.client.find as any as jest.SpyInstance).mockImplementation(() => + Promise.resolve({ savedObjects: [doc, doc2, doc3] }) + ); + core.uiSettings.get.mockImplementation(() => 10); + + const wrapper = mount( + + ); + + wrapper.instance().componentDidMount!(); + await nextTick(); + wrapper.update(); + expect(wrapper.find(EuiInMemoryTable).find('th')).toHaveLength(2); + expect(findTestSubject(wrapper, 'tableHeaderCell_type_0')).toHaveLength(1); + expect(findTestSubject(wrapper, 'tableHeaderCell_title_1')).toHaveLength(1); + expect(findTestSubject(wrapper, 'tableHeaderCell_references_2')).toHaveLength(0); + }); + }); +}); diff --git a/src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx b/src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx new file mode 100644 index 0000000000000..e74480a17e3bf --- /dev/null +++ b/src/plugins/saved_objects_finder/public/finder/saved_object_finder.tsx @@ -0,0 +1,386 @@ +/* + * 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 { debounce } from 'lodash'; +import PropTypes from 'prop-types'; +import React from 'react'; +import type { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; + +import { + EuiInMemoryTable, + EuiLink, + EuiTableFieldDataColumnType, + IconType, + EuiIcon, + EuiToolTip, + EuiSearchBarProps, + SearchFilterConfig, + Query, + PropertySort, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import type { + SimpleSavedObject, + SavedObject, + SavedObjectsStart, + IUiSettingsClient, +} from '@kbn/core/public'; +import type { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; +import { LISTING_LIMIT_SETTING } from '@kbn/saved-objects-plugin/public'; + +export interface SavedObjectMetaData { + type: string; + name: string; + getIconForSavedObject(savedObject: SimpleSavedObject): IconType; + getTooltipForSavedObject?(savedObject: SimpleSavedObject): string; + showSavedObject?(savedObject: SimpleSavedObject): boolean; + getSavedObjectSubType?(savedObject: SimpleSavedObject): string; + includeFields?: string[]; + defaultSearchField?: string; +} + +interface FinderAttributes { + title?: string; + name?: string; + type: string; +} + +interface SavedObjectFinderItem extends SavedObject { + title: string | null; + name: string | null; + simple: SimpleSavedObject; +} + +interface SavedObjectFinderState { + items: SavedObjectFinderItem[]; + query: Query; + isFetchingItems: boolean; + sort?: PropertySort; +} + +interface SavedObjectFinderServices { + savedObjects: SavedObjectsStart; + uiSettings: IUiSettingsClient; + savedObjectsManagement: SavedObjectsManagementPluginStart; + savedObjectsTagging: SavedObjectsTaggingApi | undefined; +} + +interface BaseSavedObjectFinder { + services: SavedObjectFinderServices; + onChoose?: ( + id: SimpleSavedObject['id'], + type: SimpleSavedObject['type'], + name: string, + savedObject: SimpleSavedObject + ) => void; + noItemsMessage?: React.ReactNode; + savedObjectMetaData: Array>; + showFilter?: boolean; +} + +interface SavedObjectFinderFixedPage extends BaseSavedObjectFinder { + initialPageSize?: undefined; + fixedPageSize: number; +} + +interface SavedObjectFinderInitialPageSize extends BaseSavedObjectFinder { + initialPageSize?: 5 | 10 | 15 | 25; + fixedPageSize?: undefined; +} + +export type SavedObjectFinderProps = SavedObjectFinderFixedPage | SavedObjectFinderInitialPageSize; + +export class SavedObjectFinderUi extends React.Component< + SavedObjectFinderProps, + SavedObjectFinderState +> { + public static propTypes = { + onChoose: PropTypes.func, + noItemsMessage: PropTypes.node, + savedObjectMetaData: PropTypes.array.isRequired, + initialPageSize: PropTypes.oneOf([5, 10, 15, 25]), + fixedPageSize: PropTypes.number, + showFilter: PropTypes.bool, + }; + + private isComponentMounted: boolean = false; + + private debouncedFetch = debounce(async (query: Query) => { + const metaDataMap = this.getSavedObjectMetaDataMap(); + const { queryText, visibleTypes, selectedTags } = + this.props.services.savedObjectsManagement.parseQuery( + query, + Object.values(metaDataMap).map((metadata) => ({ + name: metadata.type, + namespaceType: 'single', + hidden: false, + displayName: metadata.name, + })) + ); + + const fields = Object.values(metaDataMap) + .map((metaData) => metaData.includeFields || []) + .reduce((allFields, currentFields) => allFields.concat(currentFields), ['title', 'name']); + + const additionalSearchFields = Object.values(metaDataMap).reduce((col, item) => { + if (item.defaultSearchField) { + col.push(item.defaultSearchField); + } + return col; + }, []); + + const perPage = this.props.services.uiSettings.get(LISTING_LIMIT_SETTING); + const response = await this.props.services.savedObjects.client.find({ + type: visibleTypes ?? Object.keys(metaDataMap), + fields: [...new Set(fields)], + search: queryText ? `${queryText}*` : undefined, + page: 1, + perPage, + searchFields: ['title^3', 'description', ...additionalSearchFields], + defaultSearchOperator: 'AND', + hasReference: this.props.services.savedObjectsManagement.getTagFindReferences({ + selectedTags, + taggingApi: this.props.services.savedObjectsTagging, + }), + }); + + const savedObjects = response.savedObjects + .map((savedObject) => { + const { + attributes: { name, title }, + } = savedObject; + const titleToUse = typeof title === 'string' ? title : ''; + const nameToUse = name && typeof name === 'string' ? name : titleToUse; + return { + ...savedObject, + version: savedObject._version, + title: titleToUse, + name: nameToUse, + simple: savedObject, + }; + }) + .filter((savedObject) => { + const metaData = metaDataMap[savedObject.type]; + if (metaData.showSavedObject) { + return metaData.showSavedObject(savedObject.simple); + } else { + return true; + } + }); + + if (!this.isComponentMounted) { + return; + } + + // We need this check to handle the case where search results come back in a different + // order than they were sent out. Only load results for the most recent search. + if (query.text === this.state.query.text) { + this.setState({ + isFetchingItems: false, + items: savedObjects, + }); + } + }, 300); + + constructor(props: SavedObjectFinderProps) { + super(props); + + this.state = { + items: [], + isFetchingItems: false, + query: Query.parse(''), + }; + } + + public componentWillUnmount() { + this.isComponentMounted = false; + this.debouncedFetch.cancel(); + } + + public componentDidMount() { + this.isComponentMounted = true; + this.fetchItems(); + } + + private getSavedObjectMetaDataMap(): Record { + return this.props.savedObjectMetaData.reduce( + (map, metaData) => ({ ...map, [metaData.type]: metaData }), + {} + ); + } + + private fetchItems = () => { + this.setState( + { + isFetchingItems: true, + }, + this.debouncedFetch.bind(null, this.state.query) + ); + }; + + public render() { + const { onChoose, savedObjectMetaData } = this.props; + const taggingApi = this.props.services.savedObjectsTagging; + const originalTagColumn = taggingApi?.ui.getTableColumnDefinition(); + const tagColumn: EuiTableFieldDataColumnType | undefined = originalTagColumn + ? { + ...originalTagColumn, + sortable: (item) => + typeof originalTagColumn.sortable === 'function' + ? originalTagColumn.sortable(item) ?? '' + : '', + ['data-test-subj']: 'savedObjectFinderTags', + } + : undefined; + const typeColumn: EuiTableFieldDataColumnType | undefined = + savedObjectMetaData.length > 1 + ? { + field: 'type', + name: i18n.translate('savedObjectsFinder.typeName', { + defaultMessage: 'Type', + }), + width: '50px', + align: 'center', + description: i18n.translate('savedObjectsFinder.typeDescription', { + defaultMessage: 'Type of the saved object', + }), + sortable: ({ type }) => { + const currentSavedObjectMetaData = savedObjectMetaData.find( + (metaData) => metaData.type === type + ); + + return currentSavedObjectMetaData?.name ?? ''; + }, + 'data-test-subj': 'savedObjectFinderType', + render: (_, item) => { + const currentSavedObjectMetaData = savedObjectMetaData.find( + (metaData) => metaData.type === item.type + )!; + const iconType = ( + currentSavedObjectMetaData || + ({ + getIconForSavedObject: () => 'document', + } as Pick, 'getIconForSavedObject'>) + ).getIconForSavedObject(item.simple); + + return ( + + + + ); + }, + } + : undefined; + const columns: Array> = [ + ...(typeColumn ? [typeColumn] : []), + { + field: 'title', + name: i18n.translate('savedObjectsFinder.titleName', { + defaultMessage: 'Title', + }), + width: '55%', + description: i18n.translate('savedObjectsFinder.titleDescription', { + defaultMessage: 'Title of the saved object', + }), + dataType: 'string', + sortable: ({ name }) => name?.toLowerCase(), + 'data-test-subj': 'savedObjectFinderTitle', + render: (_, item) => { + const currentSavedObjectMetaData = savedObjectMetaData.find( + (metaData) => metaData.type === item.type + )!; + const fullName = currentSavedObjectMetaData.getTooltipForSavedObject + ? currentSavedObjectMetaData.getTooltipForSavedObject(item.simple) + : `${item.name} (${currentSavedObjectMetaData!.name})`; + + return ( + { + onChoose(item.id, item.type, fullName, item.simple); + } + : undefined + } + title={fullName} + data-test-subj={`savedObjectTitle${(item.title || '').split(' ').join('-')}`} + > + {item.name} + + ); + }, + }, + ...(tagColumn ? [tagColumn] : []), + ]; + const pagination = { + initialPageSize: this.props.initialPageSize || this.props.fixedPageSize || 10, + pageSizeOptions: [5, 10, 15, 25], + showPerPageOptions: !this.props.fixedPageSize, + }; + const sorting = { + sort: this.state.sort ?? { + field: this.state.query?.text ? '' : 'title', + direction: 'asc', + }, + }; + const typeFilter: SearchFilterConfig = { + type: 'field_value_selection', + field: 'type', + name: i18n.translate('savedObjectsFinder.filterButtonLabel', { + defaultMessage: 'Types', + }), + multiSelect: 'or', + options: this.props.savedObjectMetaData.map((metaData) => ({ + value: metaData.type, + name: metaData.name, + })), + }; + const search: EuiSearchBarProps = { + onChange: ({ query }) => { + this.setState({ query: query ?? Query.parse('') }, this.fetchItems); + }, + box: { + incremental: true, + 'data-test-subj': 'savedObjectFinderSearchInput', + }, + filters: this.props.showFilter + ? [ + ...(savedObjectMetaData.length > 1 ? [typeFilter] : []), + ...(taggingApi ? [taggingApi.ui.getSearchBarFilter({ useName: true })] : []), + ] + : undefined, + toolsRight: this.props.children ? <>{this.props.children} : undefined, + }; + + return ( + { + this.setState({ sort }); + }} + /> + ); + } +} + +// Needed for React.lazy +// eslint-disable-next-line import/no-default-export +export default SavedObjectFinderUi; diff --git a/src/plugins/saved_objects_finder/public/index.ts b/src/plugins/saved_objects_finder/public/index.ts new file mode 100644 index 0000000000000..b266860185365 --- /dev/null +++ b/src/plugins/saved_objects_finder/public/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. + */ + +import { SavedObjectsFinderPublicPlugin } from './plugin'; +export type { SavedObjectMetaData, SavedObjectFinderProps } from './finder'; +export { SavedObjectFinder } from './finder'; + +export const plugin = () => new SavedObjectsFinderPublicPlugin(); diff --git a/src/plugins/saved_objects_finder/public/plugin.ts b/src/plugins/saved_objects_finder/public/plugin.ts new file mode 100644 index 0000000000000..6c5b143fd78dc --- /dev/null +++ b/src/plugins/saved_objects_finder/public/plugin.ts @@ -0,0 +1,19 @@ +/* + * 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 { Plugin } from '@kbn/core/public'; + +export class SavedObjectsFinderPublicPlugin implements Plugin<{}, {}, object, {}> { + public setup() { + return {}; + } + + public start() { + return {}; + } +} diff --git a/src/plugins/saved_objects_finder/tsconfig.json b/src/plugins/saved_objects_finder/tsconfig.json new file mode 100644 index 0000000000000..547ab2cc357f7 --- /dev/null +++ b/src/plugins/saved_objects_finder/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": ["common/**/*", "public/**/*", "server/**/*"], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../saved_objects_management/tsconfig.json" } + ] +} diff --git a/src/plugins/saved_objects_management/public/mocks.ts b/src/plugins/saved_objects_management/public/mocks.ts index 8e12d0bde3a0e..82fe0d419855c 100644 --- a/src/plugins/saved_objects_management/public/mocks.ts +++ b/src/plugins/saved_objects_management/public/mocks.ts @@ -26,6 +26,8 @@ const createStartContractMock = (): jest.Mocked Promise; getSavedObjectLabel: typeof getSavedObjectLabel; getDefaultTitle: typeof getDefaultTitle; + parseQuery: typeof parseQuery; + getTagFindReferences: typeof getTagFindReferences; } export interface SetupDependencies { @@ -125,6 +134,8 @@ export class SavedObjectsManagementPlugin getRelationships(_core.http, type, id, savedObjectTypes), getSavedObjectLabel, getDefaultTitle, + parseQuery, + getTagFindReferences, }; } } diff --git a/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.test.ts b/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.test.ts index 397f3c11990eb..ca405537c363d 100644 --- a/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.test.ts +++ b/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.test.ts @@ -12,6 +12,7 @@ import { savedObjectsServiceMock } from '@kbn/core/public/mocks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { getSavedSearch } from './get_saved_searches'; +import { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; describe('getSavedSearch', () => { let search: DataPublicPluginStart['search']; @@ -23,7 +24,10 @@ describe('getSavedSearch', () => { }); test('should return empty saved search in case of no id', async () => { - const savedSearch = await getSavedSearch(undefined, { savedObjectsClient, search }); + const savedSearch = await getSavedSearch(undefined, { + savedObjectsClient, + search, + }); expect(search.searchSource.createEmpty).toHaveBeenCalled(); expect(savedSearch).toHaveProperty('searchSource'); @@ -146,6 +150,7 @@ describe('getSavedSearch', () => { "desc", ], ], + "tags": undefined, "timeRange": undefined, "timeRestore": undefined, "title": "test1", @@ -242,6 +247,7 @@ describe('getSavedSearch', () => { "desc", ], ], + "tags": undefined, "timeRange": undefined, "timeRestore": undefined, "title": "test2", @@ -249,4 +255,62 @@ describe('getSavedSearch', () => { } `); }); + + it('should call savedObjectsTagging.ui.getTagIdsFromReferences', async () => { + savedObjectsClient.resolve = jest.fn().mockReturnValue({ + saved_object: { + attributes: { + kibanaSavedObjectMeta: { + searchSourceJSON: + '{"query":{"sql":"SELECT * FROM foo"},"filter":[],"indexRefName":"kibanaSavedObjectMeta.searchSourceJSON.index"}', + }, + title: 'test2', + sort: [['order_date', 'desc']], + columns: ['_source'], + description: 'description', + grid: {}, + hideChart: true, + isTextBasedQuery: true, + }, + id: 'ccf1af80-2297-11ec-86e0-1155ffb9c7a7', + type: 'search', + references: [ + { + name: 'kibanaSavedObjectMeta.searchSourceJSON.index', + id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f', + type: 'index-pattern', + }, + { + name: 'tag-1', + id: 'tag-1', + type: 'tag', + }, + ], + namespaces: ['default'], + }, + outcome: 'exactMatch', + }); + const savedObjectsTagging = { + ui: { + getTagIdsFromReferences: jest.fn((_, tags) => tags), + }, + } as unknown as SavedObjectsTaggingApi; + await getSavedSearch('ccf1af80-2297-11ec-86e0-1155ffb9c7a7', { + savedObjectsClient, + search, + savedObjectsTagging, + }); + expect(savedObjectsTagging.ui.getTagIdsFromReferences).toHaveBeenCalledWith([ + { + name: 'kibanaSavedObjectMeta.searchSourceJSON.index', + id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f', + type: 'index-pattern', + }, + { + name: 'tag-1', + id: 'tag-1', + type: 'tag', + }, + ]); + }); }); diff --git a/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.ts b/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.ts index 444e9f0978182..59f2104adbcad 100644 --- a/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.ts +++ b/src/plugins/saved_search/public/services/saved_searches/get_saved_searches.ts @@ -6,11 +6,12 @@ * Side Public License, v 1. */ -import type { SavedObjectsStart } from '@kbn/core/public'; +import type { SavedObjectsClientContract } from '@kbn/core/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { injectSearchSourceReferences, parseSearchSourceJSON } from '@kbn/data-plugin/public'; import { SavedObjectNotFound } from '@kbn/kibana-utils-plugin/public'; import type { SpacesApi } from '@kbn/spaces-plugin/public'; +import type { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; import type { SavedSearchAttributes, SavedSearch } from './types'; import { SAVED_SEARCH_TYPE } from './constants'; @@ -18,8 +19,9 @@ import { fromSavedSearchAttributes } from './saved_searches_utils'; interface GetSavedSearchDependencies { search: DataPublicPluginStart['search']; - savedObjectsClient: SavedObjectsStart['client']; + savedObjectsClient: SavedObjectsClientContract; spaces?: SpacesApi; + savedObjectsTagging?: SavedObjectsTaggingApi; } const getEmptySavedSearch = ({ @@ -32,7 +34,7 @@ const getEmptySavedSearch = ({ const findSavedSearch = async ( savedSearchId: string, - { search, savedObjectsClient, spaces }: GetSavedSearchDependencies + { search, savedObjectsClient, spaces, savedObjectsTagging }: GetSavedSearchDependencies ) => { const so = await savedObjectsClient.resolve( SAVED_SEARCH_TYPE, @@ -54,9 +56,14 @@ const findSavedSearch = async ( savedSearch.references ); + const tags = savedObjectsTagging + ? savedObjectsTagging.ui.getTagIdsFromReferences(savedSearch.references) + : undefined; + return fromSavedSearchAttributes( savedSearchId, savedSearch.attributes, + tags, await search.searchSource.create(searchSourceValues), { outcome: so.outcome, diff --git a/src/plugins/saved_search/public/services/saved_searches/save_saved_searches.test.ts b/src/plugins/saved_search/public/services/saved_searches/save_saved_searches.test.ts index 56b988b20121c..0d7769b46c19d 100644 --- a/src/plugins/saved_search/public/services/saved_searches/save_saved_searches.test.ts +++ b/src/plugins/saved_search/public/services/saved_searches/save_saved_searches.test.ts @@ -13,6 +13,7 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { saveSavedSearch } from './save_saved_searches'; import type { SavedSearch } from './types'; +import type { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; describe('saveSavedSearch', () => { let savedObjectsClient: SavedObjectsStart['client']; @@ -51,7 +52,8 @@ describe('saveSavedSearch', () => { onTitleDuplicate, copyOnSave: true, }, - savedObjectsClient + savedObjectsClient, + undefined ); expect(onTitleDuplicate).toHaveBeenCalled(); @@ -69,7 +71,8 @@ describe('saveSavedSearch', () => { onTitleDuplicate, copyOnSave: false, }, - savedObjectsClient + savedObjectsClient, + undefined ); expect(onTitleDuplicate).not.toHaveBeenCalled(); @@ -79,7 +82,7 @@ describe('saveSavedSearch', () => { test('should call savedObjectsClient.create for saving new search', async () => { delete savedSearch.id; - await saveSavedSearch(savedSearch, {}, savedObjectsClient); + await saveSavedSearch(savedSearch, {}, savedObjectsClient, undefined); expect(savedObjectsClient.create).toHaveBeenCalledWith( 'search', @@ -99,7 +102,7 @@ describe('saveSavedSearch', () => { }); test('should call savedObjectsClient.update for saving existing search', async () => { - await saveSavedSearch(savedSearch, {}, savedObjectsClient); + await saveSavedSearch(savedSearch, {}, savedObjectsClient, undefined); expect(savedObjectsClient.update).toHaveBeenCalledWith( 'search', @@ -118,4 +121,39 @@ describe('saveSavedSearch', () => { { references: [] } ); }); + + test('should call savedObjectsTagging.ui.updateTagsReferences', async () => { + const savedObjectsTagging = { + ui: { + updateTagsReferences: jest.fn((_, tags) => tags), + }, + } as unknown as SavedObjectsTaggingApi; + await saveSavedSearch( + { ...savedSearch, tags: ['tag-1', 'tag-2'] }, + {}, + savedObjectsClient, + savedObjectsTagging + ); + + expect(savedObjectsTagging.ui.updateTagsReferences).toHaveBeenCalledWith( + [], + ['tag-1', 'tag-2'] + ); + expect(savedObjectsClient.update).toHaveBeenCalledWith( + 'search', + 'id', + { + columns: [], + description: '', + grid: {}, + isTextBasedQuery: false, + hideChart: false, + kibanaSavedObjectMeta: { searchSourceJSON: '{}' }, + sort: [], + title: 'title', + timeRestore: false, + }, + { references: ['tag-1', 'tag-2'] } + ); + }); }); diff --git a/src/plugins/saved_search/public/services/saved_searches/save_saved_searches.ts b/src/plugins/saved_search/public/services/saved_searches/save_saved_searches.ts index e83685015dd46..029d738096859 100644 --- a/src/plugins/saved_search/public/services/saved_searches/save_saved_searches.ts +++ b/src/plugins/saved_search/public/services/saved_searches/save_saved_searches.ts @@ -5,7 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import type { SavedObjectsStart } from '@kbn/core/public'; +import type { SavedObjectsClientContract, SavedObjectsStart } from '@kbn/core/public'; +import type { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; import type { SavedSearch, SavedSearchAttributes } from './types'; import { SAVED_SEARCH_TYPE } from './constants'; @@ -42,7 +43,8 @@ const hasDuplicatedTitle = async ( export const saveSavedSearch = async ( savedSearch: SavedSearch, options: SaveSavedSearchOptions, - savedObjectsClient: SavedObjectsStart['client'] + savedObjectsClient: SavedObjectsClientContract, + savedObjectsTagging: SavedObjectsTaggingApi | undefined ): Promise => { const isNew = options.copyOnSave || !savedSearch.id; @@ -58,7 +60,10 @@ export const saveSavedSearch = async ( } } - const { searchSourceJSON, references } = savedSearch.searchSource.serialize(); + const { searchSourceJSON, references: originalReferences } = savedSearch.searchSource.serialize(); + const references = savedObjectsTagging + ? savedObjectsTagging.ui.updateTagsReferences(originalReferences, savedSearch.tags ?? []) + : originalReferences; const resp = isNew ? await savedObjectsClient.create( SAVED_SEARCH_TYPE, diff --git a/src/plugins/saved_search/public/services/saved_searches/saved_searches_utils.test.ts b/src/plugins/saved_search/public/services/saved_searches/saved_searches_utils.test.ts index a6926aef50796..55d2b7f99009d 100644 --- a/src/plugins/saved_search/public/services/saved_searches/saved_searches_utils.test.ts +++ b/src/plugins/saved_search/public/services/saved_searches/saved_searches_utils.test.ts @@ -30,8 +30,15 @@ describe('saved_searches_utils', () => { isTextBasedQuery: false, }; - expect(fromSavedSearchAttributes('id', attributes, createSearchSourceMock(), {})) - .toMatchInlineSnapshot(` + expect( + fromSavedSearchAttributes( + 'id', + attributes, + ['tags-1', 'tags-2'], + createSearchSourceMock(), + {} + ) + ).toMatchInlineSnapshot(` Object { "columns": Array [ "a", @@ -67,6 +74,10 @@ describe('saved_searches_utils', () => { }, "sharingSavedObjectProps": Object {}, "sort": Array [], + "tags": Array [ + "tags-1", + "tags-2", + ], "timeRange": undefined, "timeRestore": undefined, "title": "saved search", diff --git a/src/plugins/saved_search/public/services/saved_searches/saved_searches_utils.ts b/src/plugins/saved_search/public/services/saved_searches/saved_searches_utils.ts index 52c25783c0e50..8ca6dde21d6fc 100644 --- a/src/plugins/saved_search/public/services/saved_searches/saved_searches_utils.ts +++ b/src/plugins/saved_search/public/services/saved_searches/saved_searches_utils.ts @@ -27,6 +27,7 @@ export const throwErrorOnSavedSearchUrlConflict = async (savedSearch: SavedSearc export const fromSavedSearchAttributes = ( id: string, attributes: SavedSearchAttributes, + tags: string[] | undefined, searchSource: SavedSearch['searchSource'], sharingSavedObjectProps: SavedSearch['sharingSavedObjectProps'] ): SavedSearch => ({ @@ -37,6 +38,7 @@ export const fromSavedSearchAttributes = ( sort: attributes.sort, columns: attributes.columns, description: attributes.description, + tags, grid: attributes.grid, hideChart: attributes.hideChart, viewMode: attributes.viewMode, diff --git a/src/plugins/saved_search/public/services/saved_searches/types.ts b/src/plugins/saved_search/public/services/saved_searches/types.ts index acd745374e265..58972dd40bfb8 100644 --- a/src/plugins/saved_search/public/services/saved_searches/types.ts +++ b/src/plugins/saved_search/public/services/saved_searches/types.ts @@ -58,6 +58,7 @@ export interface SavedSearch { sort?: SortOrder[]; columns?: string[]; description?: string; + tags?: string[] | undefined; grid?: { columns?: Record; }; diff --git a/src/plugins/saved_search/tsconfig.json b/src/plugins/saved_search/tsconfig.json index 3bfddf5ff5858..288f30441b922 100644 --- a/src/plugins/saved_search/tsconfig.json +++ b/src/plugins/saved_search/tsconfig.json @@ -16,6 +16,7 @@ { "path": "../../core/tsconfig.json" }, { "path": "../data/tsconfig.json" }, { "path": "../kibana_utils/tsconfig.json" }, - { "path": "../../../x-pack/plugins/spaces/tsconfig.json" } + { "path": "../../../x-pack/plugins/spaces/tsconfig.json" }, + { "path": "../saved_objects_tagging_oss/tsconfig.json" } ] } diff --git a/src/plugins/vis_types/table/public/components/table_vis_split.tsx b/src/plugins/vis_types/table/public/components/table_vis_split.tsx index ca5e7161c0b93..9d5d8260592bb 100644 --- a/src/plugins/vis_types/table/public/components/table_vis_split.tsx +++ b/src/plugins/vis_types/table/public/components/table_vis_split.tsx @@ -9,6 +9,7 @@ import React, { memo } from 'react'; import { IInterpreterRenderHandlers } from '@kbn/expressions-plugin/common'; +import { euiThemeVars } from '@kbn/ui-theme'; import { TableGroup, TableVisConfig, TableVisUseUiStateProps } from '../types'; import { TableVisBasic } from './table_vis_basic'; @@ -17,23 +18,43 @@ interface TableVisSplitProps { tables: TableGroup[]; visConfig: TableVisConfig; uiStateProps: TableVisUseUiStateProps; + enforceMinWidth?: boolean; } export const TableVisSplit = memo( - ({ fireEvent, tables, visConfig, uiStateProps }: TableVisSplitProps) => { + ({ fireEvent, tables, visConfig, uiStateProps, enforceMinWidth }: TableVisSplitProps) => { return ( <> - {tables.map(({ table, title }) => ( -
- -
- ))} + {tables.map(({ table, title }) => { + // reserve minimum size per table + const minTableWidth = table.columns.reduce((sum, column, index) => { + return ( + sum + + (uiStateProps.columnsWidth.find((width) => width.colIndex === index)?.width ?? 25) + ); + }, 0); + return ( +
+ +
+ ); + })} ); } diff --git a/src/plugins/vis_types/table/public/components/table_visualization.test.tsx b/src/plugins/vis_types/table/public/components/table_visualization.test.tsx index a415da71555d9..e20c6f2e09771 100644 --- a/src/plugins/vis_types/table/public/components/table_visualization.test.tsx +++ b/src/plugins/vis_types/table/public/components/table_visualization.test.tsx @@ -7,16 +7,27 @@ */ jest.mock('../utils', () => ({ - useUiState: jest.fn(() => 'uiState'), + useUiState: jest.fn(() => ({ + columnsWidth: [ + { colIndex: 0, width: 77 }, + { colIndex: 1, width: 22 }, + ], + sort: { + columnIndex: null, + direction: null, + }, + })), + usePagination: () => undefined, })); import React from 'react'; -import { shallow } from 'enzyme'; +import { mount, shallow } from 'enzyme'; import { IInterpreterRenderHandlers } from '@kbn/expressions-plugin/common'; import { coreMock } from '@kbn/core/public/mocks'; -import { TableVisConfig, TableVisData } from '../types'; +import { FormattedColumns, TableVisConfig, TableVisData } from '../types'; import TableVisualizationComponent from './table_visualization'; import { useUiState } from '../utils'; +import { TableVisSplit } from './table_vis_split'; describe('TableVisualizationComponent', () => { const coreStartMock = coreMock.createStart(); @@ -68,4 +79,59 @@ describe('TableVisualizationComponent', () => { expect(comp.find('.tbvChart__split').exists()).toBeFalsy(); expect(comp.find('[data-test-subj="tbvChart"]').children().prop('tables')).toEqual([]); }); + + it('should render split table and set minWidth for column split', () => { + const comp = mount( + + ); + const splits = comp.find(TableVisSplit).find('.tbvChart__split'); + expect(splits.length).toBe(2); + splits.forEach((split) => { + expect((split.prop('css') as { minWidth: string }).minWidth).toEqual( + `calc(${77 + 22 + 25}px + 2 * 8px)` + ); + }); + }); }); diff --git a/src/plugins/vis_types/table/public/components/table_visualization.tsx b/src/plugins/vis_types/table/public/components/table_visualization.tsx index fc89e22e63a16..01fcefad91e76 100644 --- a/src/plugins/vis_types/table/public/components/table_visualization.tsx +++ b/src/plugins/vis_types/table/public/components/table_visualization.tsx @@ -64,6 +64,7 @@ const TableVisualizationComponent = ({ tables={tables} visConfig={visConfig} uiStateProps={uiStateProps} + enforceMinWidth={direction === 'column'} /> )} diff --git a/src/plugins/vis_types/timelion/server/lib/load_functions.js b/src/plugins/vis_types/timelion/server/lib/load_functions.js index 890c5b1df5cdc..cb765c1cb7dca 100644 --- a/src/plugins/vis_types/timelion/server/lib/load_functions.js +++ b/src/plugins/vis_types/timelion/server/lib/load_functions.js @@ -7,7 +7,7 @@ */ import _ from 'lodash'; -import glob from 'glob'; +import globby from 'globby'; import path from 'path'; import processFunctionDefinition from './process_function_definition'; @@ -18,7 +18,7 @@ export default function (directory) { // Get a list of all files and use the filename as the object key const files = _.map( - glob + globby .sync(path.resolve(__dirname, '../' + directory + '/*.js')) .filter((filename) => !filename.includes('.test')), function (file) { @@ -28,7 +28,9 @@ export default function (directory) { ); // Get a list of all directories with an index.js, use the directory name as the key in the object - const directories = _.chain(glob.sync(path.resolve(__dirname, '../' + directory + '/*/index.js'))) + const directories = _.chain( + globby.sync(path.resolve(__dirname, '../' + directory + '/*/index.js')) + ) .map(function (file) { const parts = file.split('/'); const name = parts[parts.length - 2]; diff --git a/src/plugins/visualizations/public/plugin.ts b/src/plugins/visualizations/public/plugin.ts index 2bd233a5db049..e98ba20fe3056 100644 --- a/src/plugins/visualizations/public/plugin.ts +++ b/src/plugins/visualizations/public/plugin.ts @@ -88,6 +88,7 @@ import { setTheme, setExecutionContext, setFieldFormats, + setSavedObjectTagging, } from './services'; import { VisualizeConstants } from '../common/constants'; @@ -378,6 +379,10 @@ export class VisualizationsPlugin setSpaces(spaces); } + if (savedObjectsTaggingOss) { + setSavedObjectTagging(savedObjectsTaggingOss); + } + return { ...types, showNewVisModal, diff --git a/src/plugins/visualizations/public/services.ts b/src/plugins/visualizations/public/services.ts index f87597b07462b..2474647917e1f 100644 --- a/src/plugins/visualizations/public/services.ts +++ b/src/plugins/visualizations/public/services.ts @@ -25,6 +25,7 @@ import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import type { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import type { EmbeddableStart } from '@kbn/embeddable-plugin/public'; import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; +import type { SavedObjectTaggingOssPluginStart } from '@kbn/saved-objects-tagging-oss-plugin/public'; import type { TypesStart } from './vis_types'; export const [getUISettings, setUISettings] = createGetterSetter('UISettings'); @@ -68,3 +69,6 @@ export const [getExecutionContext, setExecutionContext] = createGetterSetter('ExecutionContext'); export const [getSpaces, setSpaces] = createGetterSetter('Spaces', false); + +export const [getSavedObjectTagging, setSavedObjectTagging] = + createGetterSetter('SavedObjectTagging', false); diff --git a/src/plugins/visualizations/public/vis.ts b/src/plugins/visualizations/public/vis.ts index 003a894fdfe11..1fbe84eee556c 100644 --- a/src/plugins/visualizations/public/vis.ts +++ b/src/plugins/visualizations/public/vis.ts @@ -35,6 +35,7 @@ import { getSavedObjects, getSpaces, getFieldsFormats, + getSavedObjectTagging, } from './services'; import { BaseVisType } from './vis_types'; import { SerializedVis, SerializedVisData, VisParams } from '../common/types'; @@ -58,6 +59,7 @@ const getSearchSource = async (inputSearchSource: ISearchSource, savedSearchId?: search: getSearch(), savedObjectsClient: getSavedObjects().client, spaces: getSpaces(), + savedObjectsTagging: getSavedObjectTagging()?.getTaggingApi(), }); } catch (e) { return inputSearchSource; diff --git a/src/plugins/visualizations/public/visualize_app/utils/get_visualization_instance.ts b/src/plugins/visualizations/public/visualize_app/utils/get_visualization_instance.ts index 4049f8242a02a..40f789390214b 100644 --- a/src/plugins/visualizations/public/visualize_app/utils/get_visualization_instance.ts +++ b/src/plugins/visualizations/public/visualize_app/utils/get_visualization_instance.ts @@ -37,7 +37,8 @@ const createVisualizeEmbeddableAndLinkSavedSearch = async ( vis: Vis, visualizeServices: VisualizeServices ) => { - const { data, createVisEmbeddableFromObject, savedObjects, spaces } = visualizeServices; + const { data, createVisEmbeddableFromObject, savedObjects, spaces, savedObjectsTagging } = + visualizeServices; let savedSearch: SavedSearch | undefined; @@ -47,6 +48,7 @@ const createVisualizeEmbeddableAndLinkSavedSearch = async ( search: data.search, savedObjectsClient: savedObjects.client, spaces, + savedObjectsTagging, }); } catch (e) { // skip this catch block diff --git a/test/common/services/es_archiver.ts b/test/common/services/es_archiver.ts index 8a9106e928152..865c2ba4b4434 100644 --- a/test/common/services/es_archiver.ts +++ b/test/common/services/es_archiver.ts @@ -17,7 +17,7 @@ export function EsArchiverProvider({ getService }: FtrProviderContext): EsArchiv const log = getService('log'); const kibanaServer = getService('kibanaServer'); const retry = getService('retry'); - const esArchives = config.get('testData.esArchives'); + const esArchives: string[] = config.get('testData.esArchives'); const esArchiver = new EsArchiver({ client, @@ -32,7 +32,7 @@ export function EsArchiverProvider({ getService }: FtrProviderContext): EsArchiv defaults: config.get('uiSettings.defaults'), }); - if (esArchives) { + if (esArchives.length) { lifecycle.beforeTests.add(async () => { for (const archive of esArchives) { await esArchiver.load(archive); diff --git a/test/common/services/kibana_server/kibana_server.ts b/test/common/services/kibana_server/kibana_server.ts index 85bf463648205..182b289ed1d8e 100644 --- a/test/common/services/kibana_server/kibana_server.ts +++ b/test/common/services/kibana_server/kibana_server.ts @@ -17,7 +17,8 @@ export function KibanaServerProvider({ getService }: FtrProviderContext): KbnCli const lifecycle = getService('lifecycle'); const url = Url.format(config.get('servers.kibana')); const defaults = config.get('uiSettings.defaults'); - const kbnArchives = config.get('testData.kbnArchives'); + const kbnArchives: string[] = config.get('testData.kbnArchives'); + const kbn = new KbnClient({ log, url, @@ -31,7 +32,7 @@ export function KibanaServerProvider({ getService }: FtrProviderContext): KbnCli }); } - if (kbnArchives) { + if (kbnArchives.length) { lifecycle.beforeTests.add(async () => { for (const archive of kbnArchives) { await kbn.importExport.load(archive); diff --git a/test/examples/search/warnings.ts b/test/examples/search/warnings.ts index 226a9c48cfb4e..78aa042ce6ea6 100644 --- a/test/examples/search/warnings.ts +++ b/test/examples/search/warnings.ts @@ -22,7 +22,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const kibanaServer = getService('kibanaServer'); const esArchiver = getService('esArchiver'); - describe('handling warnings with search source fetch', function () { + // Failing: See https://github.com/elastic/kibana/issues/139879 + describe.skip('handling warnings with search source fetch', function () { const dataViewTitle = 'sample-01,sample-01-rollup'; const fromTime = 'Jun 17, 2022 @ 00:00:00.000'; const toTime = 'Jun 23, 2022 @ 00:00:00.000'; diff --git a/test/functional/fixtures/es_archiver/empty_kibana/data.json.gz b/test/functional/fixtures/es_archiver/empty_kibana/data.json.gz deleted file mode 100644 index 0d3cc4355bbde..0000000000000 Binary files a/test/functional/fixtures/es_archiver/empty_kibana/data.json.gz and /dev/null differ diff --git a/test/functional/fixtures/es_archiver/empty_kibana/mappings.json b/test/functional/fixtures/es_archiver/empty_kibana/mappings.json deleted file mode 100644 index 7082f43f45e99..0000000000000 --- a/test/functional/fixtures/es_archiver/empty_kibana/mappings.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana": {} - }, - "index": ".kibana_1", - "mappings": { - "properties": { - "config": { - "dynamic": "true", - "properties": { - "buildNum": { - "type": "keyword" - }, - "dateFormat:tz": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "dashboard": { - "dynamic": "strict", - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "dynamic": "strict", - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - } - } - }, - "search": { - "dynamic": "strict", - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "dynamic": "strict", - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "type": { - "type": "keyword" - }, - "url": { - "dynamic": "strict", - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "visualization": { - "dynamic": "strict", - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - }, - "query": { - "properties": { - "title": { - "type": "text" - }, - "description": { - "type": "text" - }, - "query": { - "properties": { - "language": { - "type": "keyword" - }, - "query": { - "type": "keyword", - "index": false - } - } - }, - "filters": { - "type": "object", - "enabled": false - }, - "timefilter": { - "type": "object", - "enabled": false - } - } - } - } - }, - "settings": { - "index": { - "number_of_replicas": "1", - "number_of_shards": "1" - } - } - } -} diff --git a/test/functional/page_objects/common_page.ts b/test/functional/page_objects/common_page.ts index 71594370680df..a92cd19405378 100644 --- a/test/functional/page_objects/common_page.ts +++ b/test/functional/page_objects/common_page.ts @@ -549,7 +549,7 @@ export class CommonPageObject extends FtrService { * @param time */ async setTime(time: TimeStrings) { - await this.kibanaServer.uiSettings.replace({ + await this.kibanaServer.uiSettings.update({ 'timepicker:timeDefaults': JSON.stringify(this.formatTime(time)), }); } diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts index ab453fc2378ed..da301a7d5d82d 100644 --- a/test/functional/page_objects/discover_page.ts +++ b/test/functional/page_objects/discover_page.ts @@ -49,7 +49,11 @@ export class DiscoverPageObject extends FtrService { await fieldSearch.clearValue(); } - public async saveSearch(searchName: string, saveAsNew?: boolean) { + public async saveSearch( + searchName: string, + saveAsNew?: boolean, + options: { tags: string[] } = { tags: [] } + ) { await this.clickSaveSearchButton(); // preventing an occasional flakiness when the saved object wasn't set and the form can't be submitted await this.retry.waitFor( @@ -61,6 +65,14 @@ export class DiscoverPageObject extends FtrService { } ); + if (options.tags.length) { + await this.testSubjects.click('savedObjectTagSelector'); + for (const tagName of options.tags) { + await this.testSubjects.click(`tagSelectorOption-${tagName.replace(' ', '_')}`); + } + await this.testSubjects.click('savedObjectTitle'); + } + if (saveAsNew !== undefined) { await this.retry.waitFor(`save as new switch is set`, async () => { await this.testSubjects.setEuiSwitch('saveAsNewCheckbox', saveAsNew ? 'check' : 'uncheck'); diff --git a/test/functional/services/common/test_subjects.ts b/test/functional/services/common/test_subjects.ts index 09c54af7b8811..d6254b04c1641 100644 --- a/test/functional/services/common/test_subjects.ts +++ b/test/functional/services/common/test_subjects.ts @@ -30,6 +30,21 @@ export class TestSubjects extends FtrService { public readonly TRY_TIME = this.config.get('timeouts.try'); public readonly WAIT_FOR_EXISTS_TIME = this.config.get('timeouts.waitForExists'); + /** + * Get a promise that resolves with `true` when an element exists, if the element doesn't exist + * yet it will wait until the element does exist. If we wait until the timeout and the element + * still doesn't exist the promise will resolve with `false`. + * + * This method is intended to quickly answer the question "does this testSubject exist". Its + * 2.5 second timeout responds quickly, making it a good candidate for putting inside + * `retry.waitFor()` loops. + * + * When `options.timeout` is not passed the `timeouts.waitForExists` config is used as + * the timeout. The default value for that config is currently 2.5 seconds. + * + * If the element is hidden it is not treated as "existing", unless `options.allowHidden` + * is set to `true`. + */ public async exists(selector: string, options: ExistsOptions = {}): Promise { const { timeout = this.WAIT_FOR_EXISTS_TIME, allowHidden = false } = options; @@ -39,6 +54,17 @@ export class TestSubjects extends FtrService { : this.findService.existsByDisplayedByCssSelector(testSubjSelector(selector), timeout)); } + /** + * Get a promise that resolves when an element exists, if the element doesn't exist + * before the timeout is reached the promise will reject with an error. + * + * This method is intended to be used as success critieria when something is expected + * to exist. The default 2 minute timeout is not appropriate for all conditions, but + * hard-coding timeouts all over tests is also bad, so please use your best judgement. + * + * The options are equal to the options accepted by the {@link #exists} method except + * that `options.timeout` defaults to the `timeouts.try` config, or 2 minutes. + */ public async existOrFail(selector: string, existsOptions?: ExistsOptions): Promise { if (!(await this.exists(selector, { timeout: this.TRY_TIME, ...existsOptions }))) { throw new Error(`expected testSubject(${selector}) to exist`); diff --git a/test/functional/services/filter_bar.ts b/test/functional/services/filter_bar.ts index 16ce34d446d1c..07ad11d32d4ca 100644 --- a/test/functional/services/filter_bar.ts +++ b/test/functional/services/filter_bar.ts @@ -15,6 +15,8 @@ export class FilterBarService extends FtrService { private readonly common = this.ctx.getPageObject('common'); private readonly header = this.ctx.getPageObject('header'); private readonly retry = this.ctx.getService('retry'); + private readonly config = this.ctx.getService('config'); + private readonly defaultTryTimeout = this.config.get('timeouts.try'); /** * Checks if specified filter exists @@ -130,7 +132,7 @@ export class FilterBarService extends FtrService { * filterBar.addFilter('extension', 'is one of', ['jpg', 'png']); */ public async addFilter(field: string, operator: string, ...values: any): Promise { - await this.retry.try(async () => { + await this.retry.tryForTime(this.defaultTryTimeout * 2, async () => { await this.testSubjects.click('addFilter'); await this.testSubjects.existOrFail('addFilterPopover'); diff --git a/tsconfig.base.json b/tsconfig.base.json index 22aeada1359fa..e5decc27e2e39 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -139,6 +139,8 @@ "@kbn/newsfeed-plugin/*": ["src/plugins/newsfeed/*"], "@kbn/presentation-util-plugin": ["src/plugins/presentation_util"], "@kbn/presentation-util-plugin/*": ["src/plugins/presentation_util/*"], + "@kbn/saved-objects-finder-plugin": ["src/plugins/saved_objects_finder"], + "@kbn/saved-objects-finder-plugin/*": ["src/plugins/saved_objects_finder/*"], "@kbn/saved-objects-management-plugin": ["src/plugins/saved_objects_management"], "@kbn/saved-objects-management-plugin/*": ["src/plugins/saved_objects_management/*"], "@kbn/saved-objects-tagging-oss-plugin": ["src/plugins/saved_objects_tagging_oss"], diff --git a/x-pack/dev-tools/api_debug/index.js b/x-pack/dev-tools/api_debug/index.js index 43d49e5a85f56..259dcaa8aa3ee 100644 --- a/x-pack/dev-tools/api_debug/index.js +++ b/x-pack/dev-tools/api_debug/index.js @@ -6,20 +6,14 @@ */ import { resolve } from 'path'; -import glob from 'glob'; +import globby from 'globby'; import { bold } from 'chalk'; import { argv } from 'yargs'; import { requestFromApi } from './request_from_api'; async function listFiles() { - const scan = (pattern) => { - return new Promise((resolve, reject) => { - glob(pattern, {}, (err, files) => (err ? reject(err) : resolve(files))); - }); - }; - const pattern = resolve(__dirname, './apis/*/index.js'); - const files = await scan(pattern); + const files = await globby(pattern); files.forEach((file) => { const { name, description } = require(file); // eslint-disable-line import/no-dynamic-require console.log(' ' + bold(`node ${argv.$0} ${name}`)); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.test.js index 1ee2061d598c7..a72f59656c62b 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.test.js @@ -93,49 +93,34 @@ describe('switch', () => { it('should support partial results', () => { testScheduler.run(({ cold, expectObservable }) => { const context = 'foo'; - const case1 = cold('--ab-c-', { - a: { - type: 'case', - matches: false, - result: 1, - }, - b: { - type: 'case', - matches: true, - result: 2, - }, - c: { - type: 'case', - matches: false, - result: 3, - }, - }); - const case2 = cold('-a--bc-', { - a: { - type: 'case', - matches: true, - result: 4, - }, - b: { - type: 'case', - matches: true, - result: 5, - }, - c: { - type: 'case', - matches: true, - result: 6, - }, - }); - const expected = ' --abc(de)-'; - const args = { case: [() => case1, () => case2] }; - expectObservable(fn(context, args)).toBe(expected, { - a: 4, - b: 2, - c: 2, - d: 5, - e: 6, - }); + const a = { type: 'case', matches: false, result: 'a' }; + const b = { type: 'case', matches: true, result: 'b' }; + const c = { type: 'case', matches: false, result: 'c' }; + const d = { type: 'case', matches: true, result: 'd' }; + const e = { type: 'case', matches: false, result: 'e' }; + const f = { type: 'case', matches: true, result: 'f' }; + + const case1 = cold('--a---b-c-', { a, b, c }); + const case2 = cold(' d-e-f-', { d, e, f }); + const expected = ' --d-g-b-d-g-f'; + const args = { case: [() => case1, () => case2], default: () => cold('g') }; + expectObservable(fn(context, args)).toBe(expected); + }); + }); + + it('should not resolve the next case if the current one matches', () => { + testScheduler.run(({ cold, expectObservable }) => { + const context = 'foo'; + const a = { type: 'case', matches: true, result: 'a' }; + const b = { type: 'case', matches: true, result: 'b' }; + const c = { type: 'case', matches: false, result: 'c' }; + + const case1 = cold('--a-b', { a, b }); + const case2 = cold('c', { c }); + const expected = ' --a-b'; + const args = { case: [() => case1, jest.fn(() => case2)] }; + expectObservable(fn(context, args)).toBe(expected); + expect(args.case[1]).not.toHaveBeenCalled(); }); }); }); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.ts b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.ts index 4f344c6141c9b..d80d3d2fe621a 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.ts @@ -5,8 +5,7 @@ * 2.0. */ -import { Observable, combineLatest, defer, of } from 'rxjs'; -import { concatMap } from 'rxjs/operators'; +import { Observable, defaultIfEmpty, defer, of, switchMap } from 'rxjs'; import { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; import { Case } from '../../../types'; import { getFunctionHelp } from '../../../i18n'; @@ -42,15 +41,21 @@ export function switchFn(): ExpressionFunctionDefinition< help: argHelp.default!, }, }, - fn(input, args) { - return combineLatest(args.case.map((item) => defer(() => item()))).pipe( - concatMap((items) => { - const item = items.find(({ matches }) => matches); - const item$ = item && of(item.result); + fn: function fn(input, args): Observable { + return defer(() => { + if (!args.case.length) { + return args.default?.() ?? of(input); + } - return item$ ?? args.default?.() ?? of(input); - }) - ); + const [head$, ...tail$] = args.case; + + return head$().pipe( + defaultIfEmpty(undefined), + switchMap((value) => + value?.matches ? of(value.result) : fn(input, { ...args, case: tail$ }) + ) + ); + }); }, }; } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.test.ts index 630d6f1b85a5d..0238cf6e7a439 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.test.ts @@ -94,7 +94,7 @@ describe('CrawlCustomSettingsFlyoutLogic', () => { expect(http.get).toHaveBeenNthCalledWith( 1, - '/internal/enterprise_search/engines/some-engine/crawler/domain_configs', + '/internal/app_search/engines/some-engine/crawler/domain_configs', { query: { 'page[current]': 1, @@ -104,7 +104,7 @@ describe('CrawlCustomSettingsFlyoutLogic', () => { ); expect(http.get).toHaveBeenNthCalledWith( 2, - '/internal/enterprise_search/engines/some-engine/crawler/domain_configs', + '/internal/app_search/engines/some-engine/crawler/domain_configs', { query: { 'page[current]': 2, diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.ts index 1f4003741e347..8c9cc351c8257 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_custom_settings_flyout/crawl_custom_settings_flyout_logic.ts @@ -210,7 +210,7 @@ export const CrawlCustomSettingsFlyoutLogic = kea< } = await http.get<{ meta: Meta; results: DomainConfigFromServer[]; - }>(`/internal/enterprise_search/engines/${engineName}/crawler/domain_configs`, { + }>(`/internal/app_search/engines/${engineName}/crawler/domain_configs`, { query: { 'page[current]': nextPage, 'page[size]': pageSize }, }); diff --git a/x-pack/plugins/fleet/common/constants/agent.ts b/x-pack/plugins/fleet/common/constants/agent.ts index 832a9027c6517..6d4133c32c6c7 100644 --- a/x-pack/plugins/fleet/common/constants/agent.ts +++ b/x-pack/plugins/fleet/common/constants/agent.ts @@ -25,3 +25,13 @@ export const AGENT_POLICY_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL = 5; export const AGENTS_INDEX = '.fleet-agents'; export const AGENT_ACTIONS_INDEX = '.fleet-actions'; export const AGENT_ACTIONS_RESULTS_INDEX = '.fleet-actions-results'; + +export const FleetServerAgentComponentStatuses = [ + 'starting', + 'configuring', + 'healthy', + 'degraded', + 'failed', + 'stopping', + 'stopped', +] as const; diff --git a/x-pack/plugins/fleet/common/index.ts b/x-pack/plugins/fleet/common/index.ts index d514d5b564690..b6107a769793c 100644 --- a/x-pack/plugins/fleet/common/index.ts +++ b/x-pack/plugins/fleet/common/index.ts @@ -36,6 +36,7 @@ export { AGENTS_PREFIX, AGENT_UPDATE_LAST_CHECKIN_INTERVAL_MS, agentPolicyStatuses, + FleetServerAgentComponentStatuses, // Routes PACKAGE_POLICY_API_ROOT, AGENT_API_ROUTES, @@ -177,6 +178,7 @@ export type { InstallFailed, // Fleet server models FleetServerAgent, + FleetServerAgentComponentStatus, } from './types'; export { ElasticsearchAssetType } from './types'; diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/agent.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/agent.yaml index 72679dd1dab64..0e14c8ecbf009 100644 --- a/x-pack/plugins/fleet/common/openapi/components/schemas/agent.yaml +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/agent.yaml @@ -33,6 +33,10 @@ properties: $ref: ./agent_status.yaml default_api_key: type: string + components: + type: array + items: + $ref: ./agent_component.yaml required: - type - active diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component.yaml new file mode 100644 index 0000000000000..13b24f35b0544 --- /dev/null +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component.yaml @@ -0,0 +1,15 @@ +title: Agent component +type: object +properties: + id: + type: string + type: + type: string + status: + $ref: ./agent_component_status.yaml + message: + type: string + units: + type: array + items: + $ref: ./agent_component_unit.yaml diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component_status.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component_status.yaml new file mode 100644 index 0000000000000..9c7a1facf2f79 --- /dev/null +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component_status.yaml @@ -0,0 +1,10 @@ +title: Agent component status +type: string +enum: + - starting + - configuring + - healthy + - degraded + - failed + - stopping + - stopped diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component_unit.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component_unit.yaml new file mode 100644 index 0000000000000..8224a0696d483 --- /dev/null +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component_unit.yaml @@ -0,0 +1,13 @@ +title: Agent component unit +type: object +properties: + id: + type: string + type: + $ref: ./agent_component_unit_type.yaml + status: + $ref: ./agent_component_status.yaml + message: + type: string + payload: + type: object diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component_unit_type.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component_unit_type.yaml new file mode 100644 index 0000000000000..edeaa4240cfff --- /dev/null +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_component_unit_type.yaml @@ -0,0 +1,5 @@ +title: Agent component unit type +type: string +enum: + - input + - output diff --git a/x-pack/plugins/fleet/common/types/models/agent.ts b/x-pack/plugins/fleet/common/types/models/agent.ts index 55bdaf37e52a8..3bcadfc863f84 100644 --- a/x-pack/plugins/fleet/common/types/models/agent.ts +++ b/x-pack/plugins/fleet/common/types/models/agent.ts @@ -9,6 +9,7 @@ import type { AGENT_TYPE_EPHEMERAL, AGENT_TYPE_PERMANENT, AGENT_TYPE_TEMPORARY, + FleetServerAgentComponentStatuses, } from '../../constants'; export type AgentType = @@ -31,6 +32,9 @@ export type SimplifiedAgentStatus = 'healthy' | 'unhealthy' | 'updating' | 'offl export type AgentActionType = 'UNENROLL' | 'UPGRADE' | 'SETTINGS' | 'POLICY_REASSIGN' | 'CANCEL'; +type FleetServerAgentComponentStatusTuple = typeof FleetServerAgentComponentStatuses; +export type FleetServerAgentComponentStatus = FleetServerAgentComponentStatusTuple[number]; + export interface NewAgentAction { type: AgentActionType; data?: any; @@ -99,7 +103,25 @@ export interface CurrentUpgrade { startTime?: string; } -// Generated from FleetServer schema.json +interface FleetServerAgentComponentUnit { + id: string; + type: 'input' | 'output'; + status: FleetServerAgentComponentStatus; + message: string; + payload?: { + [key: string]: any; + }; +} + +interface FleetServerAgentComponent { + id: string; + type: string; + status: FleetServerAgentComponentStatus; + message: string; + units: FleetServerAgentComponentUnit[]; +} + +// Initially generated from FleetServer schema.json /** * An Elastic Agent that has enrolled into Fleet @@ -209,6 +231,10 @@ export interface FleetServerAgent { id: string; retired_at: string; }>; + /** + * Components array + */ + components?: FleetServerAgentComponent[]; } /** * An Elastic Agent metadata diff --git a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts index 4a78d4b117c88..283d3d57faae6 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts @@ -18,12 +18,15 @@ import type { import { agentPolicyService } from '../agent_policy'; import { outputService } from '../output'; import { dataTypes, outputType } from '../../../common/constants'; -import type { FullAgentPolicyOutputPermissions } from '../../../common/types'; +import type { FullAgentPolicyOutputPermissions, PackageInfo } from '../../../common/types'; import { getSettings } from '../settings'; import { DEFAULT_OUTPUT } from '../../constants'; import { getSourceUriForAgentPolicy } from '../../routes/agent/source_uri_utils'; +import { getPackageInfo } from '../epm/packages'; +import { pkgToPkgKey, splitPkgKey } from '../epm/registry'; + import { getMonitoringPermissions } from './monitoring_permissions'; import { storedPackagePoliciesToAgentInputs } from '.'; import { @@ -80,6 +83,34 @@ export async function getFullAgentPolicy( const sourceUri = await getSourceUriForAgentPolicy(soClient, agentPolicy); + // Build up an in-memory object for looking up Package Info, so we don't have + // call `getPackageInfo` for every single policy, which incurs performance costs + const packageInfoCache = new Map(); + for (const policy of agentPolicy.package_policies as PackagePolicy[]) { + if (!policy.package || packageInfoCache.has(pkgToPkgKey(policy.package))) { + continue; + } + + // Prime the cache w/ just the package key - we'll fetch all the package + // info concurrently below + packageInfoCache.set(pkgToPkgKey(policy.package), {} as PackageInfo); + } + + // Fetch all package info concurrently + await Promise.all( + Array.from(packageInfoCache.keys()).map(async (pkgKey) => { + const { pkgName, pkgVersion } = splitPkgKey(pkgKey); + + const packageInfo = await getPackageInfo({ + savedObjectsClient: soClient, + pkgName, + pkgVersion, + }); + + packageInfoCache.set(pkgKey, packageInfo); + }) + ); + const fullAgentPolicy: FullAgentPolicy = { id: agentPolicy.id, outputs: { @@ -93,8 +124,8 @@ export async function getFullAgentPolicy( }, {}), }, inputs: await storedPackagePoliciesToAgentInputs( - soClient, agentPolicy.package_policies as PackagePolicy[], + packageInfoCache, getOutputIdForAgentPolicy(dataOutput) ), revision: agentPolicy.revision, @@ -116,7 +147,10 @@ export async function getFullAgentPolicy( }; const dataPermissions = - (await storedPackagePoliciesToAgentPermissions(soClient, agentPolicy.package_policies)) || {}; + (await storedPackagePoliciesToAgentPermissions( + packageInfoCache, + agentPolicy.package_policies + )) || {}; dataPermissions._elastic_agent_checks = { cluster: DEFAULT_CLUSTER_PERMISSIONS, diff --git a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.test.ts b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.test.ts index 5914da1716efc..67d08cd5e6b2a 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.test.ts @@ -4,46 +4,35 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import type { PackagePolicy, PackagePolicyInput } from '../../types'; import { storedPackagePoliciesToAgentInputs } from './package_policies_to_agent_inputs'; -async function mockedGetPackageInfo({ pkgName }: { pkgName: string }) { - const packages: Record = { - 'mock-package': { - name: 'mock-package', - version: '0.0.0', - policy_templates: [ - { - multiple: true, - }, - ], +const packageInfoCache = new Map(); +packageInfoCache.set('mock_package-0.0.0', { + name: 'mock_package', + version: '0.0.0', + policy_templates: [ + { + multiple: true, }, - 'limited-package': { - name: 'limited-package', - version: '0.0.0', - policy_templates: [ - { - multiple: false, - }, - ], + ], +}); +packageInfoCache.set('limited_package-0.0.0', { + name: 'limited_package', + version: '0.0.0', + policy_templates: [ + { + multiple: false, }, - }; - return Promise.resolve(packages[pkgName]); -} - -jest.mock('../epm/packages', () => { - return { - getPackageInfo: jest.fn().mockImplementation(mockedGetPackageInfo), - }; + ], }); describe('Fleet - storedPackagePoliciesToAgentInputs', () => { const mockPackagePolicy: PackagePolicy = { id: 'some-uuid', - name: 'mock-package-policy', + name: 'mock_package-policy', description: '', created_at: '', created_by: '', @@ -138,50 +127,59 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { }; it('returns no inputs for package policy with no inputs, or only disabled inputs', async () => { - expect( - await storedPackagePoliciesToAgentInputs(savedObjectsClientMock.create(), [mockPackagePolicy]) - ).toEqual([]); + expect(await storedPackagePoliciesToAgentInputs([mockPackagePolicy], packageInfoCache)).toEqual( + [] + ); expect( - await storedPackagePoliciesToAgentInputs(savedObjectsClientMock.create(), [ - { - ...mockPackagePolicy, - package: { - name: 'mock-package', - title: 'Mock package', - version: '0.0.0', + await storedPackagePoliciesToAgentInputs( + [ + { + ...mockPackagePolicy, + package: { + name: 'mock_package', + title: 'Mock package', + version: '0.0.0', + }, }, - }, - ]) + ], + packageInfoCache + ) ).toEqual([]); expect( - await storedPackagePoliciesToAgentInputs(savedObjectsClientMock.create(), [ - { - ...mockPackagePolicy, - inputs: [{ ...mockInput, enabled: false }], - }, - ]) + await storedPackagePoliciesToAgentInputs( + [ + { + ...mockPackagePolicy, + inputs: [{ ...mockInput, enabled: false }], + }, + ], + packageInfoCache + ) ).toEqual([]); }); it('returns agent inputs with streams', async () => { expect( - await storedPackagePoliciesToAgentInputs(savedObjectsClientMock.create(), [ - { - ...mockPackagePolicy, - package: { - name: 'mock-package', - title: 'Mock package', - version: '0.0.0', + await storedPackagePoliciesToAgentInputs( + [ + { + ...mockPackagePolicy, + package: { + name: 'mock_package', + title: 'Mock package', + version: '0.0.0', + }, + inputs: [mockInput], }, - inputs: [mockInput], - }, - ]) + ], + packageInfoCache + ) ).toEqual([ { id: 'test-logs-some-uuid', - name: 'mock-package-policy', + name: 'mock_package-policy', package_policy_id: 'some-uuid', revision: 1, type: 'test-logs', @@ -189,7 +187,7 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { use_output: 'default', meta: { package: { - name: 'mock-package', + name: 'mock_package', version: '0.0.0', }, }, @@ -211,30 +209,33 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { it('returns unique agent inputs IDs, with policy template name if one exists for non-limited packages', async () => { expect( - await storedPackagePoliciesToAgentInputs(savedObjectsClientMock.create(), [ - { - ...mockPackagePolicy, - package: { - name: 'mock-package', - title: 'Mock package', - version: '0.0.0', + await storedPackagePoliciesToAgentInputs( + [ + { + ...mockPackagePolicy, + package: { + name: 'mock_package', + title: 'Mock package', + version: '0.0.0', + }, + inputs: [mockInput, mockInput2], }, - inputs: [mockInput, mockInput2], - }, - { - ...mockPackagePolicy, - package: { - name: 'limited-package', - title: 'Limited package', - version: '0.0.0', + { + ...mockPackagePolicy, + package: { + name: 'limited_package', + title: 'Limited package', + version: '0.0.0', + }, + inputs: [mockInput2], }, - inputs: [mockInput2], - }, - ]) + ], + packageInfoCache + ) ).toEqual([ { id: 'test-logs-some-uuid', - name: 'mock-package-policy', + name: 'mock_package-policy', package_policy_id: 'some-uuid', revision: 1, type: 'test-logs', @@ -242,7 +243,7 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { use_output: 'default', meta: { package: { - name: 'mock-package', + name: 'mock_package', version: '0.0.0', }, }, @@ -261,7 +262,7 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { }, { id: 'test-metrics-some-template-some-uuid', - name: 'mock-package-policy', + name: 'mock_package-policy', package_policy_id: 'some-uuid', revision: 1, type: 'test-metrics', @@ -269,7 +270,7 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { use_output: 'default', meta: { package: { - name: 'mock-package', + name: 'mock_package', version: '0.0.0', }, }, @@ -284,7 +285,7 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { }, { id: 'some-uuid', - name: 'mock-package-policy', + name: 'mock_package-policy', package_policy_id: 'some-uuid', revision: 1, type: 'test-metrics', @@ -292,7 +293,7 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { use_output: 'default', meta: { package: { - name: 'limited-package', + name: 'limited_package', version: '0.0.0', }, }, @@ -310,29 +311,32 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { it('returns agent inputs without streams', async () => { expect( - await storedPackagePoliciesToAgentInputs(savedObjectsClientMock.create(), [ - { - ...mockPackagePolicy, - package: { - name: 'mock-package', - title: 'Mock package', - version: '0.0.0', - }, - inputs: [ - { - ...mockInput, - compiled_input: { - inputVar: 'input-value', - }, - streams: [], + await storedPackagePoliciesToAgentInputs( + [ + { + ...mockPackagePolicy, + package: { + name: 'mock_package', + title: 'Mock package', + version: '0.0.0', }, - ], - }, - ]) + inputs: [ + { + ...mockInput, + compiled_input: { + inputVar: 'input-value', + }, + streams: [], + }, + ], + }, + ], + packageInfoCache + ) ).toEqual([ { id: 'test-logs-some-uuid', - name: 'mock-package-policy', + name: 'mock_package-policy', package_policy_id: 'some-uuid', revision: 1, type: 'test-logs', @@ -340,7 +344,7 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { use_output: 'default', meta: { package: { - name: 'mock-package', + name: 'mock_package', version: '0.0.0', }, }, @@ -351,21 +355,24 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { it('returns agent inputs without disabled streams', async () => { expect( - await storedPackagePoliciesToAgentInputs(savedObjectsClientMock.create(), [ - { - ...mockPackagePolicy, - inputs: [ - { - ...mockInput, - streams: [{ ...mockInput.streams[0] }, { ...mockInput.streams[1], enabled: false }], - }, - ], - }, - ]) + await storedPackagePoliciesToAgentInputs( + [ + { + ...mockPackagePolicy, + inputs: [ + { + ...mockInput, + streams: [{ ...mockInput.streams[0] }, { ...mockInput.streams[1], enabled: false }], + }, + ], + }, + ], + packageInfoCache + ) ).toEqual([ { id: 'test-logs-some-uuid', - name: 'mock-package-policy', + name: 'mock_package-policy', package_policy_id: 'some-uuid', revision: 1, type: 'test-logs', @@ -385,51 +392,54 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { it('returns agent inputs with deeply merged config values', async () => { expect( - await storedPackagePoliciesToAgentInputs(savedObjectsClientMock.create(), [ - { - ...mockPackagePolicy, - inputs: [ - { - ...mockInput, - compiled_input: { - agent_input_template_group1_vars: { - inputVar: 'input-value', - }, - agent_input_template_group2_vars: { - inputVar3: { - testFieldGroup: { - subField1: 'subfield1', + await storedPackagePoliciesToAgentInputs( + [ + { + ...mockPackagePolicy, + inputs: [ + { + ...mockInput, + compiled_input: { + agent_input_template_group1_vars: { + inputVar: 'input-value', + }, + agent_input_template_group2_vars: { + inputVar3: { + testFieldGroup: { + subField1: 'subfield1', + }, + testField: 'test', }, - testField: 'test', }, }, - }, - config: { - agent_input_template_group1_vars: { - value: { - inputVar2: {}, + config: { + agent_input_template_group1_vars: { + value: { + inputVar2: {}, + }, }, - }, - agent_input_template_group2_vars: { - value: { - inputVar3: { - testFieldGroup: { - subField2: 'subfield2', + agent_input_template_group2_vars: { + value: { + inputVar3: { + testFieldGroup: { + subField2: 'subfield2', + }, }, + inputVar4: '', }, - inputVar4: '', }, }, }, - }, - ], - }, - ]) + ], + }, + ], + packageInfoCache + ) ).toEqual([ { id: 'test-logs-some-uuid', revision: 1, - name: 'mock-package-policy', + name: 'mock_package-policy', package_policy_id: 'some-uuid', type: 'test-logs', data_stream: { namespace: 'default' }, diff --git a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.ts b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.ts index fd8d925b48855..f0b94474c7592 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.ts @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { SavedObjectsClientContract } from '@kbn/core/server'; import { merge } from 'lodash'; import { isPackageLimited } from '../../../common/services'; @@ -15,8 +14,7 @@ import type { PackageInfo, } from '../../types'; import { DEFAULT_OUTPUT } from '../../constants'; - -import { getPackageInfo } from '../epm/packages'; +import { pkgToPkgKey } from '../epm/registry'; const isPolicyEnabled = (packagePolicy: PackagePolicy) => { return packagePolicy.enabled && packagePolicy.inputs && packagePolicy.inputs.length; @@ -104,8 +102,8 @@ export const storedPackagePolicyToAgentInputs = ( }; export const storedPackagePoliciesToAgentInputs = async ( - soClient: SavedObjectsClientContract, packagePolicies: PackagePolicy[], + packageInfoCache: Map, outputId: string = DEFAULT_OUTPUT.name ): Promise => { const fullInputs: FullAgentPolicyInput[] = []; @@ -116,11 +114,7 @@ export const storedPackagePoliciesToAgentInputs = async ( } const packageInfo = packagePolicy.package - ? await getPackageInfo({ - savedObjectsClient: soClient, - pkgName: packagePolicy.package.name, - pkgVersion: packagePolicy.package.version, - }) + ? packageInfoCache.get(pkgToPkgKey(packagePolicy.package)) : undefined; fullInputs.push(...storedPackagePolicyToAgentInputs(packagePolicy, packageInfo, outputId)); diff --git a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.test.ts b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.test.ts index 3c490268af094..774fe790f9aa5 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.test.ts @@ -6,34 +6,146 @@ */ jest.mock('../epm/packages'); -import type { SavedObjectsClientContract } from '@kbn/core/server'; - -import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import type { PackagePolicy, RegistryDataStream } from '../../types'; -import { getPackageInfo } from '../epm/packages'; import { getDataStreamPrivileges, storedPackagePoliciesToAgentPermissions, } from './package_policies_to_agent_permissions'; -const getPackageInfoMock = getPackageInfo as jest.MockedFunction; +const packageInfoCache = new Map(); +packageInfoCache.set('test_package-0.0.0', { + name: 'test_package', + version: '0.0.0', + latestVersion: '0.0.0', + release: 'experimental', + format_version: '1.0.0', + title: 'Test Package', + description: '', + icons: [], + owner: { github: '' }, + status: 'not_installed', + assets: { + kibana: { + csp_rule_template: [], + dashboard: [], + visualization: [], + search: [], + index_pattern: [], + map: [], + lens: [], + security_rule: [], + ml_module: [], + tag: [], + osquery_pack_asset: [], + osquery_saved_query: [], + }, + elasticsearch: { + component_template: [], + ingest_pipeline: [], + ilm_policy: [], + transform: [], + index_template: [], + data_stream_ilm_policy: [], + ml_model: [], + }, + }, + data_streams: [ + { + type: 'logs', + dataset: 'some-logs', + title: '', + release: '', + package: 'test_package', + path: '', + ingest_pipeline: '', + streams: [{ input: 'test-logs', title: 'Test Logs', template_path: '' }], + }, + { + type: 'metrics', + dataset: 'some-metrics', + title: '', + release: '', + package: 'test_package', + path: '', + ingest_pipeline: '', + streams: [{ input: 'test-metrics', title: 'Test Logs', template_path: '' }], + }, + ], +}); +packageInfoCache.set('osquery_manager-0.3.0', { + format_version: '1.0.0', + name: 'osquery_manager', + title: 'Osquery Manager', + version: '0.3.0', + license: 'basic', + description: + 'Centrally manage osquery deployments, run live queries, and schedule recurring queries', + type: 'integration', + release: 'beta', + categories: ['security', 'os_system', 'config_management'], + icons: [ + { + src: '/img/logo_osquery.svg', + title: 'logo osquery', + size: '32x32', + type: 'image/svg+xml', + }, + ], + owner: { github: 'elastic/integrations' }, + readme: '/package/osquery_manager/0.3.0/docs/README.md', + data_streams: [ + { + dataset: 'osquery_manager.result', + package: 'osquery_manager', + ingest_pipeline: 'default', + path: 'result', + streams: [], + title: 'Osquery Manager queries', + type: 'logs', + release: 'experimental', + }, + ], + latestVersion: '0.3.0', + notice: undefined, + status: 'not_installed', + assets: { + kibana: { + csp_rule_template: [], + dashboard: [], + visualization: [], + search: [], + index_pattern: [], + map: [], + lens: [], + security_rule: [], + ml_module: [], + tag: [], + osquery_pack_asset: [], + osquery_saved_query: [], + }, + elasticsearch: { + component_template: [], + ingest_pipeline: [], + ilm_policy: [], + transform: [], + index_template: [], + data_stream_ilm_policy: [], + ml_model: [], + }, + }, +}); describe('storedPackagePoliciesToAgentPermissions()', () => { - let soClient: jest.Mocked; - beforeEach(() => { - soClient = savedObjectsClientMock.create(); - }); - it('Returns `undefined` if there are no package policies', async () => { - const permissions = await storedPackagePoliciesToAgentPermissions(soClient, []); + const permissions = await storedPackagePoliciesToAgentPermissions(packageInfoCache, []); expect(permissions).toBeUndefined(); }); it('Throw an error if package policies is not an array', async () => { await expect(() => - storedPackagePoliciesToAgentPermissions(soClient, undefined) + storedPackagePoliciesToAgentPermissions(packageInfoCache, undefined) ).rejects.toThrow( /storedPackagePoliciesToAgentPermissions should be called with a PackagePolicy/ ); @@ -41,80 +153,20 @@ describe('storedPackagePoliciesToAgentPermissions()', () => { it('Returns the default permissions if a package policy does not have a package', async () => { await expect(() => - storedPackagePoliciesToAgentPermissions(soClient, [ + storedPackagePoliciesToAgentPermissions(packageInfoCache, [ { name: 'foo', package: undefined } as PackagePolicy, ]) ).rejects.toThrow(/No package for package policy foo/); }); it('Returns the permissions for the enabled inputs', async () => { - getPackageInfoMock.mockResolvedValueOnce({ - name: 'test-package', - version: '0.0.0', - latestVersion: '0.0.0', - release: 'experimental', - format_version: '1.0.0', - title: 'Test Package', - description: '', - icons: [], - owner: { github: '' }, - status: 'not_installed', - assets: { - kibana: { - csp_rule_template: [], - dashboard: [], - visualization: [], - search: [], - index_pattern: [], - map: [], - lens: [], - security_rule: [], - ml_module: [], - tag: [], - osquery_pack_asset: [], - osquery_saved_query: [], - }, - elasticsearch: { - component_template: [], - ingest_pipeline: [], - ilm_policy: [], - transform: [], - index_template: [], - data_stream_ilm_policy: [], - ml_model: [], - }, - }, - data_streams: [ - { - type: 'logs', - dataset: 'some-logs', - title: '', - release: '', - package: 'test-package', - path: '', - ingest_pipeline: '', - streams: [{ input: 'test-logs', title: 'Test Logs', template_path: '' }], - }, - { - type: 'metrics', - dataset: 'some-metrics', - title: '', - release: '', - package: 'test-package', - path: '', - ingest_pipeline: '', - streams: [{ input: 'test-metrics', title: 'Test Logs', template_path: '' }], - }, - ], - }); - const packagePolicies: PackagePolicy[] = [ { id: 'package-policy-uuid-test-123', name: 'test-policy', namespace: 'test', enabled: true, - package: { name: 'test-package', version: '0.0.0', title: 'Test Package' }, + package: { name: 'test_package', version: '0.0.0', title: 'Test Package' }, inputs: [ { type: 'test-logs', @@ -148,7 +200,10 @@ describe('storedPackagePoliciesToAgentPermissions()', () => { }, ]; - const permissions = await storedPackagePoliciesToAgentPermissions(soClient, packagePolicies); + const permissions = await storedPackagePoliciesToAgentPermissions( + packageInfoCache, + packagePolicies + ); expect(permissions).toMatchObject({ 'package-policy-uuid-test-123': { indices: [ @@ -162,63 +217,13 @@ describe('storedPackagePoliciesToAgentPermissions()', () => { }); it('Returns the dataset for the compiled data_streams', async () => { - getPackageInfoMock.mockResolvedValueOnce({ - name: 'test-package', - version: '0.0.0', - latestVersion: '0.0.0', - release: 'experimental', - format_version: '1.0.0', - title: 'Test Package', - description: '', - icons: [], - owner: { github: '' }, - status: 'not_installed', - assets: { - kibana: { - csp_rule_template: [], - dashboard: [], - visualization: [], - search: [], - index_pattern: [], - map: [], - lens: [], - security_rule: [], - ml_module: [], - tag: [], - osquery_pack_asset: [], - osquery_saved_query: [], - }, - elasticsearch: { - component_template: [], - ingest_pipeline: [], - ilm_policy: [], - transform: [], - index_template: [], - data_stream_ilm_policy: [], - ml_model: [], - }, - }, - data_streams: [ - { - type: 'logs', - dataset: 'some-logs', - title: '', - release: '', - package: 'test-package', - path: '', - ingest_pipeline: '', - streams: [{ input: 'test-logs', title: 'Test Logs', template_path: '' }], - }, - ], - }); - const packagePolicies: PackagePolicy[] = [ { id: 'package-policy-uuid-test-123', name: 'test-policy', namespace: 'test', enabled: true, - package: { name: 'test-package', version: '0.0.0', title: 'Test Package' }, + package: { name: 'test_package', version: '0.0.0', title: 'Test Package' }, inputs: [ { type: 'test-logs', @@ -242,7 +247,10 @@ describe('storedPackagePoliciesToAgentPermissions()', () => { }, ]; - const permissions = await storedPackagePoliciesToAgentPermissions(soClient, packagePolicies); + const permissions = await storedPackagePoliciesToAgentPermissions( + packageInfoCache, + packagePolicies + ); expect(permissions).toMatchObject({ 'package-policy-uuid-test-123': { indices: [ @@ -256,63 +264,13 @@ describe('storedPackagePoliciesToAgentPermissions()', () => { }); it('Returns the cluster privileges if there is one in the package policy', async () => { - getPackageInfoMock.mockResolvedValueOnce({ - name: 'test-package', - version: '0.0.0', - latestVersion: '0.0.0', - release: 'experimental', - format_version: '1.0.0', - title: 'Test Package', - description: '', - icons: [], - owner: { github: '' }, - status: 'not_installed', - assets: { - kibana: { - csp_rule_template: [], - dashboard: [], - visualization: [], - search: [], - index_pattern: [], - map: [], - lens: [], - security_rule: [], - ml_module: [], - tag: [], - osquery_pack_asset: [], - osquery_saved_query: [], - }, - elasticsearch: { - component_template: [], - ingest_pipeline: [], - ilm_policy: [], - transform: [], - index_template: [], - data_stream_ilm_policy: [], - ml_model: [], - }, - }, - data_streams: [ - { - type: 'logs', - dataset: 'some-logs', - title: '', - release: '', - package: 'test-package', - path: '', - ingest_pipeline: '', - streams: [{ input: 'test-logs', title: 'Test Logs', template_path: '' }], - }, - ], - }); - const packagePolicies: PackagePolicy[] = [ { id: 'package-policy-uuid-test-123', name: 'test-policy', namespace: 'test', enabled: true, - package: { name: 'test-package', version: '0.0.0', title: 'Test Package' }, + package: { name: 'test_package', version: '0.0.0', title: 'Test Package' }, elasticsearch: { privileges: { cluster: ['monitor'], @@ -341,7 +299,10 @@ describe('storedPackagePoliciesToAgentPermissions()', () => { }, ]; - const permissions = await storedPackagePoliciesToAgentPermissions(soClient, packagePolicies); + const permissions = await storedPackagePoliciesToAgentPermissions( + packageInfoCache, + packagePolicies + ); expect(permissions).toMatchObject({ 'package-policy-uuid-test-123': { indices: [ @@ -356,76 +317,13 @@ describe('storedPackagePoliciesToAgentPermissions()', () => { }); it('Returns the dataset for osquery_manager package', async () => { - getPackageInfoMock.mockResolvedValueOnce({ - format_version: '1.0.0', - name: 'osquery_manager', - title: 'Osquery Manager', - version: '0.3.0', - license: 'basic', - description: - 'Centrally manage osquery deployments, run live queries, and schedule recurring queries', - type: 'integration', - release: 'beta', - categories: ['security', 'os_system', 'config_management'], - icons: [ - { - src: '/img/logo_osquery.svg', - title: 'logo osquery', - size: '32x32', - type: 'image/svg+xml', - }, - ], - owner: { github: 'elastic/integrations' }, - readme: '/package/osquery_manager/0.3.0/docs/README.md', - data_streams: [ - { - dataset: 'osquery_manager.result', - package: 'osquery_manager', - ingest_pipeline: 'default', - path: 'result', - streams: [], - title: 'Osquery Manager queries', - type: 'logs', - release: 'experimental', - }, - ], - latestVersion: '0.3.0', - notice: undefined, - status: 'not_installed', - assets: { - kibana: { - csp_rule_template: [], - dashboard: [], - visualization: [], - search: [], - index_pattern: [], - map: [], - lens: [], - security_rule: [], - ml_module: [], - tag: [], - osquery_pack_asset: [], - osquery_saved_query: [], - }, - elasticsearch: { - component_template: [], - ingest_pipeline: [], - ilm_policy: [], - transform: [], - index_template: [], - data_stream_ilm_policy: [], - ml_model: [], - }, - }, - }); - const packagePolicies: PackagePolicy[] = [ { id: 'package-policy-uuid-test-123', name: 'test-policy', namespace: 'test', enabled: true, - package: { name: 'osquery_manager', version: '0.0.0', title: 'Test Package' }, + package: { name: 'osquery_manager', version: '0.3.0', title: 'Test Package' }, inputs: [ { type: 'osquery_manager', @@ -449,7 +347,10 @@ describe('storedPackagePoliciesToAgentPermissions()', () => { }, ]; - const permissions = await storedPackagePoliciesToAgentPermissions(soClient, packagePolicies); + const permissions = await storedPackagePoliciesToAgentPermissions( + packageInfoCache, + packagePolicies + ); expect(permissions).toMatchObject({ 'package-policy-uuid-test-123': { indices: [ diff --git a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.ts b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.ts index b961eb8691f88..d35e84ca09a3a 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.ts @@ -4,22 +4,21 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { SavedObjectsClientContract } from '@kbn/core/server'; import type { FullAgentPolicyOutputPermissions, + PackageInfo, RegistryDataStreamPrivileges, } from '../../../common/types'; import { PACKAGE_POLICY_DEFAULT_INDEX_PRIVILEGES } from '../../constants'; import type { PackagePolicy } from '../../types'; - -import { getPackageInfo } from '../epm/packages'; +import { pkgToPkgKey } from '../epm/registry'; export const DEFAULT_CLUSTER_PERMISSIONS = ['monitor']; export async function storedPackagePoliciesToAgentPermissions( - soClient: SavedObjectsClientContract, + packageInfoCache: Map, packagePolicies?: PackagePolicy[] ): Promise { // I'm not sure what permissions to return for this case, so let's return the defaults @@ -39,11 +38,7 @@ export async function storedPackagePoliciesToAgentPermissions( throw new Error(`No package for package policy ${packagePolicy.name}`); } - const pkg = await getPackageInfo({ - savedObjectsClient: soClient, - pkgName: packagePolicy.package.name, - pkgVersion: packagePolicy.package.version, - }); + const pkg = packageInfoCache.get(pkgToPkgKey(packagePolicy.package))!; if (!pkg.data_streams || pkg.data_streams.length === 0) { return [packagePolicy.name, undefined]; diff --git a/x-pack/plugins/fleet/server/services/agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policy.ts index 1e833377a3374..ffd71c2d6af06 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.ts @@ -52,6 +52,7 @@ import type { Installation, Output, DeletePackagePoliciesResponse, + PackageInfo, } from '../../common/types'; import { AgentPolicyNameExistsError, @@ -68,7 +69,7 @@ import { elasticAgentManagedManifest, } from './elastic_agent_manifest'; -import { getPackageInfo, bulkInstallPackages } from './epm/packages'; +import { bulkInstallPackages } from './epm/packages'; import { getAgentsByKuery } from './agents'; import { packagePolicyService } from './package_policy'; import { incrementPackagePolicyCopyName } from './package_policies'; @@ -122,7 +123,6 @@ class AgentPolicyService { existingAgentPolicy, this.hasAPMIntegration(existingAgentPolicy) ); - await soClient.update(SAVED_OBJECT_TYPE, id, { ...agentPolicy, ...(options.bumpRevision ? { revision: existingAgentPolicy.revision + 1 } : {}), @@ -957,18 +957,13 @@ export async function addPackageToAgentPolicy( packageToInstall: Installation, agentPolicy: AgentPolicy, defaultOutput: Output, + packageInfo: PackageInfo, packagePolicyName?: string, packagePolicyId?: string | number, packagePolicyDescription?: string, transformPackagePolicy?: (p: NewPackagePolicy) => NewPackagePolicy, bumpAgentPolicyRevison = false ) { - const packageInfo = await getPackageInfo({ - savedObjectsClient: soClient, - pkgName: packageToInstall.name, - pkgVersion: packageToInstall.version, - }); - const basePackagePolicy = packageToPackagePolicy( packageInfo, agentPolicy.id, @@ -994,5 +989,6 @@ export async function addPackageToAgentPolicy( skipUniqueNameVerification: true, overwrite: true, force: true, // To add package to managed policy we need the force flag + packageInfo, }); } diff --git a/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts b/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts index ad1787c97aa19..da9fffded20c4 100644 --- a/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts @@ -8,7 +8,7 @@ import { readFileSync } from 'fs'; import path from 'path'; -import glob from 'glob'; +import globby from 'globby'; import { safeLoad } from 'js-yaml'; import { getField, processFields } from './field'; @@ -27,7 +27,7 @@ expect.addSnapshotSerializer({ test('tests loading fields.yml', () => { // Find all .yml files to run tests on - const files = glob.sync(path.join(__dirname, '/tests/*.yml')); + const files = globby.sync(path.join(__dirname, '/tests/*.yml')); for (const file of files) { const fieldsYML = readFileSync(file, 'utf-8'); const fields: Field[] = safeLoad(fieldsYML); diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/assets/tag_assets.test.ts b/x-pack/plugins/fleet/server/services/epm/kibana/assets/tag_assets.test.ts index 4d3a4e8557a68..33f674d226e89 100644 --- a/x-pack/plugins/fleet/server/services/epm/kibana/assets/tag_assets.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/kibana/assets/tag_assets.test.ts @@ -92,6 +92,7 @@ describe('tagKibanaAssets', () => { const kibanaAssets = { dashboard: [{ id: 'dashboard1', type: 'dashboard' }], search: [{ id: 's1', type: 'search' }], + config: [{ id: 'c1', type: 'config' }], visualization: [{ id: 'v1', type: 'visualization' }], } as any; @@ -105,14 +106,14 @@ describe('tagKibanaAssets', () => { expect(savedObjectTagAssignmentService.updateTagAssignments).toHaveBeenCalledWith({ tags: ['managed', 'system'], - assign: [...kibanaAssets.dashboard, ...kibanaAssets.visualization], + assign: [...kibanaAssets.dashboard, ...kibanaAssets.search, ...kibanaAssets.visualization], unassign: [], refresh: false, }); }); it('should do nothing if no taggable assets', async () => { - const kibanaAssets = { search: [{ id: 's1', type: 'search' }] } as any; + const kibanaAssets = { config: [{ id: 'c1', type: 'config' }] } as any; await tagKibanaAssets({ savedObjectTagAssignmentService, diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install.ts b/x-pack/plugins/fleet/server/services/epm/packages/install.ts index d66550570d1fe..114396eafa04a 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install.ts @@ -241,6 +241,7 @@ interface InstallUploadedArchiveParams { archiveBuffer: Buffer; contentType: string; spaceId: string; + version?: string; } function getTelemetryEvent(pkgName: string, pkgVersion: string): PackageUpdateEvent { @@ -437,6 +438,7 @@ async function installPackageByUpload({ archiveBuffer, contentType, spaceId, + version, }: InstallUploadedArchiveParams): Promise { // Workaround apm issue with async spans: https://github.com/elastic/apm-agent-nodejs/issues/2611 await Promise.resolve(); @@ -449,21 +451,26 @@ async function installPackageByUpload({ try { const { packageInfo } = await generatePackageInfoFromArchiveBuffer(archiveBuffer, contentType); + // Allow for overriding the version in the manifest for cases where we install + // stack-aligned bundled packages to support special cases around the + // `forceAlignStackVersion` flag in `fleet_packages.json`. + const pkgVersion = version || packageInfo.version; + const installedPkg = await getInstallationObject({ savedObjectsClient, pkgName: packageInfo.name, }); - installType = getInstallType({ pkgVersion: packageInfo.version, installedPkg }); + installType = getInstallType({ pkgVersion, installedPkg }); span?.addLabels({ packageName: packageInfo.name, - packageVersion: packageInfo.version, + packageVersion: pkgVersion, installType, }); telemetryEvent.packageName = packageInfo.name; - telemetryEvent.newVersion = packageInfo.version; + telemetryEvent.newVersion = pkgVersion; telemetryEvent.installType = installType; telemetryEvent.currentVersion = installedPkg?.attributes.version || 'not_installed'; @@ -472,14 +479,14 @@ async function installPackageByUpload({ deleteVerificationResult(packageInfo); const paths = await unpackBufferToCache({ name: packageInfo.name, - version: packageInfo.version, + version: pkgVersion, archiveBuffer, contentType, }); setPackageInfo({ name: packageInfo.name, - version: packageInfo.version, + version: pkgVersion, packageInfo, }); @@ -505,7 +512,7 @@ async function installPackageByUpload({ logger, installedPkg, paths, - packageInfo, + packageInfo: { ...packageInfo, version: pkgVersion }, installType, installSource, spaceId, @@ -572,6 +579,7 @@ export async function installPackage(args: InstallPackageParams): Promise { const agentPolicy = await agentPolicyService.get(soClient, packagePolicy.policy_id, true); @@ -158,11 +159,13 @@ class PackagePolicyService implements PackagePolicyServiceInterface { }); } - const pkgInfo = await getPackageInfo({ - savedObjectsClient: soClient, - pkgName: packagePolicy.package.name, - pkgVersion: packagePolicy.package.version, - }); + const pkgInfo = + options?.packageInfo ?? + (await getPackageInfo({ + savedObjectsClient: soClient, + pkgName: packagePolicy.package.name, + pkgVersion: packagePolicy.package.version, + })); // Check if it is a limited package, and if so, check that the corresponding agent policy does not // already contain a package policy for this package @@ -1273,6 +1276,7 @@ export interface PackagePolicyServiceInterface { skipEnsureInstalled?: boolean; skipUniqueNameVerification?: boolean; overwrite?: boolean; + packageInfo?: PackageInfo; } ): Promise; diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.ts b/x-pack/plugins/fleet/server/services/preconfiguration.ts index 4b1dde82b3b41..06c206ee77dc8 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.ts @@ -9,6 +9,8 @@ import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/ import { i18n } from '@kbn/i18n'; import { groupBy, omit, pick, isEqual } from 'lodash'; +import apm from 'elastic-apm-node'; + import type { NewPackagePolicy, AgentPolicy, @@ -18,6 +20,7 @@ import type { PreconfiguredAgentPolicy, PreconfiguredPackage, PackagePolicy, + PackageInfo, } from '../../common/types'; import type { PreconfigurationError } from '../../common/constants'; import { PRECONFIGURATION_LATEST_KEYWORD } from '../../common/constants'; @@ -253,6 +256,10 @@ export async function ensurePreconfiguredPackagesAndPolicies( ); }); + apm.startTransaction( + 'fleet.preconfiguration.addPackagePolicies.improved.prReview.50', + 'fleet' + ); await addPreconfiguredPolicyPackages( soClient, esClient, @@ -261,6 +268,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( defaultOutput, true ); + apm.endTransaction('fleet.preconfiguration.addPackagePolicies.improved.prReview.50'); // Add the is_managed flag after configuring package policies to avoid errors if (shouldAddIsManagedFlag) { @@ -327,13 +335,23 @@ async function addPreconfiguredPolicyPackages( defaultOutput: Output, bumpAgentPolicyRevison = false ) { + // Cache package info objects so we don't waste lookup time on the latest package + // every time we call `getPackageInfo` + const packageInfoMap = new Map(); + // Add packages synchronously to avoid overwriting for (const { installedPackage, id, name, description, inputs } of installedPackagePolicies) { - const packageInfo = await getPackageInfo({ - savedObjectsClient: soClient, - pkgName: installedPackage.name, - pkgVersion: installedPackage.version, - }); + let packageInfo: PackageInfo; + + if (packageInfoMap.has(installedPackage.name)) { + packageInfo = packageInfoMap.get(installedPackage.name)!; + } else { + packageInfo = await getPackageInfo({ + savedObjectsClient: soClient, + pkgName: installedPackage.name, + pkgVersion: installedPackage.version, + }); + } await addPackageToAgentPolicy( soClient, @@ -341,6 +359,7 @@ async function addPreconfiguredPolicyPackages( installedPackage, agentPolicy, defaultOutput, + packageInfo, name, id, description, diff --git a/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table.js b/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table.js index ec4312166d05d..9becc0dc75d5d 100644 --- a/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table.js +++ b/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table.js @@ -198,7 +198,8 @@ export class AnomaliesTableInternal extends Component { this.state.itemIdToExpandedRowMap, this.toggleRow, filter, - influencerFilter + influencerFilter, + this.props.sourceIndicesWithGeoFields ); const sorting = { @@ -275,4 +276,5 @@ AnomaliesTableInternal.propTypes = { influencerFilter: PropTypes.func, tableState: PropTypes.object.isRequired, updateTableState: PropTypes.func.isRequired, + sourceIndicesWithGeoFields: PropTypes.object.isRequired, }; diff --git a/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table_columns.js b/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table_columns.js index c24e294b54a5d..07f52b03e6221 100644 --- a/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table_columns.js +++ b/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table_columns.js @@ -42,14 +42,18 @@ function renderTime(date, aggregationInterval) { } } -function showLinksMenuForItem(item, showViewSeriesLink) { +function showLinksMenuForItem(item, showViewSeriesLink, sourceIndicesWithGeoFields) { const canConfigureRules = isRuleSupported(item.source) && checkPermission('canUpdateJob'); return ( canConfigureRules || (showViewSeriesLink && item.isTimeSeriesViewRecord) || item.entityName === 'mlcategory' || item.customUrls !== undefined || - item.detector.includes(ML_JOB_AGGREGATION.LAT_LONG) + item.detector.includes(ML_JOB_AGGREGATION.LAT_LONG) || + (item.sourceIndices && + item.sourceIndices( + (sourceIndex) => sourceIndicesWithGeoFields[item.jobId][sourceIndex] !== undefined + )) ); } @@ -65,7 +69,8 @@ export function getColumns( itemIdToExpandedRowMap, toggleRow, filter, - influencerFilter + influencerFilter, + sourceIndicesWithGeoFields ) { const columns = [ { @@ -307,7 +312,9 @@ export function getColumns( }); } - const showLinks = items.some((item) => showLinksMenuForItem(item, showViewSeriesLink)); + const showLinks = items.some((item) => + showLinksMenuForItem(item, showViewSeriesLink, sourceIndicesWithGeoFields) + ); if (showLinks === true) { columns.push({ @@ -316,7 +323,7 @@ export function getColumns( defaultMessage: 'Actions', }), render: (item) => { - if (showLinksMenuForItem(item, showViewSeriesLink) === true) { + if (showLinksMenuForItem(item, showViewSeriesLink, sourceIndicesWithGeoFields) === true) { return ( ); } else { diff --git a/x-pack/plugins/ml/public/application/components/anomalies_table/get_query_string_for_influencers.test.ts b/x-pack/plugins/ml/public/application/components/anomalies_table/get_query_string_for_influencers.test.ts new file mode 100644 index 0000000000000..68bb6f7f926c2 --- /dev/null +++ b/x-pack/plugins/ml/public/application/components/anomalies_table/get_query_string_for_influencers.test.ts @@ -0,0 +1,60 @@ +/* + * 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 { getQueryStringForInfluencers } from './get_query_string_for_influencers'; + +const entityName = 'key_two'; +const influencers = [ + { key_one: 'value_one' }, + { [entityName]: 'value_two' }, + { key_three: 'value_three' }, +]; +const allInfluencersString = 'key_one: value_one or key_two: value_two or key_three: value_three'; + +describe('getQueryStringForInfluencers', () => { + describe('when entityName is not present', () => { + test('returns empty string when there are no influencers', () => { + const actual = getQueryStringForInfluencers([]); + expect(actual).toBe(''); + }); + + test('returns OR query with all influencer key values', () => { + const actual = getQueryStringForInfluencers(influencers); + expect(actual).toBe(allInfluencersString); + }); + }); + + describe('when entityName is present', () => { + test('returns empty string when there are no influencers', () => { + const actual = getQueryStringForInfluencers([], entityName); + expect(actual).toBe(''); + }); + + test('returns empty string when there is only one influencer and it matches the entityName', () => { + const actual = getQueryStringForInfluencers([{ [entityName]: 'value_two' }], entityName); + expect(actual).toBe(''); + }); + + test('when entityName does not match any influencers returns OR query with all influencer key values', () => { + const actual = getQueryStringForInfluencers(influencers, 'otherEntityName'); + expect(actual).toBe(allInfluencersString); + }); + + test('when entityName matches an influencer, returns OR query with all influencer key values except influencer matching entityName', () => { + const expectedWithAllInfluencers = 'key_one: value_one or key_three: value_three'; + const actualWithAllInfluencers = getQueryStringForInfluencers(influencers, entityName); + expect(actualWithAllInfluencers).toBe(expectedWithAllInfluencers); + + const expectedWithTwoInfluencers = 'key_one: value_one'; + const actualWithTwoInfluencers = getQueryStringForInfluencers( + [{ key_one: 'value_one' }, { [entityName]: 'value_two' }], + entityName + ); + expect(actualWithTwoInfluencers).toBe(expectedWithTwoInfluencers); + }); + }); +}); diff --git a/x-pack/plugins/ml/public/application/components/anomalies_table/get_query_string_for_influencers.ts b/x-pack/plugins/ml/public/application/components/anomalies_table/get_query_string_for_influencers.ts new file mode 100644 index 0000000000000..670f7d83333ae --- /dev/null +++ b/x-pack/plugins/ml/public/application/components/anomalies_table/get_query_string_for_influencers.ts @@ -0,0 +1,22 @@ +/* + * 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 { AnomaliesTableRecord } from '../../../../common/types/anomalies'; + +export function getQueryStringForInfluencers( + influencers: AnomaliesTableRecord['influencers'] = [], + entityName?: string +) { + return influencers + .reduce((acc, influencer) => { + Object.entries(influencer) + .filter(([name]) => name !== entityName) + .forEach(([name, inf]) => acc.push(`${name}: ${inf}`)); + return acc; + }, []) + .join(' or '); +} diff --git a/x-pack/plugins/ml/public/application/components/anomalies_table/links_menu.tsx b/x-pack/plugins/ml/public/application/components/anomalies_table/links_menu.tsx index 773278074cb72..f4847ea9d41c1 100644 --- a/x-pack/plugins/ml/public/application/components/anomalies_table/links_menu.tsx +++ b/x-pack/plugins/ml/public/application/components/anomalies_table/links_menu.tsx @@ -25,7 +25,7 @@ import { ES_FIELD_TYPES } from '@kbn/field-types'; import { MAPS_APP_LOCATOR } from '@kbn/maps-plugin/public'; import { mlJobService } from '../../services/job_service'; import { getDataViewIdFromName } from '../../util/index_utils'; -import { getInitialAnomaliesLayers } from '../../../maps/util'; +import { getInitialAnomaliesLayers, getInitialSourceIndexFieldLayers } from '../../../maps/util'; import { formatHumanReadableDateTimeSeconds, timeFormatter, @@ -37,7 +37,11 @@ import { getUrlForRecord, openCustomUrlWindow } from '../../util/custom_url_util import { ML_APP_LOCATOR, ML_PAGES } from '../../../../common/constants/locator'; import { SEARCH_QUERY_LANGUAGE } from '../../../../common/constants/search'; // @ts-ignore -import { escapeDoubleQuotes, getDateFormatTz } from '../../explorer/explorer_utils'; +import { + escapeDoubleQuotes, + getDateFormatTz, + SourceIndicesWithGeoFields, +} from '../../explorer/explorer_utils'; import { isCategorizationAnomaly, isRuleSupported } from '../../../../common/util/anomaly_utils'; import { checkPermission } from '../../capabilities/check_capabilities'; import type { @@ -49,7 +53,7 @@ import { useMlKibana } from '../../contexts/kibana'; // @ts-ignore import { getFieldTypeFromMapping } from '../../services/mapping_service'; import type { AnomaliesTableRecord } from '../../../../common/types/anomalies'; - +import { getQueryStringForInfluencers } from './get_query_string_for_influencers'; interface LinksMenuProps { anomaly: AnomaliesTableRecord; bounds: TimeRangeBounds; @@ -59,6 +63,7 @@ interface LinksMenuProps { interval: 'day' | 'hour' | 'second'; showRuleEditorFlyout: (anomaly: AnomaliesTableRecord) => void; onItemClick: () => void; + sourceIndicesWithGeoFields: SourceIndicesWithGeoFields; } export const LinksMenuUI = (props: LinksMenuProps) => { @@ -74,9 +79,9 @@ export const LinksMenuUI = (props: LinksMenuProps) => { services: { data, share, application }, } = kibana; - const getMapsLink = async (anomaly: AnomaliesTableRecord) => { + const getAnomaliesMapsLink = async (anomaly: AnomaliesTableRecord) => { const initialLayers = getInitialAnomaliesLayers(anomaly.jobId); - const anomalyBucketStartMoment = moment(anomaly.time).tz(getDateFormatTz()); + const anomalyBucketStartMoment = moment(anomaly.source.timestamp).tz(getDateFormatTz()); const anomalyBucketStart = anomalyBucketStartMoment.toISOString(); const anomalyBucketEnd = anomalyBucketStartMoment .add(anomaly.source.bucket_span, 'seconds') @@ -104,6 +109,54 @@ export const LinksMenuUI = (props: LinksMenuProps) => { return location; }; + const getAnomalySourceMapsLink = async ( + anomaly: AnomaliesTableRecord, + sourceIndicesWithGeoFields: SourceIndicesWithGeoFields + ) => { + // Create a layer for each of the geoFields + const initialLayers = getInitialSourceIndexFieldLayers( + sourceIndicesWithGeoFields[anomaly.jobId] + ); + // Widen the timerange by one bucket span on start/end to increase chances of always having data on the map + const anomalyBucketStartMoment = moment(anomaly.source.timestamp).tz(getDateFormatTz()); + const anomalyBucketStart = anomalyBucketStartMoment + .subtract(anomaly.source.bucket_span, 'seconds') + .toISOString(); + const anomalyBucketEnd = anomalyBucketStartMoment + .add(anomaly.source.bucket_span * 3, 'seconds') + .subtract(1, 'ms') + .toISOString(); + const timeRange = data.query.timefilter.timefilter.getTime(); + + // Set 'from' in timeRange to start bucket time for the specific anomaly + timeRange.from = anomalyBucketStart; + timeRange.to = anomalyBucketEnd; + + // Create query string for influencers + const influencersQueryString = getQueryStringForInfluencers( + anomaly.influencers, + anomaly.entityName + ); + + const locator = share.url.locators.get(MAPS_APP_LOCATOR); + const location = await locator?.getLocation({ + initialLayers, + timeRange, + filters: data.query.filterManager.getFilters(), + ...(anomaly.entityName && anomaly.entityValue + ? { + query: { + language: SEARCH_QUERY_LANGUAGE.KUERY, + query: `${escapeKuery(anomaly.entityName)}:${escapeKuery(anomaly.entityValue)}${ + influencersQueryString !== '' ? ` and (${influencersQueryString})` : '' + }`, + }, + } + : {}), + }); + return location; + }; + useEffect(() => { let unmounted = false; const discoverLocator = share.url.locators.get('DISCOVER_APP_LOCATOR'); @@ -595,7 +648,6 @@ export const LinksMenuUI = (props: LinksMenuProps) => { ); } - if (showViewSeriesLink === true) { if (anomaly.isTimeSeriesViewRecord) { items.push( @@ -615,25 +667,48 @@ export const LinksMenuUI = (props: LinksMenuProps) => { ); } + } - if (anomaly.isGeoRecord === true) { - items.push( - { - const mapsLink = await getMapsLink(anomaly); - await application.navigateToApp(MAPS_APP_ID, { path: mapsLink?.path }); - }} - data-test-subj="mlAnomaliesListRowActionViewInMapsButton" - > - - - ); - } + if (anomaly.isGeoRecord === true) { + items.push( + { + const mapsLink = await getAnomaliesMapsLink(anomaly); + await application.navigateToApp(MAPS_APP_ID, { path: mapsLink?.path }); + }} + data-test-subj="mlAnomaliesListRowActionViewInMapsButton" + > + + + ); + } else if ( + props.sourceIndicesWithGeoFields && + props.sourceIndicesWithGeoFields[anomaly.jobId] + ) { + items.push( + { + const mapsLink = await getAnomalySourceMapsLink( + anomaly, + props.sourceIndicesWithGeoFields + ); + await application.navigateToApp(MAPS_APP_ID, { path: mapsLink?.path }); + }} + data-test-subj="mlAnomaliesListRowActionViewSourceIndexInMapsButton" + > + + + ); } if (application.capabilities.discover?.show && isCategorizationAnomalyRecord) { diff --git a/x-pack/plugins/ml/public/application/explorer/explorer.tsx b/x-pack/plugins/ml/public/application/explorer/explorer.tsx index 562bc80ebfc00..4b610cbcffb96 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer.tsx +++ b/x-pack/plugins/ml/public/application/explorer/explorer.tsx @@ -54,6 +54,8 @@ import { escapeDoubleQuotes, OverallSwimlaneData, AppStateSelectedCells, + getSourceIndicesWithGeoFields, + SourceIndicesWithGeoFields, } from './explorer_utils'; import { AnomalyTimeline } from './anomaly_timeline'; import { FILTER_ACTION, FilterAction } from './explorer_constants'; @@ -73,6 +75,7 @@ import type { ExplorerState } from './reducers'; import type { TimeBuckets } from '../util/time_buckets'; import { useToastNotificationService } from '../services/toast_notification_service'; import { useMlKibana, useMlLocator } from '../contexts/kibana'; +import { useMlContext } from '../contexts/ml'; import { useAnomalyExplorerContext } from './anomaly_explorer_context'; import { AnomalyExplorerPanelsState, @@ -262,6 +265,8 @@ export const Explorer: FC = ({ const htmlIdGen = useMemo(() => htmlIdGenerator(), []); const [language, updateLanguage] = useState(DEFAULT_QUERY_LANG); + const [sourceIndicesWithGeoFields, setSourceIndicesWithGeoFields] = + useState({}); const filterSettings = useObservable( anomalyExplorerCommonStateService.getFilterSettings$(), @@ -350,6 +355,8 @@ export const Explorer: FC = ({ } = useMlKibana(); const { euiTheme } = useEuiTheme(); const mlLocator = useMlLocator(); + const context = useMlContext(); + const dataViewsService = context.dataViewsContract; const { annotations, @@ -418,6 +425,17 @@ export const Explorer: FC = ({ tableData.anomalies?.length > 0; const hasActiveFilter = isDefined(swimLaneSeverity); + const selectedJobIds = Array.isArray(selectedJobs) ? selectedJobs.map((job) => job.id) : []; + + useEffect(() => { + if (!noJobsSelected) { + getSourceIndicesWithGeoFields(selectedJobs, dataViewsService) + .then((sourceIndicesWithGeoFieldsMap) => + setSourceIndicesWithGeoFields(sourceIndicesWithGeoFieldsMap) + ) + .catch(console.error); // eslint-disable-line no-console + } + }, [JSON.stringify(selectedJobIds)]); if (noJobsSelected && !loading) { return ( @@ -436,7 +454,6 @@ export const Explorer: FC = ({ } const bounds = timefilter.getActiveBounds(); - const selectedJobIds = Array.isArray(selectedJobs) ? selectedJobs.map((job) => job.id) : []; const mainPanelContent = (
@@ -582,7 +599,12 @@ export const Explorer: FC = ({ - + )}
diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_utils.ts b/x-pack/plugins/ml/public/application/explorer/explorer_utils.ts index 818bc89b6c944..652517acc0dab 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_utils.ts +++ b/x-pack/plugins/ml/public/application/explorer/explorer_utils.ts @@ -11,6 +11,10 @@ import { get, union, uniq } from 'lodash'; import moment from 'moment-timezone'; +import { ES_FIELD_TYPES } from '@kbn/data-plugin/public'; +import { asyncForEach } from '@kbn/std'; +import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import type { DataViewsContract } from '@kbn/data-views-plugin/public'; import { lastValueFrom } from 'rxjs'; import { @@ -18,6 +22,7 @@ import { ANOMALIES_TABLE_DEFAULT_QUERY_SIZE, } from '../../../common/constants/search'; import { EntityField, getEntityFieldList } from '../../../common/util/anomaly_utils'; +import { getDataViewIdFromName } from '../util/index_utils'; import { extractErrorMessage } from '../../../common/util/errors'; import { ML_JOB_AGGREGATION } from '../../../common/constants/aggregation_types'; import { @@ -51,6 +56,16 @@ export interface ExplorerJob { selected: boolean; bucketSpanSeconds: number; isSingleMetricViewerJob?: boolean; + sourceIndices?: string[]; +} + +export function isExplorerJob(arg: unknown): arg is ExplorerJob { + return ( + isPopulatedObject(arg) && + typeof arg.id === 'string' && + arg.selected !== undefined && + arg.bucketSpanSeconds !== undefined + ); } interface ClearedSelectedAnomaliesState { @@ -110,6 +125,14 @@ export interface ViewBySwimLaneData extends OverallSwimlaneData { cardinality: number; } +export interface SourceIndexGeoFields { + [key: string]: { geoFields: string[]; dataViewId: string }; +} + +export interface SourceIndicesWithGeoFields { + [key: string]: SourceIndexGeoFields; +} + // create new job objects based on standard job config objects export function createJobs(jobs: CombinedJob[]): ExplorerJob[] { return jobs.map((job) => { @@ -119,6 +142,7 @@ export function createJobs(jobs: CombinedJob[]): ExplorerJob[] { selected: false, bucketSpanSeconds: bucketSpan!.asSeconds(), isSingleMetricViewerJob: isTimeSeriesViewJob(job), + sourceIndices: job.datafeed_config.indices, }; }); } @@ -600,3 +624,51 @@ export function removeFilterFromQueryString( return newQueryString; } + +// Returns an object mapping job ids to source indices which map to geo fields for that index +export async function getSourceIndicesWithGeoFields( + selectedJobs: Array, + dataViewsService: DataViewsContract +): Promise { + const sourceIndicesWithGeoFieldsMap: SourceIndicesWithGeoFields = {}; + // Go through selected jobs + if (Array.isArray(selectedJobs)) { + await asyncForEach(selectedJobs, async (job) => { + let sourceIndices; + let jobId: string; + if (isExplorerJob(job)) { + sourceIndices = job.sourceIndices; + jobId = job.id; + } else { + sourceIndices = job.datafeed_config.indices; + jobId = job.job_id; + } + + if (Array.isArray(sourceIndices)) { + // Check fields for each source index to see if it has geo fields + await asyncForEach(sourceIndices, async (sourceIndex) => { + const dataViewId = await getDataViewIdFromName(sourceIndex); + + if (dataViewId) { + const dataView = await dataViewsService.get(dataViewId); + const geoFields = [ + ...dataView.fields.getByType(ES_FIELD_TYPES.GEO_POINT), + ...dataView.fields.getByType(ES_FIELD_TYPES.GEO_SHAPE), + ]; + if (geoFields.length > 0) { + if (sourceIndicesWithGeoFieldsMap[jobId] === undefined) { + sourceIndicesWithGeoFieldsMap[jobId] = { + [sourceIndex]: { geoFields: [], dataViewId }, + }; + } + sourceIndicesWithGeoFieldsMap[jobId][sourceIndex].geoFields.push( + ...geoFields.map((field) => field.name) + ); + } + } + }); + } + }); + } + return sourceIndicesWithGeoFieldsMap; +} diff --git a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.test.tsx b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.test.tsx index 257cdb17707e4..893aa6afda81e 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.test.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.test.tsx @@ -8,6 +8,8 @@ import React from 'react'; import { render } from '@testing-library/react'; import { I18nProvider } from '@kbn/i18n-react'; +import { MlContext } from '../../contexts/ml'; +import { kibanaContextValueMock } from '../../contexts/ml/__mocks__/kibana_context_value'; import { TimeSeriesExplorerUrlStateManager } from './timeseriesexplorer'; import { TimeSeriesExplorer } from '../../timeseriesexplorer'; import { TimeSeriesExplorerPage } from '../../timeseriesexplorer/timeseriesexplorer_page'; @@ -109,9 +111,11 @@ describe('TimeSeriesExplorerUrlStateManager', () => { }; render( - - - + + + + + ); // assert diff --git a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx index 3e535bae1361e..b6c3879eec74f 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx @@ -14,6 +14,7 @@ import { i18n } from '@kbn/i18n'; import { getViewableDetectors } from '../../timeseriesexplorer/timeseriesexplorer_utils/get_viewable_detectors'; import { NavigateToPath, useNotifications } from '../../contexts/kibana'; +import { useMlContext } from '../../contexts/ml'; import { MlJobWithTimeRange } from '../../../../common/types/anomaly_detection_jobs'; @@ -108,6 +109,7 @@ export const TimeSeriesExplorerUrlStateManager: FC { + const dataViewsService = useMlContext().dataViewsContract; const { toasts } = useNotifications(); const toastNotificationService = useToastNotificationService(); const [timeSeriesExplorerUrlState, setTimeSeriesExplorerUrlState] = @@ -342,6 +344,7 @@ export const TimeSeriesExplorerUrlStateManager: FC { - this.loadForJobId(this.props.selectedJobId); - }); + getSourceIndicesWithGeoFields([selectedJob], this.props.dataViewsService) + .then((getSourceIndicesWithGeoFieldsResp) => + this.setState( + { + fullRefresh: false, + loading: true, + sourceIndicesWithGeoFields: getSourceIndicesWithGeoFieldsResp, + }, + () => { + this.loadForJobId(this.props.selectedJobId); + } + ) + ) + .catch(console.error); // eslint-disable-line no-console } if ( @@ -954,6 +969,7 @@ export class TimeSeriesExplorer extends React.Component { zoomFromFocusLoaded, zoomToFocusLoaded, chartDataError, + sourceIndicesWithGeoFields, } = this.state; const chartProps = { modelPlotEnabled, @@ -1296,7 +1312,12 @@ export class TimeSeriesExplorer extends React.Component { )} {arePartitioningFieldsProvided && jobs.length > 0 && hasResults === true && ( - + )} ); diff --git a/x-pack/plugins/ml/public/maps/util.ts b/x-pack/plugins/ml/public/maps/util.ts index 88e9994d303a9..51acd123398a7 100644 --- a/x-pack/plugins/ml/public/maps/util.ts +++ b/x-pack/plugins/ml/public/maps/util.ts @@ -8,11 +8,13 @@ import { FeatureCollection, Feature, Geometry } from 'geojson'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { htmlIdGenerator } from '@elastic/eui'; -import { FIELD_ORIGIN, STYLE_TYPE } from '@kbn/maps-plugin/common'; +import { FIELD_ORIGIN, STYLE_TYPE, LayerDescriptor } from '@kbn/maps-plugin/common'; +import { ESSearchSourceDescriptor } from '@kbn/maps-plugin/common/descriptor_types'; +import type { SerializableRecord } from '@kbn/utility-types'; import { fromKueryExpression, luceneStringToDsl, toElasticsearchQuery } from '@kbn/es-query'; import { ESSearchResponse } from '@kbn/core/types/elasticsearch'; import { VectorSourceRequestMeta } from '@kbn/maps-plugin/common'; -import { LAYER_TYPE } from '@kbn/maps-plugin/common'; +import { LAYER_TYPE, SOURCE_TYPES, SCALING_TYPES } from '@kbn/maps-plugin/common'; import { SEVERITY_COLOR_RAMP } from '../../common'; import { formatHumanReadableDateTimeSeconds } from '../../common/util/date_utils'; import type { MlApiServices } from '../application/services/ml_api_service'; @@ -20,6 +22,7 @@ import { MLAnomalyDoc } from '../../common/types/anomalies'; import { SEARCH_QUERY_LANGUAGE } from '../../common/constants/search'; import { getIndexPattern } from '../application/explorer/reducers/explorer_reducer/get_index_pattern'; import { AnomalySource } from './anomaly_source'; +import { SourceIndexGeoFields } from '../application/explorer/explorer_utils'; export const ML_ANOMALY_LAYERS = { TYPICAL: 'typical', @@ -109,6 +112,32 @@ export function getInitialAnomaliesLayers(jobId: string) { return initialLayers; } +export function getInitialSourceIndexFieldLayers(sourceIndexWithGeoFields: SourceIndexGeoFields) { + const initialLayers = [] as unknown as LayerDescriptor[] & SerializableRecord; + for (const index in sourceIndexWithGeoFields) { + if (sourceIndexWithGeoFields.hasOwnProperty(index)) { + const { dataViewId, geoFields } = sourceIndexWithGeoFields[index]; + + geoFields.forEach((geoField) => { + initialLayers.push({ + id: htmlIdGenerator()(), + type: LAYER_TYPE.MVT_VECTOR, + sourceDescriptor: { + id: htmlIdGenerator()(), + type: SOURCE_TYPES.ES_SEARCH, + tooltipProperties: [geoField], + label: index, + indexPatternId: dataViewId, + geoField, + scalingType: SCALING_TYPES.MVT, + } as unknown as ESSearchSourceDescriptor, + }); + }); + } + } + return initialLayers; +} + export async function getResultsForJobId( mlResultsService: MlApiServices['results'], jobId: string, diff --git a/x-pack/plugins/monitoring/public/application/index.tsx b/x-pack/plugins/monitoring/public/application/index.tsx index b313992863023..a6d20b2b1425c 100644 --- a/x-pack/plugins/monitoring/public/application/index.tsx +++ b/x-pack/plugins/monitoring/public/application/index.tsx @@ -10,7 +10,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { Route, Switch, Redirect, Router } from 'react-router-dom'; import { Observable } from 'rxjs'; -import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import { LoadingPage } from './pages/loading_page'; import { LicensePage } from './pages/license_page'; import { ClusterOverview } from './pages/cluster/overview_page'; @@ -100,247 +100,249 @@ const MonitoringApp: React.FC<{ return ( - - - - - - - - - - - - - - - {/* ElasticSearch Views */} - - - - - - - - - - - - - - - - - - - - - {/* Kibana Views */} - - - - - - - {/* Beats Views */} - - - - - - - {/* Logstash Routes */} - - - - - - - - - - - - - - - {/* APM Views */} - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + {/* ElasticSearch Views */} + + + + + + + + + + + + + + + + + + + + + {/* Kibana Views */} + + + + + + + {/* Beats Views */} + + + + + + + {/* Logstash Routes */} + + + + + + + + + + + + + + + {/* APM Views */} + + + + + + + + + + + + + + + + + ); }; diff --git a/x-pack/plugins/saved_objects_tagging/common/constants.ts b/x-pack/plugins/saved_objects_tagging/common/constants.ts index 7a49b3da64f9a..acd9800e03ce5 100644 --- a/x-pack/plugins/saved_objects_tagging/common/constants.ts +++ b/x-pack/plugins/saved_objects_tagging/common/constants.ts @@ -20,4 +20,4 @@ export const tagManagementSectionId = 'tags'; /** * The list of saved object types that are currently supporting tagging. */ -export const taggableTypes = ['dashboard', 'visualization', 'map', 'lens']; +export const taggableTypes = ['dashboard', 'visualization', 'map', 'lens', 'search']; diff --git a/x-pack/plugins/saved_objects_tagging/server/usage/schema.ts b/x-pack/plugins/saved_objects_tagging/server/usage/schema.ts index a05efd957e695..5f0c23a54f9e5 100644 --- a/x-pack/plugins/saved_objects_tagging/server/usage/schema.ts +++ b/x-pack/plugins/saved_objects_tagging/server/usage/schema.ts @@ -22,5 +22,6 @@ export const tagUsageCollectorSchema: MakeSchemaFrom = { lens: perTypeSchema, visualization: perTypeSchema, map: perTypeSchema, + search: perTypeSchema, }, }; diff --git a/x-pack/plugins/security/server/authentication/authenticator.test.ts b/x-pack/plugins/security/server/authentication/authenticator.test.ts index 6cd626d611ab8..f5924d4d3cdab 100644 --- a/x-pack/plugins/security/server/authentication/authenticator.test.ts +++ b/x-pack/plugins/security/server/authentication/authenticator.test.ts @@ -348,16 +348,23 @@ describe('Authenticator', () => { it('returns user that authentication provider returns.', async () => { const request = httpServerMock.createKibanaRequest(); + mockOptions.session.create.mockResolvedValue(mockSessVal); const user = mockAuthenticatedUser(); mockBasicAuthenticationProvider.login.mockResolvedValue( - AuthenticationResult.succeeded(user, { authHeaders: { authorization: 'Basic .....' } }) + AuthenticationResult.succeeded(user, { + authHeaders: { authorization: 'Basic .....' }, + state: {}, // to ensure a new session is created + }) ); await expect( authenticator.login(request, { provider: { type: 'basic' }, value: {} }) ).resolves.toEqual( - AuthenticationResult.succeeded(user, { authHeaders: { authorization: 'Basic .....' } }) + AuthenticationResult.succeeded(user, { + authHeaders: { authorization: 'Basic .....' }, + state: {}, + }) ); expectAuditEvents({ action: 'user_login', outcome: 'success' }); }); @@ -704,10 +711,7 @@ describe('Authenticator', () => { expect(mockOptions.session.extend).not.toHaveBeenCalled(); expect(mockOptions.session.invalidate).toHaveBeenCalledTimes(1); expect(mockOptions.session.invalidate).toHaveBeenCalledWith(request, { match: 'current' }); - expectAuditEvents( - { action: 'user_logout', outcome: 'unknown' }, - { action: 'user_login', outcome: 'success' } - ); + expectAuditEvents({ action: 'user_logout', outcome: 'unknown' }); }); it('clears session if provider asked to do so in `succeeded` result.', async () => { @@ -728,10 +732,7 @@ describe('Authenticator', () => { expect(mockOptions.session.extend).not.toHaveBeenCalled(); expect(mockOptions.session.invalidate).toHaveBeenCalledTimes(1); expect(mockOptions.session.invalidate).toHaveBeenCalledWith(request, { match: 'current' }); - expectAuditEvents( - { action: 'user_logout', outcome: 'unknown' }, - { action: 'user_login', outcome: 'success' } - ); + expectAuditEvents({ action: 'user_logout', outcome: 'unknown' }); }); it('clears session if provider asked to do so in `redirected` result.', async () => { @@ -788,7 +789,7 @@ describe('Authenticator', () => { await expect( authenticator.login(request, { provider: { type: 'basic' }, value: {} }) ).resolves.toEqual(AuthenticationResult.succeeded(mockUser)); - expectAuditEvents({ action: 'user_login', outcome: 'success' }); + expect(auditLogger.log).not.toHaveBeenCalled(); }); it('does not redirect to Access Agreement if request cannot be handled', async () => { @@ -805,7 +806,7 @@ describe('Authenticator', () => { it('does not redirect to Access Agreement if authentication fails', async () => { const request = httpServerMock.createKibanaRequest(); - mockOptions.session.get.mockResolvedValue(mockSessVal); + mockOptions.session.get.mockResolvedValue(null); const failureReason = new Error('something went wrong'); mockBasicAuthenticationProvider.login.mockResolvedValue( @@ -846,7 +847,7 @@ describe('Authenticator', () => { await expect( authenticator.login(request, { provider: { type: 'basic' }, value: {} }) ).resolves.toEqual(AuthenticationResult.succeeded(mockUser, { state: 'some-state' })); - expectAuditEvents({ action: 'user_login', outcome: 'success' }); + expect(auditLogger.log).not.toHaveBeenCalled(); }); it('does not redirect to Access Agreement its own requests', async () => { @@ -860,7 +861,7 @@ describe('Authenticator', () => { await expect( authenticator.login(request, { provider: { type: 'basic' }, value: {} }) ).resolves.toEqual(AuthenticationResult.succeeded(mockUser, { state: 'some-state' })); - expectAuditEvents({ action: 'user_login', outcome: 'success' }); + expect(auditLogger.log).not.toHaveBeenCalled(); }); it('does not redirect to Access Agreement if it is not configured', async () => { @@ -876,7 +877,7 @@ describe('Authenticator', () => { await expect( authenticator.login(request, { provider: { type: 'basic' }, value: {} }) ).resolves.toEqual(AuthenticationResult.succeeded(mockUser, { state: 'some-state' })); - expectAuditEvents({ action: 'user_login', outcome: 'success' }); + expect(auditLogger.log).not.toHaveBeenCalled(); }); it('does not redirect to Access Agreement if license doesnt allow it.', async () => { @@ -893,7 +894,7 @@ describe('Authenticator', () => { await expect( authenticator.login(request, { provider: { type: 'basic' }, value: {} }) ).resolves.toEqual(AuthenticationResult.succeeded(mockUser, { state: 'some-state' })); - expectAuditEvents({ action: 'user_login', outcome: 'success' }); + expect(auditLogger.log).not.toHaveBeenCalled(); }); it('redirects to Access Agreement when needed.', async () => { @@ -919,7 +920,7 @@ describe('Authenticator', () => { } ) ); - expectAuditEvents({ action: 'user_login', outcome: 'success' }); + expect(auditLogger.log).not.toHaveBeenCalled(); }); it('redirects to Access Agreement preserving redirect URL specified in login attempt.', async () => { @@ -949,7 +950,7 @@ describe('Authenticator', () => { } ) ); - expectAuditEvents({ action: 'user_login', outcome: 'success' }); + expect(auditLogger.log).not.toHaveBeenCalled(); }); it('redirects to Access Agreement preserving redirect URL specified in the authentication result.', async () => { @@ -976,7 +977,7 @@ describe('Authenticator', () => { } ) ); - expectAuditEvents({ action: 'user_login', outcome: 'success' }); + expect(auditLogger.log).not.toHaveBeenCalled(); }); it('redirects AJAX requests to Access Agreement when needed.', async () => { @@ -1002,7 +1003,7 @@ describe('Authenticator', () => { } ) ); - expectAuditEvents({ action: 'user_login', outcome: 'success' }); + expect(auditLogger.log).not.toHaveBeenCalled(); }); }); @@ -1064,7 +1065,7 @@ describe('Authenticator', () => { authResponseHeaders: { 'WWW-Authenticate': 'Negotiate' }, }) ); - expectAuditEvents({ action: 'user_login', outcome: 'success' }); + expect(auditLogger.log).not.toHaveBeenCalled(); }); it('does not redirect to Overwritten Session if session was unauthenticated before login', async () => { @@ -1279,7 +1280,7 @@ describe('Authenticator', () => { const authenticationResult = await authenticator.authenticate(request); expect(authenticationResult.failed()).toBe(true); expect(authenticationResult.error).toBe(failureReason); - expect(auditLogger.log).not.toHaveBeenCalled(); + expectAuditEvents({ action: 'user_login', outcome: 'failure' }); }); it('returns user that authentication provider returns.', async () => { @@ -1319,7 +1320,7 @@ describe('Authenticator', () => { provider: mockSessVal.provider, state: { authorization }, }); - expect(auditLogger.log).not.toHaveBeenCalled(); + expectAuditEvents({ action: 'user_login', outcome: 'success' }); expect(mockOptions.userProfileService.activate).not.toHaveBeenCalled(); }); @@ -1344,7 +1345,7 @@ describe('Authenticator', () => { provider: mockSessVal.provider, state: { authorization }, }); - expect(auditLogger.log).not.toHaveBeenCalled(); + expectAuditEvents({ action: 'user_login', outcome: 'success' }); expect(mockOptions.userProfileService.activate).not.toHaveBeenCalled(); }); @@ -1375,7 +1376,7 @@ describe('Authenticator', () => { provider: mockSessVal.provider, state: { authorization }, }); - expect(auditLogger.log).not.toHaveBeenCalled(); + expectAuditEvents({ action: 'user_login', outcome: 'success' }); expect(mockOptions.userProfileService.activate).toHaveBeenCalledTimes(1); expect(mockOptions.userProfileService.activate).toHaveBeenCalledWith(userProfileGrant); }); @@ -1952,7 +1953,10 @@ describe('Authenticator', () => { await expect(authenticator.authenticate(request)).resolves.toEqual( AuthenticationResult.succeeded(mockUser) ); - expectAuditEvents({ action: 'user_logout', outcome: 'unknown' }); + expectAuditEvents( + { action: 'user_logout', outcome: 'unknown' }, + { action: 'user_login', outcome: 'success' } + ); }); it('does not redirect AJAX requests to Overwritten Session', async () => { @@ -1972,7 +1976,10 @@ describe('Authenticator', () => { authResponseHeaders: { 'WWW-Authenticate': 'Negotiate' }, }) ); - expectAuditEvents({ action: 'user_logout', outcome: 'unknown' }); + expectAuditEvents( + { action: 'user_logout', outcome: 'unknown' }, + { action: 'user_login', outcome: 'success' } + ); }); it('does not redirect to Overwritten Session if username and provider did not change', async () => { @@ -2016,7 +2023,10 @@ describe('Authenticator', () => { } ) ); - expectAuditEvents({ action: 'user_logout', outcome: 'unknown' }); + expectAuditEvents( + { action: 'user_logout', outcome: 'unknown' }, + { action: 'user_login', outcome: 'success' } + ); }); it('redirects to Overwritten Session when provider changes', async () => { @@ -2043,7 +2053,10 @@ describe('Authenticator', () => { } ) ); - expectAuditEvents({ action: 'user_logout', outcome: 'unknown' }); + expectAuditEvents( + { action: 'user_logout', outcome: 'unknown' }, + { action: 'user_login', outcome: 'success' } + ); }); it('redirects to Overwritten Session preserving redirect URL specified in the authentication result.', async () => { @@ -2068,7 +2081,10 @@ describe('Authenticator', () => { } ) ); - expectAuditEvents({ action: 'user_logout', outcome: 'unknown' }); + expectAuditEvents( + { action: 'user_logout', outcome: 'unknown' }, + { action: 'user_login', outcome: 'success' } + ); }); }); }); diff --git a/x-pack/plugins/security/server/authentication/authenticator.ts b/x-pack/plugins/security/server/authentication/authenticator.ts index 581c889d72f58..2a78c2363389c 100644 --- a/x-pack/plugins/security/server/authentication/authenticator.ts +++ b/x-pack/plugins/security/server/authentication/authenticator.ts @@ -331,23 +331,6 @@ export class Authenticator { existingSessionValue, }); - // Checking for presence of `user` object to determine success state rather than - // `success()` method since that indicates a successful authentication and `redirect()` - // could also (but does not always) authenticate a user successfully (e.g. SAML flow) - if (authenticationResult.user || authenticationResult.failed()) { - const auditLogger = this.options.audit.asScoped(request); - auditLogger.log( - userLoginEvent({ - // We must explicitly specify the sessionId for login events because we just created the session, so - // it won't automatically get included in the audit event from the request context. - sessionId: sessionUpdateResult?.value?.sid, - authenticationResult, - authenticationProvider: providerName, - authenticationType: provider.type, - }) - ); - } - return this.handlePreAccessRedirects( request, authenticationResult, @@ -637,6 +620,21 @@ export class Authenticator { existingSessionValue: Readonly | null; } ) { + // Log failed `user_login` attempt only if creating a brand new session or if the existing session is + // not authenticated (e.g. during SAML handshake). If the existing session is authenticated we will + // invalidate it and log a `user_logout` event instead. + if (authenticationResult.failed() && !isSessionAuthenticated(existingSessionValue)) { + const auditLogger = this.options.audit.asScoped(request); + auditLogger.log( + userLoginEvent({ + sessionId: existingSessionValue?.sid, + authenticationResult, + authenticationProvider: provider.name, + authenticationType: provider.type, + }) + ); + } + if (!existingSessionValue && !authenticationResult.shouldUpdateState()) { return null; } @@ -745,6 +743,24 @@ export class Authenticator { provider, state: authenticationResult.shouldUpdateState() ? authenticationResult.state : null, }); + + // Log successful `user_login` event if a new authenticated session was created or an existing session was overwritten and + // the username or authentication provider changed. When username or authentication provider changes the session + // gets invalidated (logging `user_logout` event) before a new session is created. + if ( + isNewSessionAuthenticated && + (!isExistingSessionAuthenticated || usernameHasChanged || providerHasChanged) + ) { + const auditLogger = this.options.audit.asScoped(request); + auditLogger.log( + userLoginEvent({ + sessionId: newSessionValue?.sid, // We must explicitly specify the `sessionId` here since we just created the session and it can't be inferred from the request context. + authenticationResult, + authenticationProvider: provider.name, + authenticationType: provider.type, + }) + ); + } } else if (authenticationResult.shouldUpdateState()) { newSessionValue = await this.session.update(request, { ...existingSessionValue, @@ -776,7 +792,7 @@ export class Authenticator { sessionValue, skipAuditEvent, }: InvalidateSessionValueParams) { - if (sessionValue && !skipAuditEvent) { + if (sessionValue && isSessionAuthenticated(sessionValue) && !skipAuditEvent) { const auditLogger = this.options.audit.asScoped(request); auditLogger.log( userLogoutEvent({ diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rule_exception_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rule_exception_schema.test.ts new file mode 100644 index 0000000000000..b76d8cd7cfe4a --- /dev/null +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rule_exception_schema.test.ts @@ -0,0 +1,113 @@ +/* + * 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 { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; +import { pipe } from 'fp-ts/lib/pipeable'; +import { left } from 'fp-ts/lib/Either'; +import { createRuleExceptionsSchema } from './create_rule_exception_schema'; +import type { CreateRuleExceptionSchema } from './create_rule_exception_schema'; + +import { getCreateExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/request/create_exception_list_item_schema.mock'; + +describe('createRuleExceptionsSchema', () => { + test('empty objects do not validate', () => { + const payload: CreateRuleExceptionSchema = {} as CreateRuleExceptionSchema; + + const decoded = createRuleExceptionsSchema.decode(payload); + const checked = exactCheck(payload, decoded); + const message = pipe(checked, foldLeftRight); + expect(getPaths(left(message.errors))).toEqual([ + 'Invalid value "undefined" supplied to "items"', + ]); + expect(message.schema).toEqual({}); + }); + + test('items without list_id validate', () => { + const payload: CreateRuleExceptionSchema = { + items: [ + { + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + type: 'simple', + }, + ], + }; + + const decoded = createRuleExceptionsSchema.decode(payload); + const checked = exactCheck(payload, decoded); + const message = pipe(checked, foldLeftRight); + + expect(getPaths(left(message.errors))).toEqual([]); + expect((message.schema as CreateRuleExceptionSchema).items[0]).toEqual( + expect.objectContaining({ + comments: [], + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + os_types: [], + tags: [], + type: 'simple', + }) + ); + }); + + test('items with list_id do not validate', () => { + const payload = { + items: [getCreateExceptionListItemSchemaMock()], + } as unknown as CreateRuleExceptionSchema; + + const decoded = createRuleExceptionsSchema.decode(payload); + const checked = exactCheck(payload, decoded); + const message = pipe(checked, foldLeftRight); + expect(getPaths(left(message.errors))).toEqual([ + 'Invalid value "some-list-id" supplied to "items,list_id"', + ]); + expect(message.schema).toEqual({}); + }); + + test('made up parameters do not validate', () => { + const payload: Partial & { madeUp: string } = { + items: [ + { + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + type: 'simple', + }, + ], + madeUp: 'invalid value', + }; + + const decoded = createRuleExceptionsSchema.decode(payload); + const checked = exactCheck(payload, decoded); + const message = pipe(checked, foldLeftRight); + expect(getPaths(left(message.errors))).toEqual(['invalid keys "madeUp"']); + expect(message.schema).toEqual({}); + }); +}); diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rule_exception_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rule_exception_schema.ts new file mode 100644 index 0000000000000..e2d23d21abd53 --- /dev/null +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rule_exception_schema.ts @@ -0,0 +1,28 @@ +/* + * 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 * as t from 'io-ts'; + +import type { CreateRuleExceptionListItemSchemaDecoded } from '@kbn/securitysolution-io-ts-list-types'; +import { createRuleExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { RequiredKeepUndefined } from '@kbn/osquery-plugin/common/types'; + +export const createRuleExceptionsSchema = t.exact( + t.type({ + items: t.array(createRuleExceptionListItemSchema), + }) +); + +export type CreateRuleExceptionSchema = t.TypeOf; + +// This type is used after a decode since some things are defaults after a decode. +export type CreateRuleExceptionSchemaDecoded = Omit< + RequiredKeepUndefined>, + 'items' +> & { + items: CreateRuleExceptionListItemSchemaDecoded[]; +}; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/index.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/index.ts index 9c1a2581b2347..6e77066299249 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/index.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/index.ts @@ -7,12 +7,14 @@ export * from './add_prepackaged_rules_schema'; export * from './create_rules_bulk_schema'; +export * from './create_rule_exception_schema'; export * from './export_rules_schema'; export * from './find_rules_schema'; export * from './import_rules_schema'; export * from './patch_rules_bulk_schema'; export * from './patch_rules_schema'; export * from './perform_bulk_action_schema'; +export * from './query_rule_by_id_schema'; export * from './query_rules_schema'; export * from './query_signals_index_schema'; export * from './rule_schemas'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rule_by_id_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rule_by_id_schema.test.ts new file mode 100644 index 0000000000000..7266bebc8027d --- /dev/null +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rule_by_id_schema.test.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 { QueryRuleByIdSchema } from './query_rule_by_id_schema'; +import { queryRuleByIdSchema } from './query_rule_by_id_schema'; +import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; +import { pipe } from 'fp-ts/lib/pipeable'; +import { left } from 'fp-ts/lib/Either'; + +describe('query_rule_by_id_schema', () => { + test('empty objects do not validate', () => { + const payload: Partial = {}; + + const decoded = queryRuleByIdSchema.decode(payload); + const checked = exactCheck(payload, decoded); + const message = pipe(checked, foldLeftRight); + expect(getPaths(left(message.errors))).toEqual(['Invalid value "undefined" supplied to "id"']); + expect(message.schema).toEqual({}); + }); + + test('validates string for id', () => { + const payload: Partial = { + id: '4656dc92-5832-11ea-8e2d-0242ac130003', + }; + + const decoded = queryRuleByIdSchema.decode(payload); + const checked = exactCheck(payload, decoded); + const message = pipe(checked, foldLeftRight); + expect(getPaths(left(message.errors))).toEqual([]); + expect(message.schema).toEqual({ + id: '4656dc92-5832-11ea-8e2d-0242ac130003', + }); + }); +}); diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rule_by_id_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rule_by_id_schema.ts new file mode 100644 index 0000000000000..44b9692e7977f --- /dev/null +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rule_by_id_schema.ts @@ -0,0 +1,19 @@ +/* + * 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 * as t from 'io-ts'; + +import { id } from '../common/schemas'; + +export const queryRuleByIdSchema = t.exact( + t.type({ + id, + }) +); + +export type QueryRuleByIdSchema = t.TypeOf; +export type QueryRuleByIdSchemaDecoded = QueryRuleByIdSchema; diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts index 240bfdfdab2dc..127e69b862305 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts @@ -8,8 +8,13 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { DeepPartial } from 'utility-types'; import { merge } from 'lodash'; -import type { Agent, AgentStatus, FleetServerAgent } from '@kbn/fleet-plugin/common'; -import { AGENTS_INDEX } from '@kbn/fleet-plugin/common'; +import type { + Agent, + AgentStatus, + FleetServerAgent, + FleetServerAgentComponentStatus, +} from '@kbn/fleet-plugin/common'; +import { AGENTS_INDEX, FleetServerAgentComponentStatuses } from '@kbn/fleet-plugin/common'; import { BaseDataGenerator } from './base_data_generator'; const agentStatusList: readonly AgentStatus[] = [ @@ -69,6 +74,18 @@ export class FleetAgentGenerator extends BaseDataGenerator { const hostname = this.randomHostname(); const now = new Date().toISOString(); const osFamily = this.randomOSFamily(); + const componentStatus = this.randomChoice( + FleetServerAgentComponentStatuses + ); + const componentInputPayload = + componentStatus === 'failed' + ? { + error: { + code: 123, + message: 'Unable to connect to Elasticsearch', + }, + } + : { extra: 'payload' }; return merge< estypes.SearchHit, @@ -128,6 +145,32 @@ export class FleetAgentGenerator extends BaseDataGenerator { last_checkin: now, policy_revision_idx: 2, policy_coordinator_idx: 1, + components: [ + { + id: 'endpoint-0', + type: 'endpoint', + status: componentStatus, + message: 'Running as external service', + units: [ + { + id: 'endpoint-1', + type: 'input', + status: componentStatus, + message: 'Protecting machine', + payload: componentInputPayload, + }, + { + id: 'shipper', + type: 'output', + status: componentStatus, + message: 'Connected over GRPC', + payload: { + extra: 'payload', + }, + }, + ], + }, + ], }, }, overrides diff --git a/x-pack/plugins/security_solution/cypress/integration/cases/attach_timeline.spec.ts b/x-pack/plugins/security_solution/cypress/integration/cases/attach_timeline.spec.ts index 351b4971a46f7..f74be26963d45 100644 --- a/x-pack/plugins/security_solution/cypress/integration/cases/attach_timeline.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/cases/attach_timeline.spec.ts @@ -81,5 +81,17 @@ describe('attach timeline to case', () => { ); }); }); + + it('modal can be re-opened once closed', function () { + visitTimeline(this.timelineId); + attachTimelineToExistingCase(); + cy.get('[data-test-subj="all-cases-modal"] .euiButton') + .contains('Cancel') + .click({ force: true }); + + cy.get('[data-test-subj="all-cases-modal"]').should('not.exist'); + attachTimelineToExistingCase(); + cy.get('[data-test-subj="all-cases-modal"]').should('be.visible'); + }); }); }); diff --git a/x-pack/plugins/security_solution/cypress/integration/timelines/data_providers.spec.ts b/x-pack/plugins/security_solution/cypress/integration/timelines/data_providers.spec.ts index ee8f27db1fa7f..feb82397fe60c 100644 --- a/x-pack/plugins/security_solution/cypress/integration/timelines/data_providers.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/timelines/data_providers.spec.ts @@ -9,14 +9,24 @@ import { TIMELINE_DROPPED_DATA_PROVIDERS, TIMELINE_DATA_PROVIDERS_ACTION_MENU, TIMELINE_FLYOUT_HEADER, + GET_TIMELINE_GRID_CELL, + TIMELINE_DATA_PROVIDERS_CONTAINER, } from '../../screens/timeline'; import { waitForAllHostsToBeLoaded } from '../../tasks/hosts/all_hosts'; import { login, visit } from '../../tasks/login'; -import { openTimelineUsingToggle } from '../../tasks/security_main'; -import { addDataProvider } from '../../tasks/timeline'; - +import { + addDataProvider, + updateDataProviderbyDraggingField, + addNameAndDescriptionToTimeline, + populateTimeline, + waitForTimelineChanges, + closeTimeline, + createNewTimeline, + updateDataProviderByFieldHoverAction, +} from '../../tasks/timeline'; +import { getTimeline } from '../../objects/timeline'; import { HOSTS_URL } from '../../urls/navigation'; import { cleanKibana, scrollToBottom } from '../../tasks/common'; @@ -29,11 +39,19 @@ describe('timeline data providers', () => { scrollToBottom(); }); + beforeEach(() => { + createNewTimeline(); + addNameAndDescriptionToTimeline(getTimeline()); + populateTimeline(); + }); + + afterEach(() => { + closeTimeline(); + }); + it('displays the data provider action menu when Enter is pressed', (done) => { - openTimelineUsingToggle(); addDataProvider({ field: 'host.name', operator: 'exists' }).then(() => { cy.get(TIMELINE_DATA_PROVIDERS_ACTION_MENU).should('not.exist'); - cy.get(`${TIMELINE_FLYOUT_HEADER} ${TIMELINE_DROPPED_DATA_PROVIDERS}`) .pipe(($el) => $el.trigger('focus')) .should('exist'); @@ -46,4 +64,30 @@ describe('timeline data providers', () => { done(); }); }); + + it('persists timeline when data provider is updated by dragging a field from data grid', () => { + updateDataProviderbyDraggingField('host.name', 0); + waitForTimelineChanges(); + cy.wait(1000); + cy.reload(); + cy.get(`${GET_TIMELINE_GRID_CELL('host.name')}`) + .first() + .then((hostname) => { + cy.get(TIMELINE_DATA_PROVIDERS_CONTAINER).contains(`host.name: "${hostname.text()}"`); + }); + }); + + it('presists timeline when a field is added by hover action "Add To Timeline" in data provider ', () => { + updateDataProviderByFieldHoverAction('host.name', 0); + waitForTimelineChanges(); + cy.wait(1000); + cy.reload(); + cy.get(`${GET_TIMELINE_GRID_CELL('host.name')}`) + .first() + .then((hostname) => { + cy.get(TIMELINE_DATA_PROVIDERS_CONTAINER).should((dataProviderContainer) => { + expect(dataProviderContainer).to.contain(`host.name: "${hostname.text()}"`); + }); + }); + }); }); diff --git a/x-pack/plugins/security_solution/cypress/screens/timeline.ts b/x-pack/plugins/security_solution/cypress/screens/timeline.ts index 1c6e41da02c1d..51ce3b38d4d6f 100644 --- a/x-pack/plugins/security_solution/cypress/screens/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/screens/timeline.ts @@ -282,3 +282,23 @@ export const ACTIVE_TIMELINE_BOTTOM_BAR = '[data-test-subj="flyoutBottomBar"] .active-timeline-button'; export const DATA_GRID_BODY = '[data-test-subj=body-data-grid] .euiDataGrid__virtualized'; + +export const GET_TIMELINE_GRID_CELL = (fieldName: string) => + `[data-test-subj="draggable-content-${fieldName}"]`; + +export const GET_TIMELINE_GRID_HEADER = (fieldName: string) => + `[data-test-subj="header-${fieldName}"]`; + +export const EMPTY_DROPPABLE_DATA_PROVIDER_GROUP = `.empty-providers-group`; + +export const TIMELINE_DATA_PROVIDERS_CONTAINER = '[data-test-subj="dataProviders"]'; + +export const EMPTY_DATA_PROVIDER_AREA = `.timeline-drop-area-empty`; + +export const HOVER_ACTIONS = { + ADD_TO_TIMELINE: '[data-test-subj="add-to-timeline"]', + FILTER_FOR: '[data-test-subj="filter-for-value"]', + FILTER_OUT: '[data-test-subj="filter-out-value"]', + COPY: '[data-test-subj="clipboard"]', + SHOW_TOP: 'show-top-field', +}; diff --git a/x-pack/plugins/security_solution/cypress/tasks/hosts/all_hosts.ts b/x-pack/plugins/security_solution/cypress/tasks/hosts/all_hosts.ts index cdae0437eb565..44009de3e530d 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/hosts/all_hosts.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/hosts/all_hosts.ts @@ -12,5 +12,9 @@ export const openFirstHostDetails = () => { }; export const waitForAllHostsToBeLoaded = () => { - cy.get(ALL_HOSTS_TABLE).should('be.visible'); + /* + * added timeout because sometimes, default timeout of 20000 was not + * enough for all host table to be visible + */ + cy.get(ALL_HOSTS_TABLE, { timeout: 40000 }).should('be.visible'); }; diff --git a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts index 72ab78bf452b8..fda2ea08769ef 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts @@ -70,8 +70,13 @@ import { TIMESTAMP_HOVER_ACTION_OVERFLOW_BTN, TIMELINE_DATA_PROVIDER_FIELD_INPUT, ACTIVE_TIMELINE_BOTTOM_BAR, + EMPTY_DATA_PROVIDER_AREA, + EMPTY_DROPPABLE_DATA_PROVIDER_GROUP, + GET_TIMELINE_GRID_CELL, + HOVER_ACTIONS, } from '../screens/timeline'; import { REFRESH_BUTTON, TIMELINE } from '../screens/timelines'; +import { drag, drop } from './common'; import { closeFieldsBrowser, filterFieldsBrowser } from './fields_browser'; @@ -185,6 +190,34 @@ export const addDataProvider = (filter: TimelineFilter): Cypress.Chainable { + const dragTargetSelector = GET_TIMELINE_GRID_CELL(fieldName); + const dragTarget = cy.get(dragTargetSelector); + dragTarget.eq(rowNumber).then((currentSubject) => { + drag(currentSubject); + }); + let dropTarget: Cypress.Chainable>; + + cy.get('body').then((body) => { + if (body.find(EMPTY_DATA_PROVIDER_AREA).length > 0) { + dropTarget = cy.get(EMPTY_DATA_PROVIDER_AREA); + } else { + dropTarget = cy.get(EMPTY_DROPPABLE_DATA_PROVIDER_GROUP); + } + + dropTarget.then((currentEl) => { + drop(currentEl); + }); + }); +}; + +export const updateDataProviderByFieldHoverAction = (fieldName: string, rowNumber: number) => { + const fieldSelector = GET_TIMELINE_GRID_CELL(fieldName); + cy.get(fieldSelector).eq(rowNumber).trigger('mouseover', { force: true }); + cy.get(HOVER_ACTIONS.ADD_TO_TIMELINE).should('be.visible'); + cy.get(HOVER_ACTIONS.ADD_TO_TIMELINE).trigger('click', { force: true }); +}; + export const addNewCase = () => { cy.get(ALL_CASES_CREATE_NEW_CASE_TABLE_BTN).click(); }; diff --git a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.test.tsx b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.test.tsx index f1042d805b286..ea318069cdc4d 100644 --- a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.test.tsx @@ -16,6 +16,15 @@ jest.mock('../../hooks/use_selector'); jest.mock('../../containers/sourcerer', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ browserFields: {} }), })); +const mockDispatch = jest.fn(); +jest.mock('react-redux', () => { + const original = jest.requireActual('react-redux'); + + return { + ...original, + useDispatch: () => mockDispatch, + }; +}); describe('useHoverActionItems', () => { const defaultProps: UseHoverActionItemsProps = { diff --git a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx index f000e5f3157da..9ad7395fd10f5 100644 --- a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx +++ b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx @@ -6,12 +6,13 @@ */ import { EuiContextMenuItem } from '@elastic/eui'; -import React, { useMemo } from 'react'; +import React, { useCallback, useMemo } from 'react'; import type { DraggableId } from 'react-beautiful-dnd'; import { isEmpty } from 'lodash'; import { FilterManager } from '@kbn/data-plugin/public'; +import { useDispatch } from 'react-redux'; import { useKibana } from '../../lib/kibana'; import { allowTopN } from '../drag_and_drop/helpers'; import { useDeepEqualSelector } from '../../hooks/use_selector'; @@ -19,6 +20,7 @@ import type { ColumnHeaderOptions, DataProvider } from '../../../../common/types import { TimelineId } from '../../../../common/types/timeline'; import { timelineSelectors } from '../../../timelines/store/timeline'; import { ShowTopNButton } from './actions/show_top_n'; +import { addProvider } from '../../../timelines/store/timeline/actions'; export interface UseHoverActionItemsProps { dataProvider?: DataProvider | DataProvider[]; @@ -79,6 +81,7 @@ export const useHoverActionItems = ({ values, }: UseHoverActionItemsProps): UseHoverActionItems => { const kibana = useKibana(); + const dispatch = useDispatch(); const { timelines, uiSettings } = kibana.services; // Common actions used by the alert table and alert flyout const { @@ -105,6 +108,29 @@ export const useHoverActionItems = ({ [uiSettings, timelineId, activeFilterManager, filterManagerBackup] ); + /* + * Add to Timeline button, adds data to dataprovider but does not persists the Timeline + * to the server because of following reasons. + * + * 1. Add to Timeline button performs actions in `timelines` plugin + * 2. `timelines` plugin does not have information on how to create/update the timelines in the server + * as it is owned by Security Solution + * */ + const OnAddToTimeline = useCallback(() => { + if (!dataProvider || isEmpty(dataProvider)) return; + dispatch( + addProvider({ + id: TimelineId.active, + providers: dataProvider instanceof Array ? dataProvider : [dataProvider], + }) + ); + }, [dataProvider, dispatch]); + + const onAddToTimelineClicked = useCallback(() => { + if (handleHoverActionClicked) handleHoverActionClicked(); + OnAddToTimeline(); + }, [handleHoverActionClicked, OnAddToTimeline]); + /* * In the case of `DisableOverflowButton`, we show filters only when topN is NOT opened. As after topN button is clicked, the chart panel replace current hover actions in the hover actions' popover, so we have to hide all the actions. * in the case of `EnableOverflowButton`, we only need to hide all the items in the overflow popover as the chart's panel opens in the overflow popover, so non-overflowed actions are not affected. @@ -200,7 +226,7 @@ export const useHoverActionItems = ({ field, keyboardEvent: stKeyboardEvent, ownFocus, - onClick: handleHoverActionClicked, + onClick: onAddToTimelineClicked, showTooltip: enableOverflowButton ? false : true, value: values, })} @@ -247,6 +273,7 @@ export const useHoverActionItems = ({ getFilterForValueButton, getFilterOutValueButton, handleHoverActionClicked, + onAddToTimelineClicked, hideAddToTimeline, hideTopN, isObjectArray, diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.test.tsx index 8f770dfd21bf5..77ab9a73975ad 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.test.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.test.tsx @@ -12,6 +12,16 @@ import { getAddToTimelineCellAction } from './add_to_timeline'; jest.mock('../kibana'); +const mockDispatch = jest.fn; +jest.mock('react-redux', () => { + const original = jest.requireActual('react-redux'); + + return { + ...original, + useDispatch: () => mockDispatch, + }; +}); + describe('getAddToTimelineCellAction', () => { const sampleData: TimelineNonEcsData = { field: 'fizz', diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.tsx index 54956f6304576..7008ddcf53ce1 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.tsx @@ -6,11 +6,13 @@ */ import type { EuiDataGridColumnCellActionProps } from '@elastic/eui'; -import React, { useMemo } from 'react'; +import React, { useCallback, useMemo } from 'react'; import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common/search_strategy'; import type { DataProvider } from '@kbn/timelines-plugin/common/types'; import { getPageRowIndex } from '@kbn/timelines-plugin/public'; +import { useDispatch } from 'react-redux'; +import { TimelineId } from '../../../../common/types'; import { useGetMappedNonEcsValue } from '../../../timelines/components/timeline/body/data_driven_columns'; import { EXISTS_OPERATOR, @@ -18,6 +20,7 @@ import { } from '../../../timelines/components/timeline/data_providers/data_provider'; import { escapeDataProviderId } from '../../components/drag_and_drop/helpers'; import { EmptyComponent, useKibanaServices } from './helpers'; +import { addProvider } from '../../../timelines/store/timeline/actions'; export const getAddToTimelineCellAction = ({ data, @@ -28,6 +31,7 @@ export const getAddToTimelineCellAction = ({ }) => data && data.length > 0 ? function AddToTimeline({ rowIndex, columnId, Component }: EuiDataGridColumnCellActionProps) { + const dispatch = useDispatch(); const { timelines } = useKibanaServices(); const pageRowIndex = getPageRowIndex(rowIndex, pageSize); const rowData = useMemo(() => { @@ -77,6 +81,24 @@ export const getAddToTimelineCellAction = ({ }, })); }, [columnId, rowIndex, value]); + + /* + * Add to Timeline button, adds data to dataprovider but does not persists the Timeline + * to the server because of following reasons. + * + * 1. Add to Timeline button performs actions in `timelines` plugin + * 2. `timelines` plugin does not have information on how to create/update the timelines in the server + * as it is owned by Security Solution + * */ + const handleAddToTimelineAction = useCallback(() => { + dispatch( + addProvider({ + id: TimelineId.active, + providers: dataProvider, + }) + ); + }, [dataProvider, dispatch]); + const addToTimelineProps = useMemo(() => { return { Component, @@ -84,8 +106,9 @@ export const getAddToTimelineCellAction = ({ field: columnId, ownFocus: false, showTooltip: false, + onClick: handleAddToTimelineAction, }; - }, [Component, columnId, dataProvider]); + }, [Component, columnId, dataProvider, handleAddToTimelineAction]); // data grid expects each cell action always return an element, it crashes if returns null return pageRowIndex >= data.length ? ( diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx index bc104ad70f1f1..5da2a90ce14e4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx @@ -107,6 +107,10 @@ const AddToCaseButtonComponent: React.FC = ({ timelineId }) => { openCaseModal(true); }, [openCaseModal, handlePopoverClose]); + const onCaseModalClose = useCallback(() => { + openCaseModal(false); + }, [openCaseModal]); + const closePopover = useCallback(() => { setPopover(false); }, []); @@ -163,6 +167,7 @@ const AddToCaseButtonComponent: React.FC = ({ timelineId }) => { {isCaseModalOpen && cases.ui.getAllCasesSelectorModal({ onRowClick, + onClose: onCaseModalClose, owner: [APP_ID], permissions: userCasesPermissions, })} diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/translations.ts index 0bafd36d6fa1c..bc6c9ffc1b5d6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/translations.ts @@ -90,6 +90,6 @@ export const ATTACH_TO_NEW_CASE = i18n.translate( export const ATTACH_TO_EXISTING_CASE = i18n.translate( 'xpack.securitySolution.timeline.properties.attachToExistingCaseButtonLabel', { - defaultMessage: 'Attach to existing case...', + defaultMessage: 'Attach to existing case', } ); diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts index aa8671fbc7a0a..c49323b745a41 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts @@ -62,7 +62,7 @@ export const showTimeline = actionCreator<{ id: string; show: boolean }>('SHOW_T export const setInsertTimeline = actionCreator('SET_INSERT_TIMELINE'); -export const addProvider = actionCreator<{ id: string; provider: DataProvider }>('ADD_PROVIDER'); +export const addProvider = actionCreator<{ id: string; providers: DataProvider[] }>('ADD_PROVIDER'); export const saveTimeline = actionCreator('SAVE_TIMELINE'); diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/helpers.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/helpers.ts index c507a3fff69eb..2bf0aacaf6ff8 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/helpers.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { getOr, omit, uniq, isEmpty, isEqualWith } from 'lodash/fp'; +import { getOr, omit, uniq, isEmpty, isEqualWith, cloneDeep } from 'lodash/fp'; import uuid from 'uuid'; @@ -310,82 +310,92 @@ const queryMatchCustomizer = (dp1: QueryMatch, dp2: QueryMatch) => { return false; }; -const addAndToProviderInTimeline = ( +const addAndToProvidersInTimeline = ( id: string, - provider: DataProvider, + providers: DataProvider[], timeline: TimelineModel, timelineById: TimelineById ): TimelineById => { - const alreadyExistsProviderIndex = timeline.dataProviders.findIndex( - (p) => p.id === timeline.highlightedDropAndProviderId - ); - const newProvider = timeline.dataProviders[alreadyExistsProviderIndex]; - const alreadyExistsAndProviderIndex = newProvider.and.findIndex((p) => p.id === provider.id); - const { and, ...andProvider } = provider; - - if ( - isEqualWith(queryMatchCustomizer, newProvider.queryMatch, andProvider.queryMatch) || - (alreadyExistsAndProviderIndex === -1 && - newProvider.and.filter((itemAndProvider) => - isEqualWith(queryMatchCustomizer, itemAndProvider.queryMatch, andProvider.queryMatch) - ).length > 0) - ) { - return timelineById; - } - - const dataProviders = [ - ...timeline.dataProviders.slice(0, alreadyExistsProviderIndex), - { - ...timeline.dataProviders[alreadyExistsProviderIndex], - and: - alreadyExistsAndProviderIndex > -1 - ? [ - ...newProvider.and.slice(0, alreadyExistsAndProviderIndex), - andProvider, - ...newProvider.and.slice(alreadyExistsAndProviderIndex + 1), - ] - : [...newProvider.and, andProvider], - }, - ...timeline.dataProviders.slice(alreadyExistsProviderIndex + 1), - ]; - + if (providers.length === 0) return timelineById; + let localDataProviders: DataProvider[] = cloneDeep(timeline.dataProviders); + + providers.forEach((provider) => { + const alreadyExistsProviderIndex = localDataProviders.findIndex( + (p) => p.id === timeline.highlightedDropAndProviderId + ); + const newProvider = localDataProviders[alreadyExistsProviderIndex]; + const alreadyExistsAndProviderIndex = newProvider.and.findIndex((p) => p.id === provider.id); + const { and, ...andProvider } = provider; + + if ( + isEqualWith(queryMatchCustomizer, newProvider.queryMatch, andProvider.queryMatch) || + (alreadyExistsAndProviderIndex === -1 && + newProvider.and.filter((itemAndProvider) => + isEqualWith(queryMatchCustomizer, itemAndProvider.queryMatch, andProvider.queryMatch) + ).length > 0) + ) { + return timelineById; + } + + localDataProviders = [ + ...localDataProviders.slice(0, alreadyExistsProviderIndex), + { + ...localDataProviders[alreadyExistsProviderIndex], + and: + alreadyExistsAndProviderIndex > -1 + ? [ + ...newProvider.and.slice(0, alreadyExistsAndProviderIndex), + andProvider, + ...newProvider.and.slice(alreadyExistsAndProviderIndex + 1), + ] + : [...newProvider.and, andProvider], + }, + ...localDataProviders.slice(alreadyExistsProviderIndex + 1), + ]; + }); return { ...timelineById, [id]: { ...timeline, - dataProviders, + dataProviders: localDataProviders, }, }; }; -const addProviderToTimeline = ( +const addProvidersToTimeline = ( id: string, - provider: DataProvider, + providers: DataProvider[], timeline: TimelineModel, timelineById: TimelineById ): TimelineById => { - const alreadyExistsAtIndex = timeline.dataProviders.findIndex((p) => p.id === provider.id); + if (providers.length === 0) return timelineById; - if (alreadyExistsAtIndex > -1 && !isEmpty(timeline.dataProviders[alreadyExistsAtIndex].and)) { - provider.id = `${provider.id}-${ - timeline.dataProviders.filter((p) => p.id === provider.id).length - }`; - } + let localDataProviders: DataProvider[] = cloneDeep(timeline.dataProviders); - const dataProviders = - alreadyExistsAtIndex > -1 && isEmpty(timeline.dataProviders[alreadyExistsAtIndex].and) - ? [ - ...timeline.dataProviders.slice(0, alreadyExistsAtIndex), - provider, - ...timeline.dataProviders.slice(alreadyExistsAtIndex + 1), - ] - : [...timeline.dataProviders, provider]; + providers.forEach((provider) => { + const alreadyExistsAtIndex = localDataProviders.findIndex((p) => p.id === provider.id); + + if (alreadyExistsAtIndex > -1 && !isEmpty(localDataProviders[alreadyExistsAtIndex].and)) { + provider.id = `${provider.id}-${ + localDataProviders.filter((p) => p.id === provider.id).length + }`; + } + + localDataProviders = + alreadyExistsAtIndex > -1 && isEmpty(localDataProviders[alreadyExistsAtIndex].and) + ? [ + ...localDataProviders.slice(0, alreadyExistsAtIndex), + provider, + ...localDataProviders.slice(alreadyExistsAtIndex + 1), + ] + : [...localDataProviders, provider]; + }); return { ...timelineById, [id]: { ...timeline, - dataProviders, + dataProviders: localDataProviders, }, }; }; @@ -513,21 +523,20 @@ export const applyDeltaToTimelineColumnWidth = ({ interface AddTimelineProviderParams { id: string; - provider: DataProvider; + providers: DataProvider[]; timelineById: TimelineById; } -export const addTimelineProvider = ({ +export const addTimelineProviders = ({ id, - provider, + providers, timelineById, }: AddTimelineProviderParams): TimelineById => { const timeline = timelineById[id]; - if (timeline.highlightedDropAndProviderId !== '') { - return addAndToProviderInTimeline(id, provider, timeline, timelineById); + return addAndToProvidersInTimeline(id, providers, timeline, timelineById); } else { - return addProviderToTimeline(id, provider, timeline, timelineById); + return addProvidersToTimeline(id, providers, timeline, timelineById); } }; diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts index 7bb667b4eca1f..de458418cc42a 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts @@ -31,7 +31,7 @@ import { defaultHeaders } from '../../../common/mock'; import { addNewTimeline, - addTimelineProvider, + addTimelineProviders, addTimelineToStore, applyDeltaToTimelineColumnWidth, removeTimelineColumn, @@ -476,24 +476,26 @@ describe('Timeline', () => { }); describe('#addTimelineProvider', () => { - const providerToAdd: DataProvider = { - ...basicDataProvider, - id: '567', - name: 'data provider 2', - }; + const providerToAdd: DataProvider[] = [ + { + ...basicDataProvider, + id: '567', + name: 'data provider 2', + }, + ]; test('should return a new reference and not the same reference', () => { - const update = addTimelineProvider({ + const update = addTimelineProviders({ id: 'foo', - provider: providerToAdd, + providers: providerToAdd, timelineById: timelineByIdMock, }); expect(update).not.toBe(timelineByIdMock); }); test('should add a new timeline provider', () => { - const update = addTimelineProvider({ + const update = addTimelineProviders({ id: 'foo', - provider: providerToAdd, + providers: providerToAdd, timelineById: timelineByIdMock, }); const addedDataProvider = [...basicTimeline.dataProviders].concat(providerToAdd); @@ -501,9 +503,9 @@ describe('Timeline', () => { }); test('should NOT add a new timeline provider if it already exists and the attributes "and" is empty', () => { - const update = addTimelineProvider({ + const update = addTimelineProviders({ id: 'foo', - provider: basicDataProvider, + providers: [basicDataProvider], timelineById: timelineByIdMock, }); expect(update).toEqual(timelineByIdMock); @@ -518,22 +520,24 @@ describe('Timeline', () => { name: 'and data provider 1', }, ]; - const provider = { ...basicDataProvider }; - const update = addTimelineProvider({ + const providers = [{ ...basicDataProvider }]; + const update = addTimelineProviders({ id: 'foo', - provider, + providers, timelineById: myMockTimelineByIdMock, }); - expect(update.foo.dataProviders[1]).toEqual(provider); + expect(update.foo.dataProviders[1]).toEqual(providers[0]); }); test('should UPSERT an existing timeline provider if it already exists', () => { - const update = addTimelineProvider({ + const update = addTimelineProviders({ id: 'foo', - provider: { - ...basicDataProvider, - name: 'my name changed', - }, + providers: [ + { + ...basicDataProvider, + name: 'my name changed', + }, + ], timelineById: timelineByIdMock, }); expect(update.foo.dataProviders[0].name).toEqual('my name changed'); @@ -693,147 +697,159 @@ describe('Timeline', () => { describe('#addAndProviderToTimelineProvider', () => { test('should add a new and provider to an existing timeline provider', () => { - const providerToAdd: DataProvider = { - ...basicDataProvider, - id: '567', - name: 'data provider 2', - queryMatch: { - field: 'handsome', - value: 'xavier', - operator: IS_OPERATOR, + const providerToAdd: DataProvider[] = [ + { + ...basicDataProvider, + id: '567', + name: 'data provider 2', + queryMatch: { + field: 'handsome', + value: 'xavier', + operator: IS_OPERATOR, + }, }, - }; + ]; - const newTimeline = addTimelineProvider({ + const newTimeline = addTimelineProviders({ id: 'foo', - provider: providerToAdd, + providers: providerToAdd, timelineById: timelineByIdMock, }); newTimeline.foo.highlightedDropAndProviderId = '567'; - const andProviderToAdd: DataProvider = { - ...basicDataProvider, - id: '568', - name: 'And Data Provider', - queryMatch: { - field: 'smart', - value: 'steph', - operator: IS_OPERATOR, + const andProviderToAdd: DataProvider[] = [ + { + ...basicDataProvider, + id: '568', + name: 'And Data Provider', + queryMatch: { + field: 'smart', + value: 'steph', + operator: IS_OPERATOR, + }, }, - }; + ]; - const update = addTimelineProvider({ + const update = addTimelineProviders({ id: 'foo', - provider: andProviderToAdd, + providers: andProviderToAdd, timelineById: newTimeline, }); const indexProvider = update.foo.dataProviders.findIndex((i) => i.id === '567'); const addedAndDataProvider = update.foo.dataProviders[indexProvider].and[0]; - const { and, ...expectedResult } = andProviderToAdd; + const { and, ...expectedResult } = andProviderToAdd[0]; expect(addedAndDataProvider).toEqual(expectedResult); newTimeline.foo.highlightedDropAndProviderId = ''; }); test('should add another and provider because it is not a duplicate', () => { - const providerToAdd: DataProvider = { - ...basicDataProvider, - and: [ - { - ...basicDataProvider, - id: '568', - name: 'And Data Provider', - queryMatch: { - field: 'smart', - value: 'xavier', - operator: IS_OPERATOR, + const providerToAdd: DataProvider[] = [ + { + ...basicDataProvider, + and: [ + { + ...basicDataProvider, + id: '568', + name: 'And Data Provider', + queryMatch: { + field: 'smart', + value: 'xavier', + operator: IS_OPERATOR, + }, }, + ], + id: '567', + queryMatch: { + field: 'handsome', + value: 'steph', + operator: IS_OPERATOR, }, - ], - id: '567', - queryMatch: { - field: 'handsome', - value: 'steph', - operator: IS_OPERATOR, }, - }; + ]; - const newTimeline = addTimelineProvider({ + const newTimeline = addTimelineProviders({ id: 'foo', - provider: providerToAdd, + providers: providerToAdd, timelineById: timelineByIdMock, }); newTimeline.foo.highlightedDropAndProviderId = '567'; - const andProviderToAdd: DataProvider = { - ...basicDataProvider, - id: '569', - name: 'And Data Provider', - queryMatch: { - field: 'happy', - value: 'andrewG', - operator: IS_OPERATOR, + const andProviderToAdd: DataProvider[] = [ + { + ...basicDataProvider, + id: '569', + name: 'And Data Provider', + queryMatch: { + field: 'happy', + value: 'andrewG', + operator: IS_OPERATOR, + }, }, - }; + ]; // temporary, we will have to decouple DataProvider & DataProvidersAnd // that's bigger a refactor than just fixing a bug // @ts-expect-error - delete andProviderToAdd.and; - const update = addTimelineProvider({ + delete andProviderToAdd[0].and; + const update = addTimelineProviders({ id: 'foo', - provider: andProviderToAdd, + providers: andProviderToAdd, timelineById: newTimeline, }); - expect(update.foo.dataProviders[1].and[1]).toEqual(andProviderToAdd); + expect(update.foo.dataProviders[1].and[1]).toEqual(andProviderToAdd[0]); newTimeline.foo.highlightedDropAndProviderId = ''; }); test('should NOT add another and provider because it is a duplicate', () => { - const providerToAdd: DataProvider = { - ...basicDataProvider, - and: [ - { - ...basicDataProvider, - id: '568', - name: 'And Data Provider', - queryMatch: { - field: 'smart', - value: 'xavier', - operator: IS_OPERATOR, + const providerToAdd: DataProvider[] = [ + { + ...basicDataProvider, + and: [ + { + ...basicDataProvider, + id: '568', + name: 'And Data Provider', + queryMatch: { + field: 'smart', + value: 'xavier', + operator: IS_OPERATOR, + }, }, + ], + id: '567', + queryMatch: { + field: 'handsome', + value: 'steph', + operator: IS_OPERATOR, }, - ], - id: '567', - queryMatch: { - field: 'handsome', - value: 'steph', - operator: IS_OPERATOR, }, - }; + ]; - const newTimeline = addTimelineProvider({ + const newTimeline = addTimelineProviders({ id: 'foo', - provider: providerToAdd, + providers: providerToAdd, timelineById: timelineByIdMock, }); newTimeline.foo.highlightedDropAndProviderId = '567'; - const andProviderToAdd: DataProvider = { - ...basicDataProvider, - id: '569', - name: 'And Data Provider', - queryMatch: { - field: 'smart', - value: 'xavier', - operator: IS_OPERATOR, + const andProviderToAdd: DataProvider[] = [ + { + ...basicDataProvider, + id: '569', + name: 'And Data Provider', + queryMatch: { + field: 'smart', + value: 'xavier', + operator: IS_OPERATOR, + }, }, - }; - const update = addTimelineProvider({ + ]; + const update = addTimelineProviders({ id: 'foo', - provider: andProviderToAdd, + providers: andProviderToAdd, timelineById: newTimeline, }); @@ -1066,21 +1082,23 @@ describe('Timeline', () => { let timelineByIdwithAndMock: TimelineById = timelineByIdMock; let update: TimelineById; beforeEach(() => { - const providerToAdd: DataProvider = { - ...basicDataProvider, - and: [ - { - ...basicDataProvider, - id: '568', - name: 'And Data Provider', - }, - ], - id: '567', - }; + const providerToAdd: DataProvider[] = [ + { + ...basicDataProvider, + and: [ + { + ...basicDataProvider, + id: '568', + name: 'And Data Provider', + }, + ], + id: '567', + }, + ]; - timelineByIdwithAndMock = addTimelineProvider({ + timelineByIdwithAndMock = addTimelineProviders({ id: 'foo', - provider: providerToAdd, + providers: providerToAdd, timelineById: timelineByIdMock, }); @@ -1321,21 +1339,23 @@ describe('Timeline', () => { describe('#updateTimelineAndProviderExcluded', () => { let timelineByIdwithAndMock: TimelineById = timelineByIdMock; beforeEach(() => { - const providerToAdd: DataProvider = { - ...basicDataProvider, - and: [ - { - ...basicDataProvider, - id: '568', - name: 'And Data Provider', - }, - ], - id: '567', - }; + const providerToAdd: DataProvider[] = [ + { + ...basicDataProvider, + and: [ + { + ...basicDataProvider, + id: '568', + name: 'And Data Provider', + }, + ], + id: '567', + }, + ]; - timelineByIdwithAndMock = addTimelineProvider({ + timelineByIdwithAndMock = addTimelineProviders({ id: 'foo', - provider: providerToAdd, + providers: providerToAdd, timelineById: timelineByIdMock, }); }); diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.ts index d1ebd8aebc386..75d132b1c5676 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.ts @@ -54,7 +54,7 @@ import { addTimelineHistory, addTimelineNote, addTimelineNoteToEvent, - addTimelineProvider, + addTimelineProviders, addTimelineToStore, applyKqlFilterQueryDraft, pinTimelineEvent, @@ -129,9 +129,9 @@ export const timelineReducer = reducerWithInitialState(initialTimelineState) ...state, timelineById: addTimelineNoteToEvent({ id, noteId, eventId, timelineById: state.timelineById }), })) - .case(addProvider, (state, { id, provider }) => ({ + .case(addProvider, (state, { id, providers }) => ({ ...state, - timelineById: addTimelineProvider({ id, provider, timelineById: state.timelineById }), + timelineById: addTimelineProviders({ id, providers, timelineById: state.timelineById }), })) .case(applyKqlFilterQuery, (state, { id, filterQuery }) => ({ ...state, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rule_exceptions_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rule_exceptions_route.test.ts new file mode 100644 index 0000000000000..a65d165f9e109 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rule_exceptions_route.test.ts @@ -0,0 +1,164 @@ +/* + * 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 { getDetectionsExceptionListSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_schema.mock'; + +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { getRuleMock, resolveRuleMock } from '../__mocks__/request_responses'; +import { requestContextMock, serverMock, requestMock } from '../__mocks__'; +import { createRuleExceptionsRoute } from './create_rule_exceptions_route'; +import { getQueryRuleParams } from '../../schemas/rule_schemas.mock'; + +const getMockExceptionItem = () => ({ + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + type: 'simple', +}); + +describe('createRuleExceptionsRoute', () => { + let server: ReturnType; + let request: ReturnType; + let { clients, context } = requestContextMock.createTools(); + + beforeEach(() => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + request = requestMock.create({ + method: 'post', + path: `${DETECTION_ENGINE_RULES_URL}/exceptions`, + params: { + id: '4656dc92-5832-11ea-8e2d-0242ac130003', + }, + body: { + items: [getMockExceptionItem()], + }, + }); + + clients.rulesClient.resolve.mockResolvedValue(resolveRuleMock(getQueryRuleParams())); // existing rule + clients.rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); // successful update + clients.lists.exceptionListClient.createExceptionList = jest + .fn() + .mockResolvedValue(getDetectionsExceptionListSchemaMock()); + + createRuleExceptionsRoute(server.router); + }); + + describe('happy paths', () => { + test('returns 200 when adding an exception item and rule_default exception list already exists', async () => { + request = requestMock.create({ + method: 'post', + path: `${DETECTION_ENGINE_RULES_URL}/exceptions`, + params: { + id: '4656dc92-5832-11ea-8e2d-0242ac130003', + }, + body: { + items: [getMockExceptionItem()], + }, + }); + + clients.rulesClient.resolve.mockResolvedValue( + resolveRuleMock({ + ...getQueryRuleParams(), + exceptionsList: [ + { + type: 'rule_default', + id: '4656dc92-5832-11ea-8e2d-0242ac130003', + list_id: 'my_default_list', + namespace_type: 'single', + }, + ], + }) + ); + + clients.lists.exceptionListClient.createExceptionList = jest.fn().mockResolvedValue({ + ...getDetectionsExceptionListSchemaMock(), + type: 'rule_default', + }); + + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.status).toEqual(200); + }); + }); + + describe('500s', () => { + test('returns 500 if no rule found', async () => { + request = requestMock.create({ + method: 'post', + path: `${DETECTION_ENGINE_RULES_URL}/exceptions`, + params: { + id: '4656dc92-5832-11ea-8e2d-0242ac130003', + }, + body: { + items: [getMockExceptionItem()], + }, + }); + + const result = resolveRuleMock(getQueryRuleParams()); + // @ts-expect-error + delete result.alertTypeId; + + clients.rulesClient.resolve.mockResolvedValue(result); + + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.body).toEqual({ + message: + 'Unable to add exception to rule - rule with id:"4656dc92-5832-11ea-8e2d-0242ac130003" not found', + status_code: 500, + }); + }); + + test('returns 500 if rule found to have multiple default exception lists on it', async () => { + request = requestMock.create({ + method: 'post', + path: `${DETECTION_ENGINE_RULES_URL}/exceptions`, + params: { + id: '4656dc92-5832-11ea-8e2d-0242ac130003', + }, + body: { + items: [getMockExceptionItem()], + }, + }); + + clients.rulesClient.resolve.mockResolvedValue( + resolveRuleMock({ + ...getQueryRuleParams(), + exceptionsList: [ + { + type: 'rule_default', + id: '4656dc92-5832-11ea-8e2d-0242ac130003', + list_id: 'my_default_list', + namespace_type: 'single', + }, + { + type: 'rule_default', + id: '4656dc92-5832-11ea-8e2d-0242ac130044', + list_id: 'my_default_list_2', + namespace_type: 'single', + }, + ], + }) + ); + + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.body).toEqual({ + message: 'More than one default exception list found on rule', + status_code: 500, + }); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rule_exceptions_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rule_exceptions_route.ts new file mode 100644 index 0000000000000..8b5c3e1b044f2 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rule_exceptions_route.ts @@ -0,0 +1,275 @@ +/* + * 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 * as t from 'io-ts'; + +import { fold } from 'fp-ts/lib/Either'; +import { pipe } from 'fp-ts/lib/pipeable'; +import { identity } from 'fp-ts/lib/function'; + +import { transformError } from '@kbn/securitysolution-es-utils'; +import type { + CreateExceptionListSchema, + CreateExceptionListSchemaDecoded, + CreateRuleExceptionListItemSchemaDecoded, + ExceptionListSchema, +} from '@kbn/securitysolution-io-ts-list-types'; +import { + createExceptionListSchema, + exceptionListItemSchema, + ExceptionListTypeEnum, +} from '@kbn/securitysolution-io-ts-list-types'; +import { formatErrors, validate } from '@kbn/securitysolution-io-ts-utils'; +import type { SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { RulesClient } from '@kbn/alerting-plugin/server'; +import type { + CreateRuleExceptionSchemaDecoded, + QueryRuleByIdSchemaDecoded, +} from '../../../../../common/detection_engine/schemas/request'; +import { + createRuleExceptionsSchema, + queryRuleByIdSchema, +} from '../../../../../common/detection_engine/schemas/request'; +import type { SecuritySolutionPluginRouter } from '../../../../types'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { buildSiemResponse } from '../utils'; +import { patchRules } from '../../rules/patch_rules'; +import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; +import { readRules } from '../../rules/read_rules'; +import type { RuleParams } from '../../schemas/rule_schemas'; +import { checkDefaultRuleExceptionListReferences } from './utils/check_for_default_rule_exception_list'; + +export const createRuleExceptionsRoute = (router: SecuritySolutionPluginRouter) => { + router.post( + { + path: `${DETECTION_ENGINE_RULES_URL}/{id}/exceptions`, + validate: { + params: buildRouteValidation( + queryRuleByIdSchema + ), + body: buildRouteValidation< + typeof createRuleExceptionsSchema, + CreateRuleExceptionSchemaDecoded + >(createRuleExceptionsSchema), + }, + options: { + tags: ['access:securitySolution'], + }, + }, + async (context, request, response) => { + const siemResponse = buildSiemResponse(response); + + try { + const ctx = await context.resolve([ + 'core', + 'securitySolution', + 'alerting', + 'licensing', + 'lists', + ]); + const rulesClient = ctx.alerting.getRulesClient(); + const listsClient = ctx.securitySolution.getExceptionListClient(); + + const { items } = request.body; + const { id: ruleId } = request.params; + + // Check that the rule they're trying to add an exception list to exists + const rule = await readRules({ + rulesClient, + ruleId: undefined, + id: ruleId, + }); + + if (rule == null) { + return siemResponse.error({ + statusCode: 500, + body: `Unable to add exception to rule - rule with id:"${ruleId}" not found`, + }); + } + + let createdItems; + + const ruleDefaultLists = rule.params.exceptionsList.filter( + (list) => list.type === ExceptionListTypeEnum.RULE_DEFAULT + ); + + // This should hopefully never happen, but could if we forget to add such a check to one + // of our routes allowing the user to update the rule to have more than one default list added + checkDefaultRuleExceptionListReferences({ exceptionLists: rule.params.exceptionsList }); + + const [ruleDefaultList] = ruleDefaultLists; + + if (ruleDefaultList != null) { + // check that list does indeed exist + const exceptionListAssociatedToRule = await listsClient?.getExceptionList({ + id: ruleDefaultList.id, + listId: ruleDefaultList.list_id, + namespaceType: ruleDefaultList.namespace_type, + }); + + // if list does exist, just need to create the items + if (exceptionListAssociatedToRule != null) { + createdItems = await createExceptionListItems({ + items, + defaultList: exceptionListAssociatedToRule, + listsClient, + }); + } else { + // This means that there was missed cleanup when this rule exception list was + // deleted and it remained referenced on the rule. Let's remove it from the rule, + // and update the rule's exceptions lists to include newly created default list. + const defaultList = await createAndAssociateDefaultExceptionList({ + rule, + rulesClient, + listsClient, + removeOldAssociation: true, + }); + + createdItems = await createExceptionListItems({ items, defaultList, listsClient }); + } + } else { + const defaultList = await createAndAssociateDefaultExceptionList({ + rule, + rulesClient, + listsClient, + removeOldAssociation: false, + }); + + createdItems = await createExceptionListItems({ items, defaultList, listsClient }); + } + + const [validated, errors] = validate(createdItems, t.array(exceptionListItemSchema)); + if (errors != null) { + return siemResponse.error({ body: errors, statusCode: 500 }); + } else { + return response.ok({ body: validated ?? {} }); + } + } catch (err) { + const error = transformError(err); + return siemResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; + +export const createExceptionListItems = async ({ + items, + defaultList, + listsClient, +}: { + items: CreateRuleExceptionListItemSchemaDecoded[]; + defaultList: ExceptionListSchema; + listsClient: ExceptionListClient | null; +}) => { + return Promise.all( + items.map((item) => + listsClient?.createExceptionListItem({ + comments: item.comments, + description: item.description, + entries: item.entries, + itemId: item.item_id, + listId: defaultList.list_id, + meta: item.meta, + name: item.name, + namespaceType: defaultList.namespace_type, + osTypes: item.os_types, + tags: item.tags, + type: item.type, + }) + ) + ); +}; + +export const createAndAssociateDefaultExceptionList = async ({ + rule, + listsClient, + rulesClient, + removeOldAssociation, +}: { + rule: SanitizedRule; + listsClient: ExceptionListClient | null; + rulesClient: RulesClient; + removeOldAssociation: boolean; +}): Promise => { + const exceptionList: CreateExceptionListSchema = { + description: `Exception list containing exceptions for rule with id: ${rule.id}`, + meta: undefined, + name: `Exceptions for rule - ${rule.name}`, + namespace_type: 'single', + tags: ['default_rule_exception_list'], + type: ExceptionListTypeEnum.RULE_DEFAULT, + version: 1, + }; + + // The `as` defeated me. Please send help + // if you know what's missing here. + const validated = pipe( + createExceptionListSchema.decode(exceptionList), + fold((errors) => { + throw new Error(formatErrors(errors).join()); + }, identity) + ) as CreateExceptionListSchemaDecoded; + + const { + description, + list_id: listId, + meta, + name, + namespace_type: namespaceType, + tags, + type, + version, + } = validated; + + // create the default rule list + const exceptionListAssociatedToRule = await listsClient?.createExceptionList({ + description, + immutable: false, + listId, + meta, + name, + namespaceType, + tags, + type, + version, + }); + + if (exceptionListAssociatedToRule == null) { + throw Error(`An error occurred creating rule default exception list`); + } + + // The list client has no rules client context, so once we've created the exception list, + // we need to go ahead and "attach" it to the rule. + const existingRuleExceptionLists = rule.params.exceptionsList ?? []; + + const ruleExceptionLists = removeOldAssociation + ? existingRuleExceptionLists.filter((list) => list.type !== ExceptionListTypeEnum.RULE_DEFAULT) + : existingRuleExceptionLists; + + await patchRules({ + rulesClient, + existingRule: rule, + nextParams: { + ...rule.params, + exceptions_list: [ + ...ruleExceptionLists, + { + id: exceptionListAssociatedToRule.id, + list_id: exceptionListAssociatedToRule.list_id, + type: exceptionListAssociatedToRule.type, + namespace_type: exceptionListAssociatedToRule.namespace_type, + }, + ], + }, + }); + + return exceptionListAssociatedToRule; +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts index 7d4e88f3868d0..c5009138b4078 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts @@ -19,6 +19,7 @@ import { createRulesSchema } from '../../../../../common/detection_engine/schema import { newTransformValidate } from './validate'; import { createRuleValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/create_rules_type_dependents'; import { createRules } from '../../rules/create_rules'; +import { checkDefaultRuleExceptionListReferences } from './utils/check_for_default_rule_exception_list'; export const createRulesRoute = ( router: SecuritySolutionPluginRouter, @@ -78,6 +79,9 @@ export const createRulesRoute = ( // This will create the endpoint list if it does not exist yet await ctx.lists?.getExceptionListClient().createEndpointList(); + checkDefaultRuleExceptionListReferences({ + exceptionLists: request.body.exceptions_list, + }); const createdRule = await createRules({ rulesClient, params: request.body, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts index cdd46c2c189d6..aac618529c3bb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts @@ -16,7 +16,7 @@ import { buildMlAuthz } from '../../../machine_learning/authz'; import { throwAuthzError } from '../../../machine_learning/validation'; import { patchRules } from '../../rules/patch_rules'; import { buildSiemResponse } from '../utils'; - +import { checkDefaultRuleExceptionListReferences } from './utils/check_for_default_rule_exception_list'; import { getIdError } from './utils'; import { transformValidate } from './validate'; import { readRules } from '../../rules/read_rules'; @@ -69,6 +69,8 @@ export const patchRulesRoute = (router: SecuritySolutionPluginRouter, ml: SetupP throwAuthzError(await mlAuthz.validateRuleType(existingRule?.params.type)); } + checkDefaultRuleExceptionListReferences({ exceptionLists: params.exceptions_list }); + const migratedRule = await legacyMigrate({ rulesClient, savedObjectsClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts index 81d77e1e2eb71..8fa4f372fd597 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts @@ -21,6 +21,7 @@ import { updateRules } from '../../rules/update_rules'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { legacyMigrate } from '../../rules/utils'; import { readRules } from '../../rules/read_rules'; +import { checkDefaultRuleExceptionListReferences } from './utils/check_for_default_rule_exception_list'; export const updateRulesRoute = (router: SecuritySolutionPluginRouter, ml: SetupPlugins['ml']) => { router.put( @@ -53,6 +54,8 @@ export const updateRulesRoute = (router: SecuritySolutionPluginRouter, ml: Setup }); throwAuthzError(await mlAuthz.validateRuleType(request.body.type)); + checkDefaultRuleExceptionListReferences({ exceptionLists: request.body.exceptions_list }); + const existingRule = await readRules({ rulesClient, ruleId: request.body.rule_id, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/check_for_default_rule_exception_list.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/check_for_default_rule_exception_list.test.ts new file mode 100644 index 0000000000000..b95007d834b09 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/check_for_default_rule_exception_list.test.ts @@ -0,0 +1,65 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { checkDefaultRuleExceptionListReferences } from './check_for_default_rule_exception_list'; +import type { ListArray } from '@kbn/securitysolution-io-ts-list-types'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; + +describe('checkDefaultRuleExceptionListReferences', () => { + it('returns undefined if "exceptionLists" is undefined', () => { + const result = checkDefaultRuleExceptionListReferences({ + exceptionLists: undefined, + }); + + expect(result).toBeUndefined(); + }); + + it('returns "exceptionLists" if it does not contain more than one default rule exception list', () => { + const lists: ListArray = [ + { + id: '2', + list_id: '123', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + { + id: '1', + list_id: '456', + namespace_type: 'single', + type: ExceptionListTypeEnum.DETECTION, + }, + ]; + const result = checkDefaultRuleExceptionListReferences({ + exceptionLists: lists, + }); + + expect(result).toEqual(lists); + }); + + it('throws error if "exceptionLists" contains more than one default rule exception list', () => { + const lists: ListArray = [ + { + id: '2', + list_id: '123', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + { + id: '1', + list_id: '456', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + ]; + + expect(() => + checkDefaultRuleExceptionListReferences({ + exceptionLists: lists, + }) + ).toThrowErrorMatchingInlineSnapshot(`"More than one default exception list found on rule"`); + }); +}); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/check_for_default_rule_exception_list.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/check_for_default_rule_exception_list.ts new file mode 100644 index 0000000000000..9ea7bc5870902 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/check_for_default_rule_exception_list.ts @@ -0,0 +1,36 @@ +/* + * 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 { ListArray } from '@kbn/securitysolution-io-ts-list-types'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; + +/** + * Util to check if linked exceptions include more than one default list + * @param exceptionLists {array} - exception lists and items to import + * @returns {Promise} exception lists or error if more than one default list found + */ +export const checkDefaultRuleExceptionListReferences = ({ + exceptionLists, +}: { + exceptionLists: ListArray | undefined; +}): ListArray | undefined => { + if (exceptionLists == null) { + return exceptionLists; + } + + const defaultLists = exceptionLists.filter( + (list) => list.type === ExceptionListTypeEnum.RULE_DEFAULT + ); + + // This should hopefully never happen, but could if we forget to add such a check to one + // of our routes allowing the user to update the rule to have more than one default list added + if (defaultLists.length > 1) { + throw new Error('More than one default exception list found on rule'); + } else { + return exceptionLists; + } +}; diff --git a/x-pack/plugins/security_solution/server/routes/index.ts b/x-pack/plugins/security_solution/server/routes/index.ts index 9161ee89cd52c..5e8e700fcc1e0 100644 --- a/x-pack/plugins/security_solution/server/routes/index.ts +++ b/x-pack/plugins/security_solution/server/routes/index.ts @@ -74,6 +74,7 @@ import { createPrebuiltSavedObjectsRoute } from '../lib/prebuilt_saved_objects/r import { readAlertsIndexExistsRoute } from '../lib/detection_engine/routes/index/read_alerts_index_exists_route'; import { getInstalledIntegrationsRoute } from '../lib/detection_engine/routes/fleet/get_installed_integrations/get_installed_integrations_route'; import { registerResolverRoutes } from '../endpoint/routes/resolver'; +import { createRuleExceptionsRoute } from '../lib/detection_engine/routes/rules/create_rule_exceptions_route'; export const initRoutes = ( router: SecuritySolutionPluginRouter, @@ -109,6 +110,7 @@ export const initRoutes = ( previewRuleDataClient, getStartServices ); + createRuleExceptionsRoute(router); // Once we no longer have the legacy notifications system/"side car actions" this should be removed. legacyCreateLegacyNotificationRoute(router, logger); diff --git a/x-pack/plugins/synthetics/server/routes/synthetics_service/get_service_allowed.ts b/x-pack/plugins/synthetics/server/routes/synthetics_service/get_service_allowed.ts index 6c247dde94c04..3c4e634eca76f 100644 --- a/x-pack/plugins/synthetics/server/routes/synthetics_service/get_service_allowed.ts +++ b/x-pack/plugins/synthetics/server/routes/synthetics_service/get_service_allowed.ts @@ -13,10 +13,10 @@ export const getServiceAllowedRoute: SyntheticsRestApiRouteFactory = () => ({ path: API_URLS.SERVICE_ALLOWED, validate: {}, handler: async ({ syntheticsMonitorClient, server }): Promise => { - const isCloud = Boolean(server.cloud?.isCloudEnabled); + const isESS = Boolean(server.cloud?.isCloudEnabled) && server.config.service?.manifestUrl; return { - serviceAllowed: isCloud ? syntheticsMonitorClient.syntheticsService.isAllowed : true, + serviceAllowed: isESS ? syntheticsMonitorClient.syntheticsService.isAllowed : true, signupUrl: syntheticsMonitorClient.syntheticsService.signupUrl, }; }, diff --git a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json index e31e2c0dd8257..95b80a252130c 100644 --- a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json +++ b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @@ -9080,6 +9080,16 @@ "type": "integer" } } + }, + "search": { + "properties": { + "usedTags": { + "type": "integer" + }, + "taggedObjects": { + "type": "integer" + } + } } } } diff --git a/x-pack/plugins/threat_intelligence/common/types/indicator.ts b/x-pack/plugins/threat_intelligence/common/types/indicator.ts index adbb1f3baa04b..bfea03dace750 100644 --- a/x-pack/plugins/threat_intelligence/common/types/indicator.ts +++ b/x-pack/plugins/threat_intelligence/common/types/indicator.ts @@ -43,6 +43,8 @@ export enum RawIndicatorFieldId { MacAddress = 'threat.indicator.mac', TimeStamp = '@timestamp', Id = '_id', + Name = 'threat.indicator.name', + NameOrigin = 'threat.indicator.name_origin', } /** @@ -73,136 +75,7 @@ export const generateMockIndicator = (): Indicator => { indicator.fields['threat.indicator.type'] = ['ipv4-addr']; indicator.fields['threat.indicator.ip'] = ['12.68.554.87']; - - return indicator; -}; - -export const generateMockIpIndicator = generateMockIndicator; - -export const generateMockUrlIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['url']; - indicator.fields['threat.indicator.url.original'] = ['https://google.com']; - - return indicator; -}; - -export const generateMockFileIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['file']; - indicator.fields['threat.indicator.file.hash.sha256'] = ['sample_sha256_hash']; - indicator.fields['threat.indicator.file.hash.md5'] = ['sample_md5_hash']; - indicator.fields['threat.indicator.file.hash.sha1'] = ['sample_sha1_hash']; - - return indicator; -}; - -export const generateMockFileMd5Indicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['file']; - indicator.fields['threat.indicator.file.hash.md5'] = ['sample_md5_hash']; - indicator.fields['threat.indicator.file.hash.sha1'] = ['sample_sha1_hash']; - - return indicator; -}; - -export const generateMockEmailAddrIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['email-addr']; - indicator.fields['threat.indicator.email.address'] = ['sample@example.com']; - - return indicator; -}; - -export const generateMockDomainIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['domain']; - indicator.fields['threat.indicator.url.domain'] = ['google.com']; - - return indicator; -}; - -export const generateMockDomainNameIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['domain-name']; - indicator.fields['threat.indicator.url.domain'] = ['google.com']; - - return indicator; -}; - -export const generateMockX509CertificateIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['x509-certificate']; - indicator.fields['threat.indicator.x509.serial_number'] = ['sample_serial_number']; - - return indicator; -}; - -export const generateMockX509SerialIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['x509 Serial']; - indicator.fields['threat.indicator.x509.serial_number'] = ['sample_serial_bla']; - - return indicator; -}; - -export const generateMockUnknownIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['unknown']; - indicator.fields._id = ['sample_id']; - - return indicator; -}; - -export const generateMockEmailIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['email']; - indicator.fields['threat.indicator.email.address'] = ['sample@example.com']; - - return indicator; -}; - -export const generateMockEmailMessageIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['email-message']; - - return indicator; -}; - -export const generateMockWindowsRegistryKeyIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['windows-registry-key']; - indicator.fields['threat.indicator.registry.key'] = ['sample_registry_key']; - - return indicator; -}; - -export const generateMockAutonomousSystemIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['autonomous-system']; - indicator.fields['threat.indicator.as.number'] = ['sample_as_number']; - - return indicator; -}; - -export const generateMockMacAddressIndicator = (): Indicator => { - const indicator = generateMockBaseIndicator(); - - indicator.fields['threat.indicator.type'] = ['mac-addr']; - indicator.fields['threat.indicator.mac'] = ['sample_mac_address']; + indicator.fields['threat.indicator.name'] = ['12.68.554.87']; return indicator; }; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout/indicators_flyout.test.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout/indicators_flyout.test.tsx index 397d3f3522afe..4ad5c0e5f038a 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout/indicators_flyout.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout/indicators_flyout.test.tsx @@ -15,7 +15,6 @@ import { mockUiSetting } from '../../../../common/mocks/mock_kibana_ui_settings_ import { TestProvidersComponent } from '../../../../common/mocks/test_providers'; import { generateFieldTypeMap } from '../../../../common/mocks/mock_field_type_map'; import { unwrapValue } from '../../lib/unwrap_value'; -import { getDisplayName } from '../../lib/display_name'; const mockIndicator = generateMockIndicator(); const mockFieldTypesMap = generateFieldTypeMap(); @@ -33,7 +32,7 @@ describe('', () => { ); expect(getByTestId(TITLE_TEST_ID).innerHTML).toContain( - `Indicator: ${getDisplayName(mockIndicator).value}` + `Indicator: ${unwrapValue(mockIndicator, RawIndicatorFieldId.Name)}` ); expect(getByTestId(SUBTITLE_TEST_ID).innerHTML).toContain( `First seen: ${dateFormatter( diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout/indicators_flyout.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout/indicators_flyout.tsx index b93dc5a11cb94..f1dde44d05aab 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout/indicators_flyout.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout/indicators_flyout.tsx @@ -24,7 +24,6 @@ import { Indicator, RawIndicatorFieldId } from '../../../../../common/types/indi import { IndicatorsFlyoutJson } from '../indicators_flyout_json/indicators_flyout_json'; import { IndicatorsFlyoutTable } from '../indicators_flyout_table/indicators_flyout_table'; import { unwrapValue } from '../../lib/unwrap_value'; -import { getDisplayName } from '../../lib/display_name'; export const TITLE_TEST_ID = 'tiIndicatorFlyoutTitle'; export const SUBTITLE_TEST_ID = 'tiIndicatorFlyoutSubtitle'; @@ -103,8 +102,7 @@ export const IndicatorsFlyout: VFC = ({ ); const firstSeen: string = unwrapValue(indicator, RawIndicatorFieldId.FirstSeen) as string; - const displayName = getDisplayName(indicator); - const displayNameValue = displayName.value || EMPTY_VALUE; + const displayNameValue = unwrapValue(indicator, RawIndicatorFieldId.Name) || EMPTY_VALUE; const flyoutTitleId = useGeneratedHtmlId({ prefix: 'simpleFlyoutTitle', }); diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout_table/indicators_flyout_table.test.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout_table/indicators_flyout_table.test.tsx index 4497fcc538bab..bc7cfffbcf7a3 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout_table/indicators_flyout_table.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_flyout_table/indicators_flyout_table.test.tsx @@ -20,14 +20,13 @@ import { TABLE_TEST_ID, } from './indicators_flyout_table'; import { unwrapValue } from '../../lib/unwrap_value'; -import { getDisplayName } from '../../lib/display_name'; const mockIndicator: Indicator = generateMockIndicator(); const mockFieldTypesMap = generateFieldTypeMap(); describe('', () => { it('should render fields and values in table', () => { - const { getByTestId, getByText } = render( + const { getByTestId, getByText, getAllByText } = render( @@ -37,7 +36,10 @@ describe('', () => { expect(getByText(RawIndicatorFieldId.Feed)).toBeInTheDocument(); - expect(getByText(getDisplayName(mockIndicator).value as string)).toBeInTheDocument(); + // There should be two occureces of 'threat.indicator.name' value on the page + expect( + getAllByText(unwrapValue(mockIndicator, RawIndicatorFieldId.Name) as string) + ).toHaveLength(2); expect( getByText(unwrapValue(mockIndicator, RawIndicatorFieldId.Feed) as string) diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/cell_renderer.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/cell_renderer.tsx index 7c88dd7c34969..50429090505cf 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/cell_renderer.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/cell_renderer.tsx @@ -10,15 +10,13 @@ import { useContext, useEffect } from 'react'; import { euiLightVars as themeLight, euiDarkVars as themeDark } from '@kbn/ui-theme'; import React from 'react'; import { useKibana } from '../../../../hooks/use_kibana'; -import { EMPTY_VALUE } from '../../../../../common/constants'; import { Indicator } from '../../../../../common/types/indicator'; -import { getDisplayName } from '../../lib/display_name'; import { IndicatorField } from '../indicator_field/indicator_field'; import { IndicatorsTableContext } from './context'; import { ActionsRowCell } from './actions_row_cell'; export enum ComputedIndicatorFieldId { - DisplayName = 'display_name', + DisplayName = 'threat.indicator.name', } export const cellRendererFactory = (from: number) => { @@ -59,12 +57,6 @@ export const cellRendererFactory = (from: number) => { return ; } - if (columnId === ComputedIndicatorFieldId.DisplayName) { - const displayName = getDisplayName(indicator); - const displayNameValue = displayName.value; - return displayNameValue || EMPTY_VALUE; - } - return ; }; }; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/hooks/use_column_settings.test.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/hooks/use_column_settings.test.ts new file mode 100644 index 0000000000000..bc4a18c1a80bb --- /dev/null +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/hooks/use_column_settings.test.ts @@ -0,0 +1,264 @@ +/* + * 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 { mockedServices, TestProvidersComponent } from '../../../../../common/mocks/test_providers'; +import { act, renderHook } from '@testing-library/react-hooks'; +import { useColumnSettings } from './use_column_settings'; + +const renderUseColumnSettings = () => + renderHook(() => useColumnSettings(), { wrapper: TestProvidersComponent }); + +describe('useColumnSettings()', () => { + afterEach(() => mockedServices.storage.clear()); + + describe('initial state', () => { + describe('when initial state is not persisted into plugin storage service', () => { + it('should return correct value', () => { + const { result } = renderUseColumnSettings(); + + expect(result.current.columns).toMatchInlineSnapshot(` + Array [ + Object { + "displayAsText": "@timestamp", + "id": "@timestamp", + }, + Object { + "displayAsText": "Indicator", + "id": "threat.indicator.name", + }, + Object { + "displayAsText": "Indicator type", + "id": "threat.indicator.type", + }, + Object { + "displayAsText": "Feed", + "id": "threat.feed.name", + }, + Object { + "displayAsText": "First seen", + "id": "threat.indicator.first_seen", + }, + Object { + "displayAsText": "Last seen", + "id": "threat.indicator.last_seen", + }, + ] + `); + + expect(result.current.columnVisibility.visibleColumns).toMatchInlineSnapshot(` + Array [ + "@timestamp", + "threat.indicator.name", + "threat.indicator.type", + "threat.feed.name", + "threat.indicator.first_seen", + "threat.indicator.last_seen", + ] + `); + }); + }); + + describe('when initial state is present in the plugin storage service', () => { + beforeEach(() => { + mockedServices.storage.set('indicatorsTable', { + visibleColumns: ['display_name', 'threat.indicator.last_seen', 'tags', 'stream'], + columns: [ + { id: 'display_name', displayAsText: 'Indicator' }, + { id: 'threat.indicator.type', displayAsText: 'Indicator type' }, + { id: 'threat.feed.name', displayAsText: 'Feed' }, + { id: 'threat.indicator.first_seen', displayAsText: 'First seen' }, + { id: 'threat.indicator.last_seen', displayAsText: 'Last seen' }, + { id: 'tags', displayAsText: 'tags' }, + { id: 'stream', displayAsText: 'stream' }, + ], + }); + }); + + it('should restore the column settings from the cache', () => { + const { result } = renderUseColumnSettings(); + + expect(result.current.columnVisibility.visibleColumns).toMatchInlineSnapshot(` + Array [ + "display_name", + "threat.indicator.last_seen", + "tags", + "stream", + ] + `); + + expect(result.current.columns).toMatchInlineSnapshot(` + Array [ + Object { + "displayAsText": "Indicator", + "id": "display_name", + }, + Object { + "displayAsText": "Indicator type", + "id": "threat.indicator.type", + }, + Object { + "displayAsText": "Feed", + "id": "threat.feed.name", + }, + Object { + "displayAsText": "First seen", + "id": "threat.indicator.first_seen", + }, + Object { + "displayAsText": "Last seen", + "id": "threat.indicator.last_seen", + }, + Object { + "displayAsText": "tags", + "id": "tags", + }, + Object { + "displayAsText": "stream", + "id": "stream", + }, + ] + `); + }); + }); + }); + + describe('column toggle and reset', () => { + it('should return correct columns list', async () => { + const { result } = renderUseColumnSettings(); + + expect(result.current.columnVisibility.visibleColumns).toMatchInlineSnapshot(` + Array [ + "@timestamp", + "threat.indicator.name", + "threat.indicator.type", + "threat.feed.name", + "threat.indicator.first_seen", + "threat.indicator.last_seen", + ] + `); + expect(result.current.columns).toMatchInlineSnapshot(` + Array [ + Object { + "displayAsText": "@timestamp", + "id": "@timestamp", + }, + Object { + "displayAsText": "Indicator", + "id": "threat.indicator.name", + }, + Object { + "displayAsText": "Indicator type", + "id": "threat.indicator.type", + }, + Object { + "displayAsText": "Feed", + "id": "threat.feed.name", + }, + Object { + "displayAsText": "First seen", + "id": "threat.indicator.first_seen", + }, + Object { + "displayAsText": "Last seen", + "id": "threat.indicator.last_seen", + }, + ] + `); + + await act(async () => { + result.current.handleToggleColumn('justATestColumn'); + }); + + expect(result.current.columnVisibility.visibleColumns).toMatchInlineSnapshot(` + Array [ + "@timestamp", + "threat.indicator.name", + "threat.indicator.type", + "threat.feed.name", + "threat.indicator.first_seen", + "threat.indicator.last_seen", + "justATestColumn", + ] + `); + expect(result.current.columns).toMatchInlineSnapshot(` + Array [ + Object { + "displayAsText": "@timestamp", + "id": "@timestamp", + }, + Object { + "displayAsText": "Indicator", + "id": "threat.indicator.name", + }, + Object { + "displayAsText": "Indicator type", + "id": "threat.indicator.type", + }, + Object { + "displayAsText": "Feed", + "id": "threat.feed.name", + }, + Object { + "displayAsText": "First seen", + "id": "threat.indicator.first_seen", + }, + Object { + "displayAsText": "Last seen", + "id": "threat.indicator.last_seen", + }, + Object { + "displayAsText": "justATestColumn", + "id": "justATestColumn", + }, + ] + `); + + await act(async () => { + result.current.handleResetColumns(); + }); + + expect(result.current.columnVisibility.visibleColumns).toMatchInlineSnapshot(` + Array [ + "@timestamp", + "threat.indicator.name", + "threat.indicator.type", + "threat.feed.name", + "threat.indicator.first_seen", + "threat.indicator.last_seen", + ] + `); + expect(result.current.columns).toMatchInlineSnapshot(` + Array [ + Object { + "displayAsText": "@timestamp", + "id": "@timestamp", + }, + Object { + "displayAsText": "Indicator", + "id": "threat.indicator.name", + }, + Object { + "displayAsText": "Indicator type", + "id": "threat.indicator.type", + }, + Object { + "displayAsText": "Feed", + "id": "threat.feed.name", + }, + Object { + "displayAsText": "First seen", + "id": "threat.indicator.first_seen", + }, + Object { + "displayAsText": "Last seen", + "id": "threat.indicator.last_seen", + }, + ] + `); + }); + }); +}); diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/hooks/use_column_settings.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/hooks/use_column_settings.ts new file mode 100644 index 0000000000000..84c45a858591d --- /dev/null +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/hooks/use_column_settings.ts @@ -0,0 +1,136 @@ +/* + * 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 { EuiDataGridColumn } from '@elastic/eui'; +import { useCallback, useEffect, useMemo, useState } from 'react'; +import { i18n } from '@kbn/i18n'; +import negate from 'lodash/negate'; +import { RawIndicatorFieldId } from '../../../../../../common/types/indicator'; +import { useKibana } from '../../../../../hooks/use_kibana'; +import { ComputedIndicatorFieldId } from '../cell_renderer'; + +const DEFAULT_COLUMNS: EuiDataGridColumn[] = [ + { + id: RawIndicatorFieldId.TimeStamp, + displayAsText: i18n.translate('xpack.threatIntelligence.indicator.table.timestampColumnTitle', { + defaultMessage: '@timestamp', + }), + }, + { + id: ComputedIndicatorFieldId.DisplayName, + displayAsText: i18n.translate('xpack.threatIntelligence.indicator.table.indicatorColumTitle', { + defaultMessage: 'Indicator', + }), + }, + { + id: RawIndicatorFieldId.Type, + displayAsText: i18n.translate( + 'xpack.threatIntelligence.indicator.table.indicatorTypeColumTitle', + { + defaultMessage: 'Indicator type', + } + ), + }, + { + id: RawIndicatorFieldId.Feed, + displayAsText: i18n.translate('xpack.threatIntelligence.indicator.table.FeedColumTitle', { + defaultMessage: 'Feed', + }), + }, + { + id: RawIndicatorFieldId.FirstSeen, + displayAsText: i18n.translate('xpack.threatIntelligence.indicator.table.firstSeenColumTitle', { + defaultMessage: 'First seen', + }), + }, + { + id: RawIndicatorFieldId.LastSeen, + displayAsText: i18n.translate('xpack.threatIntelligence.indicator.table.lastSeenColumTitle', { + defaultMessage: 'Last seen', + }), + }, +]; + +const DEFAULT_VISIBLE_COLUMNS = DEFAULT_COLUMNS.map((column) => column.id); + +const INDICATORS_TABLE_STORAGE = 'indicatorsTable' as const; + +export const useColumnSettings = () => { + const { + services: { storage }, + } = useKibana(); + + const [columns, setColumns] = useState([]); + const [visibleColumns, setVisibleColumns] = useState>([]); + + /** Deserialize preferences on mount */ + useEffect(() => { + const cachedPreferences = storage.get(INDICATORS_TABLE_STORAGE) || { + visibleColumns: DEFAULT_VISIBLE_COLUMNS, + columns: DEFAULT_COLUMNS, + }; + + const { visibleColumns: cachedVisibleColumns, columns: cachedColumns } = cachedPreferences; + + setVisibleColumns(cachedVisibleColumns); + setColumns(cachedColumns); + }, [storage]); + + /** Ensure preferences are serialized into plugin storage on change */ + useEffect(() => { + storage.set(INDICATORS_TABLE_STORAGE, { visibleColumns, columns }); + }, [columns, storage, visibleColumns]); + + /** Toggle column and adjust its visibility */ + const handleToggleColumn = useCallback((columnId: string) => { + setColumns((currentColumns) => { + const columnsMatchingId = ({ id }: EuiDataGridColumn) => id === columnId; + const columnsNotMatchingId = negate(columnsMatchingId); + + const enabled = Boolean(currentColumns.find(columnsMatchingId)); + + if (enabled) { + return currentColumns.filter(columnsNotMatchingId); + } + + return [...currentColumns, { id: columnId as any, displayAsText: columnId }]; + }); + + setVisibleColumns((currentlyVisibleColumns) => { + const matchById = (id: string) => id === columnId; + const notMatchingId = negate(matchById); + + const enabled = Boolean(currentlyVisibleColumns.find(matchById)); + + if (enabled) { + return currentlyVisibleColumns.filter(notMatchingId); + } + + return [...currentlyVisibleColumns, columnId]; + }); + }, []); + + const handleResetColumns = useCallback(() => { + setColumns(DEFAULT_COLUMNS); + setVisibleColumns(DEFAULT_VISIBLE_COLUMNS); + }, []); + + const columnVisibility = useMemo( + () => ({ + visibleColumns, + setVisibleColumns: setVisibleColumns as (cols: string[]) => void, + }), + [visibleColumns] + ); + + return { + handleResetColumns, + handleToggleColumn, + columns, + columnVisibility, + }; +}; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/indicators_table.tsx b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/indicators_table.tsx index 128da1d6c21ba..64e3ff0cfb481 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/indicators_table.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/components/indicators_table/indicators_table.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { VFC, useState, useMemo, useEffect, useCallback } from 'react'; +import React, { VFC, useState, useMemo } from 'react'; import { EuiDataGrid, EuiDataGridColumnCellActionProps, @@ -16,59 +16,17 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { i18n } from '@kbn/i18n'; import { EuiDataGridColumn } from '@elastic/eui/src/components/datagrid/data_grid_types'; import { BrowserFields, SecuritySolutionDataViewBase } from '../../../../types'; -import { Indicator, RawIndicatorFieldId } from '../../../../../common/types/indicator'; -import { cellRendererFactory, ComputedIndicatorFieldId } from './cell_renderer'; +import { Indicator } from '../../../../../common/types/indicator'; +import { cellRendererFactory } from './cell_renderer'; import { EmptyState } from '../../../../components/empty_state'; import { AddToTimeline } from '../../../timeline/components/add_to_timeline'; import { IndicatorsTableContext, IndicatorsTableContextValue } from './context'; import { IndicatorsFlyout } from '../indicators_flyout/indicators_flyout'; import { Pagination } from '../../hooks/use_indicators'; import { useToolbarOptions } from './hooks/use_toolbar_options'; - -const defaultColumns: EuiDataGridColumn[] = [ - { - id: RawIndicatorFieldId.TimeStamp, - displayAsText: i18n.translate('xpack.threatIntelligence.indicator.table.timestampColumnTitle', { - defaultMessage: '@timestamp', - }), - }, - { - id: ComputedIndicatorFieldId.DisplayName, - displayAsText: i18n.translate('xpack.threatIntelligence.indicator.table.indicatorColumTitle', { - defaultMessage: 'Indicator', - }), - }, - { - id: RawIndicatorFieldId.Type, - displayAsText: i18n.translate( - 'xpack.threatIntelligence.indicator.table.indicatorTypeColumTitle', - { - defaultMessage: 'Indicator type', - } - ), - }, - { - id: RawIndicatorFieldId.Feed, - displayAsText: i18n.translate('xpack.threatIntelligence.indicator.table.FeedColumTitle', { - defaultMessage: 'Feed', - }), - }, - { - id: RawIndicatorFieldId.FirstSeen, - displayAsText: i18n.translate('xpack.threatIntelligence.indicator.table.firstSeenColumTitle', { - defaultMessage: 'First seen', - }), - }, - { - id: RawIndicatorFieldId.LastSeen, - displayAsText: i18n.translate('xpack.threatIntelligence.indicator.table.lastSeenColumTitle', { - defaultMessage: 'Last seen', - }), - }, -]; +import { useColumnSettings } from './hooks/use_column_settings'; export interface IndicatorsTableProps { indicators: Indicator[]; @@ -101,12 +59,6 @@ export const IndicatorsTable: VFC = ({ indexPattern, browserFields, }) => { - const [columns, setColumns] = useState(defaultColumns); - - const [visibleColumns, setVisibleColumns] = useState>( - columns.map((column) => column.id) - ); - const [expanded, setExpanded] = useState(); const renderCellValue = useMemo( @@ -160,32 +112,10 @@ export const IndicatorsTable: VFC = ({ [renderCellValue] ); - const handleToggleColumn = useCallback((columnId: string) => { - setColumns((currentColumns) => { - const columnsMatchingId = ({ id }: EuiDataGridColumn) => id === columnId; - const columnsNotMatchingId = (column: EuiDataGridColumn) => !columnsMatchingId(column); - - const enabled = Boolean(currentColumns.find(columnsMatchingId)); - - if (enabled) { - return currentColumns.filter(columnsNotMatchingId); - } - - return [...currentColumns, { id: columnId as any, displayAsText: columnId }]; - }); - }, []); - - const handleResetColumns = useCallback(() => setColumns(defaultColumns), []); - - /** - * Whenever selected columns change, we make sure they are in sync with visible cols - */ - useEffect(() => { - setVisibleColumns(columns.map(({ id }) => id)); - }, [columns]); + const { columns, columnVisibility, handleResetColumns, handleToggleColumn } = useColumnSettings(); useMemo(() => { - columns.map( + columns.forEach( (col: EuiDataGridColumn) => (col.cellActions = [ ({ rowIndex, columnId, Component }: EuiDataGridColumnCellActionProps) => ( @@ -233,10 +163,7 @@ export const IndicatorsTable: VFC = ({ aria-labelledby="indicators-table" leadingControlColumns={leadingControlColumns} columns={columns} - columnVisibility={{ - visibleColumns, - setVisibleColumns: setVisibleColumns as (cols: string[]) => void, - }} + columnVisibility={columnVisibility} rowCount={indicatorCount} renderCellValue={renderCellValue} toolbarVisibility={toolbarOptions} diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators.ts index 3df822c579419..fead584c05a93 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_indicators.ts @@ -18,6 +18,7 @@ import { Indicator } from '../../../../common/types/indicator'; import { useKibana } from '../../../hooks/use_kibana'; import { THREAT_QUERY_BASE } from '../../../../common/constants'; import { useSourcererDataView } from './use_sourcerer_data_view'; +import { threatIndicatorNamesOriginScript, threatIndicatorNamesScript } from '../lib/display_name'; const PAGE_SIZES = [10, 25, 50]; @@ -125,6 +126,20 @@ export const useIndicators = ({ from, fields: [{ field: '*', include_unmapped: true }], query: queryToExecute, + runtime_mappings: { + 'threat.indicator.name': { + type: 'keyword', + script: { + source: threatIndicatorNamesScript(), + }, + }, + 'threat.indicator.name_origin': { + type: 'keyword', + script: { + source: threatIndicatorNamesOriginScript(), + }, + }, + }, }, }, }, diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_sourcerer_data_view.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_sourcerer_data_view.ts index ce8299776542e..e4d39d1af547e 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_sourcerer_data_view.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/hooks/use_sourcerer_data_view.ts @@ -6,21 +6,37 @@ */ import { useMemo } from 'react'; +import { SecuritySolutionDataViewBase } from '../../../types'; import { useSecurityContext } from '../../../hooks/use_security_context'; export const useSourcererDataView = () => { const { sourcererDataView } = useSecurityContext(); - const indexPatterns = useMemo( - () => [sourcererDataView.indexPattern], - [sourcererDataView.indexPattern] - ); + const updatedPattern = useMemo(() => { + const displayNameField = { + aggregatable: true, + esTypes: ['keyword'], + name: 'threat.indicator.name', + searchable: true, + type: 'string', + }; + + const fields = [...sourcererDataView.indexPattern.fields, displayNameField]; + + return { + ...sourcererDataView.indexPattern, + fields, + } as SecuritySolutionDataViewBase; + }, [sourcererDataView.indexPattern]); + + const indexPatterns = useMemo(() => [updatedPattern], [updatedPattern]); return useMemo( () => ({ ...sourcererDataView, indexPatterns, + indexPattern: updatedPattern, }), - [indexPatterns, sourcererDataView] + [indexPatterns, sourcererDataView, updatedPattern] ); }; diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/lib/display_name.test.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/lib/display_name.test.ts index 6088a1669b622..1a23b1b3819e0 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/lib/display_name.test.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/lib/display_name.test.ts @@ -5,75 +5,106 @@ * 2.0. */ -import { - generateMockBaseIndicator, - generateMockFileIndicator, - generateMockIpIndicator, - generateMockUrlIndicator, - generateMockFileMd5Indicator, - generateMockDomainIndicator, - generateMockEmailAddrIndicator, - generateMockDomainNameIndicator, - generateMockX509CertificateIndicator, - generateMockX509SerialIndicator, - generateMockUnknownIndicator, - generateMockWindowsRegistryKeyIndicator, - generateMockAutonomousSystemIndicator, - generateMockMacAddressIndicator, - Indicator, - RawIndicatorFieldId, -} from '../../../../common/types/indicator'; -import { getDisplayName } from './display_name'; - -type ExpectedIndicatorValue = string | null; - -const cases: Array<[Indicator, ExpectedIndicatorValue]> = [ - [generateMockIpIndicator(), '12.68.554.87'], - [generateMockUrlIndicator(), 'https://google.com'], - [generateMockFileIndicator(), 'sample_sha256_hash'], - [generateMockFileMd5Indicator(), 'sample_md5_hash'], - [generateMockEmailAddrIndicator(), 'sample@example.com'], - [generateMockDomainIndicator(), 'google.com'], - [generateMockDomainNameIndicator(), 'google.com'], - [generateMockX509CertificateIndicator(), 'sample_serial_number'], - [generateMockX509SerialIndicator(), 'sample_serial_bla'], - [generateMockUnknownIndicator(), 'sample_id'], - [generateMockWindowsRegistryKeyIndicator(), 'sample_registry_key'], - [generateMockAutonomousSystemIndicator(), 'sample_as_number'], - [generateMockMacAddressIndicator(), 'sample_mac_address'], - - // Indicator with no fields should yield null as a display value - [{ fields: {} }, null], - - // Same for an empty object - [{} as any, null], - - // And falsy value - [null, null], -]; - -describe('getDisplayName()', () => { - describe.each<[Indicator, ExpectedIndicatorValue]>(cases)( - '%s', - (indicator, expectedDisplayValue) => { - it(`should render the indicator as ${expectedDisplayValue}`, () => { - expect(getDisplayName(indicator).value).toEqual(expectedDisplayValue); - }); - } - ); -}); +import { threatIndicatorNamesOriginScript, threatIndicatorNamesScript } from './display_name'; + +describe('display name generation', () => { + describe('threatIndicatorNamesScript()', () => { + it('should generate a valid painless script', () => { + expect(threatIndicatorNamesScript()).toMatchInlineSnapshot(` + "if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='ipv4-addr') { if (doc['threat.indicator.ip'].value!=null) { return emit(doc['threat.indicator.ip'].value) } } + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='ipv6-addr') { if (doc['threat.indicator.ip'].value!=null) { return emit(doc['threat.indicator.ip'].value) } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='file') { if (doc['threat.indicator.file.hash.sha256'].value!=null) { return emit(doc['threat.indicator.file.hash.sha256'].value) } + if (doc['threat.indicator.file.hash.md5'].value!=null) { return emit(doc['threat.indicator.file.hash.md5'].value) } + if (doc['threat.indicator.file.hash.sha1'].value!=null) { return emit(doc['threat.indicator.file.hash.sha1'].value) } + if (doc['threat.indicator.file.hash.sha224'].value!=null) { return emit(doc['threat.indicator.file.hash.sha224'].value) } + if (doc['threat.indicator.file.hash.sha3-224'].value!=null) { return emit(doc['threat.indicator.file.hash.sha3-224'].value) } + if (doc['threat.indicator.file.hash.sha3-256'].value!=null) { return emit(doc['threat.indicator.file.hash.sha3-256'].value) } + if (doc['threat.indicator.file.hash.sha384'].value!=null) { return emit(doc['threat.indicator.file.hash.sha384'].value) } + if (doc['threat.indicator.file.hash.sha3-384'].value!=null) { return emit(doc['threat.indicator.file.hash.sha3-384'].value) } + if (doc['threat.indicator.file.hash.sha512'].value!=null) { return emit(doc['threat.indicator.file.hash.sha512'].value) } + if (doc['threat.indicator.file.hash.sha3-512'].value!=null) { return emit(doc['threat.indicator.file.hash.sha3-512'].value) } + if (doc['threat.indicator.file.hash.sha512/224'].value!=null) { return emit(doc['threat.indicator.file.hash.sha512/224'].value) } + if (doc['threat.indicator.file.hash.sha512/256'].value!=null) { return emit(doc['threat.indicator.file.hash.sha512/256'].value) } + if (doc['threat.indicator.file.ssdeep'].value!=null) { return emit(doc['threat.indicator.file.ssdeep'].value) } + if (doc['threat.indicator.file.tlsh'].value!=null) { return emit(doc['threat.indicator.file.tlsh'].value) } + if (doc['threat.indicator.file.impfuzzy'].value!=null) { return emit(doc['threat.indicator.file.impfuzzy'].value) } + if (doc['threat.indicator.file.imphash'].value!=null) { return emit(doc['threat.indicator.file.imphash'].value) } + if (doc['threat.indicator.file.pehash'].value!=null) { return emit(doc['threat.indicator.file.pehash'].value) } + if (doc['threat.indicator.file.vhash'].value!=null) { return emit(doc['threat.indicator.file.vhash'].value) } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='url') { if (doc['threat.indicator.url.original'].value!=null) { return emit(doc['threat.indicator.url.original'].value) } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='domain') { if (doc['threat.indicator.url.domain'].value!=null) { return emit(doc['threat.indicator.url.domain'].value) } } + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='domain-name') { if (doc['threat.indicator.url.domain'].value!=null) { return emit(doc['threat.indicator.url.domain'].value) } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='x509-certificate') { if (doc['threat.indicator.x509.serial_number'].value!=null) { return emit(doc['threat.indicator.x509.serial_number'].value) } } + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='x509 serial') { if (doc['threat.indicator.x509.serial_number'].value!=null) { return emit(doc['threat.indicator.x509.serial_number'].value) } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='email-addr') { if (doc['threat.indicator.email.address'].value!=null) { return emit(doc['threat.indicator.email.address'].value) } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='unknown') { if (doc['_id'].value!=null) { return emit(doc['_id'].value) } } + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='email') { if (doc['_id'].value!=null) { return emit(doc['_id'].value) } } + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='email-message') { if (doc['_id'].value!=null) { return emit(doc['_id'].value) } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='windows-registry-key') { if (doc['threat.indicator.registry.key'].value!=null) { return emit(doc['threat.indicator.registry.key'].value) } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='autonomous-system') { if (doc['threat.indicator.as.number'].value!=null) { return emit(doc['threat.indicator.as.number'].value) } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='mac-addr') { if (doc['threat.indicator.mac'].value!=null) { return emit(doc['threat.indicator.mac'].value) } } -describe('displayValueField()', () => { - it('should return correct RawIndicatorFieldId for valid field', () => { - const mockIndicator = generateMockIpIndicator(); - const result = getDisplayName(mockIndicator); - expect(result.field).toEqual(RawIndicatorFieldId.Ip); + return emit('')" + `); + }); }); - it('should return null for invalid field', () => { - const mockIndicator = generateMockBaseIndicator(); - mockIndicator.fields['threat.indicator.type'] = ['abc']; - const result = getDisplayName(mockIndicator); - expect(result.field).toEqual(RawIndicatorFieldId.Id); + describe('threatIndicatorNamesOriginScript()', () => { + it('should generate a valid painless script', () => { + expect(threatIndicatorNamesOriginScript()).toMatchInlineSnapshot(` + "if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='ipv4-addr') { if (doc['threat.indicator.ip'].value!=null) { return emit('threat.indicator.ip') } } + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='ipv6-addr') { if (doc['threat.indicator.ip'].value!=null) { return emit('threat.indicator.ip') } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='file') { if (doc['threat.indicator.file.hash.sha256'].value!=null) { return emit('threat.indicator.file.hash.sha256') } + if (doc['threat.indicator.file.hash.md5'].value!=null) { return emit('threat.indicator.file.hash.md5') } + if (doc['threat.indicator.file.hash.sha1'].value!=null) { return emit('threat.indicator.file.hash.sha1') } + if (doc['threat.indicator.file.hash.sha224'].value!=null) { return emit('threat.indicator.file.hash.sha224') } + if (doc['threat.indicator.file.hash.sha3-224'].value!=null) { return emit('threat.indicator.file.hash.sha3-224') } + if (doc['threat.indicator.file.hash.sha3-256'].value!=null) { return emit('threat.indicator.file.hash.sha3-256') } + if (doc['threat.indicator.file.hash.sha384'].value!=null) { return emit('threat.indicator.file.hash.sha384') } + if (doc['threat.indicator.file.hash.sha3-384'].value!=null) { return emit('threat.indicator.file.hash.sha3-384') } + if (doc['threat.indicator.file.hash.sha512'].value!=null) { return emit('threat.indicator.file.hash.sha512') } + if (doc['threat.indicator.file.hash.sha3-512'].value!=null) { return emit('threat.indicator.file.hash.sha3-512') } + if (doc['threat.indicator.file.hash.sha512/224'].value!=null) { return emit('threat.indicator.file.hash.sha512/224') } + if (doc['threat.indicator.file.hash.sha512/256'].value!=null) { return emit('threat.indicator.file.hash.sha512/256') } + if (doc['threat.indicator.file.ssdeep'].value!=null) { return emit('threat.indicator.file.ssdeep') } + if (doc['threat.indicator.file.tlsh'].value!=null) { return emit('threat.indicator.file.tlsh') } + if (doc['threat.indicator.file.impfuzzy'].value!=null) { return emit('threat.indicator.file.impfuzzy') } + if (doc['threat.indicator.file.imphash'].value!=null) { return emit('threat.indicator.file.imphash') } + if (doc['threat.indicator.file.pehash'].value!=null) { return emit('threat.indicator.file.pehash') } + if (doc['threat.indicator.file.vhash'].value!=null) { return emit('threat.indicator.file.vhash') } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='url') { if (doc['threat.indicator.url.original'].value!=null) { return emit('threat.indicator.url.original') } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='domain') { if (doc['threat.indicator.url.domain'].value!=null) { return emit('threat.indicator.url.domain') } } + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='domain-name') { if (doc['threat.indicator.url.domain'].value!=null) { return emit('threat.indicator.url.domain') } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='x509-certificate') { if (doc['threat.indicator.x509.serial_number'].value!=null) { return emit('threat.indicator.x509.serial_number') } } + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='x509 serial') { if (doc['threat.indicator.x509.serial_number'].value!=null) { return emit('threat.indicator.x509.serial_number') } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='email-addr') { if (doc['threat.indicator.email.address'].value!=null) { return emit('threat.indicator.email.address') } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='unknown') { if (doc['_id'].value!=null) { return emit('_id') } } + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='email') { if (doc['_id'].value!=null) { return emit('_id') } } + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='email-message') { if (doc['_id'].value!=null) { return emit('_id') } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='windows-registry-key') { if (doc['threat.indicator.registry.key'].value!=null) { return emit('threat.indicator.registry.key') } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='autonomous-system') { if (doc['threat.indicator.as.number'].value!=null) { return emit('threat.indicator.as.number') } } + + if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='mac-addr') { if (doc['threat.indicator.mac'].value!=null) { return emit('threat.indicator.mac') } } + + return emit('')" + `); + }); }); }); diff --git a/x-pack/plugins/threat_intelligence/public/modules/indicators/lib/display_name.ts b/x-pack/plugins/threat_intelligence/public/modules/indicators/lib/display_name.ts index 2a41c9e6d30e6..1bd1ae0584cc2 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/indicators/lib/display_name.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/indicators/lib/display_name.ts @@ -5,228 +5,107 @@ * 2.0. */ -import { Indicator, RawIndicatorFieldId } from '../../../../common/types/indicator'; -import { unwrapValue } from './unwrap_value'; - -type IndicatorDisplayName = [RawIndicatorFieldId, string | null]; -interface IndicatorDisplayNameAsObject { - field: RawIndicatorFieldId; - value: string | null; -} -type IndicatorDisplayNameExtractor = (indicator: Indicator) => IndicatorDisplayName; -type IndicatorTypePredicate = (indicatorType: string | null) => boolean; - -type MapperRule = [predicate: IndicatorTypePredicate, extract: IndicatorDisplayNameExtractor]; - -/** - * Predicates to help identify indicator by type - */ -const isIpIndicator: IndicatorTypePredicate = (indicatorType) => - !!indicatorType && ['ipv4-addr', 'ipv6-addr'].includes(indicatorType); - -const isFileIndicator: IndicatorTypePredicate = (indicatorType) => indicatorType === 'file'; -const isUrlIndicator: IndicatorTypePredicate = (indicatorType) => indicatorType === 'url'; -const isEmailAddress: IndicatorTypePredicate = (indicatorType) => indicatorType === 'email-addr'; -const isDomain: IndicatorTypePredicate = (indicatorType) => - !!indicatorType && ['domain', 'domain-name'].includes(indicatorType); -const isX509Certificate: IndicatorTypePredicate = (indicatorType) => - !!indicatorType && ['x509-certificate', 'x509 serial'].includes(indicatorType); -const isUnknownIndicator: IndicatorTypePredicate = (indicatorType) => - !!indicatorType && ['unknown', 'email', 'email-message'].includes(indicatorType); -const isWindowsRegistryKey: IndicatorTypePredicate = (indicatorType) => - indicatorType === 'windows-registry-key'; -const isAutonomousSystem: IndicatorTypePredicate = (indicatorType) => - indicatorType === 'autonomous-system'; -const isMacAddress: IndicatorTypePredicate = (indicatorType) => indicatorType === 'mac-addr'; +import dedent from 'dedent'; +import { RawIndicatorFieldId } from '../../../../common/types/indicator'; /** - * Display value extraction logic + * Mapping connects one ore more types to field values that should be used to generate threat.indicator.name field. */ -const extractIp: IndicatorDisplayNameExtractor = (indicator: Indicator) => [ - RawIndicatorFieldId.Ip, - unwrapValue(indicator, RawIndicatorFieldId.Ip), -]; - -const extractUrl: IndicatorDisplayNameExtractor = (indicator: Indicator) => [ - RawIndicatorFieldId.UrlOriginal, - unwrapValue(indicator, RawIndicatorFieldId.UrlOriginal), -]; - -const extractId: IndicatorDisplayNameExtractor = (indicator: Indicator) => [ - RawIndicatorFieldId.Id, - unwrapValue(indicator, RawIndicatorFieldId.Id), -]; - -const extractFile: IndicatorDisplayNameExtractor = (indicator: Indicator) => { - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha256)) { - return [RawIndicatorFieldId.FileSha256, unwrapValue(indicator, RawIndicatorFieldId.FileSha256)]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileMd5)) { - return [RawIndicatorFieldId.FileMd5, unwrapValue(indicator, RawIndicatorFieldId.FileMd5)]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha1)) { - return [RawIndicatorFieldId.FileSha1, unwrapValue(indicator, RawIndicatorFieldId.FileSha1)]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha512)) { - return [RawIndicatorFieldId.FileSha512, unwrapValue(indicator, RawIndicatorFieldId.FileSha512)]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha224)) { - return [RawIndicatorFieldId.FileSha224, unwrapValue(indicator, RawIndicatorFieldId.FileSha224)]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha384)) { - return [RawIndicatorFieldId.FileSha384, unwrapValue(indicator, RawIndicatorFieldId.FileSha384)]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha3224)) { - return [ +type Mapping = [types: string[], paths: RawIndicatorFieldId[]]; + +type Mappings = Mapping[]; + +const mappingsArray: Mappings = [ + [['ipv4-addr', 'ipv6-addr'], [RawIndicatorFieldId.Ip]], + // For example, `file` indicator will have `threat.indicator.name` computed out of the first + // hash value field defined below, in order of occurrence + [ + ['file'], + [ + RawIndicatorFieldId.FileSha256, + RawIndicatorFieldId.FileMd5, + RawIndicatorFieldId.FileSha1, + RawIndicatorFieldId.FileSha224, RawIndicatorFieldId.FileSha3224, - unwrapValue(indicator, RawIndicatorFieldId.FileSha3224), - ]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha3256)) { - return [ RawIndicatorFieldId.FileSha3256, - unwrapValue(indicator, RawIndicatorFieldId.FileSha3256), - ]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha3384)) { - return [ + RawIndicatorFieldId.FileSha384, RawIndicatorFieldId.FileSha3384, - unwrapValue(indicator, RawIndicatorFieldId.FileSha3384), - ]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha3512)) { - return [ + RawIndicatorFieldId.FileSha512, RawIndicatorFieldId.FileSha3512, - unwrapValue(indicator, RawIndicatorFieldId.FileSha3512), - ]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha512224)) { - return [ RawIndicatorFieldId.FileSha512224, - unwrapValue(indicator, RawIndicatorFieldId.FileSha512224), - ]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSha512256)) { - return [ RawIndicatorFieldId.FileSha512256, - unwrapValue(indicator, RawIndicatorFieldId.FileSha512256), - ]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileSSDeep)) { - return [RawIndicatorFieldId.FileSSDeep, unwrapValue(indicator, RawIndicatorFieldId.FileSSDeep)]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileTlsh)) { - return [RawIndicatorFieldId.FileTlsh, unwrapValue(indicator, RawIndicatorFieldId.FileTlsh)]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileImpfuzzy)) { - return [ + RawIndicatorFieldId.FileSSDeep, + RawIndicatorFieldId.FileTlsh, RawIndicatorFieldId.FileImpfuzzy, - unwrapValue(indicator, RawIndicatorFieldId.FileImpfuzzy), - ]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileImphash)) { - return [ RawIndicatorFieldId.FileImphash, - unwrapValue(indicator, RawIndicatorFieldId.FileImphash), - ]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FilePehash)) { - return [RawIndicatorFieldId.FilePehash, unwrapValue(indicator, RawIndicatorFieldId.FilePehash)]; - } - - if (unwrapValue(indicator, RawIndicatorFieldId.FileVhash)) { - return [RawIndicatorFieldId.FileVhash, unwrapValue(indicator, RawIndicatorFieldId.FileVhash)]; - } - - return extractId(indicator); -}; - -const extractEmailAddress: IndicatorDisplayNameExtractor = (indicator: Indicator) => [ - RawIndicatorFieldId.EmailAddress, - unwrapValue(indicator, RawIndicatorFieldId.EmailAddress), -]; - -const extractDomain: IndicatorDisplayNameExtractor = (indicator: Indicator) => [ - RawIndicatorFieldId.UrlDomain, - unwrapValue(indicator, RawIndicatorFieldId.UrlDomain), -]; - -const extractX509Serial: IndicatorDisplayNameExtractor = (indicator: Indicator) => [ - RawIndicatorFieldId.X509Serial, - unwrapValue(indicator, RawIndicatorFieldId.X509Serial), + RawIndicatorFieldId.FilePehash, + RawIndicatorFieldId.FileVhash, + ], + ], + [['url'], [RawIndicatorFieldId.UrlOriginal]], + [['domain', 'domain-name'], [RawIndicatorFieldId.UrlDomain]], + [['x509-certificate', 'x509 serial'], [RawIndicatorFieldId.X509Serial]], + [['email-addr'], [RawIndicatorFieldId.EmailAddress]], + [['unknown', 'email', 'email-message'], [RawIndicatorFieldId.Id]], + [['windows-registry-key'], [RawIndicatorFieldId.WindowsRegistryKey]], + [['autonomous-system'], [RawIndicatorFieldId.AutonomousSystemNumber]], + [['mac-addr'], [RawIndicatorFieldId.MacAddress]], ]; -const extractWindowsRegistryKey: IndicatorDisplayNameExtractor = (indicator: Indicator) => [ - RawIndicatorFieldId.WindowsRegistryKey, - unwrapValue(indicator, RawIndicatorFieldId.WindowsRegistryKey), -]; - -const extractAutonomousSystemNumber: IndicatorDisplayNameExtractor = (indicator: Indicator) => [ - RawIndicatorFieldId.AutonomousSystemNumber, - unwrapValue(indicator, RawIndicatorFieldId.AutonomousSystemNumber), -]; - -const extractMacAddress: IndicatorDisplayNameExtractor = (indicator: Indicator) => [ - RawIndicatorFieldId.MacAddress, - unwrapValue(indicator, RawIndicatorFieldId.MacAddress), -]; +/** + * Generates Painless condition checking if given `type` is matched + */ +const fieldTypeCheck = (type: string) => + `if (doc['threat.indicator.type'].value != null && doc['threat.indicator.type'].value.toLowerCase()=='${type.toLowerCase()}')`; /** - * Pairs rule condition with display value extraction logic + * Generates Painless condition checking if given `field` has value */ -const rulesArray: MapperRule[] = [ - [isIpIndicator, extractIp], - [isUrlIndicator, extractUrl], - [isFileIndicator, extractFile], - [isUnknownIndicator, extractId], - [isEmailAddress, extractEmailAddress], - [isDomain, extractDomain], - [isX509Certificate, extractX509Serial], - [isWindowsRegistryKey, extractWindowsRegistryKey], - [isAutonomousSystem, extractAutonomousSystemNumber], - [isMacAddress, extractMacAddress], -]; +const fieldValueCheck = (field: string) => `if (doc['${field}'].value!=null)`; /** - * Finds display value mapping function for given indicatorType + * Converts Mapping to Painless script, computing `threat.indicator.name` value for given indicator types. */ -const findMappingRule = (indicatorType: string | null): IndicatorDisplayNameExtractor => { - const [_, extract = extractId] = rulesArray.find(([check]) => check(indicatorType)) || []; - return extract; +const mappingToIndicatorNameScript = ([types, paths]: Mapping) => { + return dedent`${types + .map( + (t) => + `${fieldTypeCheck(t)} { ${paths + .map((p) => `${fieldValueCheck(p)} { return emit(doc['${p}'].value) }`) + .join('\n')} }` + ) + .join('\n')}`; }; /** - * Cached rules for indicator types + * Converts Mapping to Painless script, computing `threat.indicator.name_origin` used to determine which document field has + * been used to obtain `threat.indicator.name`. */ -const rules: Record = {}; +const mappingToIndicatorNameOriginScript = ([types, paths]: Mapping) => { + return dedent`${types + .map( + (t) => + `${fieldTypeCheck(t)} { ${paths + .map((p) => `${fieldValueCheck(p)} { return emit('${p}') }`) + .join('\n')} }` + ) + .join('\n')}`; +}; /** - * Find and return indicator display name structure {field, value} + * Generates the runtime field script computing display name for the given indicator */ -export const getDisplayName = (indicator: Indicator): IndicatorDisplayNameAsObject => { - const indicatorType = (unwrapValue(indicator, RawIndicatorFieldId.Type) || '').toLowerCase(); +export const threatIndicatorNamesScript = (mappings: Mappings = mappingsArray) => { + const combined = mappings.map(mappingToIndicatorNameScript).join('\n\n'); - if (!rules[indicatorType]) { - rules[indicatorType] = findMappingRule(indicatorType); - } + return `${combined}\n\nreturn emit('')`; +}; - const [field, value] = rules[indicatorType](indicator); +/** + * Generates the runtime field script computing the display name origin path for given indicator + */ +export const threatIndicatorNamesOriginScript = (mappings: Mappings = mappingsArray) => { + const combined = mappings.map(mappingToIndicatorNameOriginScript).join('\n\n'); - return { field, value }; + return `${combined}\n\nreturn emit('')`; }; diff --git a/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline/add_to_timeline.tsx b/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline/add_to_timeline.tsx index 482f76b7f00b4..16e71f951b552 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline/add_to_timeline.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline/add_to_timeline.tsx @@ -10,8 +10,6 @@ import { DataProvider, QueryOperator } from '@kbn/timelines-plugin/common'; import { AddToTimelineButtonProps } from '@kbn/timelines-plugin/public'; import { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui/src/components/button'; import { EMPTY_VALUE } from '../../../../../common/constants'; -import { getDisplayName } from '../../../indicators/lib/display_name'; -import { ComputedIndicatorFieldId } from '../../../indicators/components/indicators_table/cell_renderer'; import { useKibana } from '../../../../hooks/use_kibana'; import { unwrapValue } from '../../../indicators/lib/unwrap_value'; import { Indicator, RawIndicatorFieldId } from '../../../../../common/types/indicator'; @@ -53,12 +51,11 @@ export const AddToTimeline: VFC = ({ data, field, component, let value: string | null; if (typeof data === 'string') { value = data; - } else if (field === ComputedIndicatorFieldId.DisplayName) { - const displayName = getDisplayName(data); - field = displayName.field; - value = displayName.value; } else { value = unwrapValue(data, field as RawIndicatorFieldId); + if (field === RawIndicatorFieldId.Name) { + field = unwrapValue(data, RawIndicatorFieldId.NameOrigin) as string; + } } if (!value || value === EMPTY_VALUE || !field) { diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 09d1599ec661d..cf302cbdc55d0 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -4447,12 +4447,6 @@ "savedObjects.advancedSettings.perPageTitle": "Objets par page", "savedObjects.confirmModal.cancelButtonLabel": "Annuler", "savedObjects.confirmModal.overwriteButtonLabel": "Écraser", - "savedObjects.finder.filterButtonLabel": "Types", - "savedObjects.finder.searchPlaceholder": "Rechercher…", - "savedObjects.finder.sortAsc": "Croissant", - "savedObjects.finder.sortAuto": "Meilleure correspondance", - "savedObjects.finder.sortButtonLabel": "Trier", - "savedObjects.finder.sortDesc": "Décroissant", "savedObjects.overwriteRejectedDescription": "La confirmation d'écrasement a été rejetée.", "savedObjects.saveDuplicateRejectedDescription": "La confirmation d'enregistrement avec un doublon de titre a été rejetée.", "savedObjects.saveModal.cancelButtonLabel": "Annuler", @@ -28993,7 +28987,6 @@ "xpack.securitySolution.timeline.properties.addTimelineButtonLabel": "Ajouter une nouvelle chronologie ou un nouveau modèle", "xpack.securitySolution.timeline.properties.addToFavoriteButtonLabel": "Ajouter aux favoris", "xpack.securitySolution.timeline.properties.attachToCaseButtonLabel": "Attacher à un cas", - "xpack.securitySolution.timeline.properties.attachToExistingCaseButtonLabel": "Attacher à un cas existant...", "xpack.securitySolution.timeline.properties.attachToNewCaseButtonLabel": "Attacher au nouveau cas", "xpack.securitySolution.timeline.properties.autosavedLabel": "Enregistré automatiquement", "xpack.securitySolution.timeline.properties.descriptionPlaceholder": "Ajouter une description", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 16ea9c49f15b1..cddfdaa75d153 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -4445,12 +4445,6 @@ "savedObjects.advancedSettings.perPageTitle": "ページごとのオブジェクト数", "savedObjects.confirmModal.cancelButtonLabel": "キャンセル", "savedObjects.confirmModal.overwriteButtonLabel": "上書き", - "savedObjects.finder.filterButtonLabel": "タイプ", - "savedObjects.finder.searchPlaceholder": "検索…", - "savedObjects.finder.sortAsc": "昇順", - "savedObjects.finder.sortAuto": "ベストマッチ", - "savedObjects.finder.sortButtonLabel": "並べ替え", - "savedObjects.finder.sortDesc": "降順", "savedObjects.overwriteRejectedDescription": "上書き確認が拒否されました", "savedObjects.saveDuplicateRejectedDescription": "重複ファイルの保存確認が拒否されました", "savedObjects.saveModal.cancelButtonLabel": "キャンセル", @@ -28970,7 +28964,6 @@ "xpack.securitySolution.timeline.properties.addTimelineButtonLabel": "新しいタイムラインまたはテンプレートの追加", "xpack.securitySolution.timeline.properties.addToFavoriteButtonLabel": "お気に入りに追加", "xpack.securitySolution.timeline.properties.attachToCaseButtonLabel": "ケースに関連付ける", - "xpack.securitySolution.timeline.properties.attachToExistingCaseButtonLabel": "既存のケースに添付...", "xpack.securitySolution.timeline.properties.attachToNewCaseButtonLabel": "新しいケースに添付", "xpack.securitySolution.timeline.properties.autosavedLabel": "自動保存済み", "xpack.securitySolution.timeline.properties.descriptionPlaceholder": "説明を追加", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index db9ac93a36076..abac16c147644 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -4450,12 +4450,6 @@ "savedObjects.advancedSettings.perPageTitle": "每页对象数", "savedObjects.confirmModal.cancelButtonLabel": "取消", "savedObjects.confirmModal.overwriteButtonLabel": "覆盖", - "savedObjects.finder.filterButtonLabel": "类型", - "savedObjects.finder.searchPlaceholder": "搜索……", - "savedObjects.finder.sortAsc": "升序", - "savedObjects.finder.sortAuto": "最佳匹配", - "savedObjects.finder.sortButtonLabel": "排序", - "savedObjects.finder.sortDesc": "降序", "savedObjects.overwriteRejectedDescription": "已拒绝覆盖确认", "savedObjects.saveDuplicateRejectedDescription": "已拒绝使用重复标题保存确认", "savedObjects.saveModal.cancelButtonLabel": "取消", @@ -29001,7 +28995,6 @@ "xpack.securitySolution.timeline.properties.addTimelineButtonLabel": "添加新时间线或模板", "xpack.securitySolution.timeline.properties.addToFavoriteButtonLabel": "添加到收藏夹", "xpack.securitySolution.timeline.properties.attachToCaseButtonLabel": "附加到案例", - "xpack.securitySolution.timeline.properties.attachToExistingCaseButtonLabel": "附加到现有案例......", "xpack.securitySolution.timeline.properties.attachToNewCaseButtonLabel": "附加到新案例", "xpack.securitySolution.timeline.properties.autosavedLabel": "已自动保存", "xpack.securitySolution.timeline.properties.descriptionPlaceholder": "添加描述", diff --git a/x-pack/test/apm_api_integration/tests/index.ts b/x-pack/test/apm_api_integration/tests/index.ts index 42bf0b4aead21..9f882797b0a15 100644 --- a/x-pack/test/apm_api_integration/tests/index.ts +++ b/x-pack/test/apm_api_integration/tests/index.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import glob from 'glob'; +import globby from 'globby'; import path from 'path'; import { FtrProviderContext } from '../common/ftr_provider_context'; @@ -23,7 +23,7 @@ export default function apmApiIntegrationTests({ getService, loadTestFile }: Ftr const registry = getService('registry'); describe('APM API tests', function () { - const tests = glob.sync(getGlobPattern(), { cwd }); + const tests = globby.sync(getGlobPattern(), { cwd }); if (envGrepFiles) { // eslint-disable-next-line no-console diff --git a/x-pack/test/common/services/spaces.ts b/x-pack/test/common/services/spaces.ts index c023d8da26ba5..bae83a71d3c27 100644 --- a/x-pack/test/common/services/spaces.ts +++ b/x-pack/test/common/services/spaces.ts @@ -24,7 +24,7 @@ export function SpacesServiceProvider({ getService }: FtrProviderContext) { return new (class SpacesService { public async create(space: any) { - log.debug(`creating space ${space.name}`); + log.debug(`creating space ${space.id}`); const { data, status, statusText } = await axios.post('/api/spaces/space', space); if (status !== 200) { @@ -32,7 +32,7 @@ export function SpacesServiceProvider({ getService }: FtrProviderContext) { `Expected status code of 200, received ${status} ${statusText}: ${util.inspect(data)}` ); } - log.debug(`created space ${space}`); + log.debug(`created space ${space.id}`); } public async delete(spaceId: string) { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rule_exceptions.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rule_exceptions.ts new file mode 100644 index 0000000000000..0dae06f71322c --- /dev/null +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rule_exceptions.ts @@ -0,0 +1,245 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; + +import { DETECTION_ENGINE_RULES_URL } from '@kbn/security-solution-plugin/common/constants'; +import { + CreateExceptionListSchema, + CreateRuleExceptionListItemSchema, + ExceptionListItemSchema, + ExceptionListTypeEnum, +} from '@kbn/securitysolution-io-ts-list-types'; +import { getCreateExceptionListMinimalSchemaMock } from '@kbn/lists-plugin/common/schemas/request/create_exception_list_schema.mock'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; +import { + getRule, + createRule, + getSimpleRule, + createSignalsIndex, + deleteSignalsIndex, + deleteAllAlerts, + createExceptionList, +} from '../../utils'; +import { + deleteAllExceptions, + removeExceptionListItemServerGeneratedProperties, +} from '../../../lists_api_integration/utils'; + +const getRuleExceptionItemMock = (): CreateRuleExceptionListItemSchema => ({ + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + type: 'simple', +}); + +// eslint-disable-next-line import/no-default-export +export default ({ getService }: FtrProviderContext) => { + const supertest = getService('supertest'); + const log = getService('log'); + + describe('create_rule_exception_route', () => { + before(async () => { + await createSignalsIndex(supertest, log); + }); + + after(async () => { + await deleteAllExceptions(supertest, log); + await deleteSignalsIndex(supertest, log); + await deleteAllAlerts(supertest, log); + }); + + it('creates and associates a `rule_default` exception list to a rule if one not already found', async () => { + const rule = await createRule(supertest, log, getSimpleRule('rule-2')); + + const { body: items } = await supertest + .post(`${DETECTION_ENGINE_RULES_URL}/${rule.id}/exceptions`) + .set('kbn-xsrf', 'true') + .send({ + items: [getRuleExceptionItemMock()], + }) + .expect(200); + + const udpatedRule = await getRule(supertest, log, rule.rule_id); + const defaultList = udpatedRule.exceptions_list.find((list) => list.type === 'rule_default'); + + const itemsWithoutServerGeneratedValues = items.map( + // eslint-disable-next-line @typescript-eslint/naming-convention + ({ item_id, ...restOfItem }: ExceptionListItemSchema) => + removeExceptionListItemServerGeneratedProperties(restOfItem) + ); + expect(itemsWithoutServerGeneratedValues).to.eql([ + { + comments: [], + created_by: 'elastic', + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + list_id: defaultList?.list_id, + namespace_type: 'single', + os_types: [], + tags: [], + type: 'simple', + updated_by: 'elastic', + }, + ]); + expect(udpatedRule.exceptions_list.some((list) => list.type === 'rule_default')).to.eql(true); + }); + + it('creates and associates a `rule_default` exception list to a rule even when rule has non existent default list attached', async () => { + // create a rule that has a non existent default exception list + const rule = await createRule(supertest, log, { + ...getSimpleRule('rule-5'), + exceptions_list: [ + { + id: '123', + list_id: '456', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + ], + }); + + const { body: items } = await supertest + .post(`${DETECTION_ENGINE_RULES_URL}/${rule.id}/exceptions`) + .set('kbn-xsrf', 'true') + .send({ + items: [getRuleExceptionItemMock()], + }) + .expect(200); + + const udpatedRule = await getRule(supertest, log, rule.rule_id); + const defaultList = udpatedRule.exceptions_list.find((list) => list.type === 'rule_default'); + + const itemsWithoutServerGeneratedValues = items.map( + // eslint-disable-next-line @typescript-eslint/naming-convention + ({ item_id, ...restOfItem }: ExceptionListItemSchema) => + removeExceptionListItemServerGeneratedProperties(restOfItem) + ); + expect(udpatedRule.exceptions_list).to.eql([ + { + id: defaultList?.id, + list_id: defaultList?.list_id, + type: 'rule_default', + namespace_type: 'single', + }, + ]); + expect(itemsWithoutServerGeneratedValues).to.eql([ + { + comments: [], + created_by: 'elastic', + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + list_id: defaultList?.list_id, + namespace_type: 'single', + os_types: [], + tags: [], + type: 'simple', + updated_by: 'elastic', + }, + ]); + }); + + it('adds exception items to rule default exception list', async () => { + // create default exception list + const exceptionList: CreateExceptionListSchema = { + ...getCreateExceptionListMinimalSchemaMock(), + list_id: 'i_exist', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }; + const defaultList = await createExceptionList(supertest, log, exceptionList); + + // add default exception list to rule + const rule = await createRule(supertest, log, { + ...getSimpleRule('rule-4'), + exceptions_list: [ + { + id: defaultList?.id, + list_id: defaultList?.list_id, + namespace_type: defaultList?.namespace_type, + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + ], + }); + + expect(rule.exceptions_list.some((list) => list.type === 'rule_default')).to.eql(true); + + const { body: items } = await supertest + .post(`${DETECTION_ENGINE_RULES_URL}/${rule.id}/exceptions`) + .set('kbn-xsrf', 'true') + .send({ + items: [getRuleExceptionItemMock()], + }) + .expect(200); + + const itemsWithoutServerGeneratedValues = items.map( + // eslint-disable-next-line @typescript-eslint/naming-convention + ({ item_id, ...restOfItem }: ExceptionListItemSchema) => + removeExceptionListItemServerGeneratedProperties(restOfItem) + ); + expect(itemsWithoutServerGeneratedValues[0]).to.eql({ + comments: [], + created_by: 'elastic', + description: 'Exception item for rule default exception list', + entries: [ + { + field: 'some.not.nested.field', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], + name: 'Sample exception item', + list_id: defaultList.list_id, + namespace_type: 'single', + os_types: [], + tags: [], + type: 'simple', + updated_by: 'elastic', + }); + }); + + it('returns 500 if no rule is found to add exception list to', async () => { + const { body } = await supertest + .post(`${DETECTION_ENGINE_RULES_URL}/4656dc92-5832-11ea-8e2d-0242ac130003/exceptions`) + .set('kbn-xsrf', 'true') + .send({ + items: [getRuleExceptionItemMock()], + }) + .expect(500); + + expect(body).to.eql({ + message: + 'Unable to add exception to rule - rule with id:"4656dc92-5832-11ea-8e2d-0242ac130003" not found', + status_code: 500, + }); + }); + }); +}; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules.ts index 5b9ebc3483e95..082d8afab9dd1 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules.ts @@ -10,8 +10,9 @@ import expect from '@kbn/expect'; import { DETECTION_ENGINE_RULES_URL } from '@kbn/security-solution-plugin/common/constants'; import { RuleExecutionStatus } from '@kbn/security-solution-plugin/common/detection_engine/rule_monitoring'; import { CreateRulesSchema } from '@kbn/security-solution-plugin/common/detection_engine/schemas/request'; - +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { ROLES } from '@kbn/security-solution-plugin/common/test'; + import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, @@ -271,6 +272,44 @@ export default ({ getService }: FtrProviderContext) => { }); }); + it('should not create a rule if trying to add more than one default rule exception list', async () => { + const rule: CreateRulesSchema = { + name: 'Simple Rule Query', + description: 'Simple Rule Query', + enabled: true, + risk_score: 1, + rule_id: 'rule-1', + severity: 'high', + type: 'query', + query: 'user.name: root or user.name: admin', + exceptions_list: [ + { + id: '2', + list_id: '123', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + { + id: '1', + list_id: '456', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + ], + }; + + const { body } = await supertest + .post(DETECTION_ENGINE_RULES_URL) + .set('kbn-xsrf', 'true') + .send(rule) + .expect(500); + + expect(body).to.eql({ + message: 'More than one default exception list found on rule', + status_code: 500, + }); + }); + describe('t1_analyst', () => { const role = ROLES.t1_analyst; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/index.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/index.ts index 11b1e5e5deda0..283456df6b1f0 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/index.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/index.ts @@ -26,6 +26,7 @@ export default ({ loadTestFile }: FtrProviderContext): void => { loadTestFile(require.resolve('./create_ml')); loadTestFile(require.resolve('./create_new_terms')); loadTestFile(require.resolve('./create_threat_matching')); + loadTestFile(require.resolve('./create_rule_exceptions')); loadTestFile(require.resolve('./delete_rules')); loadTestFile(require.resolve('./delete_rules_bulk')); loadTestFile(require.resolve('./export_rules')); diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/patch_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/patch_rules.ts index ee94c94c99376..030e92abf1f73 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/patch_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/patch_rules.ts @@ -8,6 +8,7 @@ import expect from '@kbn/expect'; import { DETECTION_ENGINE_RULES_URL } from '@kbn/security-solution-plugin/common/constants'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, @@ -189,6 +190,80 @@ export default ({ getService }: FtrProviderContext) => { expect(bodyToCompare).to.eql(outputRule); }); + it('should overwrite exception list value on patch - non additive', async () => { + await createRule(supertest, log, getSimpleRule('rule-1')); + + // patch a simple rule's exceptions_list + await supertest + .patch(DETECTION_ENGINE_RULES_URL) + .set('kbn-xsrf', 'true') + .send({ + rule_id: 'rule-1', + exceptions_list: [ + { + id: '1', + list_id: '123', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + ], + }) + .expect(200); + + // patch a simple rule's exceptions_list + const { body } = await supertest + .patch(DETECTION_ENGINE_RULES_URL) + .set('kbn-xsrf', 'true') + .send({ + rule_id: 'rule-1', + exceptions_list: [ + { + id: '2', + list_id: '123', + namespace_type: 'single', + type: ExceptionListTypeEnum.DETECTION, + }, + ], + }) + .expect(200); + + expect(body.exceptions_list).to.eql([ + { id: '2', list_id: '123', namespace_type: 'single', type: 'detection' }, + ]); + }); + + it('should throw error if trying to add more than one default exception list', async () => { + await createRule(supertest, log, getSimpleRule('rule-1')); + + // patch a simple rule's exceptions_list + const { body } = await supertest + .patch(DETECTION_ENGINE_RULES_URL) + .set('kbn-xsrf', 'true') + .send({ + rule_id: 'rule-1', + exceptions_list: [ + { + id: '1', + list_id: '123', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + { + id: '2', + list_id: '456', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + ], + }) + .expect(500); + + expect(body).to.eql({ + message: 'More than one default exception list found on rule', + status_code: 500, + }); + }); + it('should return the rule with migrated actions after the enable patch', async () => { const [connector, rule] = await Promise.all([ supertest diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/update_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/update_rules.ts index 583746db3936b..49c1ba045d5e6 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/update_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/update_rules.ts @@ -8,6 +8,7 @@ import expect from '@kbn/expect'; import { DETECTION_ENGINE_RULES_URL } from '@kbn/security-solution-plugin/common/constants'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, @@ -356,6 +357,75 @@ export default ({ getService }: FtrProviderContext) => { }); }); + it('should overwrite exception list value on update - non additive', async () => { + await createRule(supertest, log, { + ...getSimpleRule('rule-1'), + exceptions_list: [ + { + id: '1', + list_id: '123', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + ], + }); + + const ruleUpdate = { + ...getSimpleRuleUpdate('rule-1'), + exceptions_list: [ + { + id: '2', + list_id: '456', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + ], + }; + + const { body } = await supertest + .put(DETECTION_ENGINE_RULES_URL) + .set('kbn-xsrf', 'true') + .send(ruleUpdate) + .expect(200); + + expect(body.exceptions_list).to.eql([ + { id: '2', list_id: '456', namespace_type: 'single', type: 'rule_default' }, + ]); + }); + + it('should throw error if trying to add more than one default exception list', async () => { + await createRule(supertest, log, getSimpleRule('rule-1')); + + const ruleUpdate = { + ...getSimpleRuleUpdate('rule-1'), + exceptions_list: [ + { + id: '1', + list_id: '123', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + { + id: '2', + list_id: '456', + namespace_type: 'single', + type: ExceptionListTypeEnum.RULE_DEFAULT, + }, + ], + }; + + const { body } = await supertest + .put(DETECTION_ENGINE_RULES_URL) + .set('kbn-xsrf', 'true') + .send(ruleUpdate) + .expect(500); + + expect(body).to.eql({ + message: 'More than one default exception list found on rule', + status_code: 500, + }); + }); + describe('threshold validation', () => { it('should result in 400 error if no threshold-specific fields are provided', async () => { const existingRule = getThresholdRuleForSignalTesting(['*']); diff --git a/x-pack/test/encrypted_saved_objects_api_integration/tests/encrypted_saved_objects_api.ts b/x-pack/test/encrypted_saved_objects_api_integration/tests/encrypted_saved_objects_api.ts index 99d43136c98e0..9c143dfa8bacd 100644 --- a/x-pack/test/encrypted_saved_objects_api_integration/tests/encrypted_saved_objects_api.ts +++ b/x-pack/test/encrypted_saved_objects_api_integration/tests/encrypted_saved_objects_api.ts @@ -488,8 +488,7 @@ export default function ({ getService }: FtrProviderContext) { }); } - // Failing: See https://github.com/elastic/kibana/issues/139700 - describe.skip('encrypted saved objects API', () => { + describe('encrypted saved objects API', () => { function generateRawId(id: string, type: string, spaceId?: string) { return `${ spaceId && type !== SAVED_OBJECT_WITH_SECRET_AND_MULTIPLE_SPACES_TYPE diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_error_rollback.ts b/x-pack/test/fleet_api_integration/apis/epm/install_error_rollback.ts index 8906a7fa3ea37..fba01e840cfd0 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/install_error_rollback.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/install_error_rollback.ts @@ -25,6 +25,10 @@ export default function (providerContext: FtrProviderContext) { .send({ force: true }); }; + const uninstallPackage = async (pkg: string, version: string) => { + await supertest.delete(`/api/fleet/epm/packages/${pkg}/${version}`).set('kbn-xsrf', 'xxxx'); + }; + const getPackageInfo = async (pkg: string, version: string) => { return await supertest.get(`/api/fleet/epm/packages/${pkg}/${version}`).set('kbn-xsrf', 'xxxx'); }; @@ -37,6 +41,7 @@ export default function (providerContext: FtrProviderContext) { }); afterEach(async () => { await kibanaServer.savedObjects.cleanStandardList(); + await uninstallPackage(pkgName, goodPackageVersion); }); it('on a fresh install, it should uninstall a broken package during rollback', async function () { diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_remove_multiple.ts b/x-pack/test/fleet_api_integration/apis/epm/install_remove_multiple.ts index ed8c16e79b0a0..275a2abf744bc 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/install_remove_multiple.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/install_remove_multiple.ts @@ -76,6 +76,7 @@ export default function (providerContext: FtrProviderContext) { await uninstallPackages([ { name: pkgName, version: pkgVersion }, { name: experimentalPkgName, version: pkgVersion }, + { name: experimental2PkgName, version: pkgVersion }, ]); }); it('should create index patterns (without fields)', async () => { diff --git a/x-pack/test/fleet_api_integration/apis/fleet_setup.ts b/x-pack/test/fleet_api_integration/apis/fleet_setup.ts index 1d640f50c04a3..e1e1f90f57eb6 100644 --- a/x-pack/test/fleet_api_integration/apis/fleet_setup.ts +++ b/x-pack/test/fleet_api_integration/apis/fleet_setup.ts @@ -14,16 +14,17 @@ export default function (providerContext: FtrProviderContext) { const supertest = getService('supertest'); const es = getService('es'); const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('fleet_setup', () => { skipIfNoDockerRegistry(providerContext); before(async () => { - await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana'); + await kibanaServer.savedObjects.cleanStandardList(); await esArchiver.load('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); }); after(async () => { - await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana'); + await kibanaServer.savedObjects.cleanStandardList(); await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); }); beforeEach(async () => { diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/create.ts b/x-pack/test/fleet_api_integration/apis/package_policy/create.ts index 3bdbd06cf7f0d..a9825fecf783e 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/create.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/create.ts @@ -145,8 +145,8 @@ export default function (providerContext: FtrProviderContext) { const { body } = await supertest .get(`/internal/saved_objects_tagging/tags/_find?page=1&perPage=10000`) .expect(200); - expect(body.tags.find((tag: any) => tag.name === 'Managed').relationCount).to.be(6); - expect(body.tags.find((tag: any) => tag.name === 'For File Tests').relationCount).to.be(6); + expect(body.tags.find((tag: any) => tag.name === 'Managed').relationCount).to.be(9); + expect(body.tags.find((tag: any) => tag.name === 'For File Tests').relationCount).to.be(9); }); it('should return a 400 with an empty namespace', async function () { diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/delete.ts b/x-pack/test/fleet_api_integration/apis/package_policy/delete.ts index 89328d4b61400..383a92fa164e8 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/delete.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/delete.ts @@ -11,6 +11,7 @@ import { skipIfNoDockerRegistry } from '../../helpers'; export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); + const kibanaServer = getService('kibanaServer'); describe('Package Policy - delete', () => { skipIfNoDockerRegistry(providerContext); @@ -18,7 +19,7 @@ export default function (providerContext: FtrProviderContext) { let agentPolicy: any; let packagePolicy: any; before(async () => { - await getService('esArchiver').load('x-pack/test/functional/es_archives/empty_kibana'); + await kibanaServer.savedObjects.cleanStandardList(); await getService('esArchiver').load( 'x-pack/test/functional/es_archives/fleet/empty_fleet_server' ); @@ -84,7 +85,7 @@ export default function (providerContext: FtrProviderContext) { .send({ force: true, packagePolicyIds: [packagePolicy.id] }); }); after(async () => { - await getService('esArchiver').unload('x-pack/test/functional/es_archives/empty_kibana'); + await kibanaServer.savedObjects.cleanStandardList(); await getService('esArchiver').unload( 'x-pack/test/functional/es_archives/fleet/empty_fleet_server' ); @@ -151,7 +152,7 @@ export default function (providerContext: FtrProviderContext) { let agentPolicy: any; let packagePolicy: any; before(async () => { - await getService('esArchiver').load('x-pack/test/functional/es_archives/empty_kibana'); + await kibanaServer.savedObjects.cleanStandardList(); await getService('esArchiver').load( 'x-pack/test/functional/es_archives/fleet/empty_fleet_server' ); @@ -215,7 +216,7 @@ export default function (providerContext: FtrProviderContext) { .send({ force: true, packagePolicyIds: [packagePolicy.id] }); }); after(async () => { - await getService('esArchiver').unload('x-pack/test/functional/es_archives/empty_kibana'); + await kibanaServer.savedObjects.cleanStandardList(); await getService('esArchiver').unload( 'x-pack/test/functional/es_archives/fleet/empty_fleet_server' ); diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/update.ts b/x-pack/test/fleet_api_integration/apis/package_policy/update.ts index 2f82e4ca7265a..4c5320f037dd8 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/update.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/update.ts @@ -12,6 +12,7 @@ export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); const dockerServers = getService('dockerServers'); + const kibanaServer = getService('kibanaServer'); const getPackagePolicyById = async (id: string) => { const { body } = await supertest.get(`/api/fleet/package_policies/${id}`); @@ -30,7 +31,7 @@ export default function (providerContext: FtrProviderContext) { let packagePolicyId: string; let packagePolicyId2: string; before(async () => { - await getService('esArchiver').load('x-pack/test/functional/es_archives/empty_kibana'); + await kibanaServer.savedObjects.cleanStandardList(); await getService('esArchiver').load( 'x-pack/test/functional/es_archives/fleet/empty_fleet_server' ); @@ -119,7 +120,7 @@ export default function (providerContext: FtrProviderContext) { await getService('esArchiver').unload( 'x-pack/test/functional/es_archives/fleet/empty_fleet_server' ); - await getService('esArchiver').unload('x-pack/test/functional/es_archives/empty_kibana'); + await kibanaServer.savedObjects.cleanStandardList(); }); it('should work with valid values on "regular" policies', async function () { diff --git a/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_security.ts b/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_security.ts index 6b08a9455b644..8f7fc4fe73062 100644 --- a/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_security.ts +++ b/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_security.ts @@ -30,13 +30,17 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const globalNav = getService('globalNav'); const queryBar = getService('queryBar'); const savedQueryManagementComponent = getService('savedQueryManagementComponent'); + const kbnServer = getService('kibanaServer'); describe('dashboard feature controls security', () => { before(async () => { - await esArchiver.load( - 'x-pack/test/functional/es_archives/dashboard/feature_controls/security' - ); await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); + await kbnServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/security/security.json' + ); + await kbnServer.uiSettings.update({ + defaultIndex: 'logstash-*', + }); // ensure we're logged out so we can login as the appropriate users await PageObjects.security.forceLogout(); @@ -47,9 +51,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { // NOTE: Logout needs to happen before anything else to avoid flaky behavior await PageObjects.security.forceLogout(); - await esArchiver.unload( - 'x-pack/test/functional/es_archives/dashboard/feature_controls/security' - ); + await kbnServer.savedObjects.cleanStandardList(); + await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional'); }); describe('global dashboard all privileges, no embeddable application privileges', () => { diff --git a/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_spaces.ts b/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_spaces.ts index 24a90b883315e..a702b7a716a15 100644 --- a/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_spaces.ts +++ b/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_spaces.ts @@ -19,33 +19,31 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'dashboard', 'security', 'spaceSelector', 'error']); const appsMenu = getService('appsMenu'); const testSubjects = getService('testSubjects'); + const kibanaServer = getService('kibanaServer'); describe('spaces', () => { + const customSpace = 'custom_space'; before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); }); describe('space with no features disabled', () => { before(async () => { - // we need to load the following in every situation as deleting - // a space deletes all of the associated saved objects - await esArchiver.load( - 'x-pack/test/functional/es_archives/dashboard/feature_controls/spaces' - ); await spacesService.create({ - id: 'custom_space', - name: 'custom_space', + id: customSpace, + name: customSpace, disabledFeatures: [], }); - }); - - after(async () => { - await spacesService.delete('custom_space'); - await esArchiver.unload( - 'x-pack/test/functional/es_archives/dashboard/feature_controls/spaces' + // we need to load the following in every situation as deleting + // a space deletes all of the associated saved objects + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/custom_space', + { space: customSpace } ); }); + after(async () => await spacesService.delete(customSpace)); + it('shows dashboard navlink', async () => { await PageObjects.common.navigateToApp('home', { basePath: '/s/custom_space', @@ -88,7 +86,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it(`can view existing Dashboard`, async () => { await PageObjects.common.navigateToActualUrl( 'dashboard', - createDashboardEditUrl('i-exist'), + createDashboardEditUrl('8fba09d8-df3f-5aa1-83cc-65f7fbcbc0d9'), { basePath: '/s/custom_space', ensureCurrentUrl: false, @@ -103,25 +101,21 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('space with Dashboard disabled', () => { before(async () => { - // we need to load the following in every situation as deleting - // a space deletes all of the associated saved objects - await esArchiver.load( - 'x-pack/test/functional/es_archives/dashboard/feature_controls/spaces' - ); await spacesService.create({ - id: 'custom_space', - name: 'custom_space', + id: customSpace, + name: customSpace, disabledFeatures: ['dashboard'], }); - }); - - after(async () => { - await spacesService.delete('custom_space'); - await esArchiver.unload( - 'x-pack/test/functional/es_archives/dashboard/feature_controls/spaces' + // we need to load the following in every situation as deleting + // a space deletes all of the associated saved objects + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/custom_space', + { space: customSpace } ); }); + after(async () => await spacesService.delete('custom_space')); + it(`doesn't show dashboard navlink`, async () => { await PageObjects.common.navigateToApp('home', { basePath: '/s/custom_space', diff --git a/x-pack/test/functional/apps/dashboard/group1/feature_controls/time_to_visualize_security.ts b/x-pack/test/functional/apps/dashboard/group1/feature_controls/time_to_visualize_security.ts index 2c01c83ee98d0..1ed0e1535a828 100644 --- a/x-pack/test/functional/apps/dashboard/group1/feature_controls/time_to_visualize_security.ts +++ b/x-pack/test/functional/apps/dashboard/group1/feature_controls/time_to_visualize_security.ts @@ -28,13 +28,18 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const security = getService('security'); const find = getService('find'); + const kbnServer = getService('kibanaServer'); describe('dashboard time to visualize security', () => { before(async () => { - await esArchiver.load( - 'x-pack/test/functional/es_archives/dashboard/feature_controls/security' - ); await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); + await kbnServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/security/security.json' + ); + + await kbnServer.uiSettings.update({ + defaultIndex: 'logstash-*', + }); // ensure we're logged out so we can login as the appropriate users await PageObjects.security.forceLogout(); @@ -77,9 +82,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await security.role.delete('dashboard_write_vis_read'); await security.user.delete('dashboard_write_vis_read_user'); - await esArchiver.unload( - 'x-pack/test/functional/es_archives/dashboard/feature_controls/security' - ); + await kbnServer.savedObjects.cleanStandardList(); + await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional'); }); describe('lens by value works without library save permissions', () => { diff --git a/x-pack/test/functional/apps/home/feature_controls/home_security.ts b/x-pack/test/functional/apps/home/feature_controls/home_security.ts index bfa3df5642975..a48bc7651a1ed 100644 --- a/x-pack/test/functional/apps/home/feature_controls/home_security.ts +++ b/x-pack/test/functional/apps/home/feature_controls/home_security.ts @@ -13,13 +13,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const security = getService('security'); const PageObjects = getPageObjects(['security', 'home']); const testSubjects = getService('testSubjects'); + const kbnServer = getService('kibanaServer'); describe('security', () => { before(async () => { - await esArchiver.load( - 'x-pack/test/functional/es_archives/dashboard/feature_controls/security' - ); await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); + await kbnServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/home/feature_controls/security/security.json' + ); // ensure we're logged out so we can login as the appropriate users await PageObjects.security.forceLogout(); @@ -30,13 +31,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { // NOTE: Logout needs to happen before anything else to avoid flaky behavior await PageObjects.security.forceLogout(); - await esArchiver.unload( - 'x-pack/test/functional/es_archives/dashboard/feature_controls/security' - ); + await kbnServer.savedObjects.cleanStandardList(); + await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional'); }); // https://github.com/elastic/kibana/issues/132628 - describe.skip('global all privileges', () => { + describe('global all privileges', () => { before(async () => { await security.role.create('global_all_role', { elasticsearch: {}, diff --git a/x-pack/test/functional/apps/ingest_pipelines/feature_controls/ingest_pipelines_security.ts b/x-pack/test/functional/apps/ingest_pipelines/feature_controls/ingest_pipelines_security.ts index 3e7a1f2f2146a..350170160c71d 100644 --- a/x-pack/test/functional/apps/ingest_pipelines/feature_controls/ingest_pipelines_security.ts +++ b/x-pack/test/functional/apps/ingest_pipelines/feature_controls/ingest_pipelines_security.ts @@ -15,8 +15,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const appsMenu = getService('appsMenu'); const managementMenu = getService('managementMenu'); - // FLAKY: https://github.com/elastic/kibana/issues/132159 - describe.skip('security', () => { + describe('security', () => { before(async () => { await kibanaServer.savedObjects.cleanStandardList(); await PageObjects.common.navigateToApp('home'); diff --git a/x-pack/test/functional/apps/maps/group4/discover.js b/x-pack/test/functional/apps/maps/group4/discover.js index 1f6a216208076..b1a0e4677ce32 100644 --- a/x-pack/test/functional/apps/maps/group4/discover.js +++ b/x-pack/test/functional/apps/maps/group4/discover.js @@ -11,6 +11,8 @@ export default function ({ getService, getPageObjects }) { const queryBar = getService('queryBar'); const PageObjects = getPageObjects(['common', 'discover', 'header', 'maps', 'timePicker']); const security = getService('security'); + const from = 'Sep 22, 2015 @ 00:00:00.000'; + const to = 'Sep 22, 2015 @ 04:00:00.000'; describe('discover visualize button', () => { beforeEach(async () => { @@ -21,11 +23,13 @@ export default function ({ getService, getPageObjects }) { 'global_discover_read', 'global_visualize_read', ]); + await PageObjects.common.setTime({ from, to }); await PageObjects.common.navigateToApp('discover'); }); after(async () => { await security.testUser.restoreDefaults(); + await PageObjects.common.unsetTime(); }); it('should link geo_shape fields to Maps application', async () => { @@ -42,10 +46,7 @@ export default function ({ getService, getPageObjects }) { it('should link geo_point fields to Maps application with time and query context', async () => { await PageObjects.discover.selectIndexPattern('logstash-*'); - await PageObjects.timePicker.setAbsoluteRange( - 'Sep 22, 2015 @ 00:00:00.000', - 'Sep 22, 2015 @ 04:00:00.000' - ); + await queryBar.setQuery('machine.os.raw : "ios"'); await queryBar.submitQuery(); await PageObjects.header.waitUntilLoadingHasFinished(); diff --git a/x-pack/test/functional/es_archives/dashboard/feature_controls/security/data.json b/x-pack/test/functional/es_archives/dashboard/feature_controls/security/data.json deleted file mode 100644 index db4f27e42ee85..0000000000000 --- a/x-pack/test/functional/es_archives/dashboard/feature_controls/security/data.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "index-pattern:logstash-*", - "source": { - "index-pattern": { - "title": "logstash-*", - "timeFieldName": "@timestamp", - "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]" - }, - "type": "index-pattern", - "migrationVersion": { - "index-pattern": "6.5.0" - }, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "visualization:75c3e060-1e7c-11e9-8488-65449e65d0ed", - "source": { - "visualization": { - "title": "A Pie", - "visState": "{\"title\":\"A Pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"dimensions\":{\"metric\":{\"accessor\":0,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"}}]}", - "uiStateJSON": "{}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"logstash-*\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" - } - }, - "type": "visualization", - "updated_at": "2019-01-22T19:32:31.206Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "dashboard:i-exist", - "source": { - "dashboard": { - "title": "A Dashboard", - "hits": 0, - "description": "", - "panelsJSON": "[{\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"version\":\"7.0.0\",\"panelIndex\":\"1\",\"type\":\"visualization\",\"id\":\"75c3e060-1e7c-11e9-8488-65449e65d0ed\",\"embeddableConfig\":{}}]", - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "version": 1, - "timeRestore": false, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" - } - }, - "type": "dashboard", - "updated_at": "2019-01-22T19:32:47.232Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "config:6.0.0", - "source": { - "config": { - "buildNum": 9007199254740991, - "defaultIndex": "logstash-*" - }, - "type": "config", - "updated_at": "2019-01-22T19:32:02.235Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "map:0b849ed0-70f5-11e9-8625-9580c4904684", - "source": { - "map": { - "title" : "just a map", - "description" : "", - "mapStateJSON" : "{\"zoom\":0.8,\"center\":{\"lon\":0,\"lat\":0},\"timeFilters\":{\"from\":\"now-15m\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":false,\"interval\":0},\"query\":{\"query\":\"\",\"language\":\"kuery\"}}", - "layerListJSON" : "[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"id\":\"c7bdee60-5267-459e-83d6-b53acf1b9e67\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":1,\"visible\":true,\"applyGlobalQuery\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"TILE\"}]", - "uiStateJSON" : "{\"isLayerTOCOpen\":true}", - "bounds" : { - "type" : "polygon", - "coordinates" : [ - [ - [ - -180, - 85.05113 - ], - [ - -180, - -85.05113 - ], - [ - 180, - -85.05113 - ], - [ - 180, - 85.05113 - ], - [ - -180, - 85.05113 - ] - ] - ] - } - }, - "type": "map", - "references" : [ ], - "migrationVersion" : { - "map" : "7.1.0" - }, - "updated_at" : "2019-05-07T18:22:17.405Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "dashboard:1c1a87f0-70f5-11e9-8625-9580c4904684", - "source": { - "dashboard": { - "title" : "dashboard with map", - "hits" : 0, - "description" : "", - "panelsJSON" : "[{\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"version\":\"8.0.0\",\"panelIndex\":\"1\",\"embeddableConfig\":{\"mapCenter\":{\"lat\":0,\"lon\":0,\"zoom\":0.8},\"isLayerTOCOpen\":true},\"panelRefName\":\"panel_0\"}]", - "optionsJSON" : "{\"useMargins\":true,\"hidePanelTitles\":false}", - "version" : 1, - "timeRestore" : false, - "kibanaSavedObjectMeta" : { - "searchSourceJSON" : "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" - } - }, - "type": "dashboard", - "references" : [ - { - "name" : "panel_0", - "type" : "map", - "id" : "0b849ed0-70f5-11e9-8625-9580c4904684" - } - ], - "migrationVersion" : { - "dashboard" : "7.0.0" - }, - "updated_at" : "2019-05-07T18:22:45.231Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "query:OKJpgs", - "source": { - "query": { - "title": "OKJpgs", - "description": "Ok responses for jpg files", - "query": { - "query": "response:200", - "language": "kuery" - }, - "filters": [{"meta":{"index":"b15b1d40-a8bb-11e9-98cf-2bb06ef63e0b","alias":null,"negate":false,"type":"phrase","key":"extension.raw","value":"jpg","params":{"query":"jpg"},"disabled":false},"query":{"match":{"extension.raw":{"query":"jpg","type":"phrase"}}},"$state":{"store":"appState"}}] - }, - "type": "query", - "updated_at": "2019-07-17T17:54:26.378Z" - } - } -} diff --git a/x-pack/test/functional/es_archives/dashboard/feature_controls/security/mappings.json b/x-pack/test/functional/es_archives/dashboard/feature_controls/security/mappings.json deleted file mode 100644 index a4392cd88b356..0000000000000 --- a/x-pack/test/functional/es_archives/dashboard/feature_controls/security/mappings.json +++ /dev/null @@ -1,478 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana": {} - }, - "index": ".kibana_1", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "apm-telemetry": { - "properties": { - "has_any_services": { - "type": "boolean" - }, - "services_per_agent": { - "properties": { - "go": { - "type": "long", - "null_value": 0 - }, - "java": { - "type": "long", - "null_value": 0 - }, - "js-base": { - "type": "long", - "null_value": 0 - }, - "nodejs": { - "type": "long", - "null_value": 0 - }, - "python": { - "type": "long", - "null_value": 0 - }, - "ruby": { - "type": "long", - "null_value": 0 - } - } - } - } - }, - "canvas-workpad": { - "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "id": { - "type": "text", - "index": false - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword" - } - } - } - } - }, - "config": { - "dynamic": "true", - "properties": { - "accessibility:disableAnimations": { - "type": "boolean" - }, - "buildNum": { - "type": "keyword" - }, - "dateFormat:tz": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "map" : { - "properties" : { - "bounds": { - "dynamic": false, - "properties": {} - }, - "description" : { - "type" : "text" - }, - "layerListJSON" : { - "type" : "text" - }, - "mapStateJSON" : { - "type" : "text" - }, - "title" : { - "type" : "text" - }, - "uiStateJSON" : { - "type" : "text" - }, - "version" : { - "type" : "integer" - } - } - }, - "graph-workspace": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - }, - "typeMeta": { - "type": "keyword" - } - } - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "space": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "namespace": { - "type": "keyword" - }, - "references": { - "type": "nested", - "properties": { - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "id": { - "type": "keyword" - } - } - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "space": { - "properties": { - "_reserved": { - "type": "boolean" - }, - "color": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "disabledFeatures": { - "type": "keyword" - }, - "initials": { - "type": "keyword" - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "spaceId": { - "type": "keyword" - }, - "telemetry": { - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - }, - "query": { - "properties": { - "title": { - "type": "text" - }, - "description": { - "type": "text" - }, - "query": { - "properties": { - "language": { - "type": "keyword" - }, - "query": { - "type": "keyword", - "index": false - } - } - }, - "filters": { - "type": "object", - "enabled": false - }, - "timefilter": { - "type": "object", - "enabled": false - } - } - } - } - } - } -} diff --git a/x-pack/test/functional/es_archives/dashboard/feature_controls/spaces/data.json b/x-pack/test/functional/es_archives/dashboard/feature_controls/spaces/data.json deleted file mode 100644 index a43c72659b407..0000000000000 --- a/x-pack/test/functional/es_archives/dashboard/feature_controls/spaces/data.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "index-pattern:logstash-*", - "source": { - "index-pattern": { - "title": "logstash-*", - "timeFieldName": "@timestamp", - "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]" - }, - "type": "index-pattern", - "migrationVersion": { - "index-pattern": "6.5.0" - }, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "config:6.0.0", - "source": { - "config": { - "buildNum": 9007199254740991, - "defaultIndex": "logstash-*" - }, - "type": "config", - "updated_at": "2019-01-22T19:32:02.235Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "custom_space:index-pattern:logstash-*", - "source": { - "namespace": "custom_space", - "index-pattern": { - "title": "logstash-*", - "timeFieldName": "@timestamp", - "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]" - }, - "type": "index-pattern", - "migrationVersion": { - "index-pattern": "6.5.0" - }, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "custom_space:visualization:75c3e060-1e7c-11e9-8488-65449e65d0ed", - "source": { - "namespace": "custom_space", - "visualization": { - "title": "A Pie", - "visState": "{\"title\":\"A Pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"dimensions\":{\"metric\":{\"accessor\":0,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"}}]}", - "uiStateJSON": "{}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"logstash-*\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" - } - }, - "type": "visualization", - "updated_at": "2019-01-22T19:32:31.206Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "custom_space:dashboard:i-exist", - "source": { - "namespace": "custom_space", - "dashboard": { - "title": "A Dashboard", - "hits": 0, - "description": "", - "panelsJSON": "[{\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"version\":\"7.0.0\",\"panelIndex\":\"1\",\"type\":\"visualization\",\"id\":\"75c3e060-1e7c-11e9-8488-65449e65d0ed\",\"embeddableConfig\":{}}]", - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "version": 1, - "timeRestore": false, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" - } - }, - "type": "dashboard", - "updated_at": "2019-01-22T19:32:47.232Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "custom_space:config:6.0.0", - "source": { - "namespace": "custom_space", - "config": { - "buildNum": 9007199254740991, - "defaultIndex": "logstash-*" - }, - "type": "config", - "updated_at": "2019-01-22T19:32:02.235Z" - } - } -} diff --git a/x-pack/test/functional/es_archives/dashboard/feature_controls/spaces/mappings.json b/x-pack/test/functional/es_archives/dashboard/feature_controls/spaces/mappings.json deleted file mode 100644 index 51dfbb6d066fc..0000000000000 --- a/x-pack/test/functional/es_archives/dashboard/feature_controls/spaces/mappings.json +++ /dev/null @@ -1,421 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana": {} - }, - "index": ".kibana_1", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "apm-telemetry": { - "properties": { - "has_any_services": { - "type": "boolean" - }, - "services_per_agent": { - "properties": { - "go": { - "type": "long", - "null_value": 0 - }, - "java": { - "type": "long", - "null_value": 0 - }, - "js-base": { - "type": "long", - "null_value": 0 - }, - "nodejs": { - "type": "long", - "null_value": 0 - }, - "python": { - "type": "long", - "null_value": 0 - }, - "ruby": { - "type": "long", - "null_value": 0 - } - } - } - } - }, - "canvas-workpad": { - "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "id": { - "type": "text", - "index": false - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword" - } - } - } - } - }, - "config": { - "dynamic": "true", - "properties": { - "accessibility:disableAnimations": { - "type": "boolean" - }, - "buildNum": { - "type": "keyword" - }, - "dateFormat:tz": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "gis-map" : { - "properties" : { - "bounds": { - "dynamic": false, - "properties": {} - }, - "description" : { - "type" : "text" - }, - "layerListJSON" : { - "type" : "text" - }, - "mapStateJSON" : { - "type" : "text" - }, - "title" : { - "type" : "text" - }, - "uiStateJSON" : { - "type" : "text" - }, - "version" : { - "type" : "integer" - } - } - }, - "graph-workspace": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - }, - "typeMeta": { - "type": "keyword" - } - } - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "space": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "namespace": { - "type": "keyword" - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "space": { - "properties": { - "_reserved": { - "type": "boolean" - }, - "color": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "disabledFeatures": { - "type": "keyword" - }, - "initials": { - "type": "keyword" - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "spaceId": { - "type": "keyword" - }, - "telemetry": { - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - } - } -} diff --git a/x-pack/test/functional/es_archives/empty_kibana/mappings.json b/x-pack/test/functional/es_archives/empty_kibana/mappings.json deleted file mode 100644 index 07dc66dd8ce94..0000000000000 --- a/x-pack/test/functional/es_archives/empty_kibana/mappings.json +++ /dev/null @@ -1,245 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana": {} - }, - "index": ".kibana_1", - "mappings": { - "properties": { - "config": { - "dynamic": "true", - "properties": { - "buildNum": { - "type": "keyword" - }, - "dateFormat:tz": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "dashboard": { - "dynamic": "strict", - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "dynamic": "strict", - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - } - } - }, - "search": { - "dynamic": "strict", - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "dynamic": "strict", - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "space": { - "properties": { - "_reserved": { - "type": "boolean" - }, - "color": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "disabledFeatures": { - "type": "keyword" - }, - "initials": { - "type": "keyword" - }, - "name": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "spaceId": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "url": { - "dynamic": "strict", - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "visualization": { - "dynamic": "strict", - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - }, - "settings": { - "index": { - "number_of_replicas": "1", - "number_of_shards": "1" - } - } - } -} diff --git a/x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/custom_space.json b/x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/custom_space.json new file mode 100644 index 0000000000000..b77f2e8a5819f --- /dev/null +++ b/x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/custom_space.json @@ -0,0 +1,77 @@ +{ + "attributes": { + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "logstash-*" + }, + "coreMigrationVersion": "8.5.0", + "id": "950add79-d222-5f2e-941a-3110f25e0bb2", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "originId": "logstash-*", + "references": [], + "type": "index-pattern", + "updated_at": "2018-12-21T00:43:07.096Z", + "version": "WzExLDJd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "A Pie", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"A Pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"dimensions\":{\"metric\":{\"accessor\":0,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"}},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true,\"legendDisplay\":\"show\",\"legendSize\":\"auto\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"}}]}" + }, + "coreMigrationVersion": "8.5.0", + "id": "0b79398c-b647-5223-9fac-f102dd7ffdf0", + "migrationVersion": { + "visualization": "8.3.0" + }, + "originId": "75c3e060-1e7c-11e9-8488-65449e65d0ed", + "references": [ + { + "id": "950add79-d222-5f2e-941a-3110f25e0bb2", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-01-22T19:32:31.206Z", + "version": "WzEzLDJd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "A Dashboard", + "version": 1 + }, + "coreMigrationVersion": "8.5.0", + "id": "8fba09d8-df3f-5aa1-83cc-65f7fbcbc0d9", + "migrationVersion": { + "dashboard": "8.5.0" + }, + "originId": "i-exist", + "references": [ + { + "id": "0b79398c-b647-5223-9fac-f102dd7ffdf0", + "name": "1:panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2019-01-22T19:32:47.232Z", + "version": "WzE1LDJd" +} diff --git a/x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/security/security.json b/x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/security/security.json new file mode 100644 index 0000000000000..c16dfc98e30bd --- /dev/null +++ b/x-pack/test/functional/fixtures/kbn_archiver/dashboard/feature_controls/security/security.json @@ -0,0 +1,192 @@ +{ + "attributes": { + "description": "", + "layerListJSON": "[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\",\"lightModeDefault\":\"road_map\"},\"id\":\"c7bdee60-5267-459e-83d6-b53acf1b9e67\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":1,\"visible\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"EMS_VECTOR_TILE\"}]", + "mapStateJSON": "{\"zoom\":0.8,\"center\":{\"lon\":0,\"lat\":0},\"timeFilters\":{\"from\":\"now-15m\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":false,\"interval\":0},\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"settings\":{\"autoFitToDataBounds\":false}}", + "title": "just a map", + "uiStateJSON": "{\"isLayerTOCOpen\":true}" + }, + "coreMigrationVersion": "8.5.0", + "id": "0b849ed0-70f5-11e9-8625-9580c4904684", + "migrationVersion": { + "map": "8.4.0" + }, + "references": [], + "type": "map", + "updated_at": "2019-05-07T18:22:17.405Z", + "version": "WzExLDJd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + }, + "optionsJSON": "{\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"8.0.0\",\"type\":\"map\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"mapCenter\":{\"lat\":0,\"lon\":0,\"zoom\":0.8},\"isLayerTOCOpen\":true,\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "dashboard with map", + "version": 1 + }, + "coreMigrationVersion": "8.5.0", + "id": "1c1a87f0-70f5-11e9-8625-9580c4904684", + "migrationVersion": { + "dashboard": "8.4.0" + }, + "references": [ + { + "id": "0b849ed0-70f5-11e9-8625-9580c4904684", + "name": "1:panel_1", + "type": "map" + } + ], + "type": "dashboard", + "updated_at": "2019-05-07T18:22:45.231Z", + "version": "WzEyLDJd" +} + +{ + "attributes": { + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "logstash-*" + }, + "coreMigrationVersion": "8.5.0", + "id": "logstash-*", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-12-21T00:43:07.096Z", + "version": "WzcsMl0=" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "A Pie", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"A Pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"dimensions\":{\"metric\":{\"accessor\":0,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"}},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true,\"legendDisplay\":\"show\",\"legendSize\":\"auto\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"}}]}" + }, + "coreMigrationVersion": "8.5.0", + "id": "75c3e060-1e7c-11e9-8488-65449e65d0ed", + "migrationVersion": { + "visualization": "8.3.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-01-22T19:32:31.206Z", + "version": "WzgsMl0=" +} + +{ + "attributes": { + "description": "Ok responses for jpg files", + "filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "index": "16628291-058f-4788-b6c9-d4c6ad032020", + "key": "extension.raw", + "negate": false, + "params": { + "query": "jpg" + }, + "type": "phrase", + "value": "jpg" + }, + "query": { + "match": { + "extension.raw": { + "query": "jpg", + "type": "phrase" + } + } + } + } + ], + "query": { + "language": "kuery", + "query": "response:200" + }, + "title": "OKJpgs" + }, + "coreMigrationVersion": "8.5.0", + "id": "OKJpgs", + "migrationVersion": { + "query": "8.0.0" + }, + "references": [ + { + "id": "b15b1d40-a8bb-11e9-98cf-2bb06ef63e0b", + "name": "16628291-058f-4788-b6c9-d4c6ad032020", + "type": "index-pattern" + } + ], + "type": "query", + "updated_at": "2019-07-17T17:54:26.378Z", + "version": "WzEzLDJd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "A Dashboard", + "version": 1 + }, + "coreMigrationVersion": "8.5.0", + "id": "i-exist", + "migrationVersion": { + "dashboard": "8.4.0" + }, + "references": [ + { + "id": "75c3e060-1e7c-11e9-8488-65449e65d0ed", + "name": "1:panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2019-01-22T19:32:47.232Z", + "version": "WzksMl0=" +} + +{ + "attributes": { + "timeFieldName": "@timestamp", + "title": "logs*" + }, + "coreMigrationVersion": "7.17.2", + "id": "b15b1d40-a8bb-11e9-98cf-2bb06ef63e0b", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-12-21T00:43:07.096Z", + "version": "WzEwLDJd" +} \ No newline at end of file diff --git a/x-pack/test/functional/fixtures/kbn_archiver/home/feature_controls/security/security.json b/x-pack/test/functional/fixtures/kbn_archiver/home/feature_controls/security/security.json new file mode 100644 index 0000000000000..1b22a16994732 --- /dev/null +++ b/x-pack/test/functional/fixtures/kbn_archiver/home/feature_controls/security/security.json @@ -0,0 +1,192 @@ +{ + "attributes": { + "description": "", + "layerListJSON": "[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\",\"lightModeDefault\":\"road_map\"},\"id\":\"c7bdee60-5267-459e-83d6-b53acf1b9e67\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":1,\"visible\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"EMS_VECTOR_TILE\"}]", + "mapStateJSON": "{\"zoom\":0.8,\"center\":{\"lon\":0,\"lat\":0},\"timeFilters\":{\"from\":\"now-15m\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":false,\"interval\":0},\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"settings\":{\"autoFitToDataBounds\":false}}", + "title": "just a map", + "uiStateJSON": "{\"isLayerTOCOpen\":true}" + }, + "coreMigrationVersion": "8.5.0", + "id": "0b849ed0-70f5-11e9-8625-9580c4904684", + "migrationVersion": { + "map": "8.4.0" + }, + "references": [], + "type": "map", + "updated_at": "2019-05-07T18:22:17.405Z", + "version": "WzExLDJd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + }, + "optionsJSON": "{\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"8.0.0\",\"type\":\"map\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"mapCenter\":{\"lat\":0,\"lon\":0,\"zoom\":0.8},\"isLayerTOCOpen\":true,\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "dashboard with map", + "version": 1 + }, + "coreMigrationVersion": "8.5.0", + "id": "1c1a87f0-70f5-11e9-8625-9580c4904684", + "migrationVersion": { + "dashboard": "8.4.0" + }, + "references": [ + { + "id": "0b849ed0-70f5-11e9-8625-9580c4904684", + "name": "1:panel_1", + "type": "map" + } + ], + "type": "dashboard", + "updated_at": "2019-05-07T18:22:45.231Z", + "version": "WzEyLDJd" +} + +{ + "attributes": { + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "logstash-*" + }, + "coreMigrationVersion": "8.5.0", + "id": "logstash-*", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-12-21T00:43:07.096Z", + "version": "WzcsMl0=" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "A Pie", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"A Pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"dimensions\":{\"metric\":{\"accessor\":0,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"}},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true,\"legendDisplay\":\"show\",\"legendSize\":\"auto\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"}}]}" + }, + "coreMigrationVersion": "8.5.0", + "id": "75c3e060-1e7c-11e9-8488-65449e65d0ed", + "migrationVersion": { + "visualization": "8.3.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-01-22T19:32:31.206Z", + "version": "WzgsMl0=" +} + +{ + "attributes": { + "description": "Ok responses for jpg files", + "filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "index": "ef0c891a-d588-415a-95be-4d21801754b4", + "key": "extension.raw", + "negate": false, + "params": { + "query": "jpg" + }, + "type": "phrase", + "value": "jpg" + }, + "query": { + "match": { + "extension.raw": { + "query": "jpg", + "type": "phrase" + } + } + } + } + ], + "query": { + "language": "kuery", + "query": "response:200" + }, + "title": "OKJpgs" + }, + "coreMigrationVersion": "8.5.0", + "id": "OKJpgs", + "migrationVersion": { + "query": "8.0.0" + }, + "references": [ + { + "id": "b15b1d40-a8bb-11e9-98cf-2bb06ef63e0b", + "name": "ef0c891a-d588-415a-95be-4d21801754b4", + "type": "index-pattern" + } + ], + "type": "query", + "updated_at": "2019-07-17T17:54:26.378Z", + "version": "WzEzLDJd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "A Dashboard", + "version": 1 + }, + "coreMigrationVersion": "8.5.0", + "id": "i-exist", + "migrationVersion": { + "dashboard": "8.4.0" + }, + "references": [ + { + "id": "75c3e060-1e7c-11e9-8488-65449e65d0ed", + "name": "1:panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2019-01-22T19:32:47.232Z", + "version": "WzksMl0=" +} + +{ + "attributes": { + "timeFieldName": "@timestamp", + "title": "logs*" + }, + "coreMigrationVersion": "7.17.2", + "id": "b15b1d40-a8bb-11e9-98cf-2bb06ef63e0b", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-12-21T00:43:07.096Z", + "version": "WzEwLDJd" +} \ No newline at end of file diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index 2a96080e9d4f6..50f687654ce01 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -47,7 +47,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont }, async isLensPageOrFail() { - return await testSubjects.existOrFail('lnsApp', { timeout: 5000 }); + return await testSubjects.existOrFail('lnsApp', { timeout: 10000 }); }, /** diff --git a/x-pack/test/performance/journeys/ecommerce_dashboard/config.ts b/x-pack/test/performance/journeys/ecommerce_dashboard/config.ts index b75eda7cb1ee1..3b4d19b9a5bfc 100644 --- a/x-pack/test/performance/journeys/ecommerce_dashboard/config.ts +++ b/x-pack/test/performance/journeys/ecommerce_dashboard/config.ts @@ -15,8 +15,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { const testFiles = [require.resolve(`./${JOURNEY_ECOMMERCE_DASHBOARD}`)]; const config = { - testFiles, ...performanceConfig.getAll(), + testFiles, }; const apmGlobalLabels = { diff --git a/x-pack/test/performance/journeys/flight_dashboard/config.ts b/x-pack/test/performance/journeys/flight_dashboard/config.ts index 61471d0829f9e..0b060694a2881 100644 --- a/x-pack/test/performance/journeys/flight_dashboard/config.ts +++ b/x-pack/test/performance/journeys/flight_dashboard/config.ts @@ -15,8 +15,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { const testFiles = [require.resolve(`./${JOURNEY_FLIGHT_DASHBOARD}`)]; const config = { - testFiles, ...performanceConfig.getAll(), + testFiles, }; const apmGlobalLabels = { diff --git a/x-pack/test/performance/journeys/login/config.ts b/x-pack/test/performance/journeys/login/config.ts index 2ba9b07700007..adf9bc76416a4 100644 --- a/x-pack/test/performance/journeys/login/config.ts +++ b/x-pack/test/performance/journeys/login/config.ts @@ -15,6 +15,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { const testFiles = [require.resolve(`./${JOURNEY_LOGIN}`)]; const config = { + ...performanceConfig.getAll(), testFiles, scalabilitySetup: { warmup: [ @@ -39,7 +40,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ], maxDuration: '10m', }, - ...performanceConfig.getAll(), }; const apmGlobalLabels = { diff --git a/x-pack/test/performance/journeys/many_fields_discover/config.ts b/x-pack/test/performance/journeys/many_fields_discover/config.ts index 856607b5cd17f..11ce52089a730 100644 --- a/x-pack/test/performance/journeys/many_fields_discover/config.ts +++ b/x-pack/test/performance/journeys/many_fields_discover/config.ts @@ -15,8 +15,12 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { const testFiles = [require.resolve(`./${JOURNEY_MANY_FIELDS_DISCOVER}`)]; const config = { - testFiles, ...performanceConfig.getAll(), + testFiles, + testData: { + kbnArchives: ['test/functional/fixtures/kbn_archiver/many_fields_data_view'], + esArchives: ['test/functional/fixtures/es_archiver/many_fields'], + }, }; const apmGlobalLabels = { diff --git a/x-pack/test/performance/journeys/many_fields_discover/many_fields_discover.ts b/x-pack/test/performance/journeys/many_fields_discover/many_fields_discover.ts index 381f0b4e46003..648ed9fca37db 100644 --- a/x-pack/test/performance/journeys/many_fields_discover/many_fields_discover.ts +++ b/x-pack/test/performance/journeys/many_fields_discover/many_fields_discover.ts @@ -11,22 +11,6 @@ export default function ({ getService }: FtrProviderContext) { // FAILING: https://github.com/elastic/kibana/issues/130287 describe.skip('many_fields_discover', () => { const performance = getService('performance'); - const esArchiver = getService('esArchiver'); - const kibanaServer = getService('kibanaServer'); - - before(async () => { - await kibanaServer.importExport.load( - 'test/functional/fixtures/kbn_archiver/many_fields_data_view' - ); - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/many_fields'); - }); - - after(async () => { - await kibanaServer.importExport.unload( - 'test/functional/fixtures/kbn_archiver/many_fields_data_view' - ); - await esArchiver.unload('test/functional/fixtures/es_archiver/many_fields'); - }); it('many_fields_discover', async () => { await performance.runUserJourney( diff --git a/x-pack/test/performance/journeys/promotion_tracking_dashboard/config.ts b/x-pack/test/performance/journeys/promotion_tracking_dashboard/config.ts index b125028ebf381..cc0074503576f 100644 --- a/x-pack/test/performance/journeys/promotion_tracking_dashboard/config.ts +++ b/x-pack/test/performance/journeys/promotion_tracking_dashboard/config.ts @@ -15,8 +15,12 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { const testFiles = [require.resolve(`./${JOURNEY_PROMOTION_TRACKING_DASHBOARD}`)]; const config = { - testFiles, ...performanceConfig.getAll(), + testFiles, + testData: { + kbnArchives: ['x-pack/test/performance/kbn_archives/promotion_tracking_dashboard'], + esArchives: ['x-pack/test/performance/es_archives/ecommerce_sample_data'], + }, scalabilitySetup: { warmup: [ { diff --git a/x-pack/test/performance/journeys/promotion_tracking_dashboard/promotion_tracking_dashboard.ts b/x-pack/test/performance/journeys/promotion_tracking_dashboard/promotion_tracking_dashboard.ts index 7c44573962a1e..fc38b718eb2a6 100644 --- a/x-pack/test/performance/journeys/promotion_tracking_dashboard/promotion_tracking_dashboard.ts +++ b/x-pack/test/performance/journeys/promotion_tracking_dashboard/promotion_tracking_dashboard.ts @@ -10,22 +10,6 @@ import { StepCtx } from '../../services/performance'; export default function ({ getService }: FtrProviderContext) { describe('promotion_tracking_dashboard', () => { const performance = getService('performance'); - const esArchiver = getService('esArchiver'); - const kibanaServer = getService('kibanaServer'); - - before(async () => { - await kibanaServer.importExport.load( - 'x-pack/test/performance/kbn_archives/promotion_tracking_dashboard' - ); - await esArchiver.loadIfNeeded('x-pack/test/performance/es_archives/ecommerce_sample_data'); - }); - - after(async () => { - await kibanaServer.importExport.unload( - 'x-pack/test/performance/kbn_archives/promotion_tracking_dashboard' - ); - await esArchiver.unload('x-pack/test/performance/es_archives/ecommerce_sample_data'); - }); it('promotion_tracking_dashboard', async () => { await performance.runUserJourney( diff --git a/x-pack/test/performance/journeys/web_logs_dashboard/config.ts b/x-pack/test/performance/journeys/web_logs_dashboard/config.ts index 01eb841b8e8ef..0c84f7bcc2071 100644 --- a/x-pack/test/performance/journeys/web_logs_dashboard/config.ts +++ b/x-pack/test/performance/journeys/web_logs_dashboard/config.ts @@ -15,8 +15,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { const testFiles = [require.resolve(`./${JOURNEY_WEBLOGS_DASHBOARD}`)]; const config = { - testFiles, ...performanceConfig.getAll(), + testFiles, }; const apmGlobalLabels = { diff --git a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/_get_assignable_types.ts b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/_get_assignable_types.ts index 63a204cbdbb00..673ae6f73fac2 100644 --- a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/_get_assignable_types.ts +++ b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/_get_assignable_types.ts @@ -32,7 +32,7 @@ export default function (ftrContext: FtrProviderContext) { }); const assignablePerUser = { - [USERS.SUPERUSER.username]: ['dashboard', 'visualization', 'map', 'lens'], + [USERS.SUPERUSER.username]: ['dashboard', 'visualization', 'map', 'lens', 'search'], [USERS.DEFAULT_SPACE_SO_TAGGING_READ_USER.username]: [], [USERS.DEFAULT_SPACE_READ_USER.username]: [], [USERS.DEFAULT_SPACE_ADVANCED_SETTINGS_READ_USER.username]: [], diff --git a/x-pack/test/saved_object_tagging/common/fixtures/es_archiver/discover/data.json b/x-pack/test/saved_object_tagging/common/fixtures/es_archiver/discover/data.json new file mode 100644 index 0000000000000..bd3b305bc7d40 --- /dev/null +++ b/x-pack/test/saved_object_tagging/common/fixtures/es_archiver/discover/data.json @@ -0,0 +1,182 @@ +{ + "id": "tag-1", + "type": "tag", + "attributes": { + "name": "tag-1", + "description": "My first tag!", + "color": "#FF00FF" + }, + "references": [], + "updated_at": "2021-06-17T18:57:58.076Z" +} + +{ + "id": "tag-2", + "type": "tag", + "attributes": { + "name": "tag-2", + "description": "Another awesome tag", + "color": "#123456" + }, + "references": [], + "updated_at": "2021-06-17T18:57:58.076Z" +} + +{ + "id": "tag-3", + "type": "tag", + "attributes": { + "name": "tag-3", + "description": "Last but not least", + "color": "#000000" + }, + "references": [], + "updated_at": "2021-06-17T18:57:58.076Z" +} + +{ + "attributes": { + "fieldAttrs": "{\"referer\":{\"customLabel\":\"Referer custom\"}}", + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"@message\"}}},{\"name\":\"@tags\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"@tags\"}}},{\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"agent\"}}},{\"name\":\"bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"extension\"}}},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"headings\"}}},{\"name\":\"host\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"host\"}}},{\"name\":\"id\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"index\"}}},{\"name\":\"ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"links\"}}},{\"name\":\"machine.os\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"machine.os\"}}},{\"name\":\"machine.ram\",\"type\":\"number\",\"esTypes\":[\"long\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"esTypes\":[\"double\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nestedField.child\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"nestedField\"}}},{\"name\":\"phpmemory\",\"type\":\"number\",\"esTypes\":[\"long\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.article:section\"}}},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.article:tag\"}}},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:description\"}}},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:image\"}}},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:image:height\"}}},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:image:width\"}}},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:site_name\"}}},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:title\"}}},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:type\"}}},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:url\"}}},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:card\"}}},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:description\"}}},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:image\"}}},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:site\"}}},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:title\"}}},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.url\"}}},{\"name\":\"request\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"request\"}}},{\"name\":\"response\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"response\"}}},{\"name\":\"spaces\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"spaces\"}}},{\"name\":\"type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"url\"}}},{\"name\":\"utc_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"esTypes\":[\"text\"],\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"xss\"}}}]", + "timeFieldName": "@timestamp", + "title": "logstash-*" + }, + "coreMigrationVersion": "8.0.0", + "id": "logstash-*", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "version": "WzQsMl0=" +} + +{ + "attributes": { + "columns": [ + "_source" + ], + "description": "A Saved Search Description", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"filter\":[],\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "A Saved Search", + "version": 1 + }, + "coreMigrationVersion": "8.0.0", + "id": "ab12e3c0-f231-11e6-9486-733b1ac9221a", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "tag-1", + "name": "tag-1-ref", + "type": "tag" + }, + { + "id": "tag-2", + "name": "tag-2-ref", + "type": "tag" + } + ], + "type": "search", + "version": "WzUsMl0=" +} + +{ + "attributes": { + "columns": [ + "_source" + ], + "description": "A Different Saved Search Description", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"filter\":[],\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "A Different Saved Search", + "version": 1 + }, + "coreMigrationVersion": "8.0.0", + "id": "ab12e3c0-f231-11e6-9486-733b1ac9221b", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "tag-2", + "name": "tag-2-ref", + "type": "tag" + }, + { + "id": "tag-3", + "name": "tag-3-ref", + "type": "tag" + } + ], + "type": "search", + "version": "WzUsMl0=" +} + +{ + "attributes": { + "columns": [ + "_source" + ], + "description": "An Untagged Saved Search Description", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"filter\":[],\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "A Third Saved Search", + "version": 1 + }, + "coreMigrationVersion": "8.0.0", + "id": "ab12e3c0-f231-11e6-9486-733b1ac9221c", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "tag-3", + "name": "tag-3-ref", + "type": "tag" + } + ], + "type": "search", + "version": "WzUsMl0=" +} \ No newline at end of file diff --git a/x-pack/test/saved_object_tagging/functional/tests/discover_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/discover_integration.ts new file mode 100644 index 0000000000000..b2772cec74ea1 --- /dev/null +++ b/x-pack/test/saved_object_tagging/functional/tests/discover_integration.ts @@ -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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../ftr_provider_context'; + +// eslint-disable-next-line import/no-default-export +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + const testSubjects = getService('testSubjects'); + const PageObjects = getPageObjects([ + 'tagManagement', + 'common', + 'header', + 'timePicker', + 'discover', + ]); + + /** + * Select tags in the searchbar's tag filter. + */ + const selectFilterTags = async (...tagNames: string[]) => { + // open the filter dropdown + const filterButton = await testSubjects + .find('loadSearchForm') + .then((wrapper) => wrapper.findByCssSelector('.euiFilterGroup .euiFilterButton')); + await filterButton.click(); + // select the tags + for (const tagName of tagNames) { + await testSubjects.click( + `tag-searchbar-option-${PageObjects.tagManagement.testSubjFriendly(tagName)}` + ); + } + // click elsewhere to close the filter dropdown + const searchFilter = await testSubjects.find('savedObjectFinderSearchInput'); + await searchFilter.click(); + }; + + const expectSavedSearches = async (...savedSearchTitles: string[]) => { + await testSubjects.retry.try(async () => { + const searchTitleWrappers = await testSubjects.findAll('savedObjectFinderTitle'); + const searchTitles = await Promise.all( + searchTitleWrappers.map((entry) => entry.getVisibleText()) + ); + expect(searchTitles).to.eql(savedSearchTitles); + }); + }; + + describe('discover integration', () => { + before(async () => { + await kibanaServer.importExport.load( + 'x-pack/test/saved_object_tagging/common/fixtures/es_archiver/discover/data.json' + ); + await esArchiver.loadIfNeeded( + 'x-pack/test/saved_object_tagging/common/fixtures/es_archiver/logstash_functional' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'x-pack/test/saved_object_tagging/common/fixtures/es_archiver/discover/data.json' + ); + await kibanaServer.savedObjects.clean({ types: ['tag'] }); + await esArchiver.unload( + 'x-pack/test/saved_object_tagging/common/fixtures/es_archiver/logstash_functional' + ); + }); + + describe('open search', () => { + beforeEach(async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.header.waitUntilLoadingHasFinished(); + }); + + it('allows to manually type tag filter query', async () => { + await PageObjects.discover.openLoadSavedSearchPanel(); + await testSubjects.setValue('savedObjectFinderSearchInput', 'tag:(tag-1)'); + await expectSavedSearches('A Saved Search'); + }); + + it('allows to filter by selecting a tag in the filter menu', async () => { + await PageObjects.discover.openLoadSavedSearchPanel(); + await selectFilterTags('tag-2'); + await expectSavedSearches('A Saved Search', 'A Different Saved Search'); + }); + + it('allows to filter by multiple tags', async () => { + await PageObjects.discover.openLoadSavedSearchPanel(); + await selectFilterTags('tag-2', 'tag-3'); + await expectSavedSearches( + 'A Saved Search', + 'A Different Saved Search', + 'A Third Saved Search' + ); + }); + }); + + describe('creating', () => { + beforeEach(async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.discover.selectIndexPattern('logstash-*'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await PageObjects.header.waitUntilLoadingHasFinished(); + }); + + it('allows to select tags for a new saved search', async () => { + await PageObjects.discover.saveSearch('My New Search', undefined, { + tags: ['tag-1', 'tag-2'], + }); + await PageObjects.discover.openLoadSavedSearchPanel(); + await selectFilterTags('tag-1', 'tag-2'); + await expectSavedSearches('A Saved Search', 'A Different Saved Search', 'My New Search'); + }); + + it('allows to create a tag from the tag selector', async () => { + await PageObjects.discover.clickSaveSearchButton(); + await testSubjects.setValue('savedObjectTitle', 'search-with-new-tag'); + await testSubjects.click('savedObjectTagSelector'); + await testSubjects.click(`tagSelectorOption-action__create`); + const { tagModal } = PageObjects.tagManagement; + expect(await tagModal.isOpened()).to.be(true); + await tagModal.fillForm( + { + name: 'my-new-tag', + color: '#FFCC33', + description: '', + }, + { + submit: true, + } + ); + expect(await tagModal.isOpened()).to.be(false); + await testSubjects.click('confirmSaveSavedObjectButton'); + await PageObjects.common.waitForSaveModalToClose(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.openLoadSavedSearchPanel(); + await selectFilterTags('my-new-tag'); + await expectSavedSearches('search-with-new-tag'); + }); + }); + + describe('editing', () => { + beforeEach(async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.header.waitUntilLoadingHasFinished(); + }); + + it('allows to select tags for an existing saved search', async () => { + await PageObjects.discover.loadSavedSearch('A Saved Search'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.saveSearch('A Saved Search', undefined, { + tags: ['tag-3'], + }); + await PageObjects.discover.openLoadSavedSearchPanel(); + await selectFilterTags('tag-3'); + await expectSavedSearches( + 'A Different Saved Search', + 'A Third Saved Search', + 'A Saved Search' + ); + }); + }); + }); +} diff --git a/x-pack/test/saved_object_tagging/functional/tests/index.ts b/x-pack/test/saved_object_tagging/functional/tests/index.ts index 2d79d0a7a45ec..909207589e04e 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/index.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/index.ts @@ -25,5 +25,6 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) { loadTestFile(require.resolve('./dashboard_integration')); loadTestFile(require.resolve('./feature_control')); loadTestFile(require.resolve('./maps_integration')); + loadTestFile(require.resolve('./discover_integration')); }); } diff --git a/x-pack/test/security_api_integration/anonymous.config.ts b/x-pack/test/security_api_integration/anonymous.config.ts index 80ac45507de73..3c5d53e8cbb4e 100644 --- a/x-pack/test/security_api_integration/anonymous.config.ts +++ b/x-pack/test/security_api_integration/anonymous.config.ts @@ -6,6 +6,7 @@ */ import { FtrConfigProviderContext } from '@kbn/test'; +import { resolve } from 'path'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { const kibanaAPITestsConfig = await readConfigFile( @@ -13,6 +14,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ); const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); + const auditLogPath = resolve(__dirname, './fixtures/audit/anonymous.log'); + return { testFiles: [require.resolve('./tests/anonymous')], servers: xPackAPITestsConfig.get('servers'), @@ -41,6 +44,14 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { }, basic: { basic1: { order: 1 } }, })}`, + '--xpack.security.audit.enabled=true', + '--xpack.security.audit.appender.type=file', + `--xpack.security.audit.appender.fileName=${auditLogPath}`, + '--xpack.security.audit.appender.layout.type=json', + `--xpack.security.audit.ignore_filters=${JSON.stringify([ + { actions: ['http_request'] }, + { categories: ['database'] }, + ])}`, ], }, }; diff --git a/x-pack/test/security_api_integration/kerberos.config.ts b/x-pack/test/security_api_integration/kerberos.config.ts index 5ac3a8c60ee3a..3e2bbf769103d 100644 --- a/x-pack/test/security_api_integration/kerberos.config.ts +++ b/x-pack/test/security_api_integration/kerberos.config.ts @@ -20,6 +20,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { '../security_functional/fixtures/common/test_endpoints' ); + const auditLogPath = resolve(__dirname, './fixtures/audit/kerberos.log'); + return { testFiles: [require.resolve('./tests/kerberos')], servers: xPackAPITestsConfig.get('servers'), @@ -49,6 +51,14 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ...xPackAPITestsConfig.get('kbnTestServer.serverArgs'), `--plugin-path=${testEndpointsPlugin}`, `--xpack.security.authc.providers=${JSON.stringify(['kerberos', 'basic'])}`, + '--xpack.security.audit.enabled=true', + '--xpack.security.audit.appender.type=file', + `--xpack.security.audit.appender.fileName=${auditLogPath}`, + '--xpack.security.audit.appender.layout.type=json', + `--xpack.security.audit.ignore_filters=${JSON.stringify([ + { actions: ['http_request'] }, + { categories: ['database'] }, + ])}`, ], }, }; diff --git a/x-pack/test/security_api_integration/oidc.config.ts b/x-pack/test/security_api_integration/oidc.config.ts index 6c4982989654a..82d1608543ebf 100644 --- a/x-pack/test/security_api_integration/oidc.config.ts +++ b/x-pack/test/security_api_integration/oidc.config.ts @@ -20,6 +20,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { '../security_functional/fixtures/common/test_endpoints' ); + const auditLogPath = resolve(__dirname, './fixtures/audit/oidc.log'); + return { testFiles: [require.resolve('./tests/oidc/authorization_code_flow')], servers: xPackAPITestsConfig.get('servers'), @@ -58,6 +60,14 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { `--plugin-path=${testEndpointsPlugin}`, `--xpack.security.authProviders=${JSON.stringify(['oidc', 'basic'])}`, '--xpack.security.authc.oidc.realm="oidc1"', + '--xpack.security.audit.enabled=true', + '--xpack.security.audit.appender.type=file', + `--xpack.security.audit.appender.fileName=${auditLogPath}`, + '--xpack.security.audit.appender.layout.type=json', + `--xpack.security.audit.ignore_filters=${JSON.stringify([ + { actions: ['http_request'] }, + { categories: ['database'] }, + ])}`, ], }, }; diff --git a/x-pack/test/security_api_integration/pki.config.ts b/x-pack/test/security_api_integration/pki.config.ts index 46e20f009e4c3..dae79f8c5fa00 100644 --- a/x-pack/test/security_api_integration/pki.config.ts +++ b/x-pack/test/security_api_integration/pki.config.ts @@ -30,6 +30,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { }, }; + const auditLogPath = resolve(__dirname, './fixtures/audit/pki.log'); + return { testFiles: [require.resolve('./tests/pki')], servers, @@ -71,6 +73,14 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { `--elasticsearch.hosts=${servers.elasticsearch.protocol}://${servers.elasticsearch.hostname}:${servers.elasticsearch.port}`, `--elasticsearch.ssl.certificateAuthorities=${CA_CERT_PATH}`, `--xpack.security.authc.providers=${JSON.stringify(['pki', 'basic'])}`, + '--xpack.security.audit.enabled=true', + '--xpack.security.audit.appender.type=file', + `--xpack.security.audit.appender.fileName=${auditLogPath}`, + '--xpack.security.audit.appender.layout.type=json', + `--xpack.security.audit.ignore_filters=${JSON.stringify([ + { actions: ['http_request'] }, + { categories: ['database'] }, + ])}`, ], }, }; diff --git a/x-pack/test/security_api_integration/saml.config.ts b/x-pack/test/security_api_integration/saml.config.ts index e3597813d17d6..9f696912958f4 100644 --- a/x-pack/test/security_api_integration/saml.config.ts +++ b/x-pack/test/security_api_integration/saml.config.ts @@ -20,6 +20,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { '../security_functional/fixtures/common/test_endpoints' ); + const auditLogPath = resolve(__dirname, './fixtures/audit/saml.log'); + return { testFiles: [require.resolve('./tests/saml')], servers: xPackAPITestsConfig.get('servers'), @@ -53,6 +55,14 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { `--xpack.security.authc.providers=${JSON.stringify(['saml', 'basic'])}`, '--xpack.security.authc.saml.realm=saml1', '--xpack.security.authc.saml.maxRedirectURLSize=100b', + '--xpack.security.audit.enabled=true', + '--xpack.security.audit.appender.type=file', + `--xpack.security.audit.appender.fileName=${auditLogPath}`, + '--xpack.security.audit.appender.layout.type=json', + `--xpack.security.audit.ignore_filters=${JSON.stringify([ + { actions: ['http_request'] }, + { categories: ['database'] }, + ])}`, ], }, }; diff --git a/x-pack/test/security_api_integration/tests/anonymous/login.ts b/x-pack/test/security_api_integration/tests/anonymous/login.ts index bdb504014f92a..8e6b22c2b79b3 100644 --- a/x-pack/test/security_api_integration/tests/anonymous/login.ts +++ b/x-pack/test/security_api_integration/tests/anonymous/login.ts @@ -8,12 +8,15 @@ import expect from '@kbn/expect'; import { parse as parseCookie, Cookie } from 'tough-cookie'; import { adminTestUser } from '@kbn/test'; +import { resolve } from 'path'; import { FtrProviderContext } from '../../ftr_provider_context'; +import { FileWrapper } from '../audit/file_wrapper'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertestWithoutAuth'); const config = getService('config'); const security = getService('security'); + const retry = getService('retry'); function checkCookieIsSet(cookie: Cookie) { expect(cookie.value).to.not.be.empty(); @@ -214,5 +217,54 @@ export default function ({ getService }: FtrProviderContext) { expect(logoutResponse.headers.location).to.be('/security/logged_out?msg=LOGGED_OUT'); }); }); + + describe('Audit Log', function () { + const logFilePath = resolve(__dirname, '../../fixtures/audit/anonymous.log'); + const logFile = new FileWrapper(logFilePath, retry); + + beforeEach(async () => { + await logFile.reset(); + }); + + it('should log a single `user_login` and `user_logout` event per session', async () => { + // Accessing Kibana without an existing session should create a `user_login` event. + const response = await supertest.get('/security/account').expect(200); + + const cookies = response.headers['set-cookie']; + expect(cookies).to.have.length(1); + const sessionCookie = parseCookie(cookies[0])!; + + // Accessing Kibana again using the same session should not create another `user_login` event. + await supertest + .get('/security/account') + .set('Cookie', sessionCookie.cookieString()) + .expect(200); + + // Clearing the session should create a `user_logout` event. + await supertest + .get('/api/security/logout') + .set('Cookie', sessionCookie.cookieString()) + .expect(302); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(2); + + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('success'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].user.name).to.be('anonymous_user'); + expect(auditEvents[0].kibana.authentication_provider).to.be('anonymous1'); + + expect(auditEvents[1]).to.be.ok(); + expect(auditEvents[1].event.action).to.be('user_logout'); + expect(auditEvents[1].event.outcome).to.be('unknown'); + expect(auditEvents[1].trace.id).to.be.ok(); + expect(auditEvents[1].user.name).to.be('anonymous_user'); + expect(auditEvents[1].kibana.authentication_provider).to.be('anonymous1'); + }); + }); }); } diff --git a/x-pack/test/security_api_integration/tests/audit/audit_log.ts b/x-pack/test/security_api_integration/tests/audit/audit_log.ts index 65ceaa46dd44a..553efa63431f1 100644 --- a/x-pack/test/security_api_integration/tests/audit/audit_log.ts +++ b/x-pack/test/security_api_integration/tests/audit/audit_log.ts @@ -6,41 +6,9 @@ */ import Path from 'path'; -import Fs from 'fs'; import expect from '@kbn/expect'; -import { RetryService } from '../../../../../test/common/services/retry'; import { FtrProviderContext } from '../../ftr_provider_context'; - -class FileWrapper { - constructor(private readonly path: string, private readonly retry: RetryService) {} - async reset() { - // "touch" each file to ensure it exists and is empty before each test - await Fs.promises.writeFile(this.path, ''); - } - async read() { - const content = await Fs.promises.readFile(this.path, { encoding: 'utf8' }); - return content.trim().split('\n'); - } - async readJSON() { - return this.retry.try(async () => { - const content = await this.read(); - try { - return content.map((l) => JSON.parse(l)); - } catch (err) { - const contentString = content.join('\n'); - throw new Error( - `Failed to parse audit log JSON, error: "${err.message}", audit.log contents:\n${contentString}` - ); - } - }); - } - // writing in a file is an async operation. we use this method to make sure logs have been written. - async isNotEmpty() { - const content = await this.read(); - const line = content[0]; - return line.length > 0; - } -} +import { FileWrapper } from './file_wrapper'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); diff --git a/x-pack/test/security_api_integration/tests/audit/file_wrapper.ts b/x-pack/test/security_api_integration/tests/audit/file_wrapper.ts new file mode 100644 index 0000000000000..bb7e707eefd8b --- /dev/null +++ b/x-pack/test/security_api_integration/tests/audit/file_wrapper.ts @@ -0,0 +1,40 @@ +/* + * 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 Fs from 'fs'; +import { RetryService } from '../../../../../test/common/services/retry'; + +export class FileWrapper { + constructor(private readonly path: string, private readonly retry: RetryService) {} + async reset() { + // "touch" each file to ensure it exists and is empty before each test + await Fs.promises.writeFile(this.path, ''); + } + async read() { + const content = await Fs.promises.readFile(this.path, { encoding: 'utf8' }); + return content.trim().split('\n'); + } + async readJSON() { + return this.retry.try(async () => { + const content = await this.read(); + try { + return content.map((l) => JSON.parse(l)); + } catch (err) { + const contentString = content.join('\n'); + throw new Error( + `Failed to parse audit log JSON, error: "${err.message}", audit.log contents:\n${contentString}` + ); + } + }); + } + // writing in a file is an async operation. we use this method to make sure logs have been written. + async isNotEmpty() { + const content = await this.read(); + const line = content[0]; + return line.length > 0; + } +} diff --git a/x-pack/test/security_api_integration/tests/kerberos/kerberos_login.ts b/x-pack/test/security_api_integration/tests/kerberos/kerberos_login.ts index 091dfb1fb5ccc..f92f9d5a58b5b 100644 --- a/x-pack/test/security_api_integration/tests/kerberos/kerberos_login.ts +++ b/x-pack/test/security_api_integration/tests/kerberos/kerberos_login.ts @@ -9,17 +9,20 @@ import expect from '@kbn/expect'; import { parse as parseCookie, Cookie } from 'tough-cookie'; import { setTimeout as setTimeoutAsync } from 'timers/promises'; import { adminTestUser } from '@kbn/test'; +import { resolve } from 'path'; import { FtrProviderContext } from '../../ftr_provider_context'; import { getMutualAuthenticationResponseToken, getSPNEGOToken, } from '../../fixtures/kerberos/kerberos_tools'; +import { FileWrapper } from '../audit/file_wrapper'; export default function ({ getService }: FtrProviderContext) { const spnegoToken = getSPNEGOToken(); const supertest = getService('supertestWithoutAuth'); const config = getService('config'); + const retry = getService('retry'); function checkCookieIsSet(cookie: Cookie) { expect(cookie.value).to.not.be.empty(); @@ -477,5 +480,74 @@ export default function ({ getService }: FtrProviderContext) { expect(nonAjaxResponse.headers['www-authenticate']).to.be('Negotiate'); }); }); + + describe('Audit Log', function () { + const logFilePath = resolve(__dirname, '../../fixtures/audit/kerberos.log'); + const logFile = new FileWrapper(logFilePath, retry); + + beforeEach(async () => { + await logFile.reset(); + }); + + it('should log a single `user_login` and `user_logout` event per session', async () => { + // Accessing Kibana without an existing session should create a `user_login` event. + const response = await supertest + .get('/security/account') + .set('Authorization', `Negotiate ${spnegoToken}`) + .expect(200); + + const cookies = response.headers['set-cookie']; + expect(cookies).to.have.length(1); + const sessionCookie = parseCookie(cookies[0])!; + + // Accessing Kibana again using the same session should not create another `user_login` event. + await supertest + .get('/security/account') + .set('Cookie', sessionCookie.cookieString()) + .expect(200); + + // Clearing the session should create a `user_logout` event. + await supertest + .get('/api/security/logout') + .set('Cookie', sessionCookie.cookieString()) + .expect(302); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(2); + + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('success'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].user.name).to.be('tester@TEST.ELASTIC.CO'); + expect(auditEvents[0].kibana.authentication_provider).to.be('kerberos'); + + expect(auditEvents[1]).to.be.ok(); + expect(auditEvents[1].event.action).to.be('user_logout'); + expect(auditEvents[1].event.outcome).to.be('unknown'); + expect(auditEvents[1].trace.id).to.be.ok(); + expect(auditEvents[1].user.name).to.be('tester@TEST.ELASTIC.CO'); + expect(auditEvents[1].kibana.authentication_provider).to.be('kerberos'); + }); + + it('should log authentication failure correctly', async () => { + await supertest + .get('/security/account') + .set('Authorization', `Negotiate ${Buffer.from('Hello').toString('base64')}`) + .expect(401); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(1); + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('failure'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].kibana.authentication_provider).to.be('kerberos'); + }); + }); }); } diff --git a/x-pack/test/security_api_integration/tests/oidc/authorization_code_flow/oidc_auth.ts b/x-pack/test/security_api_integration/tests/oidc/authorization_code_flow/oidc_auth.ts index a5fad51792d30..9ea2e9b635522 100644 --- a/x-pack/test/security_api_integration/tests/oidc/authorization_code_flow/oidc_auth.ts +++ b/x-pack/test/security_api_integration/tests/oidc/authorization_code_flow/oidc_auth.ts @@ -10,11 +10,14 @@ import { parse as parseCookie, Cookie } from 'tough-cookie'; import url from 'url'; import { setTimeout as setTimeoutAsync } from 'timers/promises'; import { adminTestUser } from '@kbn/test'; +import { resolve } from 'path'; import { getStateAndNonce } from '../../../fixtures/oidc/oidc_tools'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FileWrapper } from '../../audit/file_wrapper'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertestWithoutAuth'); + const retry = getService('retry'); describe('OpenID Connect authentication', () => { it('should reject API requests if client is not authenticated', async () => { @@ -659,5 +662,90 @@ export default function ({ getService }: FtrProviderContext) { expect(redirectURL.query.nonce).to.not.be.empty(); }); }); + + describe('Audit Log', function () { + const logFilePath = resolve(__dirname, '../../../fixtures/audit/oidc.log'); + const logFile = new FileWrapper(logFilePath, retry); + + beforeEach(async () => { + await logFile.reset(); + }); + + it('should log a single `user_login` and `user_logout` event per session', async () => { + // Initiating handshake + const handshakeResponse = await supertest + .get( + '/abc/xyz/handshake?one=two three&auth_provider_hint=saml&auth_url_hash=%23%2Fworkpad' + ) + .expect(302); + + const handshakeCookie = parseCookie(handshakeResponse.headers['set-cookie'][0])!; + const stateAndNonce = getStateAndNonce(handshakeResponse.headers.location); + + // Set the nonce in our mock OIDC Provider so that it can generate the ID Tokens + await supertest + .post('/api/oidc_provider/setup') + .set('kbn-xsrf', 'xxx') + .send({ nonce: stateAndNonce.nonce }) + .expect(200); + + // Signing in should create a `user_login` event. + const oidcAuthenticationResponse = await supertest + .get(`/api/security/oidc/callback?code=code1&state=${stateAndNonce.state}`) + .set('Cookie', handshakeCookie.cookieString()) + .expect(302); + + const cookies = oidcAuthenticationResponse.headers['set-cookie']; + expect(cookies).to.have.length(1); + const sessionCookie = parseCookie(cookies[0])!; + + // Accessing Kibana again using the same session should not create another `user_login` event. + await supertest + .get('/security/account') + .set('Cookie', sessionCookie.cookieString()) + .expect(200); + + // Clearing the session should create a `user_logout` event. + await supertest + .get('/api/security/logout') + .set('Cookie', sessionCookie.cookieString()) + .expect(302); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(2); + + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('success'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].user.name).to.be('user1'); + expect(auditEvents[0].kibana.authentication_provider).to.be('oidc'); + + expect(auditEvents[1]).to.be.ok(); + expect(auditEvents[1].event.action).to.be('user_logout'); + expect(auditEvents[1].event.outcome).to.be('unknown'); + expect(auditEvents[1].trace.id).to.be.ok(); + expect(auditEvents[1].user.name).to.be('user1'); + expect(auditEvents[1].kibana.authentication_provider).to.be('oidc'); + }); + + it('should log authentication failure correctly', async () => { + await supertest + .get(`/api/security/oidc/callback?code=thisisthecode&state=someothervalue`) + .expect(401); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(1); + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('failure'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].kibana.authentication_provider).to.be('oidc'); + }); + }); }); } diff --git a/x-pack/test/security_api_integration/tests/pki/pki_auth.ts b/x-pack/test/security_api_integration/tests/pki/pki_auth.ts index ae9f3d893534b..6b8178ac938df 100644 --- a/x-pack/test/security_api_integration/tests/pki/pki_auth.ts +++ b/x-pack/test/security_api_integration/tests/pki/pki_auth.ts @@ -13,6 +13,7 @@ import { resolve } from 'path'; import { CA_CERT_PATH } from '@kbn/dev-utils'; import { adminTestUser } from '@kbn/test'; import { FtrProviderContext } from '../../ftr_provider_context'; +import { FileWrapper } from '../audit/file_wrapper'; const CA_CERT = readFileSync(CA_CERT_PATH); const FIRST_CLIENT_CERT = readFileSync(resolve(__dirname, '../../fixtures/pki/first_client.p12')); @@ -23,6 +24,7 @@ const UNTRUSTED_CLIENT_CERT = readFileSync( export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertestWithoutAuth'); + const retry = getService('retry'); function checkCookieIsSet(cookie: Cookie) { expect(cookie.value).to.not.be.empty(); @@ -453,5 +455,78 @@ export default function ({ getService }: FtrProviderContext) { } }); }); + + describe('Audit Log', function () { + const logFilePath = resolve(__dirname, '../../fixtures/audit/pki.log'); + const logFile = new FileWrapper(logFilePath, retry); + + beforeEach(async () => { + await logFile.reset(); + }); + + it('should log a single `user_login` and `user_logout` event per session', async () => { + this.timeout(60000); + + // Accessing Kibana without an existing session should create a `user_login` event. + const response = await supertest + .get('/security/account') + .ca(CA_CERT) + .pfx(FIRST_CLIENT_CERT) + .expect(200); + + const cookies = response.headers['set-cookie']; + expect(cookies).to.have.length(1); + const sessionCookie = parseCookie(cookies[0])!; + + // Accessing Kibana again using the same session should not create another `user_login` event. + await supertest + .get('/security/account') + .ca(CA_CERT) + .pfx(FIRST_CLIENT_CERT) + .set('Cookie', sessionCookie.cookieString()) + .expect(200); + + // Clearing the session should create a `user_logout` event. + await supertest + .get('/api/security/logout') + .ca(CA_CERT) + .pfx(FIRST_CLIENT_CERT) + .set('Cookie', sessionCookie.cookieString()) + .expect(302); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(2); + + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('success'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].user.name).to.be('first_client'); + expect(auditEvents[0].kibana.authentication_provider).to.be('pki'); + + expect(auditEvents[1]).to.be.ok(); + expect(auditEvents[1].event.action).to.be('user_logout'); + expect(auditEvents[1].event.outcome).to.be('unknown'); + expect(auditEvents[1].trace.id).to.be.ok(); + expect(auditEvents[1].user.name).to.be('first_client'); + expect(auditEvents[1].kibana.authentication_provider).to.be('pki'); + }); + + it('should log authentication failure correctly', async () => { + await supertest.get('/security/account').ca(CA_CERT).pfx(UNTRUSTED_CLIENT_CERT).expect(401); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(1); + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('failure'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].kibana.authentication_provider).to.be('pki'); + }); + }); }); } diff --git a/x-pack/test/security_api_integration/tests/saml/saml_login.ts b/x-pack/test/security_api_integration/tests/saml/saml_login.ts index 998e906a47415..474525eab4979 100644 --- a/x-pack/test/security_api_integration/tests/saml/saml_login.ts +++ b/x-pack/test/security_api_integration/tests/saml/saml_login.ts @@ -7,6 +7,7 @@ import { stringify } from 'query-string'; import url from 'url'; +import { resolve } from 'path'; import { setTimeout as setTimeoutAsync } from 'timers/promises'; import expect from '@kbn/expect'; import { parse as parseCookie, Cookie } from 'tough-cookie'; @@ -17,11 +18,13 @@ import { getSAMLResponse, } from '../../fixtures/saml/saml_tools'; import { FtrProviderContext } from '../../ftr_provider_context'; +import { FileWrapper } from '../audit/file_wrapper'; export default function ({ getService }: FtrProviderContext) { const randomness = getService('randomness'); const supertest = getService('supertestWithoutAuth'); const config = getService('config'); + const retry = getService('retry'); const kibanaServerConfig = config.get('servers.kibana'); @@ -791,5 +794,97 @@ export default function ({ getService }: FtrProviderContext) { }); } }); + + describe('Audit Log', function () { + const logFilePath = resolve(__dirname, '../../fixtures/audit/saml.log'); + const logFile = new FileWrapper(logFilePath, retry); + + beforeEach(async () => { + await logFile.reset(); + }); + + it('should log a single `user_login` and `user_logout` event per session', async () => { + // Initiating handshake + const handshakeResponse = await supertest + .get( + '/abc/xyz/handshake?one=two three&auth_provider_hint=saml&auth_url_hash=%23%2Fworkpad' + ) + .expect(302); + + const handshakeCookie = parseCookie(handshakeResponse.headers['set-cookie'][0])!; + const samlRequestId = await getSAMLRequestId(handshakeResponse.headers.location); + + // Signing in should create a `user_login` event. + const samlAuthenticationResponse = await supertest + .post('/api/security/saml/callback') + .set('Cookie', handshakeCookie.cookieString()) + .send({ SAMLResponse: await createSAMLResponse({ inResponseTo: samlRequestId }) }) + .expect(302); + + const cookies = samlAuthenticationResponse.headers['set-cookie']; + expect(cookies).to.have.length(1); + const sessionCookie = parseCookie(cookies[0])!; + + // Accessing Kibana again using the same session should not create another `user_login` event. + await supertest + .get('/security/account') + .set('Cookie', sessionCookie.cookieString()) + .expect(200); + + // Clearing the session should create a `user_logout` event. + await supertest + .get('/api/security/logout') + .set('Cookie', sessionCookie.cookieString()) + .expect(302); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(2); + + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('success'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].user.name).to.be('a@b.c'); + expect(auditEvents[0].kibana.authentication_provider).to.be('saml'); + + expect(auditEvents[1]).to.be.ok(); + expect(auditEvents[1].event.action).to.be('user_logout'); + expect(auditEvents[1].event.outcome).to.be('unknown'); + expect(auditEvents[1].trace.id).to.be.ok(); + expect(auditEvents[1].user.name).to.be('a@b.c'); + expect(auditEvents[1].kibana.authentication_provider).to.be('saml'); + }); + + it('should log authentication failure correctly', async () => { + // Initiating handshake + const handshakeResponse = await supertest + .get( + '/abc/xyz/handshake?one=two three&auth_provider_hint=saml&auth_url_hash=%23%2Fworkpad' + ) + .expect(302); + + const handshakeCookie = parseCookie(handshakeResponse.headers['set-cookie'][0])!; + + await supertest + .post('/api/security/saml/callback') + .set('Cookie', handshakeCookie.cookieString()) + .send({ + SAMLResponse: await createSAMLResponse({ inResponseTo: 'some-invalid-request-id' }), + }) + .expect(401); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(1); + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('failure'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].kibana.authentication_provider).to.be('saml'); + }); + }); }); } diff --git a/x-pack/test/security_api_integration/tests/token/audit.ts b/x-pack/test/security_api_integration/tests/token/audit.ts new file mode 100644 index 0000000000000..7c9a783144ebe --- /dev/null +++ b/x-pack/test/security_api_integration/tests/token/audit.ts @@ -0,0 +1,99 @@ +/* + * 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 { parse as parseCookie } from 'tough-cookie'; +import { resolve } from 'path'; +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +import { FileWrapper } from '../audit/file_wrapper'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertestWithoutAuth'); + const retry = getService('retry'); + + describe('Audit Log', function () { + const logFilePath = resolve(__dirname, '../../fixtures/audit/token.log'); + const logFile = new FileWrapper(logFilePath, retry); + + beforeEach(async () => { + await logFile.reset(); + }); + + it('should log a single `user_login` and `user_logout` event per session', async () => { + // Signing in should create a `user_login` event. + const response = await supertest + .post('/internal/security/login') + .set('kbn-xsrf', 'true') + .send({ + providerType: 'token', + providerName: 'token', + currentURL: '/', + params: { username: 'elastic', password: 'changeme' }, + }) + .expect(200); + + const cookies = response.headers['set-cookie']; + expect(cookies).to.have.length(1); + const sessionCookie = parseCookie(cookies[0])!; + + // Accessing Kibana again using the same session should not create another `user_login` event. + await supertest + .get('/security/account') + .set('Cookie', sessionCookie.cookieString()) + .expect(200); + + // Clearing the session should create a `user_logout` event. + await supertest + .get('/api/security/logout') + .set('Cookie', sessionCookie.cookieString()) + .expect(302); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(2); + + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('success'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].user.name).to.be('elastic'); + expect(auditEvents[0].kibana.authentication_provider).to.be('token'); + + expect(auditEvents[1]).to.be.ok(); + expect(auditEvents[1].event.action).to.be('user_logout'); + expect(auditEvents[1].event.outcome).to.be('unknown'); + expect(auditEvents[1].trace.id).to.be.ok(); + expect(auditEvents[1].user.name).to.be('elastic'); + expect(auditEvents[1].kibana.authentication_provider).to.be('token'); + }); + + it('should log authentication failure correctly', async () => { + await supertest + .post('/internal/security/login') + .set('kbn-xsrf', 'true') + .send({ + providerType: 'token', + providerName: 'token', + currentURL: '/', + params: { username: 'elastic', password: 'notvalidpassword' }, + }) + .expect(401); + + await retry.waitFor('audit events in dest file', () => logFile.isNotEmpty()); + const auditEvents = await logFile.readJSON(); + + expect(auditEvents).to.have.length(1); + expect(auditEvents[0]).to.be.ok(); + expect(auditEvents[0].event.action).to.be('user_login'); + expect(auditEvents[0].event.outcome).to.be('failure'); + expect(auditEvents[0].trace.id).to.be.ok(); + expect(auditEvents[0].kibana.authentication_provider).to.be('token'); + }); + }); +} diff --git a/x-pack/test/security_api_integration/tests/token/index.ts b/x-pack/test/security_api_integration/tests/token/index.ts index 54717dc1c8617..e38f5148d644d 100644 --- a/x-pack/test/security_api_integration/tests/token/index.ts +++ b/x-pack/test/security_api_integration/tests/token/index.ts @@ -13,5 +13,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./logout')); loadTestFile(require.resolve('./header')); loadTestFile(require.resolve('./session')); + loadTestFile(require.resolve('./audit')); }); } diff --git a/x-pack/test/security_api_integration/token.config.ts b/x-pack/test/security_api_integration/token.config.ts index d0ba54de7fc54..d2e208d8f56d9 100644 --- a/x-pack/test/security_api_integration/token.config.ts +++ b/x-pack/test/security_api_integration/token.config.ts @@ -17,6 +17,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { '../security_functional/fixtures/common/test_endpoints' ); + const auditLogPath = resolve(__dirname, './fixtures/audit/token.log'); + return { testFiles: [require.resolve('./tests/token')], servers: xPackAPITestsConfig.get('servers'), @@ -41,6 +43,14 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ...xPackAPITestsConfig.get('kbnTestServer.serverArgs'), `--plugin-path=${testEndpointsPlugin}`, '--xpack.security.authc.providers=["token"]', + '--xpack.security.audit.enabled=true', + '--xpack.security.audit.appender.type=file', + `--xpack.security.audit.appender.fileName=${auditLogPath}`, + '--xpack.security.audit.appender.layout.type=json', + `--xpack.security.audit.ignore_filters=${JSON.stringify([ + { actions: ['http_request'] }, + { categories: ['database'] }, + ])}`, ], }, }; diff --git a/x-pack/test/security_solution_cypress/runner.ts b/x-pack/test/security_solution_cypress/runner.ts index 0074adb4a19d1..79e202046a4e0 100644 --- a/x-pack/test/security_solution_cypress/runner.ts +++ b/x-pack/test/security_solution_cypress/runner.ts @@ -7,7 +7,7 @@ import { chunk } from 'lodash'; import { resolve } from 'path'; -import glob from 'glob'; +import globby from 'globby'; import Url from 'url'; @@ -21,7 +21,7 @@ const retrieveIntegrations = (chunksTotal: number, chunkIndex: number) => { __dirname, '../../plugins/security_solution/cypress/integration/**/*.spec.ts' ); - const integrationsPaths = glob.sync(pattern); + const integrationsPaths = globby.sync(pattern); const chunkSize = Math.ceil(integrationsPaths.length / chunksTotal); return chunk(integrationsPaths, chunkSize)[chunkIndex - 1]; diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/responder.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/responder.ts index c6e7dbc583dda..95850ceb0a54d 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/responder.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/responder.ts @@ -136,6 +136,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { timeline.data.persistTimeline.timeline.version ); + // start/stop the endpoint rule. This should cause the rule to run immediately + // and avoid us having to wait for the interval (of 5 minutes) + await detectionsTestService.stopStartEndpointRule(); + await detectionsTestService.waitForAlerts( getEndpointAlertsQueryForAgentId(endpointAgentId), // The Alerts rules seems to run every 5 minutes, so we wait here a max diff --git a/x-pack/test/security_solution_endpoint/page_objects/endpoint_responder.ts b/x-pack/test/security_solution_endpoint/page_objects/endpoint_responder.ts index 813d587776d89..56a47631a4912 100644 --- a/x-pack/test/security_solution_endpoint/page_objects/endpoint_responder.ts +++ b/x-pack/test/security_solution_endpoint/page_objects/endpoint_responder.ts @@ -5,6 +5,7 @@ * 2.0. */ +import testSubjSelector from '@kbn/test-subj-selector'; import { FtrProviderContext } from '../ftr_provider_context'; const TEST_SUBJ = Object.freeze({ @@ -21,13 +22,13 @@ export function EndpointResponderPageObjects({ getService }: FtrProviderContext) const closeResponder = async () => { await ensureOnResponder(); - (await testSubjects.find('consolePageOverlay-header-back-link')).click(); + await testSubjects.click('consolePageOverlay-header-back-link'); await testSubjects.missingOrFail(TEST_SUBJ.responderPage); }; const openActionLogFlyout = async () => { await ensureOnResponder(); - await (await testSubjects.find('responderShowActionLogButton')).click(); + await testSubjects.click('responderShowActionLogButton'); await testSubjects.existOrFail(TEST_SUBJ.actionLogFlyout); }; @@ -35,20 +36,20 @@ export function EndpointResponderPageObjects({ getService }: FtrProviderContext) await ensureOnResponder(); if (await testSubjects.exists(TEST_SUBJ.actionLogFlyout)) { - const flyout = await testSubjects.find(TEST_SUBJ.actionLogFlyout); + await testSubjects.findService.clickByCssSelector( + `${testSubjSelector(TEST_SUBJ.actionLogFlyout)} ${testSubjSelector('euiFlyoutCloseButton')}` + ); - await (await testSubjects.findDescendant('euiFlyoutCloseButton', flyout)).click(); await testSubjects.missingOrFail(TEST_SUBJ.actionLogFlyout); } }; const clickActionLogSuperDatePickerQuickMenuButton = async (): Promise => { - const actionLogFlyout = await testSubjects.find(TEST_SUBJ.actionLogFlyout); - - await ( - await testSubjects.findDescendant('superDatePickerToggleQuickMenuButton', actionLogFlyout) - ).click(); - + await testSubjects.findService.clickByCssSelector( + `${testSubjSelector(TEST_SUBJ.actionLogFlyout)} ${testSubjSelector( + 'superDatePickerToggleQuickMenuButton' + )}` + ); await testSubjects.existOrFail('superDatePickerQuickMenu'); }; diff --git a/x-pack/test/security_solution_ftr/page_objects/timeline/index.ts b/x-pack/test/security_solution_ftr/page_objects/timeline/index.ts index b2efe5a4da3d3..e418f03143134 100644 --- a/x-pack/test/security_solution_ftr/page_objects/timeline/index.ts +++ b/x-pack/test/security_solution_ftr/page_objects/timeline/index.ts @@ -5,13 +5,26 @@ * 2.0. */ +import testSubjSelector from '@kbn/test-subj-selector'; import { FtrService } from '../../../functional/ftr_provider_context'; -import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper'; import { DATE_RANGE_OPTION_TO_TEST_SUBJ_MAP } from '../helpers/super_date_picker'; const TIMELINE_BOTTOM_BAR_CONTAINER_TEST_SUBJ = 'timeline-bottom-bar-container'; const TIMELINE_CLOSE_BUTTON_TEST_SUBJ = 'close-timeline'; const TIMELINE_MODAL_PAGE_TEST_SUBJ = 'timeline'; +const TIMELINE_TAB_QUERY_TEST_SUBJ = 'timeline-tab-content-query'; + +const TIMELINE_CSS_SELECTOR = Object.freeze({ + /** The Plus icon to add a new timeline located in the bottom timeline sticky bar */ + buttonBarAddButton: `${testSubjSelector( + TIMELINE_BOTTOM_BAR_CONTAINER_TEST_SUBJ + )} ${testSubjSelector('settings-plus-in-circle')}`, + + /** The refresh button on the timeline view (top of view, next to the date selector) */ + refreshButton: `${testSubjSelector(TIMELINE_TAB_QUERY_TEST_SUBJ)} ${testSubjSelector( + 'superDatePickerApplyTimeButton' + )} `, +}); export class TimelinePageObject extends FtrService { private readonly pageObjects = this.ctx.getPageObjects(['common', 'header']); @@ -31,27 +44,21 @@ export class TimelinePageObject extends FtrService { await this.testSubjects.existOrFail(TIMELINE_BOTTOM_BAR_CONTAINER_TEST_SUBJ); } - async findTimelineBottomBarAddButton(): Promise { - await this.ensureTimelineAccessible(); - return this.testSubjects.findDescendant( - 'settings-plus-in-circle', - await this.testSubjects.find(TIMELINE_BOTTOM_BAR_CONTAINER_TEST_SUBJ) - ); - } - async showOpenTimelinePopupFromBottomBar(): Promise { await this.ensureTimelineAccessible(); - await (await this.findTimelineBottomBarAddButton()).click(); + await this.testSubjects.findService.clickByCssSelector( + TIMELINE_CSS_SELECTOR.buttonBarAddButton + ); await this.testSubjects.existOrFail('timeline-addPopupPanel'); } async openTimelineById(id: string): Promise { await this.showOpenTimelinePopupFromBottomBar(); await this.testSubjects.click('open-timeline-button'); + await this.testSubjects.findService.clickByCssSelector( + `${testSubjSelector('open-timeline-modal')} ${testSubjSelector(`title-${id}`)}` + ); - const timelineSelectModel = await this.testSubjects.find('open-timeline-modal'); - - await (await this.testSubjects.findDescendant(`title-${id}`, timelineSelectModel)).click(); await this.ensureTimelineIsOpen(); } @@ -72,14 +79,9 @@ export class TimelinePageObject extends FtrService { */ async showEventDetails(index: number = 0): Promise { await this.ensureTimelineIsOpen(); - - const event = (await this.testSubjects.findAll('event'))[index]; - - if (!event) { - throw new Error(`Timeline event at index [${index}] not found`); - } - - await (await this.testSubjects.findDescendant('expand-event', event)).click(); + await this.testSubjects.findService.clickByCssSelector( + `${testSubjSelector('event')}:nth-child(${index + 1}) ${testSubjSelector('expand-event')}` + ); await this.testSubjects.existOrFail('eventDetails'); } @@ -88,20 +90,15 @@ export class TimelinePageObject extends FtrService { */ async clickRefresh(): Promise { await this.ensureTimelineIsOpen(); - - // There are multiple buttons on the page with the same test subject as the Refresh button. - // We specifically want the one that is always visible at the top of timeline page. - const timelineContentQueryArea = await this.testSubjects.find('timeline-tab-content-query'); - const refreshButton = await this.testSubjects.findDescendant( - 'superDatePickerApplyTimeButton', - timelineContentQueryArea - ); - await refreshButton.click(); + await this.testSubjects.findService.clickByCssSelector(TIMELINE_CSS_SELECTOR.refreshButton); await this.retry.waitFor( 'Timeline refresh button to be enabled', async (): Promise => { - return refreshButton.isEnabled(); + const refreshButton = await this.testSubjects.findService.byCssSelector( + TIMELINE_CSS_SELECTOR.refreshButton + ); + return (await refreshButton.isDisplayed()) && (await refreshButton.isEnabled()); } ); } @@ -111,15 +108,17 @@ export class TimelinePageObject extends FtrService { * @param timeoutMs */ async waitForEvents(timeoutMs?: number): Promise { - const timeline = await this.testSubjects.find(TIMELINE_MODAL_PAGE_TEST_SUBJ); - await this.retry.waitForWithTimeout( 'waiting for events to show up on timeline', timeoutMs ?? this.defaultTimeoutMs, async (): Promise => { await this.clickRefresh(); - return Boolean((await this.testSubjects.findAllDescendant('event', timeline)).length); + const allEventRows = await this.testSubjects.findService.allByCssSelector( + `${testSubjSelector(TIMELINE_MODAL_PAGE_TEST_SUBJ)} ${testSubjSelector('event')}` + ); + + return Boolean(allEventRows.length); } ); } @@ -130,16 +129,11 @@ export class TimelinePageObject extends FtrService { */ async setDateRange(range: keyof typeof DATE_RANGE_OPTION_TO_TEST_SUBJ_MAP): Promise { await this.ensureTimelineIsOpen(); - - const timelineContentQueryArea = await this.testSubjects.find('timeline-tab-content-query'); - - await ( - await this.testSubjects.findDescendant( - 'superDatePickerToggleQuickMenuButton', - timelineContentQueryArea - ) - ).click(); - + await this.testSubjects.findService.clickByCssSelector( + `${testSubjSelector(TIMELINE_TAB_QUERY_TEST_SUBJ)} ${testSubjSelector( + 'superDatePickerToggleQuickMenuButton' + )}` + ); await this.testSubjects.existOrFail('superDatePickerQuickMenu'); await this.testSubjects.click(DATE_RANGE_OPTION_TO_TEST_SUBJ_MAP[range]); await this.testSubjects.missingOrFail('superDatePickerQuickMenu'); diff --git a/x-pack/test/security_solution_ftr/services/detections/index.ts b/x-pack/test/security_solution_ftr/services/detections/index.ts index 7232b41637a22..1d3e18f1ab43d 100644 --- a/x-pack/test/security_solution_ftr/services/detections/index.ts +++ b/x-pack/test/security_solution_ftr/services/detections/index.ts @@ -7,8 +7,14 @@ import { Response } from 'superagent'; import { EndpointError } from '@kbn/security-solution-plugin/common/endpoint/errors'; -import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '@kbn/security-solution-plugin/common/constants'; +import { + DETECTION_ENGINE_QUERY_SIGNALS_URL, + DETECTION_ENGINE_RULES_BULK_ACTION, + DETECTION_ENGINE_RULES_URL, +} from '@kbn/security-solution-plugin/common/constants'; import { estypes } from '@elastic/elasticsearch'; +import endpointPrePackagedRule from '@kbn/security-solution-plugin/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security.json'; +import { Rule } from '@kbn/security-solution-plugin/public/detections/containers/detection_engine/rules'; import { FtrService } from '../../../functional/ftr_provider_context'; export class DetectionsTestService extends FtrService { @@ -45,6 +51,53 @@ export class DetectionsTestService extends FtrService { }; } + /** + * Fetches the endpoint security rule using the pre-packaged `rule_id` + */ + async fetchEndpointSecurityRule(): Promise { + return this.supertest + .get(DETECTION_ENGINE_RULES_URL) + .set('kbn-xsrf', 'true') + .query({ rule_id: endpointPrePackagedRule.rule_id }) + .send() + .then(this.getHttpResponseFailureHandler()) + .then((response) => response.body as Rule); + } + + /** + * Disables and then re-enables the Endpoint Security Rule. Use this to speed up triggering + * the rule to run, since it is immediately ran when it is enabled. + */ + async stopStartEndpointRule(): Promise { + const endpointSecurityRule = await this.fetchEndpointSecurityRule(); + + // First disable/stop it + this.log.info(`Disabling Endpoint Security Rule (id: ${endpointSecurityRule.id})`); + + await this.supertest + .post(DETECTION_ENGINE_RULES_BULK_ACTION) + .set('kbn-xsrf', 'true') + .send({ + action: 'disable', + ids: [endpointSecurityRule.id], + }) + .then(this.getHttpResponseFailureHandler()) + .then((response) => response.body as Rule); + + // Now enable/start it + this.log.info(`Re-Enabling Endpoint Security Rule (id: ${endpointSecurityRule.id})`); + + await this.supertest + .post(DETECTION_ENGINE_RULES_BULK_ACTION) + .set('kbn-xsrf', 'true') + .send({ + action: 'enable', + ids: [endpointSecurityRule.id], + }) + .then(this.getHttpResponseFailureHandler()) + .then((response) => response.body as Rule); + } + /** * Waits for alerts to have been loaded into `.alerts-security.alerts-default` index * @param query diff --git a/x-pack/test/threat_intelligence_cypress/runner.ts b/x-pack/test/threat_intelligence_cypress/runner.ts index b75a350c73c47..c165cb552b9ba 100644 --- a/x-pack/test/threat_intelligence_cypress/runner.ts +++ b/x-pack/test/threat_intelligence_cypress/runner.ts @@ -7,7 +7,7 @@ import { chunk } from 'lodash'; import { resolve } from 'path'; -import glob from 'glob'; +import globby from 'globby'; import Url from 'url'; @@ -26,7 +26,7 @@ const retrieveIntegrations = (chunksTotal: number, chunkIndex: number) => { __dirname, '../../plugins/threat_intelligence/cypress/integration/**/*.spec.ts' ); - const integrationsPaths = glob.sync(pattern); + const integrationsPaths = globby.sync(pattern); const chunkSize = Math.ceil(integrationsPaths.length / chunksTotal); return chunk(integrationsPaths, chunkSize)[chunkIndex - 1]; diff --git a/yarn.lock b/yarn.lock index 93ada50c63f78..85a031a31b593 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2815,6 +2815,18 @@ version "0.0.0" uid "" +"@kbn/core-chrome-browser-internal@link:bazel-bin/packages/core/chrome/core-chrome-browser-internal": + version "0.0.0" + uid "" + +"@kbn/core-chrome-browser-mocks@link:bazel-bin/packages/core/chrome/core-chrome-browser-mocks": + version "0.0.0" + uid "" + +"@kbn/core-chrome-browser@link:bazel-bin/packages/core/chrome/core-chrome-browser": + version "0.0.0" + uid "" + "@kbn/core-config-server-internal@link:bazel-bin/packages/core/config/core-config-server-internal": version "0.0.0" uid "" @@ -3003,6 +3015,18 @@ version "0.0.0" uid "" +"@kbn/core-i18n-server-internal@link:bazel-bin/packages/core/i18n/core-i18n-server-internal": + version "0.0.0" + uid "" + +"@kbn/core-i18n-server-mocks@link:bazel-bin/packages/core/i18n/core-i18n-server-mocks": + version "0.0.0" + uid "" + +"@kbn/core-i18n-server@link:bazel-bin/packages/core/i18n/core-i18n-server": + version "0.0.0" + uid "" + "@kbn/core-injected-metadata-browser-internal@link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-internal": version "0.0.0" uid "" @@ -6386,7 +6410,7 @@ "@types/glob" "*" "@types/node" "*" -"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.2", "@types/glob@^7.1.3": +"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.3": version "7.1.3" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== @@ -6865,6 +6889,18 @@ version "0.0.0" uid "" +"@types/kbn__core-chrome-browser-internal@link:bazel-bin/packages/core/chrome/core-chrome-browser-internal/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-chrome-browser-mocks@link:bazel-bin/packages/core/chrome/core-chrome-browser-mocks/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-chrome-browser@link:bazel-bin/packages/core/chrome/core-chrome-browser/npm_module_types": + version "0.0.0" + uid "" + "@types/kbn__core-common-internal-base@link:bazel-bin/packages/core/common/internal-base/npm_module_types": version "0.0.0" uid "" @@ -7057,6 +7093,18 @@ version "0.0.0" uid "" +"@types/kbn__core-i18n-server-internal@link:bazel-bin/packages/core/i18n/core-i18n-server-internal/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-i18n-server-mocks@link:bazel-bin/packages/core/i18n/core-i18n-server-mocks/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-i18n-server@link:bazel-bin/packages/core/i18n/core-i18n-server/npm_module_types": + version "0.0.0" + uid "" + "@types/kbn__core-injected-metadata-browser-internal@link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-internal/npm_module_types": version "0.0.0" uid "" @@ -8738,6 +8786,13 @@ dependencies: "@types/node" "*" +"@types/yazl@^2.4.2": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@types/yazl/-/yazl-2.4.2.tgz#d5f8a4752261badbf1a36e8b49e042dc18ec84bc" + integrity sha512-T+9JH8O2guEjXNxqmybzQ92mJUh2oCwDDMSSimZSe1P+pceZiFROZLYmcbqkzV5EUwz6VwcKXCO2S2yUpra6XQ== + dependencies: + "@types/node" "*" + "@types/zen-observable@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d" @@ -13217,21 +13272,7 @@ del@^4.1.1: pify "^4.0.1" rimraf "^2.6.3" -del@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7" - integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA== - dependencies: - globby "^10.0.1" - graceful-fs "^4.2.2" - is-glob "^4.0.1" - is-path-cwd "^2.2.0" - is-path-inside "^3.0.1" - p-map "^3.0.0" - rimraf "^3.0.0" - slash "^3.0.0" - -del@^6.0.0, del@^6.1.1: +del@^6.0.0, del@^6.1.0, del@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/del/-/del-6.1.1.tgz#3b70314f1ec0aa325c6b14eb36b95786671edb7a" integrity sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg== @@ -14944,17 +14985,6 @@ fast-equals@^2.0.0: resolved "https://registry.yarnpkg.com/fast-equals/-/fast-equals-2.0.0.tgz#bef2c423af3939f2c54310df54c57e64cd2adefc" integrity sha512-u6RBd8cSiLLxAiC04wVsLV6GBFDOXcTCgWkd3wEoFXgidPSoAJENqC9m7Jb2vewSvjBIfXV6icKeh3GTKfIaXA== -fast-glob@3.2.7, fast-glob@^3.2.9: - version "3.2.7" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" - integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - fast-glob@^2.2.6: version "2.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" @@ -14967,7 +14997,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.0.3, fast-glob@^3.1.1, fast-glob@^3.2.11, fast-glob@^3.2.2, fast-glob@^3.2.7: +fast-glob@^3.0.3, fast-glob@^3.1.1, fast-glob@^3.2.11, fast-glob@^3.2.2, fast-glob@^3.2.7, fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== @@ -15855,14 +15885,6 @@ gl-matrix@~3.3.0: resolved "https://registry.yarnpkg.com/gl-matrix/-/gl-matrix-3.3.0.tgz#232eef60b1c8b30a28cbbe75b2caf6c48fd6358b" integrity sha512-COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA== -glob-all@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/glob-all/-/glob-all-3.2.1.tgz#082ca81afd2247cbd3ed2149bb2630f4dc877d95" - integrity sha512-x877rVkzB3ipid577QOp+eQCR6M5ZyiwrtaYgrX/z3EThaSPFtLDwBXFHc3sH1cG0R0vFYI5SRYeWMMSEyXkUw== - dependencies: - glob "^7.1.2" - yargs "^15.3.1" - glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" @@ -16154,7 +16176,7 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -17642,7 +17664,7 @@ is-path-inside@^2.1.0: dependencies: path-is-inside "^1.0.2" -is-path-inside@^3.0.1, is-path-inside@^3.0.2: +is-path-inside@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==