Skip to content

Commit 1c14a36

Browse files
author
Liza K
committed
Merge branch 'master' of github.com:elastic/kibana into pr/82545
2 parents 168214b + e892b03 commit 1c14a36

File tree

364 files changed

+3658
-3315
lines changed

Some content is hidden

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

364 files changed

+3658
-3315
lines changed

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchbar.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<b>Signature:</b>
88

99
```typescript
10-
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, any> & {
11-
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated"> & ReactIntl.InjectedIntlProps>;
10+
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "intl" | "indexPatterns" | "dataTestSubj" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, "query" | "isLoading" | "filters" | "indexPatterns" | "dataTestSubj" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, any> & {
11+
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "intl" | "indexPatterns" | "dataTestSubj" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated"> & ReactIntl.InjectedIntlProps>;
1212
}
1313
```

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.search.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ search: {
3434
siblingPipelineType: string;
3535
termsAggFilter: string[];
3636
toAbsoluteDates: typeof toAbsoluteDates;
37+
calcAutoIntervalLessThan: typeof calcAutoIntervalLessThan;
3738
};
3839
getRequestInspectorStats: typeof getRequestInspectorStats;
3940
getResponseInspectorStats: typeof getResponseInspectorStats;

docs/user/dashboard/tutorials.asciidoc

Lines changed: 28 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ Now that you've created your *Lens* visualization, add it to a <<dashboard,dashb
7676
[[vega-lite-tutorial-create-your-first-visualizations]]
7777
=== Create your first visualization with Vega-Lite
7878

79-
experimental[]
80-
8179
In this tutorial, you will learn about how to edit Vega-Lite in {kib} to create
8280
a stacked area chart from an {es} search query. It will give you a starting point
8381
for a more comprehensive
@@ -88,7 +86,7 @@ In this tutorial, you will build a stacked area chart from one of the {kib} samp
8886
sets.
8987

9088
[role="screenshot"]
91-
image::visualize/images/vega_lite_tutorial_1.png[]
89+
image::visualize/images/vega_lite_tutorial_1.png[Vega-Lite tutorial stacked area chart]
9290

9391
Before beginning this tutorial, install the <<add-sample-data, eCommerce sample data>>
9492
set.
@@ -98,7 +96,7 @@ line chart which shows the total number of documents across all your indices
9896
within the time range.
9997

10098
[role="screenshot"]
101-
image::visualize/images/vega_lite_default.png[]
99+
image::visualize/images/vega_lite_default.png[Vega-Lite tutorial default visualization]
102100

103101
The text editor contains a Vega-Lite spec written in https://hjson.github.io/[HJSON],
104102
which is similar to JSON but optimized for human editing. HJSON supports:
@@ -134,7 +132,7 @@ Click "Update". The result is probably not what you expect. You should see a fla
134132
line with 0 results.
135133

136134
You've only changed the index, so the difference must be the query is returning
137-
no results. You can try the <<vega-browser-debugging-console, Vega debugging process>>,
135+
no results. You can try the <<vega-debugging, Vega debugging process>>,
138136
but intuition may be faster for this particular problem.
139137

140138
In this case, the problem is that you are querying the field `@timestamp`,
@@ -332,38 +330,29 @@ your spec:
332330

333331
If you copy and paste that into your Vega-Lite spec, and click "Update",
334332
you will see a warning saying `Infinite extent for field "key": [Infinity, -Infinity]`.
335-
Let's use our <<vega-browser-debugging-console, Vega debugging skills>> to understand why.
333+
Let's use our <<vega-inspector, Vega debugging skills>> to understand why.
336334

337335
Vega-Lite generates data using the names `source_0` and `data_0`. `source_0` contains
338336
the results from the {es} query, and `data_0` contains the visually encoded results
339337
which are shown in the chart. To debug this problem, you need to compare both.
340338

