Skip to content

Commit cd636df

Browse files
Merge branch 'master' into faster-alerts
2 parents 1d6339e + ee323bd commit cd636df

1,640 files changed

Lines changed: 44544 additions & 13350 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_flaky

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def getWorkerFromParams(isXpack, job, ciGroup) {
7070
"run `node scripts/mocha`"
7171
)
7272
})
73+
} else if (job == 'accessibility') {
74+
return kibanaPipeline.functionalTestProcess('kibana-accessibility', './test/scripts/jenkins_accessibility.sh')
7375
} else if (job == 'firefoxSmoke') {
7476
return kibanaPipeline.functionalTestProcess('firefoxSmoke', './test/scripts/jenkins_firefox_smoke.sh')
7577
} else if(job == 'visualRegression') {
@@ -79,7 +81,9 @@ def getWorkerFromParams(isXpack, job, ciGroup) {
7981
}
8082
}
8183

82-
if (job == 'firefoxSmoke') {
84+
if (job == 'accessibility') {
85+
return kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh')
86+
} else if (job == 'firefoxSmoke') {
8387
return kibanaPipeline.functionalTestProcess('xpack-firefoxSmoke', './test/scripts/jenkins_xpack_firefox_smoke.sh')
8488
} else if(job == 'visualRegression') {
8589
return kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')

.ci/packer_cache.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ mkdir -p ".geckodriver"
3535
cp "node_modules/geckodriver/geckodriver.tar.gz" .geckodriver/geckodriver.tar.gz
3636
echo "$geckodriverPkgVersion" > .geckodriver/pkgVersion
3737

38+
echo "Creating bootstrap_cache archive"
39+
3840
# archive cacheable directories
3941
mkdir -p "$HOME/.kibana/bootstrap_cache"
4042
tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \
41-
node_modules \
42-
packages/*/node_modules \
43-
x-pack/node_modules \
44-
x-pack/legacy/plugins/*/node_modules \
4543
x-pack/legacy/plugins/reporting/.chromium \
46-
test/plugin_functional/plugins/*/node_modules \
47-
examples/*/node_modules \
4844
.es \
4945
.chromedriver \
5046
.geckodriver;
5147

48+
echo "Adding node_modules"
49+
# Find all of the node_modules directories that aren't test fixtures, and aren't inside other node_modules directories, and append them to the tar
50+
find . -type d -name node_modules -not -path '*__fixtures__*' -prune -print0 | xargs -0I % tar -rf "$HOME/.kibana/bootstrap_cache/$branch.tar" "%"
51+
5252
echo "created $HOME/.kibana/bootstrap_cache/$branch.tar"
5353

5454
if [ "$branch" == "master" ]; then

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ target
2626
/src/plugins/vis_type_timelion/public/_generated_/**
2727
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
2828
/x-pack/legacy/plugins/**/__tests__/fixtures/**
29-
/x-pack/plugins/apm/e2e/cypress/**/snapshots.js
29+
/x-pack/plugins/apm/e2e/**/snapshots.js
30+
/x-pack/plugins/apm/e2e/tmp/*
3031
/x-pack/plugins/canvas/canvas_plugin
3132
/x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts
3233
/x-pack/plugins/canvas/shareable_runtime/build

.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ module.exports = {
202202
from: ['(src|x-pack)/plugins/*/server/**/*'],
203203
errorMessage: `Public code can not import from server, use a common directory.`,
204204
},
205+
{
206+
target: ['(src|x-pack)/plugins/*/common/**/*'],
207+
from: ['(src|x-pack)/plugins/*/(server|public)/**/*'],
208+
errorMessage: `Common code can not import from server or public, use a common directory.`,
209+
},
205210
{
206211
target: [
207212
'(src|x-pack)/legacy/**/*',

.github/CODEOWNERS

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-app
77
/x-pack/plugins/lens/ @elastic/kibana-app
88
/x-pack/plugins/graph/ @elastic/kibana-app
9-
/src/legacy/server/url_shortening/ @elastic/kibana-app
10-
/src/legacy/server/sample_data/ @elastic/kibana-app
119
/src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
12-
/src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app
1310
/src/plugins/dashboard/ @elastic/kibana-app
1411
/src/plugins/discover/ @elastic/kibana-app
1512
/src/plugins/input_control_vis/ @elastic/kibana-app
@@ -158,7 +155,6 @@
158155
/x-pack/legacy/plugins/security/ @elastic/kibana-security
159156
/x-pack/legacy/plugins/spaces/ @elastic/kibana-security
160157
/x-pack/plugins/spaces/ @elastic/kibana-security
161-
/x-pack/legacy/plugins/encrypted_saved_objects/ @elastic/kibana-security
162158
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
163159
/x-pack/plugins/security/ @elastic/kibana-security
164160
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security
@@ -180,7 +176,7 @@
180176
/x-pack/plugins/telemetry_collection_xpack/ @elastic/pulse
181177

182178
# Kibana Alerting Services
183-
/x-pack/plugins/alerting/ @elastic/kibana-alerting-services
179+
/x-pack/plugins/alerts/ @elastic/kibana-alerting-services
184180
/x-pack/plugins/actions/ @elastic/kibana-alerting-services
185181
/x-pack/plugins/event_log/ @elastic/kibana-alerting-services
186182
/x-pack/plugins/task_manager/ @elastic/kibana-alerting-services

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ package-lock.json
4444
*.sublime-*
4545
npm-debug.log*
4646
.tern-project
47-
x-pack/plugins/apm/tsconfig.json
48-
apm.tsconfig.json
49-
/x-pack/legacy/plugins/apm/e2e/snapshots.js
50-
/x-pack/plugins/apm/e2e/snapshots.js
5147
.nyc_output
48+
49+
# apm plugin
50+
/x-pack/plugins/apm/tsconfig.json
51+
apm.tsconfig.json

CONTRIBUTING.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,44 @@ A high level overview of our contributing guidelines.
1313
- ["My issue isn't getting enough attention"](#my-issue-isnt-getting-enough-attention)
1414
- ["I want to help!"](#i-want-to-help)
1515
- [How We Use Git and GitHub](#how-we-use-git-and-github)
16+
- [Forking](#forking)
1617
- [Branching](#branching)
1718
- [Commits and Merging](#commits-and-merging)
19+
- [Rebasing and fixing merge conflicts](#rebasing-and-fixing-merge-conflicts)
1820
- [What Goes Into a Pull Request](#what-goes-into-a-pull-request)
1921
- [Contributing Code](#contributing-code)
2022
- [Setting Up Your Development Environment](#setting-up-your-development-environment)
23+
- [Increase node.js heap size](#increase-nodejs-heap-size)
24+
- [Running Elasticsearch Locally](#running-elasticsearch-locally)
25+
- [Nightly snapshot (recommended)](#nightly-snapshot-recommended)
26+
- [Keeping data between snapshots](#keeping-data-between-snapshots)
27+
- [Source](#source)
28+
- [Archive](#archive)
29+
- [Sample Data](#sample-data)
30+
- [Running Elasticsearch Remotely](#running-elasticsearch-remotely)
31+
- [Running remote clusters](#running-remote-clusters)
32+
- [Running Kibana](#running-kibana)
33+
- [Running Kibana in Open-Source mode](#running-kibana-in-open-source-mode)
34+
- [Unsupported URL Type](#unsupported-url-type)
2135
- [Customizing `config/kibana.dev.yml`](#customizing-configkibanadevyml)
36+
- [Potential Optimization Pitfalls](#potential-optimization-pitfalls)
2237
- [Setting Up SSL](#setting-up-ssl)
2338
- [Linting](#linting)
39+
- [Setup Guide for VS Code Users](#setup-guide-for-vs-code-users)
2440
- [Internationalization](#internationalization)
2541
- [Localization](#localization)
42+
- [Styling with SASS](#styling-with-sass)
2643
- [Testing and Building](#testing-and-building)
2744
- [Debugging server code](#debugging-server-code)
2845
- [Instrumenting with Elastic APM](#instrumenting-with-elastic-apm)
29-
- [Debugging Unit Tests](#debugging-unit-tests)
30-
- [Unit Testing Plugins](#unit-testing-plugins)
31-
- [Automated Accessibility Testing](#automated-accessibility-testing)
32-
- [Cross-browser compatibility](#cross-browser-compatibility)
33-
- [Testing compatibility locally](#testing-compatibility-locally)
34-
- [Running Browser Automation Tests](#running-browser-automation-tests)
35-
- [Browser Automation Notes](#browser-automation-notes)
46+
- [Unit testing frameworks](#unit-testing-frameworks)
47+
- [Running specific Kibana tests](#running-specific-kibana-tests)
48+
- [Debugging Unit Tests](#debugging-unit-tests)
49+
- [Unit Testing Plugins](#unit-testing-plugins)
50+
- [Automated Accessibility Testing](#automated-accessibility-testing)
51+
- [Cross-browser compatibility](#cross-browser-compatibility)
52+
- [Testing compatibility locally](#testing-compatibility-locally)
53+
- [Running Browser Automation Tests](#running-browser-automation-tests)
3654
- [Building OS packages](#building-os-packages)
3755
- [Writing documentation](#writing-documentation)
3856
- [Release Notes Process](#release-notes-process)
@@ -414,7 +432,7 @@ extract them to a `JSON` file or integrate translations back to Kibana. To know
414432
We cannot support accepting contributions to the translations from any source other than the translators we have engaged to do the work.
415433
We are still to develop a proper process to accept any contributed translations. We certainly appreciate that people care enough about the localization effort to want to help improve the quality. We aim to build out a more comprehensive localization process for the future and will notify you once contributions can be supported, but for the time being, we are not able to incorporate suggestions.
416434

417-
### Syling with SASS
435+
### Styling with SASS
418436

419437
When writing a new component, create a sibling SASS file of the same name and import directly into the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint).
420438

@@ -467,10 +485,10 @@ macOS users on a machine with a discrete graphics card may see significant speed
467485
- Uncheck the "Prefer integrated to discrete GPU" option
468486
- Restart iTerm
469487

470-
### Debugging Server Code
488+
#### Debugging Server Code
471489
`yarn debug` will start the server with Node's inspect flag. Kibana's development mode will start three processes on ports `9229`, `9230`, and `9231`. Chrome's developer tools need to be configured to connect to all three connections. Add `localhost:<port>` for each Kibana process in Chrome's developer tools connection tab.
472490

473-
### Instrumenting with Elastic APM
491+
#### Instrumenting with Elastic APM
474492
Kibana ships with the [Elastic APM Node.js Agent](https://github.com/elastic/apm-agent-nodejs) built-in for debugging purposes.
475493

476494
Its default configuration is meant to be used by core Kibana developers only, but it can easily be re-configured to your needs.
@@ -501,13 +519,13 @@ ELASTIC_APM_ACTIVE=true yarn start
501519
Once the agent is active, it will trace all incoming HTTP requests to Kibana, monitor for errors, and collect process-level metrics.
502520
The collected data will be sent to the APM Server and is viewable in the APM UI in Kibana.
503521

504-
### Unit testing frameworks
522+
#### Unit testing frameworks
505523
Kibana is migrating unit testing from Mocha to Jest. Legacy unit tests still
506524
exist in Mocha but all new unit tests should be written in Jest. Mocha tests
507525
are contained in `__tests__` directories. Whereas Jest tests are stored in
508526
the same directory as source code files with the `.test.js` suffix.
509527

510-
### Running specific Kibana tests
528+
#### Running specific Kibana tests
511529

512530
The following table outlines possible test file locations and how to invoke them:
513531

@@ -540,7 +558,7 @@ Test runner arguments:
540558
yarn test:ftr:runner --config test/api_integration/config.js --grep='should return 404 if id does not match any sample data sets'
541559
```
542560
543-
### Debugging Unit Tests
561+
#### Debugging Unit Tests
544562
545563
The standard `yarn test` task runs several sub tasks and can take several minutes to complete, making debugging failures pretty painful. In order to ease the pain specialized tasks provide alternate methods for running the tests.
546564
@@ -567,7 +585,7 @@ In the screenshot below, you'll notice the URL is `localhost:9876/debug.html`. Y
567585

568586
![Browser test debugging](http://i.imgur.com/DwHxgfq.png)
569587

570-
### Unit Testing Plugins
588+
#### Unit Testing Plugins
571589

572590
This should work super if you're using the [Kibana plugin generator](https://github.com/elastic/kibana/tree/master/packages/kbn-plugin-generator). If you're not using the generator, well, you're on your own. We suggest you look at how the generator works.
573591

@@ -578,7 +596,7 @@ yarn test:mocha
578596
yarn test:karma:debug # remove the debug flag to run them once and close
579597
```
580598

581-
### Automated Accessibility Testing
599+
#### Automated Accessibility Testing
582600

583601
To run the tests locally:
584602

@@ -595,11 +613,11 @@ can be run locally using their browser plugins:
595613
- [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)
596614
- [Firefox](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/)
597615

598-
### Cross-browser Compatibility
616+
#### Cross-browser Compatibility
599617

600-
#### Testing Compatibility Locally
618+
##### Testing Compatibility Locally
601619

602-
##### Testing IE on OS X
620+
###### Testing IE on OS X
603621

604622
* [Download VMWare Fusion](http://www.vmware.com/products/fusion/fusion-evaluation.html).
605623
* [Download IE virtual machines](https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/#downloads) for VMWare.
@@ -610,7 +628,7 @@ can be run locally using their browser plugins:
610628
* Now you can run your VM, open the browser, and navigate to `http://computer.local:5601` to test Kibana.
611629
* Alternatively you can use browserstack
612630

613-
#### Running Browser Automation Tests
631+
##### Running Browser Automation Tests
614632

615633
[Read about the `FunctionalTestRunner`](https://www.elastic.co/guide/en/kibana/current/development-functional-tests.html) to learn more about how you can run and develop functional tests for Kibana core and plugins.
616634

docs/canvas/canvas-elements.asciidoc

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,38 @@ By default, most of the elements you create use demo data until you change the d
2727

2828
* *Timelion* &mdash; Access your time series data using <<timelion,Timelion>> queries. To use Timelion queries, you can enter a query using the <<lucene-query,Lucene Query Syntax>>.
2929

30+
Each element can display a different data source. Pages and workpads often contain multiple data sources.
31+
3032
[float]
3133
[[canvas-add-object]]
3234
==== Add a saved object
3335

34-
Add a <<managing-saved-objects,saved object>>, then customize it to fit your display needs.
36+
Add <<managing-saved-objects,saved objects>> to your workpad, such as maps and visualizations.
3537

36-
. Click *Embed object*.
38+
. Click *Add element > Add from Visualize Library*.
3739

38-
. Select the object you want to add.
40+
. Select the saved object you want to add.
3941
+
4042
[role="screenshot"]
4143
image::images/canvas-map-embed.gif[]
4244

4345
. To use the customization options, click the panel menu, then select one of the following options:
4446

45-
* *Edit map* &mdash; Opens <<maps,Maps>> so that you can edit the original map.
47+
* *Edit map* &mdash; Opens <<maps,Maps>> or <<visualize,Visualize>> so that you can edit the original saved object.
4648

47-
* *Customize panel* &mdash; Specifies the object title options.
49+
* *Edit panel title* &mdash; Adds a title to the saved object.
4850

49-
* *Inspect* &mdash; Allows you to drill down into the element data.
51+
* *Customize time range* &mdash; Exposes a time filter dedicated to the saved object.
5052

51-
* *Customize time range* &mdash; Exposes a time filter dedicated to the map.
53+
* *Inspect* &mdash; Allows you to drill down into the element data.
5254

5355
[float]
5456
[[canvas-add-image]]
5557
==== Add your own image
5658

5759
To personalize your workpad, add your own logos and graphics.
5860

59-
. Click *Manage assets*.
61+
. Click *Add element > Manage assets*.
6062

6163
. On the *Manage workpad assets* window, drag and drop your images.
6264

@@ -83,40 +85,25 @@ Move and resize your elements to meet your design needs.
8385
[[format-canvas-elements]]
8486
==== Format elements
8587

86-
Align, distribute, and reorder elements for consistency and readability across your workpad pages.
87-
88-
Access the align, distribute, and reorder options by clicking the *Element options* icon.
89-
90-
[role="screenshot"]
91-
image::images/canvas_element_options.png[]
88+
For consistency and readability across your workpad pages, align, distribute, and reorder elements.
9289

93-
To align elements:
90+
To align two or more elements:
9491

9592
. Press and hold Shift, then select the elements you want to align.
9693

97-
. Click the , then select *Group*.
94+
. Click *Edit > Alignment*, then select the alignment option.
9895

99-
. Click the *Element options* icon, then select *Alignment*.
100-
101-
. Select the alignment option.
102-
103-
To distribute elements:
96+
To distribute three or more elements:
10497

10598
. Press and hold Shift, then select the elements you want to distribute.
10699

107-
. Click the *Element options* icon, then select *Group*.
108-
109-
. Click the *Element options* icon, then select *Distribution*.
110-
111-
. Select the distribution option.
100+
. Click *Edit > Distribution*, then select the distribution option.
112101

113102
To reorder elements:
114103

115104
. Select the element you want to reorder.
116105

117-
. Click the *Element options* icon, then select *Order*.
118-
119-
. Select the order option.
106+
. Click *Edit > Order*, then select the order option.
120107

121108
[float]
122109
[[data-display]]
@@ -157,14 +144,14 @@ text.align: center;
157144

158145
To use the elements across all workpads, save the elements.
159146

160-
When you're ready to save your element, select the element, then click the *Save as new element* icon.
147+
When you're ready to save your element, select the element, then click *Edit > Save as new element*.
161148

162149
[role="screenshot"]
163150
image::images/canvas_save_element.png[]
164151

165-
To save a group of elements, press and hold Shift, then select the elements you want to save.
152+
To save a group of elements, press and hold Shift, select the elements you want to save, then click *Edit > Save as new element*.
166153

167-
To access your saved elements, click *Add element*, then select *My elements*.
154+
To access your saved elements, click *Add element > My elements*.
168155

169156
[float]
170157
[[delete-elements]]
@@ -174,9 +161,7 @@ When you no longer need an element, delete it from your workpad.
174161

175162
. Select the element you want to delete.
176163

177-
. Click the *Element options* icon.
164+
. Click *Edit > Delete*.
178165
+
179166
[role="screenshot"]
180167
image::images/canvas_element_options.png[]
181-
182-
. Select *Delete*.

0 commit comments

Comments
 (0)