Skip to content

Commit a89ef3c

Browse files
Merge branch 'master' into saved-views-bugs
2 parents a46d853 + ef83e77 commit a89ef3c

File tree

603 files changed

+10300
-8534
lines changed

Some content is hidden

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

603 files changed

+10300
-8534
lines changed

.eslintrc.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -771,19 +771,22 @@ module.exports = {
771771
},
772772

773773
/**
774-
* APM overrides
774+
* APM and Observability overrides
775775
*/
776776
{
777-
files: ['x-pack/plugins/apm/**/*.js'],
777+
files: [
778+
'x-pack/plugins/apm/**/*.{js,mjs,ts,tsx}',
779+
'x-pack/plugins/observability/**/*.{js,mjs,ts,tsx}',
780+
],
778781
rules: {
779-
'no-unused-vars': ['error', { ignoreRestSiblings: true }],
780782
'no-console': ['warn', { allow: ['error'] }],
781-
},
782-
},
783-
{
784-
plugins: ['react-hooks'],
785-
files: ['x-pack/plugins/apm/**/*.{ts,tsx}'],
786-
rules: {
783+
'react/function-component-definition': [
784+
'warn',
785+
{
786+
namedComponents: 'function-declaration',
787+
unnamedComponents: 'arrow-function',
788+
},
789+
],
787790
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
788791
'react-hooks/exhaustive-deps': ['error', { additionalHooks: '^useFetcher$' }],
789792
},

docs/developer/advanced/running-elasticsearch.asciidoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ This will run a snapshot of {es} that is usually built nightly. Read more about
1313
----
1414
yarn es snapshot
1515
----
16+
By default, two users are added to Elasticsearch:
17+
18+
- A superuser with username: `elastic` and password: `changeme`, which can be used to log into Kibana with.
19+
- A user with username: `kibana_system` and password `changeme`. This account is used by the Kibana server to authenticate itself to Elasticsearch, and to perform certain actions on behalf of the end user. These credentials should be specified in your kibana.yml as described in <<using-kibana-with-security>>
1620

1721
See all available options, like how to specify a specific license, with the `--help` flag.
1822

@@ -115,4 +119,4 @@ PUT _cluster/settings
115119
}
116120
----
117121

118-
Follow the cross-cluster search instructions for setting up index patterns to search across clusters (<<management-cross-cluster-search>>).
122+
Follow the cross-cluster search instructions for setting up index patterns to search across clusters (<<management-cross-cluster-search>>).

docs/developer/architecture/code-exploration.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,9 @@ WARNING: Missing README.
524524
See Configuring security in Kibana.
525525
526526
527-
- {kib-repo}blob/{branch}/x-pack/plugins/security_solution[securitySolution]
527+
- {kib-repo}blob/{branch}/x-pack/plugins/security_solution/README.md[securitySolution]
528528
529-
WARNING: Missing README.
529+
Welcome to the Kibana Security Solution plugin! This README will go over getting started with development and testing.
530530
531531
532532
- {kib-repo}blob/{branch}/x-pack/plugins/snapshot_restore/README.md[snapshotRestore]

docs/developer/contributing/development-tests.asciidoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ root)
2626
|Functional
2727
|`test/*integration/**/config.js` `test/*functional/**/config.js` `test/accessibility/config.js`
2828
|`yarn test:ftr:server --config test/[directory]/config.js``yarn test:ftr:runner --config test/[directory]/config.js --grep=regexp`
29-
30-
|Karma |`src/**/public/__tests__/*.js` |`yarn test:karma:debug`
3129
|===
3230

3331
For X-Pack tests located in `x-pack/` see

docs/developer/contributing/development-unit-tests.asciidoc

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -95,38 +95,6 @@ to proceed in this mode.
9595
node scripts/mocha --debug <file>
9696
----
9797

98-
With `yarn test:karma`, you can run only the browser tests. Coverage
99-
reports are available for browser tests by running
100-
`yarn test:coverage`. You can find the results under the `coverage/`
101-
directory that will be created upon completion.
102-
103-
[source,bash]
104-
----
105-
yarn test:karma
106-
----
107-
108-
Using `yarn test:karma:debug` initializes an environment for debugging
109-
the browser tests. Includes an dedicated instance of the {kib} server
110-
for building the test bundle, and a karma server. When running this task
111-
the build is optimized for the first time and then a karma-owned
112-
instance of the browser is opened. Click the "`debug`" button to open a
113-
new tab that executes the unit tests.
114-
115-
[source,bash]
116-
----
117-
yarn test:karma:debug
118-
----
119-
120-
In the screenshot below, you’ll notice the URL is
121-
`localhost:9876/debug.html`. You can append a `grep` query parameter
122-
to this URL and set it to a string value which will be used to exclude
123-
tests which don’t match. For example, if you changed the URL to
124-
`localhost:9876/debug.html?query=my test` and then refreshed the
125-
browser, you’d only see tests run which contain "`my test`" in the test
126-
description.
127-
128-
image:http://i.imgur.com/DwHxgfq.png[Browser test debugging]
129-
13098
[discrete]
13199
=== Unit Testing Plugins
132100