341-
To look at the source, open the browser dev tools console and type
342-
`VEGA_DEBUG.view.data('source_0')`. You will see:
339+
To inspect data sets, go to *Inspect* and select *View: Vega debug*. You will see a menu with different data sources:
343340

344-
```js
345-
[{
346-
doc_count: 454
347-
key: "Men's Clothing"
348-
time_buckets: {buckets: Array(57)}
349-
Symbol(vega_id): 12822
350-
}, ...]
351-
```
341+
[role="screenshot"]
342+
image::visualize/images/vega_lite_tutorial_3.png[Data set selector showing root, source_0, data_0, and marks]
352343

353-
To compare to the visually encoded data, open the browser dev tools console and type
354-
`VEGA_DEBUG.view.data('data_0')`. You will see:
344+
To look closer at the raw data in Vega, select the option for `source_0` in the dropdown:
355345

356-
```js
357-
[{
358-
doc_count: 454
359-
key: NaN
360-
time_buckets: {buckets: Array(57)}
361-
Symbol(vega_id): 13879
362-
}]
363-
```
346+
[role="screenshot"]
347+
image::visualize/images/vega_lite_tutorial_4.png[Table for data_0 with columns key, doc_count and array of time_buckets]
348+
349+
To compare to the visually encoded data, change the dropdown selection to `data_0`. You will see:
350+
351+
[role="screenshot"]
352+
image::visualize/images/vega_lite_tutorial_5.png[Table for data_0 where the key is NaN instead of a string]
364353

365354
The issue seems to be that the `key` property is not being converted the right way,
366-
which makes sense because the `key` is now `Men's Clothing` instead of a timestamp.
355+
which makes sense because the `key` is now category (`Men's Clothing`, `Women's Clothing`, etc.) instead of a timestamp.
367356

368357
To fix this, try updating the `encoding` of your Vega-Lite spec to:
369358

@@ -382,21 +371,13 @@ To fix this, try updating the `encoding` of your Vega-Lite spec to:
382371
}
383372
```
384373

385-
This will show more errors, and you can inspect `VEGA_DEBUG.view.data('data_0')` to
374+
This will show more errors, so you need to debug. Click *Inspect*, switch the view to *Vega Debug*, and switch to look at the visually encoded data in `data_0` to
386375
understand why. This now shows:
387376

388-
```js
389-
[{
390-
doc_count: 454
391-
key: "Men's Clothing"
392-
time_buckets: {buckets: Array(57)}
393-
time_buckets.buckets.doc_count: undefined
394-
time_buckets.buckets.key: null
395-
Symbol(vega_id): 14094
396-
}]
397-
```
377+
[role="screenshot"]
378+
image::visualize/images/vega_lite_tutorial_6.png[Table for data_0 showing that the column time_buckets.buckets.key is undefined]
398379

399-
It looks like the problem is that the `time_buckets` inner array is not being
380+
It looks like the problem is that the `time_buckets.buckets` inner array is not being
400381
extracted by Vega. The solution is to use a Vega-lite
401382
https://vega.github.io/vega-lite/docs/flatten.html[flatten transformation], available in {kib} 7.9 and later.
402383
If using an older version of Kibana, the flatten transformation is available in Vega
@@ -411,23 +392,10 @@ Add this section in between the `data` and `encoding` section:
411392
```
412393

413394
This does not yet produce the results you expect. Inspect the transformed data
414-
by typing `VEGA_DEBUG.view.data('data_0')` into the console again:
395+
by selecting `data_0` in *Data sets* again:
415396

416-
```js
417-
[{
418-
doc_count: 453
419-
key: "Men's Clothing"
420-
time_bucket.buckets.doc_count: undefined
421-
time_buckets: {buckets: Array(57)}
422-
time_buckets.buckets: {
423-
key_as_string: "2020-06-30T15:00:00.000Z",
424-
key: 1593529200000,
425-
doc_count: 2
426-
}
427-
time_buckets.buckets.key: null
428-
Symbol(vega_id): 21564
429-
}]
430-
```
397+
[role="screenshot"]
398+
image::visualize/images/vega_lite_tutorial_7.png[Table showing data_0 with multiple pages of results, but undefined values in the column time_buckets.buckets.key]
431399

