Skip to content

Commit e1d5375

Browse files
Merge branch 'master' into drilldown-count-tooltip
2 parents e3b5d3e + dccb1dc commit e1d5375

File tree

200 files changed

+6141
-1699
lines changed

Some content is hidden

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

200 files changed

+6141
-1699
lines changed

.ci/es-snapshots/Jenkinsfile_verify_es

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def SNAPSHOT_MANIFEST = "https://storage.googleapis.com/kibana-ci-es-snapshots-d
2121

2222
kibanaPipeline(timeoutMinutes: 120) {
2323
catchErrors {
24+
retryable.enable(2)
2425
withEnv(["ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}"]) {
2526
parallel([
2627
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),

docs/canvas/canvas-function-reference.asciidoc

Lines changed: 256 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ filters
4242
| metric "Average uptime"
4343
metricFont={
4444
font size=48 family="'Open Sans', Helvetica, Arial, sans-serif"
45-
color={
46-
if {all {gte 0} {lt 0.8}} then="red" else="green"
47-
}
48-
align="center" lHeight=48
45+
color={
46+
if {all {gte 0} {lt 0.8}} then="red" else="green"
47+
}
48+
align="center" lHeight=48
4949
}
5050
| render
5151
----
@@ -324,12 +324,14 @@ case if={lte 50} then="green"
324324
----
325325
math "random()"
326326
| progress shape="gauge" label={formatnumber "0%"}
327-
font={font size=24 family="'Open Sans', Helvetica, Arial, sans-serif" align="center"
328-
color={
329-
switch {case if={lte 0.5} then="green"}
330-
{case if={all {gt 0.5} {lte 0.75}} then="orange"}
331-
default="red"
332-
}}
327+
font={
328+
font size=24 family="'Open Sans', Helvetica, Arial, sans-serif" align="center"
329+
color={
330+
switch {case if={lte 0.5} then="green"}
331+
{case if={all {gt 0.5} {lte 0.75}} then="orange"}
332+
default="red"
333+
}
334+
}
333335
valueColor={
334336
switch {case if={lte 0.5} then="green"}
335337
{case if={all {gt 0.5} {lte 0.75}} then="orange"}
@@ -693,7 +695,25 @@ Alias: `value`
693695
[[demodata_fn]]
694696
=== `demodata`
695697

696-
A mock data set that includes project CI times with usernames, countries, and run phases.
698+
A sample data set that includes project CI times with usernames, countries, and run phases.
699+
700+
*Expression syntax*
701+
[source,js]
702+
----
703+
demodata
704+
demodata "ci"
705+
demodata type="shirts"
706+
----
707+
708+
*Code example*
709+
[source,text]
710+
----
711+
filters
712+
| demodata
713+
| table
714+
| render
715+
----
716+
`demodata` is a mock data set that you can use to start playing around in Canvas.
697717

698718
*Accepts:* `filter`
699719

@@ -837,6 +857,28 @@ Alias: `value`
837857

838858
Query Elasticsearch for the number of hits matching the specified query.
839859

860+
*Expression syntax*
861+
[source,js]
862+
----
863+
escount index="logstash-*"
864+
escount "currency:"EUR"" index="kibana_sample_data_ecommerce"
865+
escount query="response:404" index="kibana_sample_data_logs"
866+
----
867+
868+
*Code example*
869+
[source,text]
870+
----
871+
filters
872+
| escount "Cancelled:true" index="kibana_sample_data_flights"
873+
| math "value"
874+
| progress shape="semicircle"
875+
label={formatnumber 0,0}
876+
font={font size=24 family="'Open Sans', Helvetica, Arial, sans-serif" color="#000000" align=center}
877+
max={filters | escount index="kibana_sample_data_flights"}
878+
| render
879+
----
880+
The first `escount` expression retrieves the number of flights that were cancelled. The second `escount` expression retrieves the total number of flights.
881+
840882
*Accepts:* `filter`
841883

842884
[cols="3*^<"]
@@ -867,6 +909,34 @@ Default: `_all`
867909

868910
Query Elasticsearch for raw documents. Specify the fields you want to retrieve, especially if you are asking for a lot of rows.
869911

912+
*Expression syntax*
913+
[source,js]
914+
----
915+
esdocs index="logstash-*"
916+
esdocs "currency:"EUR"" index="kibana_sample_data_ecommerce"
917+
esdocs query="response:404" index="kibana_sample_data_logs"
918+
esdocs index="kibana_sample_data_flights" count=100
919+
esdocs index="kibana_sample_data_flights" sort="AvgTicketPrice, asc"
920+
----
921+
922+
*Code example*
923+
[source,text]
924+
----
925+
filters
926+
| esdocs index="kibana_sample_data_ecommerce"
927+
fields="customer_gender, taxful_total_price, order_date"
928+
sort="order_date, asc"
929+
count=10000
930+
| mapColumn "order_date"
931+
fn={getCell "order_date" | date {context} | rounddate "YYYY-MM-DD"}
932+
| alterColumn "order_date" type="date"
933+
| pointseries x="order_date" y="sum(taxful_total_price)" color="customer_gender"
934+
| plot defaultStyle={seriesStyle lines=3}
935+
palette={palette "#7ECAE3" "#003A4D" gradient=true}
936+
| render
937+
----
938+
This retrieves the first 10000 documents data from the `kibana_sample_data_ecommerce` index sorted by `order_date` in ascending order, and only requests the `customer_gender`, `taxful_total_price`, and `order_date` fields.
939+
870940
*Accepts:* `filter`
871941

872942
[cols="3*^<"]
@@ -915,6 +985,23 @@ Default: `_all`
915985

916986
Queries Elasticsearch using Elasticsearch SQL.
917987

988+
*Expression syntax*
989+
[source,js]
990+
----
991+
essql query="SELECT * FROM "logstash*""
992+
essql "SELECT * FROM "apm*"" count=10000
993+
----
994+
995+
*Code example*
996+
[source,text]
997+
----
998+
filters
999+
| essql query="SELECT Carrier, FlightDelayMin, AvgTicketPrice FROM "kibana_sample_data_flights""
1000+
| table
1001+
| render
1002+
----
1003+
This retrieves the `Carrier`, `FlightDelayMin`, and `AvgTicketPrice` fields from the "kibana_sample_data_flights" index.
1004+
9181005
*Accepts:* `filter`
9191006

9201007
[cols="3*^<"]
@@ -1107,7 +1194,7 @@ Default: `false`
11071194
[[font_fn]]
11081195
=== `font`
11091196

1110-
Creates a font style.
1197+
Create a font style.
11111198

11121199
*Expression syntax*
11131200
[source,js]
@@ -1244,7 +1331,7 @@ Alias: `format`
12441331
[[formatnumber_fn]]
12451332
=== `formatnumber`
12461333

1247-
Formats a number into a formatted number string using the <<numeral, numeral pattern syntax>>.
1334+
Formats a number into a formatted number string using the Numeral pattern.
12481335

12491336
*Expression syntax*
12501337
[source,js]
@@ -1276,7 +1363,7 @@ The `formatnumber` subexpression receives the same `context` as the `progress` f
12761363

12771364
Alias: `format`
12781365
|`string`
1279-
|A <<numeral, numeral pattern>> string. For example, `"0.0a"` or `"0%"`.
1366+
|A Numeral pattern format string. For example, `"0.0a"` or `"0%"`.
12801367
|===
12811368

12821369
*Returns:* `string`
@@ -1559,6 +1646,34 @@ Alias: `value`
15591646
[[m_fns]]
15601647
== M
15611648

1649+
[float]
1650+
[[mapCenter_fn]]
1651+
=== `mapCenter`
1652+
1653+
Returns an object with the center coordinates and zoom level of the map.
1654+
1655+
*Accepts:* `null`
1656+
1657+
[cols="3*^<"]
1658+
|===
1659+
|Argument |Type |Description
1660+
1661+
|`lat` ***
1662+
|`number`
1663+
|Latitude for the center of the map
1664+
1665+
|`lon` ***
1666+
|`number`
1667+
|Longitude for the center of the map
1668+
1669+
|`zoom` ***
1670+
|`number`
1671+
|Zoom level of the map
1672+
|===
1673+
1674+
*Returns:* `mapCenter`
1675+
1676+
15621677
[float]
15631678
[[mapColumn_fn]]
15641679
=== `mapColumn`
@@ -1612,6 +1727,12 @@ Default: `""`
16121727
|The CSS font properties for the content. For example, "font-family" or "font-weight".
16131728

16141729
Default: `${font}`
1730+
1731+
|`openLinksInNewTab`
1732+
|`boolean`
1733+
|A true or false value for opening links in a new tab. The default value is `false`. Setting to `true` opens all links in a new tab.
1734+
1735+
Default: `false`
16151736
|===
16161737

16171738
*Returns:* `render`
@@ -1675,7 +1796,7 @@ Default: `${font size=48 family="'Open Sans', Helvetica, Arial, sans-serif" colo
16751796

16761797
Alias: `format`
16771798
|`string`
1678-
|A <<numeral, numeral pattern>> string. For example, `"0.0a"` or `"0%"`.
1799+
|A Numeral pattern format string. For example, `"0.0a"` or `"0%"`.
16791800
|===
16801801

16811802
*Returns:* `render`
@@ -2184,6 +2305,102 @@ Returns the number of rows. Pairs with <<ply_fn>> to get the count of unique col
21842305
[[s_fns]]
21852306
== S
21862307

2308+
[float]
2309+
[[savedLens_fn]]
2310+
=== `savedLens`
2311+
2312+
Returns an embeddable for a saved Lens visualization object.
2313+
2314+
*Accepts:* `any`
2315+
2316+
[cols="3*^<"]
2317+
|===
2318+
|Argument |Type |Description
2319+
2320+
|`id`
2321+
|`string`
2322+
|The ID of the saved Lens visualization object
2323+
2324+
|`timerange`
2325+
|`timerange`
2326+
|The timerange of data that should be included
2327+
2328+
|`title`
2329+
|`string`
2330+
|The title for the Lens visualization object
2331+
|===
2332+
2333+
*Returns:* `embeddable`
2334+
2335+
2336+
[float]
2337+
[[savedMap_fn]]
2338+
=== `savedMap`
2339+
2340+
Returns an embeddable for a saved map object.
2341+
2342+
*Accepts:* `any`
2343+
2344+
[cols="3*^<"]
2345+
|===
2346+
|Argument |Type |Description
2347+
2348+
|`center`
2349+
|`mapCenter`
2350+
|The center and zoom level the map should have
2351+
2352+
|`hideLayer` †
2353+
|`string`
2354+
|The IDs of map layers that should be hidden
2355+
2356+
|`id`
2357+
|`string`
2358+
|The ID of the saved map object
2359+
2360+
|`timerange`
2361+
|`timerange`
2362+
|The timerange of data that should be included
2363+
2364+
|`title`
2365+
|`string`
2366+
|The title for the map
2367+
|===
2368+
2369+
*Returns:* `embeddable`
2370+
2371+
2372+
[float]
2373+
[[savedVisualization_fn]]
2374+
=== `savedVisualization`
2375+
2376+
Returns an embeddable for a saved visualization object.
2377+
2378+
*Accepts:* `any`
2379+
2380+
[cols="3*^<"]
2381+
|===
2382+
|Argument |Type |Description
2383+
2384+
|`colors` †
2385+
|`seriesStyle`
2386+
|Defines the color to use for a specific series
2387+
2388+
|`hideLegend`
2389+
|`boolean`
2390+
|Specifies the option to hide the legend
2391+
2392+
|`id`
2393+
|`string`
2394+
|The ID of the saved visualization object
2395+
2396+
|`timerange`
2397+
|`timerange`
2398+
|The timerange of data that should be included
2399+
|===
2400+
2401+
*Returns:* `embeddable`
2402+
2403+
21872404
[float]
21882405
[[seriesStyle_fn]]
21892406
=== `seriesStyle`
@@ -2579,6 +2796,30 @@ Default: `"now"`
25792796
*Returns:* `datatable`
25802797

25812798

2799+
[float]
2800+
[[timerange_fn]]
2801+
=== `timerange`
2802+
2803+
An object that represents a span of time.
2804+
2805+
*Accepts:* `null`
2806+
2807+
[cols="3*^<"]
2808+
|===
2809+
|Argument |Type |Description
2810+
2811+
|`from` ***
2812+
|`string`
2813+
|The start of the time range
2814+
2815+
|`to` ***
2816+
|`string`
2817+
|The end of the time range
2818+
|===
2819+
2820+
*Returns:* `timerange`
2821+
2822+
25822823
[float]
25832824
[[to_fn]]
25842825
=== `to`
9.54 KB
Loading

0 commit comments

Comments
 (0)