@@ -141,5 +109,4 @@ command from your plugin:
141109
[source,bash]
142110
----
143111
yarn test:mocha
144-
yarn test:karma:debug # remove the debug flag to run them once and close
145112
----

package.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141
"kbn": "node scripts/kbn",
4242
"es": "node scripts/es",
4343
"test": "grunt test",
44-
"test:karma": "grunt test:karma",
45-
"test:karma:debug": "grunt test:karmaDebug",
4644
"test:jest": "node scripts/jest",
4745
"test:jest_integration": "node scripts/jest_integration",
4846
"test:mocha": "node scripts/mocha",
@@ -435,7 +433,7 @@
435433
"eslint-plugin-node": "^11.0.0",
436434
"eslint-plugin-prefer-object-spread": "^1.2.1",
437435
"eslint-plugin-prettier": "^3.1.3",
438-
"eslint-plugin-react": "^7.17.0",
436+
"eslint-plugin-react": "^7.20.3",
439437
"eslint-plugin-react-hooks": "^4.0.4",
440438
"eslint-plugin-react-perf": "^3.2.3",
441439
"exit-hook": "^2.2.0",
@@ -447,7 +445,6 @@
447445
"grunt-available-tasks": "^0.6.3",
448446
"grunt-cli": "^1.2.0",
449447
"grunt-contrib-watch": "^1.1.0",
450-
"grunt-karma": "^3.0.2",
451448
"grunt-peg": "^2.0.1",
452449
"grunt-run": "0.8.1",
453450
"gulp-babel": "^8.0.0",
@@ -465,14 +462,6 @@
465462
"jest-raw-loader": "^1.0.1",
466463
"jimp": "^0.9.6",
467464
"json5": "^1.0.1",
468-
"karma": "5.0.2",
469-
"karma-chrome-launcher": "2.2.0",
470-
"karma-coverage": "1.1.2",
471-
"karma-firefox-launcher": "1.1.0",
472-
"karma-ie-launcher": "1.0.0",
473-
"karma-junit-reporter": "1.2.0",
474-
"karma-mocha": "2.0.0",
475-
"karma-safari-launcher": "1.0.0",
476465
"license-checker": "^16.0.0",
477466
"listr": "^0.14.1",
478467
"load-grunt-config": "^3.0.1",

packages/kbn-eslint-import-resolver-kibana/lib/get_webpack_config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,9 @@ exports.getWebpackConfig = function (kibanaPath, projectRoot, config) {
2828
const alias = {
2929
// Kibana defaults https://github.com/elastic/kibana/blob/6998f074542e8c7b32955db159d15661aca253d7/src/legacy/ui/ui_bundler_env.js#L30-L36
3030
ui: fromKibana('src/legacy/ui/public'),
31-
test_harness: fromKibana('src/test_harness/public'),
3231

3332
// Dev defaults for test bundle https://github.com/elastic/kibana/blob/6998f074542e8c7b32955db159d15661aca253d7/src/core_plugins/tests_bundle/index.js#L73-L78
3433
ng_mock$: fromKibana('src/test_utils/public/ng_mock'),
35-
'angular-mocks$': fromKibana(
36-
'src/legacy/core_plugins/tests_bundle/webpackShims/angular-mocks.js'
37-
),
3834
fixtures: fromKibana('src/fixtures'),
3935
test_utils: fromKibana('src/test_utils/public'),
4036
};

packages/kbn-plugin-generator/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ Generated plugins receive a handful of scripts that can be used during developme
7171
7272
Build a distributable archive of your plugin.
7373
74-
- `yarn test:karma`
75-
76-
Run the browser tests in a real web browser.
77-
7874
- `yarn test:mocha`
7975
8076
Run the server tests using mocha.

packages/kbn-plugin-helpers/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ $ plugin-helpers help
3030
start Start kibana and have it include this plugin
3131
build [options] [files...] Build a distributable archive
3232
test Run the server and browser tests
33-
test:karma [options] Run the browser tests in a real web browser
3433
test:mocha [files...] Run the server tests using mocha
3534

3635
Options:

packages/kbn-plugin-helpers/src/cli.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,6 @@ program
6262
}))
6363
);
6464

65-
program
66-
.command('test')
67-
.description('Run the server and browser tests')
68-
.on('--help', docs('test/all'))
69-
.action(createCommanderAction('testAll'));
70-
71-
program
72-
.command('test:karma')
73-
.description('Run the browser tests in a real web browser')
74-
.option('--dev', 'Enable dev mode, keeps the test server running')
75-
.option('-p, --plugins <plugin-ids>', "Manually specify which plugins' test bundles to run")
76-
.on('--help', docs('test/karma'))
77-
.action(
78-
createCommanderAction('testKarma', (command) => ({
79-
dev: Boolean(command.dev),
80-
plugins: command.plugins,
81-
}))
82-
);
83-
8465
program
8566
.command('test:mocha [files...]')
8667
.description('Run the server tests using mocha')

0 commit comments

Comments
 (0)