432400
The debug view shows `undefined` values where you would expect to see numbers, and
433401
the cause is that there are duplicate names which are confusing Vega-Lite. This can
@@ -564,7 +532,9 @@ Now that you've enabled a selection, try moving the mouse around the visualizati
564532
and seeing the points respond to the nearest position:
565533

566534
[role="screenshot"]
567-
image::visualize/images/vega_lite_tutorial_2.png[]
535+
image::visualize/images/vega_lite_tutorial_2.png[Vega-Lite tutorial selection enabled]
536+
537+
The selection is controlled by a Vega signal, and can be viewed using the <<vega-inspector, Vega Inspector>>.
568538

569539
The final result of this tutorial is this spec:
570540

@@ -683,8 +653,6 @@ The final result of this tutorial is this spec:
683653
[[vega-tutorial-update-kibana-filters-from-vega]]
684654
=== Update {kib} filters from Vega
685655

686-
experimental[]
687-
688656
In this tutorial you will build an area chart in Vega using an {es} search query,
689657
and add a click handler and drag handler to update {kib} filters.
690658
This tutorial is not a full https://vega.github.io/vega/tutorials/[Vega tutorial],
@@ -935,6 +903,7 @@ The first step is to add a new `signal` to track the X position of the cursor:
935903
}]
936904
}
937905
```
906+
To learn more about inspecting signals, explore the <<vega-inspector, Vega Inspector>>.
938907

939908
Now add a new `mark` to indicate the current cursor position:
940909

@@ -1756,4 +1725,4 @@ Customize and format the visualization using functions:
17561725
image::images/timelion-conditional04.png[]
17571726
{nbsp}
17581727

1759-
For additional information on Timelion conditional capabilities, go to https://www.elastic.co/blog/timeseries-if-then-else-with-timelion[I have but one .condition()].
1728+
For additional information on Timelion conditional capabilities, go to https://www.elastic.co/blog/timeseries-if-then-else-with-timelion[I have but one .condition()].
18.3 KB
Loading
64.3 KB
Loading
85 KB
Loading
71.6 KB
Loading
171 KB
Loading

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"**/prismjs": "1.22.0",
9696
"**/request": "^2.88.2",
9797
"**/trim": "0.0.3",
98-
"**/typescript": "4.0.2"
98+
"**/typescript": "4.1.2"
9999
},
100100
"engines": {
101101
"node": "12.19.1",
@@ -654,7 +654,7 @@
654654
"file-loader": "^4.2.0",
655655
"file-saver": "^1.3.8",
656656
"formsy-react": "^1.1.5",
657-
"geckodriver": "^1.20.0",
657+
"geckodriver": "^1.21.0",
658658
"glob-watcher": "5.0.3",
659659
"graphql-code-generator": "^0.18.2",
660660
"graphql-codegen-add": "^0.18.2",
@@ -827,7 +827,7 @@
827827
"topojson-client": "3.0.0",
828828
"ts-loader": "^7.0.5",
829829
"tsd": "^0.13.1",
830-
"typescript": "4.0.2",
830+
"typescript": "4.1.2",
831831
"typescript-fsa": "^3.0.0",
832832
"typescript-fsa-reducers": "^1.2.1",
833833
"unlazy-loader": "^0.1.3",

packages/kbn-es-archiver/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@kbn/dev-utils": "link:../kbn-dev-utils",
15-
"@kbn/test": "link:../kbn-test"
15+
"@kbn/test": "link:../kbn-test",
16+
"@kbn/utils": "link:../kbn-utils"
1617
}
1718
}

0 commit comments

Comments
 (0)