Skip to content

Commit ce441d0

Browse files
committed
Merge branch 'master' into rk/64695-branding-updates
2 parents 7efa4b1 + 3442c25 commit ce441d0

1,217 files changed

Lines changed: 19653 additions & 5231 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/Jenkinsfile_coverage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
library 'kibana-pipeline-library'
44
kibanaLibrary.load() // load from the Jenkins instance
55

6-
kibanaPipeline(timeoutMinutes: 180) {
6+
kibanaPipeline(timeoutMinutes: 240) {
77
catchErrors {
88
withEnv([
99
'CODE_COVERAGE=1', // Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.

.eslintignore

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
1-
node_modules
2-
bower_components
3-
/data
4-
/optimize
5-
/build
6-
/target
1+
**/*.js.snap
2+
**/graphql/types.ts
73
/.es
8-
/plugins
4+
/build
95
/built_assets
6+
/data
107
/html_docs
11-
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
12-
/src/plugins/vis_type_timelion/public/_generated_/**
13-
/src/legacy/ui/public/flot-charts
8+
/optimize
9+
/plugins
1410
/test/fixtures/scenarios
15-
/src/legacy/core_plugins/console/public/webpackShims
11+
/x-pack/build
12+
node_modules
13+
target
14+
15+
!/.eslintrc.js
16+
17+
# plugin overrides
18+
/src/core/lib/kbn_internal_native_observable
1619
/src/legacy/core_plugins/console/public/tests/webpackShims
20+
/src/legacy/core_plugins/console/public/webpackShims
21+
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
22+
/src/legacy/ui/public/flot-charts
1723
/src/legacy/ui/public/utils/decode_geo_hash.js
24+
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
25+
/src/plugins/vis_type_timelion/public/_generated_/**
1826
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
19-
/src/core/lib/kbn_internal_native_observable
20-
/packages/*/target
21-
/packages/eslint-config-kibana
22-
/packages/kbn-pm/dist
23-
/packages/kbn-plugin-generator/sao_template/template
24-
/packages/kbn-ui-framework/dist
25-
/packages/kbn-ui-framework/doc_site/build
26-
/packages/kbn-ui-framework/generator-kui/*/templates/
27-
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
28-
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
29-
/x-pack/legacy/plugins/maps/public/vendor/**
30-
/x-pack/coverage
31-
/x-pack/build
3227
/x-pack/legacy/plugins/**/__tests__/fixtures/**
33-
/packages/kbn-interpreter/src/common/lib/grammar.js
28+
/x-pack/legacy/plugins/apm/e2e/cypress/**/snapshots.js
3429
/x-pack/legacy/plugins/canvas/canvas_plugin
30+
/x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts
3531
/x-pack/legacy/plugins/canvas/shareable_runtime/build
3632
/x-pack/legacy/plugins/canvas/storybook
37-
/x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts
3833
/x-pack/legacy/plugins/infra/common/graphql/types.ts
3934
/x-pack/legacy/plugins/infra/public/graphql/types.ts
4035
/x-pack/legacy/plugins/infra/server/graphql/types.ts
41-
/x-pack/legacy/plugins/apm/e2e/cypress/**/snapshots.js
42-
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
43-
**/graphql/types.ts
44-
**/*.js.snap
45-
!/.eslintrc.js
36+
/x-pack/legacy/plugins/maps/public/vendor/**
37+
38+
# package overrides
39+
/packages/eslint-config-kibana
40+
/packages/kbn-interpreter/src/common/lib/grammar.js
41+
/packages/kbn-plugin-generator/sao_template/template
42+
/packages/kbn-pm/dist
43+
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
44+
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
45+
/packages/kbn-ui-framework/dist
46+
/packages/kbn-ui-framework/doc_site/build
47+
/packages/kbn-ui-framework/generator-kui/*/templates/
48+

.eslintrc.js

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,101 @@ module.exports = {
742742
},
743743
},
744744

745+
/**
746+
* Lists overrides
747+
*/
748+
{
749+
// typescript and javascript for front and back end
750+
files: ['x-pack/plugins/lists/**/*.{js,ts,tsx}'],
751+
plugins: ['eslint-plugin-node'],
752+
env: {
753+
mocha: true,
754+
jest: true,
755+
},
756+
rules: {
757+
'accessor-pairs': 'error',
758+
'array-callback-return': 'error',
759+
'no-array-constructor': 'error',
760+
complexity: 'error',
761+
'consistent-return': 'error',
762+
'func-style': ['error', 'expression'],
763+
'import/order': [
764+
'error',
765+
{
766+
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
767+
'newlines-between': 'always',
768+
},
769+
],
770+
'sort-imports': [
771+
'error',
772+
{
773+
ignoreDeclarationSort: true,
774+
},
775+
],
776+
'node/no-deprecated-api': 'error',
777+
'no-bitwise': 'error',
778+
'no-continue': 'error',
779+
'no-dupe-keys': 'error',
780+
'no-duplicate-case': 'error',
781+
'no-duplicate-imports': 'error',
782+
'no-empty-character-class': 'error',
783+
'no-empty-pattern': 'error',
784+
'no-ex-assign': 'error',
785+
'no-extend-native': 'error',
786+
'no-extra-bind': 'error',
787+
'no-extra-boolean-cast': 'error',
788+
'no-extra-label': 'error',
789+
'no-func-assign': 'error',
790+
'no-implicit-globals': 'error',
791+
'no-implied-eval': 'error',
792+
'no-invalid-regexp': 'error',
793+
'no-inner-declarations': 'error',
794+
'no-lone-blocks': 'error',
795+
'no-multi-assign': 'error',
796+
'no-misleading-character-class': 'error',
797+
'no-new-symbol': 'error',
798+
'no-obj-calls': 'error',
799+
'no-param-reassign': ['error', { props: true }],
800+
'no-process-exit': 'error',
801+
'no-prototype-builtins': 'error',
802+
'no-return-await': 'error',
803+
'no-self-compare': 'error',
804+
'no-shadow-restricted-names': 'error',
805+
'no-sparse-arrays': 'error',
806+
'no-this-before-super': 'error',
807+
'no-undef': 'error',
808+
'no-unreachable': 'error',
809+
'no-unsafe-finally': 'error',
810+
'no-useless-call': 'error',
811+
'no-useless-catch': 'error',
812+
'no-useless-concat': 'error',
813+
'no-useless-computed-key': 'error',
814+
'no-useless-escape': 'error',
815+
'no-useless-rename': 'error',
816+
'no-useless-return': 'error',
817+
'no-void': 'error',
818+
'one-var-declaration-per-line': 'error',
819+
'prefer-object-spread': 'error',
820+
'prefer-promise-reject-errors': 'error',
821+
'prefer-rest-params': 'error',
822+
'prefer-spread': 'error',
823+
'prefer-template': 'error',
824+
'require-atomic-updates': 'error',
825+
'symbol-description': 'error',
826+
'vars-on-top': 'error',
827+
'@typescript-eslint/explicit-member-accessibility': 'error',
828+
'@typescript-eslint/no-this-alias': 'error',
829+
'@typescript-eslint/no-explicit-any': 'error',
830+
'@typescript-eslint/no-useless-constructor': 'error',
831+
'@typescript-eslint/unified-signatures': 'error',
832+
'@typescript-eslint/explicit-function-return-type': 'error',
833+
'@typescript-eslint/no-non-null-assertion': 'error',
834+
'@typescript-eslint/no-unused-vars': 'error',
835+
'no-template-curly-in-string': 'error',
836+
'sort-keys': 'error',
837+
'prefer-destructuring': 'error',
838+
},
839+
},
745840
/**
746841
* Alerting Services overrides
747842
*/

.github/CODEOWNERS

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
/x-pack/legacy/plugins/ingest_manager/ @elastic/ingest-management
8585
/x-pack/plugins/observability/ @elastic/logs-metrics-ui @elastic/apm-ui @elastic/uptime @elastic/ingest-management
8686
/x-pack/legacy/plugins/monitoring/ @elastic/stack-monitoring-ui
87-
/x-pack/legacy/plugins/uptime @elastic/uptime
8887
/x-pack/plugins/uptime @elastic/uptime
8988

9089
# Machine Learning
@@ -167,16 +166,13 @@
167166
/x-pack/plugins/telemetry_collection_xpack/ @elastic/pulse
168167

169168
# Kibana Alerting Services
170-
/x-pack/legacy/plugins/alerting/ @elastic/kibana-alerting-services
171-
/x-pack/legacy/plugins/actions/ @elastic/kibana-alerting-services
172169
/x-pack/plugins/alerting/ @elastic/kibana-alerting-services
173170
/x-pack/plugins/actions/ @elastic/kibana-alerting-services
174171
/x-pack/plugins/event_log/ @elastic/kibana-alerting-services
175172
/x-pack/plugins/task_manager/ @elastic/kibana-alerting-services
176173
/x-pack/test/alerting_api_integration/ @elastic/kibana-alerting-services
177174
/x-pack/test/plugin_api_integration/plugins/task_manager/ @elastic/kibana-alerting-services
178175
/x-pack/test/plugin_api_integration/test_suites/task_manager/ @elastic/kibana-alerting-services
179-
/x-pack/legacy/plugins/triggers_actions_ui/ @elastic/kibana-alerting-services
180176
/x-pack/plugins/triggers_actions_ui/ @elastic/kibana-alerting-services
181177
/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/ @elastic/kibana-alerting-services
182178
/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/ @elastic/kibana-alerting-services
@@ -209,22 +205,21 @@
209205
/x-pack/plugins/watcher/ @elastic/es-ui
210206

211207
# Endpoint
212-
/x-pack/plugins/endpoint/ @elastic/endpoint-app-team
213-
/x-pack/test/api_integration/apis/endpoint/ @elastic/endpoint-app-team
214-
/x-pack/test/endpoint_api_integration_no_ingest/ @elastic/endpoint-app-team
215-
/x-pack/test/functional_endpoint/ @elastic/endpoint-app-team
216-
/x-pack/test/functional_endpoint_ingest_failure/ @elastic/endpoint-app-team
217-
/x-pack/test/functional/es_archives/endpoint/ @elastic/endpoint-app-team
218-
/x-pack/test/plugin_functional/plugins/resolver_test/ @elastic/endpoint-app-team
219-
/x-pack/test/plugin_functional/test_suites/resolver/ @elastic/endpoint-app-team
208+
/x-pack/plugins/endpoint/ @elastic/endpoint-app-team @elastic/siem
209+
/x-pack/test/api_integration/apis/endpoint/ @elastic/endpoint-app-team @elastic/siem
210+
/x-pack/test/endpoint_api_integration_no_ingest/ @elastic/endpoint-app-team @elastic/siem
211+
/x-pack/test/functional_endpoint/ @elastic/endpoint-app-team @elastic/siem
212+
/x-pack/test/functional_endpoint_ingest_failure/ @elastic/endpoint-app-team @elastic/siem
213+
/x-pack/test/functional/es_archives/endpoint/ @elastic/endpoint-app-team @elastic/siem
214+
/x-pack/test/plugin_functional/plugins/resolver_test/ @elastic/endpoint-app-team @elastic/siem
215+
/x-pack/test/plugin_functional/test_suites/resolver/ @elastic/endpoint-app-team @elastic/siem
220216

221217
# SIEM
222-
/x-pack/legacy/plugins/siem/ @elastic/siem
223-
/x-pack/plugins/siem/ @elastic/siem
224-
/x-pack/test/detection_engine_api_integration @elastic/siem
225-
/x-pack/test/api_integration/apis/siem @elastic/siem
226-
/x-pack/plugins/case @elastic/siem
218+
/x-pack/plugins/siem/ @elastic/siem @elastic/endpoint-app-team
219+
/x-pack/test/detection_engine_api_integration @elastic/siem @elastic/endpoint-app-team
220+
/x-pack/test/api_integration/apis/siem @elastic/siem @elastic/endpoint-app-team
221+
/x-pack/plugins/case @elastic/siem @elastic/endpoint-app-team
222+
/x-pack/plugins/lists @elastic/siem @elastic/endpoint-app-team
227223

228224
# Security Intelligence And Analytics
229-
/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics
230225
/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [defaultPath](./kibana-plugin-core-public.appbase.defaultpath.md)
4+
5+
## AppBase.defaultPath property
6+
7+
Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the `path` option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)<!-- -->\`<!-- -->, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
defaultPath?: string;
13+
```

docs/development/core/public/kibana-plugin-core-public.appbase.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface AppBase
1818
| [capabilities](./kibana-plugin-core-public.appbase.capabilities.md) | <code>Partial&lt;Capabilities&gt;</code> | Custom capabilities defined by the app. |
1919
| [category](./kibana-plugin-core-public.appbase.category.md) | <code>AppCategory</code> | The category definition of the product See [AppCategory](./kibana-plugin-core-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference |
2020
| [chromeless](./kibana-plugin-core-public.appbase.chromeless.md) | <code>boolean</code> | Hide the UI chrome when the application is mounted. Defaults to <code>false</code>. Takes precedence over chrome service visibility settings. |
21+
| [defaultPath](./kibana-plugin-core-public.appbase.defaultpath.md) | <code>string</code> | Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the <code>path</code> option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)<!-- -->\`<!-- -->, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar. |
2122
| [euiIconType](./kibana-plugin-core-public.appbase.euiicontype.md) | <code>string</code> | A EUI iconType that will be used for the app's icon. This icon takes precendence over the <code>icon</code> property. |
2223
| [icon](./kibana-plugin-core-public.appbase.icon.md) | <code>string</code> | A URL to an image file used as an icon. Used as a fallback if <code>euiIconType</code> is not provided. |
2324
| [id](./kibana-plugin-core-public.appbase.id.md) | <code>string</code> | The unique identifier of the application |

docs/development/core/public/kibana-plugin-core-public.appupdatablefields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ Defines the list of fields that can be updated via an [AppUpdater](./kibana-plug
99
<b>Signature:</b>
1010

1111
```typescript
12-
export declare type AppUpdatableFields = Pick<AppBase, 'status' | 'navLinkStatus' | 'tooltip'>;
12+
export declare type AppUpdatableFields = Pick<AppBase, 'status' | 'navLinkStatus' | 'tooltip' | 'defaultPath'>;
1313
```

docs/development/core/public/kibana-plugin-core-public.chromenavlink.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ export interface ChromeNavLink
2929
| [subUrlBase](./kibana-plugin-core-public.chromenavlink.suburlbase.md) | <code>string</code> | A url base that legacy apps can set to match deep URLs to an application. |
3030
| [title](./kibana-plugin-core-public.chromenavlink.title.md) | <code>string</code> | The title of the application. |
3131
| [tooltip](./kibana-plugin-core-public.chromenavlink.tooltip.md) | <code>string</code> | A tooltip shown when hovering over an app link. |
32-
| [url](./kibana-plugin-core-public.chromenavlink.url.md) | <code>string</code> | A url that legacy apps can set to deep link into their applications. |
32+
| [url](./kibana-plugin-core-public.chromenavlink.url.md) | <code>string</code> | The route used to open the [default path](./kibana-plugin-core-public.appbase.defaultpath.md) of an application. If unset, <code>baseUrl</code> will be used instead. |
3333

docs/development/core/public/kibana-plugin-core-public.chromenavlink.url.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44

55
## ChromeNavLink.url property
66

7-
> Warning: This API is now obsolete.
8-
>
9-
>
10-
11-
A url that legacy apps can set to deep link into their applications.
7+
The route used to open the [default path](./kibana-plugin-core-public.appbase.defaultpath.md) of an application. If unset, `baseUrl` will be used instead.
128

139
<b>Signature:</b>
1410

docs/development/core/server/kibana-plugin-core-server.savedobjectmigrationfn.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,36 @@ A migration function for a [saved object type](./kibana-plugin-core-server.saved
99
<b>Signature:</b>
1010

1111
```typescript
12-
export declare type SavedObjectMigrationFn = (doc: SavedObjectUnsanitizedDoc, context: SavedObjectMigrationContext) => SavedObjectUnsanitizedDoc;
12+
export declare type SavedObjectMigrationFn<InputAttributes = unknown, MigratedAttributes = unknown> = (doc: SavedObjectUnsanitizedDoc<InputAttributes>, context: SavedObjectMigrationContext) => SavedObjectUnsanitizedDoc<MigratedAttributes>;
1313
```
1414

1515
## Example
1616

1717

1818
```typescript
19-
const migrateProperty: SavedObjectMigrationFn = (doc, { log }) => {
20-
if(doc.attributes.someProp === null) {
21-
log.warn('Skipping migration');
22-
} else {
23-
doc.attributes.someProp = migrateProperty(doc.attributes.someProp);
24-
}
25-
26-
return doc;
19+
interface TypeV1Attributes {
20+
someKey: string;
21+
obsoleteProperty: number;
2722
}
2823

24+
interface TypeV2Attributes {
25+
someKey: string;
26+
newProperty: string;
27+
}
28+
29+
const migrateToV2: SavedObjectMigrationFn<TypeV1Attributes, TypeV2Attributes> = (doc, { log }) => {
30+
const { obsoleteProperty, ...otherAttributes } = doc.attributes;
31+
// instead of mutating `doc` we make a shallow copy so that we can use separate types for the input
32+
// and output attributes. We don't need to make a deep copy, we just need to ensure that obsolete
33+
// attributes are not present on the returned doc.
34+
return {
35+
...doc,
36+
attributes: {
37+
...otherAttributes,
38+
newProperty: migrate(obsoleteProperty),
39+
},
40+
};
41+
};
42+
2943
```
3044

0 commit comments

Comments
 (0)