Skip to content

Commit 9616142

Browse files
Merge branch 'master' of github.com:elastic/kibana into ingest_pipelines/polish
2 parents d8107bc + 6e0b20c commit 9616142

File tree

1,490 files changed

+29780
-18482
lines changed

Some content is hidden

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

1,490 files changed

+29780
-18482
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ module.exports = {
305305
'!src/core/server/mocks{,.ts}',
306306
'!src/core/server/types{,.ts}',
307307
'!src/core/server/test_utils{,.ts}',
308+
'!src/core/server/utils', // ts alias
309+
'!src/core/server/utils/**/*',
308310
// for absolute imports until fixed in
309311
// https://github.com/elastic/kibana/issues/36096
310312
'!src/core/server/*.test.mocks{,.ts}',

.github/CODEOWNERS

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@
6363
/src/plugins/apm_oss/ @elastic/apm-ui
6464
/src/apm.js @watson @vigneshshanmugam
6565

66+
# Client Side Monitoring (lives in APM directories but owned by Uptime)
67+
/x-pack/plugins/apm/e2e/cypress/support/step_definitions/rum @elastic/uptime
68+
/x-pack/plugins/apm/public/application/csmApp.tsx @elastic/uptime
69+
/x-pack/plugins/apm/public/components/app/RumDashboard @elastic/uptime
70+
/x-pack/plugins/apm/server/lib/rum_client @elastic/uptime
71+
/x-pack/plugins/apm/server/routes/rum_client.ts @elastic/uptime
72+
6673
# Beats
6774
/x-pack/legacy/plugins/beats_management/ @elastic/beats
6875

@@ -209,8 +216,19 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
209216
/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/ @elastic/kibana-alerting-services
210217

211218
# Enterprise Search
212-
/x-pack/plugins/enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend
213-
/x-pack/test/functional_enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend
219+
# Shared
220+
/x-pack/plugins/enterprise_search/ @elastic/enterprise-search-frontend
221+
/x-pack/test/functional_enterprise_search/ @elastic/enterprise-search-frontend
222+
# App Search
223+
/x-pack/plugins/enterprise_search/public/applications/app_search @elastic/app-search-frontend
224+
/x-pack/plugins/enterprise_search/server/routes/app_search @elastic/app-search-frontend
225+
/x-pack/plugins/enterprise_search/server/collectors/app_search @elastic/app-search-frontend
226+
/x-pack/plugins/enterprise_search/server/saved_objects/app_search @elastic/app-search-frontend
227+
# Workplace Search
228+
/x-pack/plugins/enterprise_search/public/applications/workplace_search @elastic/workplace-search-frontend
229+
/x-pack/plugins/enterprise_search/server/routes/workplace_search @elastic/workplace-search-frontend
230+
/x-pack/plugins/enterprise_search/server/collectors/workplace_search @elastic/workplace-search-frontend
231+
/x-pack/plugins/enterprise_search/server/saved_objects/workplace_search @elastic/workplace-search-frontend
214232

215233
# Elasticsearch UI
216234
/src/plugins/dev_tools/ @elastic/es-ui

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,6 @@ apm.tsconfig.json
6060
# release notes script output
6161
report.csv
6262
report.asciidoc
63+
64+
# TS incremental build cache
65+
*.tsbuildinfo

NOTICE.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
281281
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
282282
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
283283

284+
---
285+
This product includes code in the function applyCubicBezierStyles that was
286+
inspired by a public Codepen, which was available under a "MIT" license.
287+
288+
Copyright (c) 2020 by Guillaume (https://codepen.io/guillaumethomas/pen/xxbbBKO)
289+
MIT License http://www.opensource.org/licenses/mit-license
290+
284291
---
285292
This product includes code that is adapted from mapbox-gl-js, which is
286293
available under a "BSD-3-Clause" license.

docs/apm/apm-app-users.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Here are two examples:
8484
| Allow the use of the the {beat_kib_app}
8585

8686
| Spaces
87-
| `Read` or `All` on Dashboards, Visualize, and Discover
87+
| `Read` or `All` on Dashboards and Discover
8888
| Allow the user to view, edit, and create dashboards, as well as browse data.
8989
|====
9090

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
[role="xpack"]
2+
[[add-canvas-elements]]
3+
=== Add elements
4+
5+
Create a story about your data by adding elements to your workpad that include images, text, charts, and more. You can create your own elements and connect them to your data sources, add saved objects, and add your own images.
6+
7+
[float]
8+
[[create-canvas-element]]
9+
==== Create an element
10+
11+
Choose the type of element you want to use, then connect it to your own data.
12+
13+
. Click *Add element*, then select the element you want to use.
14+
+
15+
[role="screenshot"]
16+
image::images/canvas-element-select.gif[Canvas elements]
17+
18+
. To familiarize yourself with the element, use the preconfigured data demo data.
19+
+
20+
By default, most of the elements you create use demo data until you change the data source. The demo data includes a small data set that you can use to experiment with your element.
21+
22+
. To connect the element to your data, select *Data*, then select one of the following data sources:
23+
24+
* *{es} SQL* — Access your data in {es} using SQL syntax. For information about SQL syntax, refer to {ref}/sql-spec.html[SQL language].
25+
26+
* *{es} documents* &mdash; Access your data in {es} without using aggregations. To use, select an index and fields, and optionally enter a query using the <<lucene-query,Lucene Query Syntax>>. Use the *{es} documents* data source when you have low volume datasets, to view raw documents, or to plot exact, non-aggregated values on a chart.
27+
28+
* *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>>.
29+
30+
Each element can display a different data source. Pages and workpads often contain multiple data sources.
31+
32+
[float]
33+
[[canvas-add-object]]
34+
==== Add a saved object
35+
36+
Add <<managing-saved-objects,saved objects>> to your workpad, such as maps and visualizations.
37+
38+
. Click *Add element > Add from Visualize Library*.
39+
40+
. Select the saved object you want to add.
41+
+
42+
[role="screenshot"]
43+
image::images/canvas-map-embed.gif[]
44+
45+
. To use the customization options, click the panel menu, then select one of the following options:
46+
47+
* *Edit map* &mdash; Opens <<maps,Maps>> or <<create-panels,Dashboard>> so that you can edit the original saved object.
48+
49+
* *Edit panel title* &mdash; Adds a title to the saved object.
50+
51+
* *Customize time range* &mdash; Exposes a time filter dedicated to the saved object.
52+
53+
* *Inspect* &mdash; Allows you to drill down into the element data.
54+
55+
[float]
56+
[[canvas-add-image]]
57+
==== Add your own image
58+
59+
To personalize your workpad, add your own logos and graphics.
60+
61+
. Click *Add element > Manage assets*.
62+
63+
. On the *Manage workpad assets* window, drag and drop your images.
64+
65+
. To add the image to the workpad, click the *Create image element* icon.
66+
+
67+
[role="screenshot"]
68+
image::images/canvas-add-image.gif[]
69+
70+
[float]
71+
[[move-canvas-elements]]
72+
==== Organize elements
73+
74+
Move and resize your elements to meet your design needs.
75+
76+
* To move, click and hold the element, then drag to the new location.
77+
78+
* To move by 1 pixel, select the element, press and hold Shift, then use your arrow keys.
79+
80+
* To move by 10 pixels, select the element, then use your arrow keys.
81+
82+
* To resize, click and drag the resize handles to the new dimensions.
83+
84+
[float]
85+
[[format-canvas-elements]]
86+
==== Format elements
87+
88+
For consistency and readability across your workpad pages, align, distribute, and reorder elements.
89+
90+
To align two or more elements:
91+
92+
. Press and hold Shift, then select the elements you want to align.
93+
94+
. Click *Edit > Alignment*, then select the alignment option.
95+
96+
To distribute three or more elements:
97+
98+
. Press and hold Shift, then select the elements you want to distribute.
99+
100+
. Click *Edit > Distribution*, then select the distribution option.
101+
102+
To reorder elements:
103+
104+
. Select the element you want to reorder.
105+
106+
. Click *Edit > Order*, then select the order option.
107+
108+
[float]
109+
[[data-display]]
110+
==== Change the element display options
111+
112+
Each element has its own display options to fit your design needs.
113+
114+
To choose the display options, click *Display*, then make your changes.
115+
116+
To define the appearance of the container and border:
117+
118+
. Next to *Element style*, click *+*, then select *Container style*.
119+
120+
. Expand *Container style*.
121+
122+
. Change the *Appearance* and *Border* options.
123+
124+
To apply CSS overrides:
125+
126+
. Next to *Element style*, click *+*, then select *CSS*.
127+
128+
. Enter the *CSS*.
129+
+
130+
For example, to center the Markdown element, enter:
131+
+
132+
[source,text]
133+
--------------------------------------------------
134+
.canvasRenderEl h1 {
135+
text.align: center;
136+
}
137+
--------------------------------------------------
138+
139+
. Click *Apply stylesheet*.
140+
141+
[float]
142+
[[save-elements]]
143+
==== Save elements
144+
145+
To use the elements across all workpads, save the elements.
146+
147+
When you're ready to save your element, select the element, then click *Edit > Save as new element*.
148+
149+
[role="screenshot"]
150+
image::images/canvas_save_element.png[]
151+
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*.
153+
154+
To access your saved elements, click *Add element > My elements*.
155+
156+
[float]
157+
[[delete-elements]]
158+
==== Delete elements
159+
160+
When you no longer need an element, delete it from your workpad.
161+
162+
. Select the element you want to delete.
163+
164+
. Click *Edit > Delete*.
165+
+
166+
[role="screenshot"]
167+
image::images/canvas_element_options.png[]
Lines changed: 91 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,104 @@
11
[[development-accessibility-tests]]
22
== Automated Accessibility Testing
33

4+
5+
To write an accessibility test, use the provided accessibility service `getService('a11y')`. Accessibility tests are fairly straightforward to write as https://github.com/dequelabs/axe-core[axe] does most of the heavy lifting. Navigate to the UI that you need to test, then call `testAppSnapshot();` from the service imported earlier to make sure axe finds no failures. Navigate through every portion of the UI for the best coverage.
6+
7+
An example test might look like this:
8+
[source,js]
9+
----
10+
export default function ({ getService, getPageObjects }) {
11+
const { common, home } = getPageObjects(['common', 'home']);
12+
const a11y = getService('a11y'); /* this is the wrapping service around axe */
13+
14+
describe('Kibana Home', () => {
15+
before(async () => {
16+
await common.navigateToApp('home'); /* navigates to the page we want to test */
17+
});
18+
19+
it('Kibana Home view', async () => {
20+
await retry.waitFor(
21+
'home page visible',
22+
async () => await testSubjects.exists('homeApp')
23+
); /* confirm you're on the correct page and that it's loaded */
24+
await a11y.testAppSnapshot(); /* this expects that there are no failures found by axe */
25+
});
26+
27+
/**
28+
* If these tests were added by our QA team, tests that fail that require significant app code
29+
* changes to be fixed will be skipped with a corresponding issue label with more info
30+
*/
31+
// Skipped due to https://github.com/elastic/kibana/issues/99999
32+
it.skip('all plugins view page meets a11y requirements', async () => {
33+
await home.clickAllKibanaPlugins();
34+
await a11y.testAppSnapshot();
35+
});
36+
37+
/**
38+
* Testing all the versions and different views of of a page is important to get good
39+
* coverage. Things like empty states, different license levels, different permissions, and
40+
* loaded data can all significantly change the UI which necessitates their own test.
41+
*/
42+
it('Add Kibana sample data page', async () => {
43+
await common.navigateToUrl('home', '/tutorial_directory/sampleData', {
44+
useActualUrl: true,
45+
});
46+
await a11y.testAppSnapshot();
47+
});
48+
});
49+
}
50+
----
51+
52+
=== Running tests
453
To run the tests locally:
554

655
[arabic]
7-
. In one terminal window run
8-
`node scripts/functional_tests_server --config test/accessibility/config.ts`
9-
. In another terminal window run
10-
`node scripts/functional_test_runner.js --config test/accessibility/config.ts`
56+
. In one terminal window run:
57+
+
58+
[source,shell]
59+
-----------
60+
node scripts/functional_tests_server --config test/accessibility/config.ts
61+
-----------
62+
63+
. When the server prints that it is ready, in another terminal window run:
64+
+
65+
[source,shell]
66+
-----------
67+
node scripts/functional_test_runner.js --config test/accessibility/config.ts
68+
-----------
1169

1270
To run the x-pack tests, swap the config file out for
1371
`x-pack/test/accessibility/config.ts`.
1472

15-
After the server is up, you can go to this instance of {kib} at
16-
`localhost:5620`.
17-
1873
The testing is done using https://github.com/dequelabs/axe-core[axe].
19-
The same thing that runs in CI, can be run locally using their browser
20-
plugins:
74+
You can run the same thing that runs CI using browser plugins:
2175

2276
* https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US[Chrome]
23-
* https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/[Firefox]
77+
* https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/[Firefox]
78+
79+
=== Anatomy of a failure
80+
81+
Failures can seem confusing if you've never seen one before. Here is a breakdown of what a failure coming from CI might look like:
82+
[source,bash]
83+
----
84+
1) Dashboard
85+
create dashboard button:
86+
87+
Error: a11y report:
88+
89+
VIOLATION
90+
[aria-hidden-focus]: Ensures aria-hidden elements do not contain focusable elements
91+
Help: https://dequeuniversity.com/rules/axe/3.5/aria-hidden-focus?application=axeAPI
92+
Elements:
93+
- #example
94+
at Accessibility.testAxeReport (test/accessibility/services/a11y/a11y.ts:90:15)
95+
at Accessibility.testAppSnapshot (test/accessibility/services/a11y/a11y.ts:58:18)
96+
at process._tickCallback (internal/process/next_tick.js:68:7)
97+
----
98+
99+
100+
* "Dashboard" and "create dashboard button" are the names of the test suite and specific test that failed.
101+
* Always in brackets, "[aria-hidden-focus]" is the name of the axe rule that failed, followed by a short description.
102+
* "Help: <url>" links to the axe documentation for that rule, including severity, remediation tips, and good and bad code examples.
103+
* "Elements:" points to where in the DOM the failure originated (using CSS selector syntax). In this example, the problem came from an element with the ID `example`. If the selector is too complicated to find the source of the problem, use the browser plugins mentioned earlier to locate it. If you have a general idea where the issue is coming from, you can also try adding unique IDs to the page to narrow down the location.
104+
* The stack trace points to the internals of axe. The stack trace is there in case the test failure is a bug in axe and not in your code, although this is unlikely.

docs/development/core/public/kibana-plugin-core-public.appbase.capabilities.md renamed to docs/development/core/public/kibana-plugin-core-public.app.capabilities.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [capabilities](./kibana-plugin-core-public.appbase.capabilities.md)
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [App](./kibana-plugin-core-public.app.md) &gt; [capabilities](./kibana-plugin-core-public.app.capabilities.md)
44

5-
## AppBase.capabilities property
5+
## App.capabilities property
66

77
Custom capabilities defined by the app.
88

docs/development/core/public/kibana-plugin-core-public.appbase.category.md renamed to docs/development/core/public/kibana-plugin-core-public.app.category.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [category](./kibana-plugin-core-public.appbase.category.md)
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [App](./kibana-plugin-core-public.app.md) &gt; [category](./kibana-plugin-core-public.app.category.md)
44

5-
## AppBase.category property
5+
## App.category property
66

77
The category definition of the product See [AppCategory](./kibana-plugin-core-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference
88

docs/development/core/public/kibana-plugin-core-public.appbase.defaultpath.md renamed to docs/development/core/public/kibana-plugin-core-public.app.defaultpath.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

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)
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [App](./kibana-plugin-core-public.app.md) &gt; [defaultPath](./kibana-plugin-core-public.app.defaultpath.md)
44

5-
## AppBase.defaultPath property
5+
## App.defaultPath property
66

77
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.
88

0 commit comments

Comments
 (0)