diff --git a/.ci/jobs.yml b/.ci/jobs.yml index f9302db4b2910..84d8f75acbd30 100644 --- a/.ci/jobs.yml +++ b/.ci/jobs.yml @@ -21,6 +21,7 @@ JOB: - x-pack-ciGroup4 - x-pack-ciGroup5 - x-pack-ciGroup6 + - x-pack-ciGroup7 # `~` is yaml for `null` exclude: ~ diff --git a/docs/api.asciidoc b/docs/api.asciidoc index a650d016ce951..ab9134c27719d 100644 --- a/docs/api.asciidoc +++ b/docs/api.asciidoc @@ -24,6 +24,8 @@ wherever possible. have breaking changes in any version of Kibana, or it might even be removed entirely. +NOTE: You cannot access these APIs via the Console in Kibana. + [float] == APIs * <> diff --git a/docs/api/dashboard-import.asciidoc b/docs/api/dashboard-import.asciidoc index 43ed037daf13b..b928abfd06881 100644 --- a/docs/api/dashboard-import.asciidoc +++ b/docs/api/dashboard-import.asciidoc @@ -10,6 +10,8 @@ documents directly to the `.kibana` index. *Do not do this!* Writing directly to the `.kibana` index is not safe and it _will_ result in corrupted data that permanently breaks Kibana in a future version. +NOTE: You cannot access these endpoints via the Console in Kibana. + * <> * <> diff --git a/docs/api/dashboard-import/export.asciidoc b/docs/api/dashboard-import/export.asciidoc index 861fa7626de91..e71631aefd340 100644 --- a/docs/api/dashboard-import/export.asciidoc +++ b/docs/api/dashboard-import/export.asciidoc @@ -7,6 +7,8 @@ The dashboard export API allows people to export dashboards along with all of their corresponding saved objects such as visualizations, saved searches, and index patterns. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request `GET /api/kibana/dashboards/export` diff --git a/docs/api/dashboard-import/import.asciidoc b/docs/api/dashboard-import/import.asciidoc index e95d15f1b20d0..3e9584bafbddd 100644 --- a/docs/api/dashboard-import/import.asciidoc +++ b/docs/api/dashboard-import/import.asciidoc @@ -7,6 +7,8 @@ The dashboard import API allows people to import dashboards along with all of their corresponding saved objects such as visualizations, saved searches, and index patterns. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request `POST /api/kibana/dashboards/import` diff --git a/docs/api/logstash-configuration-management.asciidoc b/docs/api/logstash-configuration-management.asciidoc index d788cfb29d711..78cb215723eba 100644 --- a/docs/api/logstash-configuration-management.asciidoc +++ b/docs/api/logstash-configuration-management.asciidoc @@ -9,6 +9,8 @@ Traditionally users would perform this integration by accessing the the `.logsta directly. *Do not do this!* The structure of this index is subject to change, which could cause your integration to break. Instead, use the following API. +NOTE: You cannot access these endpoints via the Console in Kibana. + * <> * <> * <> diff --git a/docs/api/logstash-configuration-management/create.asciidoc b/docs/api/logstash-configuration-management/create.asciidoc index e3f8a6260d80a..8df496f1b6211 100644 --- a/docs/api/logstash-configuration-management/create.asciidoc +++ b/docs/api/logstash-configuration-management/create.asciidoc @@ -7,6 +7,8 @@ experimental[This functionality is *experimental* and may be changed or removed The Create Pipeline API enables you to create a centrally-managed Logstash pipeline. You can also use it to update an existing pipeline. +Note: You cannot access this endpoint via the Console in Kibana. + [float] ==== Request diff --git a/docs/api/logstash-configuration-management/delete.asciidoc b/docs/api/logstash-configuration-management/delete.asciidoc index e286440f9075f..36c7060e96a0e 100644 --- a/docs/api/logstash-configuration-management/delete.asciidoc +++ b/docs/api/logstash-configuration-management/delete.asciidoc @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed The Delete Pipeline API enables you to delete a centrally-managed Logstash pipeline. +Note: You cannot access this endpoint via the Console in Kibana. + [float] ==== Request diff --git a/docs/api/logstash-configuration-management/list.asciidoc b/docs/api/logstash-configuration-management/list.asciidoc index 3f60ab240ed20..d93e734bbdfd4 100644 --- a/docs/api/logstash-configuration-management/list.asciidoc +++ b/docs/api/logstash-configuration-management/list.asciidoc @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed The List Pipelines API enables you to list all centrally-managed Logstash pipelines. +Note: You cannot access this endpoint via the Console in Kibana. + [float] ==== Request diff --git a/docs/api/logstash-configuration-management/retrieve.asciidoc b/docs/api/logstash-configuration-management/retrieve.asciidoc index 894d8f7947d1f..d98ca54a39e83 100644 --- a/docs/api/logstash-configuration-management/retrieve.asciidoc +++ b/docs/api/logstash-configuration-management/retrieve.asciidoc @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed The Retrieve Pipeline API enables you to retrieve a centrally-managed Logstash pipeline. +Note: You cannot access this endpoint via the Console in Kibana. + [float] ==== Request diff --git a/docs/api/role-management.asciidoc b/docs/api/role-management.asciidoc index 638be89ffbfdf..ded9db75e6150 100644 --- a/docs/api/role-management.asciidoc +++ b/docs/api/role-management.asciidoc @@ -9,6 +9,8 @@ It is *not* supported to do so using the {ref}/security-api.html#security-role-apis[{es} role management APIs], and doing so will likely cause {kib}'s authorization to behave unexpectedly. +NOTE: You cannot access these endpoints via the Console in Kibana. + * <> * <> * <> diff --git a/docs/api/role-management/delete.asciidoc b/docs/api/role-management/delete.asciidoc index 6bcc82a7498c0..be5a9a84cfc57 100644 --- a/docs/api/role-management/delete.asciidoc +++ b/docs/api/role-management/delete.asciidoc @@ -3,6 +3,8 @@ experimental[This API is experimental and may be changed or removed completely in a future release. Although the underlying mechanism of enforcing role-based access control is stable, the APIs for managing the roles are currently experimental.] +Note: You cannot access this endpoint via the Console in Kibana. + ==== Authorization To use this API, you must have at least the `manage_security` cluster privilege. diff --git a/docs/api/role-management/get.asciidoc b/docs/api/role-management/get.asciidoc index f6262a6de1423..6f7e3f37950d4 100644 --- a/docs/api/role-management/get.asciidoc +++ b/docs/api/role-management/get.asciidoc @@ -5,6 +5,8 @@ experimental[This API is experimental and may be changed or removed completely i Retrieves all {kib} roles, or a specific role. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Authorization To use this API, you must have at least the `manage_security` cluster privilege. diff --git a/docs/api/role-management/put.asciidoc b/docs/api/role-management/put.asciidoc index d6974c3b9e08c..acbd9fc62b8e8 100644 --- a/docs/api/role-management/put.asciidoc +++ b/docs/api/role-management/put.asciidoc @@ -6,6 +6,8 @@ experimental[This API is experimental and may be changed or removed completely i Creates a new {kib} role or updates the attributes of an existing role. {kib} roles are stored in the {es} native realm. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Authorization To use this API, you must have at least the `manage_security` cluster privilege. diff --git a/docs/api/saved-objects.asciidoc b/docs/api/saved-objects.asciidoc index ee8b73a02efb8..756890faa122d 100644 --- a/docs/api/saved-objects.asciidoc +++ b/docs/api/saved-objects.asciidoc @@ -9,6 +9,8 @@ documents directly to the `.kibana` index. *Do not do this!* Writing directly to the `.kibana` index is not safe and it _will_ result in corrupted data that permanently breaks Kibana in a future version. +NOTE: You cannot access these endpoints via the Console in Kibana. + * <> * <> * <> diff --git a/docs/api/saved-objects/bulk_create.asciidoc b/docs/api/saved-objects/bulk_create.asciidoc index 307a6d23408bc..62b63674e6f81 100644 --- a/docs/api/saved-objects/bulk_create.asciidoc +++ b/docs/api/saved-objects/bulk_create.asciidoc @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed The bulk-create saved object API enables you to persist multiple Kibana saved objects. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request `POST /api/saved_objects/_bulk_create` diff --git a/docs/api/saved-objects/bulk_get.asciidoc b/docs/api/saved-objects/bulk_get.asciidoc index f741410aa87de..3d081affcebc7 100644 --- a/docs/api/saved-objects/bulk_get.asciidoc +++ b/docs/api/saved-objects/bulk_get.asciidoc @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed The bulk-get saved object API enables you to retrieve multiple Kibana saved objects by id. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request `POST /api/saved_objects/_bulk_get` diff --git a/docs/api/saved-objects/create.asciidoc b/docs/api/saved-objects/create.asciidoc index 0a8ae9d7c636d..7631dd296c2b3 100644 --- a/docs/api/saved-objects/create.asciidoc +++ b/docs/api/saved-objects/create.asciidoc @@ -5,6 +5,8 @@ experimental[This functionality is *experimental* and may be changed or removed The create saved object API enables you to persist a Kibana saved object. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request `POST /api/saved_objects/` + diff --git a/docs/api/saved-objects/delete.asciidoc b/docs/api/saved-objects/delete.asciidoc index 1c75321e1c73e..c303edf2ed422 100644 --- a/docs/api/saved-objects/delete.asciidoc +++ b/docs/api/saved-objects/delete.asciidoc @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed The delete saved object API permanently removes a Kibana saved object. Once a saved object has been deleted, _it cannot be recovered_. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request `DELETE /api/saved_objects//` diff --git a/docs/api/saved-objects/find.asciidoc b/docs/api/saved-objects/find.asciidoc index 26c6187f9b99c..a95cf61ffd749 100644 --- a/docs/api/saved-objects/find.asciidoc +++ b/docs/api/saved-objects/find.asciidoc @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed The find saved object API enables you to retrieve a paginated set of Kibana saved objects by various conditions. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request `GET /api/saved_objects/_find` diff --git a/docs/api/saved-objects/get.asciidoc b/docs/api/saved-objects/get.asciidoc index 669936657a393..cb9b577d46e7a 100644 --- a/docs/api/saved-objects/get.asciidoc +++ b/docs/api/saved-objects/get.asciidoc @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed The get saved object API enables you to retrieve a single Kibana saved object by id. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request `GET /api/saved_objects//` diff --git a/docs/api/saved-objects/update.asciidoc b/docs/api/saved-objects/update.asciidoc index 5c47e447c2881..2c61f2e66b4b0 100644 --- a/docs/api/saved-objects/update.asciidoc +++ b/docs/api/saved-objects/update.asciidoc @@ -6,6 +6,8 @@ experimental[This functionality is *experimental* and may be changed or removed The update saved object API enables you to update the attributes for an existing Kibana saved object. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request `PUT /api/saved_objects//` diff --git a/docs/api/spaces-management.asciidoc b/docs/api/spaces-management.asciidoc index f5f9a9d81c2fc..869f7e722dd3d 100644 --- a/docs/api/spaces-management.asciidoc +++ b/docs/api/spaces-management.asciidoc @@ -6,6 +6,8 @@ experimental[This API is *experimental* and may be changed or removed completely The spaces API allows people to manage their spaces within {kib}. +NOTE: You cannot access these endpoints via the Console in Kibana. + * <> * <> * <> diff --git a/docs/api/spaces-management/delete.asciidoc b/docs/api/spaces-management/delete.asciidoc index c5ae025dd9e2e..fbc20bbf26d0c 100644 --- a/docs/api/spaces-management/delete.asciidoc +++ b/docs/api/spaces-management/delete.asciidoc @@ -8,6 +8,8 @@ experimental[This API is *experimental* and may be changed or removed completely Deleting a space will automatically delete all saved objects that belong to that space. This operation cannot be undone! ================================================== +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request To delete a space, submit a DELETE request to the `/api/spaces/space/` diff --git a/docs/api/spaces-management/get.asciidoc b/docs/api/spaces-management/get.asciidoc index c79a883a80e4b..88ad117bdd492 100644 --- a/docs/api/spaces-management/get.asciidoc +++ b/docs/api/spaces-management/get.asciidoc @@ -5,6 +5,8 @@ experimental[This API is *experimental* and may be changed or removed completely Retrieves all {kib} spaces, or a specific space. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Get all {kib} spaces ===== Request diff --git a/docs/api/spaces-management/post.asciidoc b/docs/api/spaces-management/post.asciidoc index 38ff647051335..fcdff350b2aa6 100644 --- a/docs/api/spaces-management/post.asciidoc +++ b/docs/api/spaces-management/post.asciidoc @@ -5,6 +5,8 @@ experimental[This API is *experimental* and may be changed or removed completely Creates a new {kib} space. To update an existing space, use the PUT command. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request To create a space, issue a POST request to the diff --git a/docs/api/spaces-management/put.asciidoc b/docs/api/spaces-management/put.asciidoc index 529742bf2ce66..b5d41ec0a4fe5 100644 --- a/docs/api/spaces-management/put.asciidoc +++ b/docs/api/spaces-management/put.asciidoc @@ -5,6 +5,8 @@ experimental[This API is *experimental* and may be changed or removed completely Updates an existing {kib} space. To create a new space, use the POST command. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request To update a space, issue a PUT request to the diff --git a/docs/api/url-shortening.asciidoc b/docs/api/url-shortening.asciidoc index 47bbfd3746a69..52da092831181 100644 --- a/docs/api/url-shortening.asciidoc +++ b/docs/api/url-shortening.asciidoc @@ -6,6 +6,8 @@ Internet Explorer has URL length restrictions, and some wiki and markup parsers The short URLs enabled by this API are designed to make sharing Kibana URLs easier. +NOTE: You cannot access these endpoints via the Console in Kibana. + * <> include::url_shortening/shorten_url.asciidoc[] diff --git a/docs/api/url_shortening/shorten_url.asciidoc b/docs/api/url_shortening/shorten_url.asciidoc index 813a670f0aa12..2f9d9342296b9 100644 --- a/docs/api/url_shortening/shorten_url.asciidoc +++ b/docs/api/url_shortening/shorten_url.asciidoc @@ -3,6 +3,8 @@ The Shorten URL API allows for converting a Kibana URL into a token. +Note: You cannot access this endpoint via the Console in Kibana. + ==== Request `POST /api/shorten_url` diff --git a/docs/canvas.asciidoc b/docs/canvas.asciidoc index 0a883831dbee5..892857ad20363 100644 --- a/docs/canvas.asciidoc +++ b/docs/canvas.asciidoc @@ -16,8 +16,16 @@ you make neat stuff and you want to show that neat stuff to others. Canvas is for makers who are a little bit creative, a little bit technical, and whole lot of curious. -We've put together <> to teach you -how to get the most out of Canvas. +[role="screenshot"] +image::images/canvas_workpad_weblog.png[] + + +We've put together <> to get you +up and running with Canvas. + +If you want to dig into the expression language and the functions that drive +Canvas, see the <> and +<>. -- @@ -25,3 +33,12 @@ include::canvas/canvas-getting-started.asciidoc[] include::canvas/canvas-workpad.asciidoc[] +include::canvas/canvas-function-reference.asciidoc[] + +include::canvas/canvas-common-functions.asciidoc[] + +include::canvas/canvas-server-functions.asciidoc[] + +include::canvas/canvas-client-functions.asciidoc[] + +include::canvas/canvas-tinymath-functions.asciidoc[] diff --git a/docs/canvas/canvas-client-functions.asciidoc b/docs/canvas/canvas-client-functions.asciidoc new file mode 100644 index 0000000000000..a88fa8a5a9490 --- /dev/null +++ b/docs/canvas/canvas-client-functions.asciidoc @@ -0,0 +1,82 @@ +[[canvas-client-functions]] +=== Canvas client functions + +beta[]These functions must execute in a browser. They are only available +from within the Canvas application, not via the Canvas HTTP API. These functions must +execute in the browser because they use browser specific APIs, such as location, +or interact with the workpad to read filters. + +A *** denotes a required argument. + +[float] +=== asset + +Uses Canvas workpad asset objects to provide argument values. Usually images. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|string +|The ID of the asset value to return +|=== + +*Returns:* string + + +[float] +=== browser + +Forces the interpreter to return to the browser. + +*Accepts:* Anything or nothing + +*Returns:* Depends on your input and arguments + +[float] +=== filters + +Collects element filters on the workpad, usually to provide them to a data source. + +*Accepts:* null + +*Returns:* filter + +[float] +=== location + +Uses the browser's location functionality to get your current location. Usually +quite slow, but fairly accurate. + +*Accepts:* null + +*Returns:* datatable + +[float] +=== urlparam + +Accesses URL parameters and use them in expressions. This will always return a string. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* (Aliases: `var`, `variable`) +|string +|The URL hash parameter to access + +|default +|string +|Return this string if the url parameter is not defined (default: `""`) +|=== + +*Returns:* string diff --git a/docs/canvas/canvas-common-functions.asciidoc b/docs/canvas/canvas-common-functions.asciidoc new file mode 100644 index 0000000000000..805832e2887e7 --- /dev/null +++ b/docs/canvas/canvas-common-functions.asciidoc @@ -0,0 +1,1524 @@ +[[canvas-common-functions]] +=== Canvas common functions + +beta[]The common functions can run anywhere, which means they'll execute wherever +the expression is currently executing. For example, if the engine is currently +running on the server, the functions will run on the server. + +A *** denotes a required argument. + + +[float] +=== all + +Returns true if all of the conditions are true. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|boolean +|The conditions to check +|=== + +*Returns:* boolean + + +[float] +=== alterColumn + +Converts between core types, for example, string, number, null, boolean, date +and rename columns. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|column* +|string +|The name of the column to alter + +|type +|string +|The type to convert the column to; leave blank to not change type (default: `null`) + +|name +|string +|The resultant column name; leave blank to not rename (default: `null`) +|=== + +*Returns:* datatable + + +[float] +=== any + +Returns true if any of the conditions are true. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|boolean +|The conditions to check +|=== + +*Returns:* boolean + + +[float] +=== as + +Creates a datatable with a single value. + +*Accepts:* string, boolean, number, null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ (Alias: `name`) +|string +|A name to give the column (default: `value`) +|=== + +*Returns:* datatable + + +[float] +=== axisConfig + +Configures axis of a visualization. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|show +|boolean +|default: `true` + +|position +|string +|The position of the axis labels, for example, top, bottom, left, and right +|=== + +*Returns:* axisConfig + + +[float] +=== case + +Builds a case (including a condition/result) to pass to the switch function. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ +|any +|This value is compared to the context to see if the condition +s met. It is overridden by the "if" argument if both are provided. + +|if* +|boolean +|This value determines whether or not the condition is met. +It overrides the unnamed argument if both are provided. + +|then +|any +|The value to return if the condition is met +|=== + +*Returns:* case + +[float] +=== clog + +Outputs the context to the console. + +*Accepts:* Anything or nothing + +*Returns:* Depends on your input and arguments + + +[float] +=== columns + +Includes or excludes columns from a data table. If you specify both, this will exclude first. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|include +|string +|A comma separated list of column names to keep in the table +(default: `null`) + +|exclude +|string +|A comma separated list of column names to remove from the table +(default: `null`) +|=== + +*Returns:* datatable + + +[float] +=== compare + +Compares the input to something else to determine true or false. +Usually used in combination with `if`. This only works with primitive types, +such as number, string, and boolean. + +*Accepts:* null, string, number, boolean + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ (Alias: `op`) +|string +|The operator to use in the comparison: `eq` (equal), `ne` (not equal), `lt` +(less than), `gt` (greater than), `lte` (less than equal), `gte` (greater than eq). +The default is `eq`. + +|to (Aliases: `this`, `b`) +|any +|The value to compare the context to, usually returned by a subexpression +|=== + +*Returns:* boolean + + +[float] +=== containerStyle + +Creates an object used for describing the properties of a series on a chart. +You would usually use this inside of a charting function. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|border +|string +|Valid CSS border string + +|borderRadius +|string +|Number of pixels to use when rounding the border + +|padding +|string +|Content distance in pixels from border + +|backgroundColor +|string +|Valid CSS background color string + +|backgroundImage +|string +|Valid CSS background image string + +|backgroundSize +|string +|Valid CSS background size string (default: `contain`) + +|backgroundRepeat +|string +|Valid CSS background repeat string (default: `no-repeat`) + +|opacity +|number +|A number between 0 and 1 representing the degree of transparency of the element +|=== + +*Returns:* containerStyle + + +[float] +=== context + +Returns whatever you pass into it. This can be useful when you need to use +context as argument to a function as a sub-expression. + +*Accepts:* Anything or nothing + +*Returns:* Depends on your input and arguments + +[float] +=== csv + +Creates a datatable from CSV input. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|string +|CSV data to use + +|delimiter* +|string +|Data separation character + +|newLine* +|string +|Row separation character +|=== + +*Returns:* containerStyle + + +[float] +=== date + +Returns the current time, or a time parsed from a string, as milliseconds since epoch. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ +|string +|An optional date string to be parsed into milliseconds +since epoch. Can be either a valid JavaScript Date input or a string to parse +using the format argument. Must be an ISO 8601 string or you must provide the format. + +|format* +|string +|The Moment.js format for parsing the optional date +string. See the https://momentjs.com/docs/#/displaying/[Moment.js documentation]. +|=== + +*Returns:* number + + +[float] +=== do + +Runs multiple sub-expressions. Returns the passed in context. Nice for running +actions producing functions. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ +|any +|One or more sub-expressions. The value of these is not +available in the root pipeline as this function simply returns the passed in context. +|=== + +*Returns:* Depends on your input and arguments + + +[float] +=== dropdownControl + +Configures a dropdown filter control element. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|filterColumn +|any +|The column or field to which to attach the filter + +|valueColumn +|any +|The datatable column from which to extract the unique values +for the dropdown +|=== + +*Returns:* render + + +[float] +=== eq + +Returns whether the context is equal to the argument. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|boolean, number, string +|The value to which to compare the context +|=== + +*Returns:* boolean + +[float] +=== exactly + +Creates a filter that matches a given column for a perfectly exact value. + +*Accepts:* filter + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|column* (Aliases: `field`, `c`) +|string +|The column or field to attach the filter to + +|value* (Aliases: `v`, `val`) +|string +|The value to match exactly, including white space and +capitalization +|=== + +*Returns:* filter + + +[float] +=== filterrows + +Filters rows in a datatable based on the return value of a subexpression. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* (Alias: `fn`) +|boolean +|An expression to pass into each row in the datatable. +The expression should return a boolean. A true value preserves the row, +and a false value removes it. +|=== + +*Returns:* datatable + + +[float] +=== font + +Creates font style. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|size +|number +|The font size in pixels (default: `14`) + +|lHeight* (Alias: `lineHeight`) +|number +|The line height in pixels + +|family +|string +|An acceptable CSS web font string (default: `"'Open Sans', Helvetica, Arial, sans-serif"`) + +|color +|string +|The text color + +|weight +|string +|The font weight, for example, `normal`, `bold`, `bolder`, `lighter`, +`100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` (default is `normal`) + +|underline +|boolean +|Underline the text, `true` or `false` (default is `false`) + +|italic +|boolean +|Italicize the text, `true` or `false` (default is `false`) + +|align +|string +|The horizontal alignment of text (default is `left`) +|=== + +*Returns:* style + + +[float] +=== formatdate + +Outputs milliseconds since epoch as a formatted string. + +*Accepts:* number + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|string +|Moment.js Format with which to bucket, see the https://momentjs.com/docs/#/displaying/[Moment.js documentation] +|=== + +*Returns:* string + + +[float] +=== formatnumber + +Turns a number into a string using a Number.js format. + +*Accepts:* number + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|string +|Numeral.js format string, see the http://numeraljs.com/#format[Numeral.js documentation] +|=== + +*Returns:* string + + +[float] +=== getCell + +Fetches a single cell in a table. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* (Aliases: `column`, `c`) +|string +|The name of the column value to fetch + +|row (Alias: `r`) +|number +|The row number, starting at 0 (default: `0`) +|=== + +*Returns:* Depends on your input and arguments + + +[float] +=== gt + +Returns whether the context is greater than the argument. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|boolean, number, string +|The value to compare the context to +|=== + +*Returns:* boolean + + +[float] +=== gte + +Returns whether the context is greater than or equal to the argument. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|boolean, number, string +|The value to compare the context to +|=== + +*Returns:* boolean + + +[float] +=== head + +Gets the first N rows from the datatable. Also see `tail`. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ +|number +|Return this number of rows from the beginning of the datatable (default: `1`) +|=== + +*Returns:* datatable + + +[float] +=== if + +Performs conditional logic. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ (Alias: `condition`) +|boolean +|A boolean true or false, usually returned by a subexpression. +If this is not supplied, then the input context will be used. + +|then +|any +|The return value if true + +|else +|any +|The return value if false. If else is not specified, and the condition is false, +then the input context to the function will be returned. +|=== + +*Returns:* Depends on your input and arguments + + +[float] +=== image + +Displays an image. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|dataurl (Alias: `_,`, `url`) +|string +|An image asset can be provided as a base64 dataurl, or passed in as a subexpression +(see example below) + +|mode +|string +|`contain` +|=== + +Example value for the `dataurl` argument, formatted as a base64 data URL: +[source, url] +------------- +data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmlld0JveD0iMCAwIDI3MC42MDAwMSAyNjkuNTQ2NjYiCiAgIGhlaWdodD0iMjY5LjU0NjY2IgogICB3aWR0aD0iMjcwLjYwMDAxIgogICB4bWw6c3BhY2U9InByZXNlcnZlIgogICBpZD0ic3ZnMiIKICAgdmVyc2lvbj0iMS4xIj48bWV0YWRhdGEKICAgICBpZD0ibWV0YWRhdGE4Ij48cmRmOlJERj48Y2M6V29yawogICAgICAgICByZGY6YWJvdXQ9IiI+PGRjOmZvcm1hdD5pbWFnZS9zdmcreG1sPC9kYzpmb3JtYXQ+PGRjOnR5cGUKICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIiAvPjwvY2M6V29yaz48L3JkZjpSREY+PC9tZXRhZGF0YT48ZGVmcwogICAgIGlkPSJkZWZzNiIgLz48ZwogICAgIHRyYW5zZm9ybT0ibWF0cml4KDEuMzMzMzMzMywwLDAsLTEuMzMzMzMzMywwLDI2OS41NDY2NykiCiAgICAgaWQ9ImcxMCI+PGcKICAgICAgIHRyYW5zZm9ybT0ic2NhbGUoMC4xKSIKICAgICAgIGlkPSJnMTIiPjxwYXRoCiAgICAgICAgIGlkPSJwYXRoMTQiCiAgICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2tlOm5vbmUiCiAgICAgICAgIGQ9Im0gMjAyOS40OCw5NjIuNDQxIGMgMCwxNzAuMDk5IC0xMDUuNDYsMzE4Ljc5OSAtMjY0LjE3LDM3Ni42NTkgNi45OCwzNS44NiAxMC42Miw3MS43MSAxMC42MiwxMDkuMDUgMCwzMTYuMTkgLTI1Ny4yNCw1NzMuNDMgLTU3My40Nyw1NzMuNDMgLTE4NC43MiwwIC0zNTYuNTU4LC04OC41OSAtNDY0LjUzLC0yMzcuODUgLTUzLjA5LDQxLjE4IC0xMTguMjg1LDYzLjc1IC0xODYuMzA1LDYzLjc1IC0xNjcuODM2LDAgLTMwNC4zODMsLTEzNi41NCAtMzA0LjM4MywtMzA0LjM4IDAsLTM3LjA4IDYuNjE3LC03Mi41OCAxOS4wMzEsLTEwNi4wOCBDIDEwOC40ODgsMTM4MC4wOSAwLDEyMjcuODkgMCwxMDU4Ljg4IDAsODg3LjkxIDEwNS45NzcsNzM4LjUzOSAyNjUuMzk4LDY4MS4wOSBjIC02Ljc2OSwtMzUuNDQyIC0xMC40NiwtNzIuMDIgLTEwLjQ2LC0xMDkgQyAyNTQuOTM4LDI1Ni42MjEgNTExLjU2NiwwIDgyNy4wMjcsMCAxMDEyLjIsMCAxMTgzLjk0LDg4Ljk0MTQgMTI5MS4zLDIzOC44MzIgYyA1My40NSwtNDEuOTYxIDExOC44LC02NC45OTIgMTg2LjU2LC02NC45OTIgMTY3LjgzLDAgMzA0LjM4LDEzNi40OTIgMzA0LjM4LDMwNC4zMzIgMCwzNy4wNzggLTYuNjIsNzIuNjI5IC0xOS4wMywxMDYuMTI5IDE1Ny43OCw1Ni44NzkgMjY2LjI3LDIwOS4xMjkgMjY2LjI3LDM3OC4xNCIgLz48cGF0aAogICAgICAgICBpZD0icGF0aDE2IgogICAgICAgICBzdHlsZT0iZmlsbDojZmFjZjA5O2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIgogICAgICAgICBkPSJtIDc5Ny44OTgsMTE1MC45MyA0NDQuMDcyLC0yMDIuNDUgNDQ4LjA1LDM5Mi41OCBjIDYuNDksMzIuMzkgOS42Niw2NC42NyA5LjY2LDk4LjQ2IDAsMjc2LjIzIC0yMjQuNjgsNTAwLjk1IC01MDAuOSw1MDAuOTUgLTE2NS4yNCwwIC0zMTkuMzcsLTgxLjM2IC00MTMuMDUzLC0yMTcuNzkgbCAtNzQuNTI0LC0zODYuNjQgODYuNjk1LC0xODUuMTEiIC8+PHBhdGgKICAgICAgICAgaWQ9InBhdGgxOCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ5YzFhZTtmaWxsLW9wYWNpdHk6MTtmaWxsLXJ1bGU6bm9uemVybztzdHJva2U6bm9uZSIKICAgICAgICAgZD0ibSAzMzguMjIzLDY4MC42NzIgYyAtNi40ODksLTMyLjM4MyAtOS44MDksLTY1Ljk4MSAtOS44MDksLTk5Ljk3MyAwLC0yNzYuOTI5IDIyNS4zMzYsLTUwMi4yNTc2IDUwMi4zMTMsLTUwMi4yNTc2IDE2Ni41OTMsMCAzMjEuNDczLDgyLjExNzYgNDE1LjAxMywyMTkuOTQ5NiBsIDczLjk3LDM4NS4zNDcgLTk4LjcyLDE4OC42MjEgTCA3NzUuMTU2LDEwNzUuNTcgMzM4LjIyMyw2ODAuNjcyIiAvPjxwYXRoCiAgICAgICAgIGlkPSJwYXRoMjAiCiAgICAgICAgIHN0eWxlPSJmaWxsOiNlZjI5OWI7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2tlOm5vbmUiCiAgICAgICAgIGQ9Im0gMzM1LjQxLDE0NDkuMTggMzA0LjMzMiwtNzEuODYgNjYuNjgsMzQ2LjAyIGMgLTQxLjU4NiwzMS43OCAtOTIuOTMsNDkuMTggLTE0NS43MzEsNDkuMTggLTEzMi4yNSwwIC0yMzkuODEyLC0xMDcuNjEgLTIzOS44MTIsLTIzOS44NyAwLC0yOS4yMSA0Ljg3OSwtNTcuMjIgMTQuNTMxLC04My40NyIgLz48cGF0aAogICAgICAgICBpZD0icGF0aDIyIgogICAgICAgICBzdHlsZT0iZmlsbDojNGNhYmU0O2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIgogICAgICAgICBkPSJNIDMwOC45OTIsMTM3Ni43IEMgMTczLjAyLDEzMzEuNjQgNzguNDgwNSwxMjAxLjMgNzguNDgwNSwxMDU3LjkzIDc4LjQ4MDUsOTE4LjM0IDE2NC44Miw3OTMuNjggMjk0LjQwNiw3NDQuMzUyIGwgNDI2Ljk4MSwzODUuOTM4IC03OC4zOTUsMTY3LjUxIC0zMzQsNzguOSIgLz48cGF0aAogICAgICAgICBpZD0icGF0aDI0IgogICAgICAgICBzdHlsZT0iZmlsbDojODVjZTI2O2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIgogICAgICAgICBkPSJtIDEzMjMuOCwyOTguNDEgYyA0MS43NCwtMzIuMDkgOTIuODMsLTQ5LjU5IDE0NC45OCwtNDkuNTkgMTMyLjI1LDAgMjM5LjgxLDEwNy41NTkgMjM5LjgxLDIzOS44MjEgMCwyOS4xNiAtNC44OCw1Ny4xNjggLTE0LjUzLDgzLjQxOCBsIC0zMDQuMDgsNzEuMTYgLTY2LjE4LC0zNDQuODA5IiAvPjxwYXRoCiAgICAgICAgIGlkPSJwYXRoMjYiCiAgICAgICAgIHN0eWxlPSJmaWxsOiMzMTc3YTc7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2tlOm5vbmUiCiAgICAgICAgIGQ9Im0gMTM4NS42Nyw3MjIuOTMgMzM0Ljc2LC03OC4zMDEgYyAxMzYuMDIsNDQuOTYxIDIzMC41NiwxNzUuMzUxIDIzMC41NiwzMTguNzYyIDAsMTM5LjMzOSAtODYuNTQsMjYzLjg1OSAtMjE2LjM4LDMxMy4wMzkgbCAtNDM3Ljg0LC0zODMuNTkgODguOSwtMTY5LjkxIiAvPjwvZz48L2c+PC9zdmc+ +------------- + +*Returns:* image + + +[float] +=== lt + +Returns whether the context is less than the argument passed in. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|boolean, number, string +|The value to compare the context to +|=== + +*Returns:* boolean + + +[float] +=== lte + +Returns whether the context is less than or equal to the argument passed in. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|boolean, number, string +|The value to compare the context to +|=== + +*Returns:* boolean + + +[float] +=== mapColumn + +Adds a column calculated as the result of other columns, or not. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* (Alias: `column`) +|string +|The name of the resulting column + +|expression (Aliases: `exp`, `fn`) +|boolean, number, string +|A Canvas expression that will be passed to each row as a single row datatable +|=== + +*Returns:* datatable + + +[float] +=== markdown + +Adds an element for rendering Markdown text. Great for single numbers, metrics, or paragraphs of text. + +*Accepts:* datatable, null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ +|string +|A string containing Markdown. You can pass this multiple +times to achieve concatenation (default: `""`). + +|font +|style +|Font settings. Technically, you can put other styles in here too (default is `{font}`). +|=== + +*Returns:* render + + +[float] +=== math + +Interprets a math expression, with a number or datatable as context. Datatable +columns are available by their column name. If you pass in a number, it is +available as "value" (without the quotes). + +*Accepts:* number, datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|string +|An evaluated TinyMath expression, see <> +|=== + +*Returns:* number + + +[float] +=== metric + +A number with a label. + +*Accepts:* string, null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ +|string +|Text describing the metric (default is `""`) + +|metricFont +|style +|Font settings for the metric. Technically, you can put other styles in here too. +The default is `{font size=48 family="'Open Sans', Helvetica, Arial, sans-serif" color="#000000" align=center lHeight=48}`. + +|labelFont +|style +|Font settings for the label. Technically you can put other styles in here too. +The default is `{font size=14 family="'Open Sans', Helvetica, Arial, sans-serif" color="#000000" align=center}`. +|=== + +*Returns:* render + + +[float] +=== neq + +Returns whether the context is not equal to the argument. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|boolean, number, string +|The value to compare the context to +|=== + +*Returns:* boolean + + +[float] +=== palette + +Creates a color palette. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|string +|Palette colors, rgba, hex, or HTML color string; you can pass this multiple times + +|gradient +|boolean +|Make a gradient, where supported (default: `false`) + +|reverse +|any +|Reverse the palette (default is `false`) +|=== + +*Returns:* palette + + +[float] +=== pie + +Configures a pie chart element. + +*Accepts:* pointseries + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|palette +|palette +|A palette object for describing the colors to use on this pie (default: `{palette}`) + +|seriesStyle +|seriesStyle +|A style of a specific series + +|radius +|any +|Radius of the pie as a percentage (between 0 and 1) of the available space. +Set to `auto` to automatically set radius (default: `auto`). + +|hole +|number +|Draw a hole in the pie, 0-100, as a percentage of the pie radius (default: `0`) + +|labels +|boolean +|Show pie labels (default: `true`) + +|labelRadius +|number +|The percentage of the area of container to use as a radius for the label circle +(default: `100`) + +|font +|style +|The label font (default: `{font}`) + +|legend +|string, boolean +|The legend position, `nw`, `sw`, `ne`, `se`, or `false` (default: `false`) + +|tilt +|number +|The percentage of tilt, where 1 is fully vertical and 0 is completely flat (default: `1`) +|=== + +*Returns:* render + + +[float] +=== plot + +Configures a plot element. + +*Accepts:* pointseries + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|seriesStyle +|seriesStyle +|A style of a specific series + +|defaultStyle +|seriesStyle +|The default style to use for every series (default is `{seriesStyle points=5}`) + +|palette +|palette +|A palette object for describing the colors to use on this plot (default is `{palette}`) + +|font +|style +|The legend and tick mark fonts (default is `{font}`) + +|legend +|string, boolean +|The legend position, `nw`, `sw`, `ne`, `se`, or `false` (default is `ne`) + +|yaxis +|boolean, axisConfig +|Axis configuration, or use `false` to disable (default is `true`) + +|xaxis +|boolean, axisConfig +|Axis configuration, or use `false` to disable (default is `true`) +|=== + +*Returns:* render + + +[float] +=== ply + +Subdivides a datatable and passes the resulting tables into an expression, +then merges the output. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|by* +|string +|The column to subdivide + +|expression* (Alias: `fn`, `function`) +|datatable +|An expression to pass into each resulting data table. +Expressions must return a datatable. Use `as` to turn literals into datatables. +Multiple expressions must return the same number of rows. If you need to return +a differing row count, pipe into another instance of `ply`. +If multiple expressions return the same columns, the last one wins. +|=== + +*Returns:* datatable + + +[float] +=== render + +Renders an input as a specific element and sets element level options, +such as styling. + +*Accepts:* render + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|as +|string +|The element type to use in rendering. You might want to use a +specialized function instead, such as `plot` or `grid`. + +|css +|string +|Any block of custom CSS to be scoped to this element (default is `"* > * {}"`) + +|containerStyle +|containerStyle +|Style for the container, including background, border, and opacity +|=== + +*Returns:* render + + +[float] +=== repeatImage + +Configures a repeating image element. + +*Accepts:* number + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|image +|string +|An image asset can be provided as a base64 dataurl, or passed in as a subexpression + (see example below) + +|size +|number +|default: `100` + +|max +|number +|default: `100` + +|emptyImage +|string +|default: `null` +|=== + + +Example value for the `image` argument, formatted as a base64 data URL: +[source, url] +------------ +data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20viewBox%3D%22-3.948730230331421%20-1.7549896240234375%20245.25946044921875%20241.40370178222656%22%20width%3D%22245.25946044921875%22%20height%3D%22241.40370178222656%22%20style%3D%22enable-background%3Anew%200%200%20686.2%20235.7%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%09.st0%7Bfill%3A%232D2D2D%3B%7D%0A%3C%2Fstyle%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Cg%20transform%3D%22matrix%281%2C%200%2C%200%2C%201%2C%200%2C%200%29%22%3E%0A%20%20%20%20%3Cg%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M329.4%2C160.3l4.7-0.5l0.3%2C9.6c-12.4%2C1.7-23%2C2.6-31.8%2C2.6c-11.7%2C0-20-3.4-24.9-10.2%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-4.9-6.8-7.3-17.4-7.3-31.7c0-28.6%2C11.4-42.9%2C34.1-42.9c11%2C0%2C19.2%2C3.1%2C24.6%2C9.2c5.4%2C6.1%2C8.1%2C15.8%2C8.1%2C28.9l-0.7%2C9.3h-53.8%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc0%2C9%2C1.6%2C15.7%2C4.9%2C20c3.3%2C4.3%2C8.9%2C6.5%2C17%2C6.5C312.8%2C161.2%2C321.1%2C160.9%2C329.4%2C160.3z%20M325%2C124.9c0-10-1.6-17.1-4.8-21.2%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-3.2-4.1-8.4-6.2-15.6-6.2c-7.2%2C0-12.7%2C2.2-16.3%2C6.5c-3.6%2C4.3-5.5%2C11.3-5.6%2C20.9H325z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M354.3%2C171.4V64h12.2v107.4H354.3z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M443.5%2C113.5v41.1c0%2C4.1%2C10.1%2C3.9%2C10.1%2C3.9l-0.6%2C10.8c-8.6%2C0-15.7%2C0.7-20-3.4c-9.8%2C4.3-19.5%2C6.1-29.3%2C6.1%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-7.5%2C0-13.2-2.1-17.1-6.4c-3.9-4.2-5.9-10.3-5.9-18.3c0-7.9%2C2-13.8%2C6-17.5c4-3.7%2C10.3-6.1%2C18.9-6.9l25.6-2.4v-7%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc0-5.5-1.2-9.5-3.6-11.9c-2.4-2.4-5.7-3.6-9.8-3.6l-32.1%2C0V87.2h31.3c9.2%2C0%2C15.9%2C2.1%2C20.1%2C6.4C441.4%2C97.8%2C443.5%2C104.5%2C443.5%2C113.5%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bz%20M393.3%2C146.7c0%2C10%2C4.1%2C15%2C12.4%2C15c7.4%2C0%2C14.7-1.2%2C21.8-3.7l3.7-1.3v-26.9l-24.1%2C2.3c-4.9%2C0.4-8.4%2C1.8-10.6%2C4.2%26%2310%3B%26%239%3B%26%239%3B%26%239%3BC394.4%2C138.7%2C393.3%2C142.2%2C393.3%2C146.7z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M491.2%2C98.2c-11.8%2C0-17.8%2C4.1-17.8%2C12.4c0%2C3.8%2C1.4%2C6.5%2C4.1%2C8.1c2.7%2C1.6%2C8.9%2C3.2%2C18.6%2C4.9%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc9.7%2C1.7%2C16.5%2C4%2C20.5%2C7.1c4%2C3%2C6%2C8.7%2C6%2C17.1c0%2C8.4-2.7%2C14.5-8.1%2C18.4c-5.4%2C3.9-13.2%2C5.9-23.6%2C5.9c-6.7%2C0-29.2-2.5-29.2-2.5%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bl0.7-10.6c12.9%2C1.2%2C22.3%2C2.2%2C28.6%2C2.2c6.3%2C0%2C11.1-1%2C14.4-3c3.3-2%2C5-5.4%2C5-10.1c0-4.7-1.4-7.9-4.2-9.6c-2.8-1.7-9-3.3-18.6-4.8%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-9.6-1.5-16.4-3.7-20.4-6.7c-4-2.9-6-8.4-6-16.3c0-7.9%2C2.8-13.8%2C8.4-17.6c5.6-3.8%2C12.6-5.7%2C20.9-5.7c6.6%2C0%2C29.6%2C1.7%2C29.6%2C1.7%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bv10.7C508.1%2C99%2C498.2%2C98.2%2C491.2%2C98.2z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M581.7%2C99.5h-25.9v39c0%2C9.3%2C0.7%2C15.5%2C2%2C18.4c1.4%2C2.9%2C4.6%2C4.4%2C9.7%2C4.4l14.5-1l0.8%2C10.1%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-7.3%2C1.2-12.8%2C1.8-16.6%2C1.8c-8.5%2C0-14.3-2.1-17.6-6.2c-3.3-4.1-4.9-12-4.9-23.6V99.5h-11.6V88.9h11.6V63.9h12.1v24.9h25.9V99.5z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M598.7%2C78.4V64.3h12.2v14.2H598.7z%20M598.7%2C171.4V88.9h12.2v82.5H598.7z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M663.8%2C87.2c3.6%2C0%2C9.7%2C0.7%2C18.3%2C2l3.9%2C0.5l-0.5%2C9.9c-8.7-1-15.1-1.5-19.2-1.5c-9.2%2C0-15.5%2C2.2-18.8%2C6.6%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-3.3%2C4.4-5%2C12.6-5%2C24.5c0%2C11.9%2C1.5%2C20.2%2C4.6%2C24.9c3.1%2C4.7%2C9.5%2C7%2C19.3%2C7l19.2-1.5l0.5%2C10.1c-10.1%2C1.5-17.7%2C2.3-22.7%2C2.3%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-12.7%2C0-21.5-3.3-26.3-9.8c-4.8-6.5-7.3-17.5-7.3-33c0-15.5%2C2.6-26.4%2C7.8-32.6C643%2C90.4%2C651.7%2C87.2%2C663.8%2C87.2z%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M236.6%2C123.5c0-19.8-12.3-37.2-30.8-43.9c0.8-4.2%2C1.2-8.4%2C1.2-12.7C207%2C30%2C177%2C0%2C140.2%2C0%26%2310%3B%26%239%3B%26%239%3BC118.6%2C0%2C98.6%2C10.3%2C86%2C27.7c-6.2-4.8-13.8-7.4-21.7-7.4c-19.6%2C0-35.5%2C15.9-35.5%2C35.5c0%2C4.3%2C0.8%2C8.5%2C2.2%2C12.4%26%2310%3B%26%239%3B%26%239%3BC12.6%2C74.8%2C0%2C92.5%2C0%2C112.2c0%2C19.9%2C12.4%2C37.3%2C30.9%2C44c-0.8%2C4.1-1.2%2C8.4-1.2%2C12.7c0%2C36.8%2C29.9%2C66.7%2C66.7%2C66.7%26%2310%3B%26%239%3B%26%239%3Bc21.6%2C0%2C41.6-10.4%2C54.1-27.8c6.2%2C4.9%2C13.8%2C7.6%2C21.7%2C7.6c19.6%2C0%2C35.5-15.9%2C35.5-35.5c0-4.3-0.8-8.5-2.2-12.4%26%2310%3B%26%239%3B%26%239%3BC223.9%2C160.9%2C236.6%2C143.2%2C236.6%2C123.5z%20M91.6%2C34.8c10.9-15.9%2C28.9-25.4%2C48.1-25.4c32.2%2C0%2C58.4%2C26.2%2C58.4%2C58.4%26%2310%3B%26%239%3B%26%239%3Bc0%2C3.9-0.4%2C7.7-1.1%2C11.5l-52.2%2C45.8L93%2C101.5L82.9%2C79.9L91.6%2C34.8z%20M65.4%2C29c6.2%2C0%2C12.1%2C2%2C17%2C5.7l-7.8%2C40.3l-35.5-8.4%26%2310%3B%26%239%3B%26%239%3Bc-1.1-3.1-1.7-6.3-1.7-9.7C37.4%2C41.6%2C49.9%2C29%2C65.4%2C29z%20M9.1%2C112.3c0-16.7%2C11-31.9%2C26.9-37.2L75%2C84.4l9.1%2C19.5l-49.8%2C45%26%2310%3B%26%239%3B%26%239%3BC19.2%2C143.1%2C9.1%2C128.6%2C9.1%2C112.3z%20M145.2%2C200.9c-10.9%2C16.1-29%2C25.6-48.4%2C25.6c-32.3%2C0-58.6-26.3-58.6-58.5c0-4%2C0.4-7.9%2C1.1-11.7%26%2310%3B%26%239%3B%26%239%3Bl50.9-46l52%2C23.7l11.5%2C22L145.2%2C200.9z%20M171.2%2C206.6c-6.1%2C0-12-2-16.9-5.8l7.7-40.2l35.4%2C8.3c1.1%2C3.1%2C1.7%2C6.3%2C1.7%2C9.7%26%2310%3B%26%239%3B%26%239%3BC199.2%2C194.1%2C186.6%2C206.6%2C171.2%2C206.6z%20M200.5%2C160.5l-39-9.1l-10.4-19.8l51-44.7c15.1%2C5.7%2C25.2%2C20.2%2C25.2%2C36.5%26%2310%3B%26%239%3B%26%239%3BC227.4%2C140.1%2C216.4%2C155.3%2C200.5%2C160.5z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E +------------ + +*Returns:* render + + + +[float] +=== replace + +Uses a regular expression to replace parts of a string. + +*Accepts:* string + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* (Aliases: `pattern`, `regex`) +|string +|The text or pattern of a JavaScript regular expression, for example, `"[aeiou]"`. +You can use capture groups here. + +|flags (Alias: `modifiers`) +|datatable +|Specify flags. See the +https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp[RegExp documentation] +for reference (default: `g`). + +|replacement +|string +|The replacement for the matching parts of string. Capture groups can be accessed +by their index, for example $1 (default: `""`). +|=== + +*Returns:* string + + +[float] +=== revealImage + +Configures an image reveal element. + +*Accepts:* number + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|image +|string +|An image asset can be provided as a base64 dataurl, or passed in as a subexpression +(see example below) + +|emptyImage +|string +|default: `null` + +|origin +|string +|default: `bottom` +|=== + + +Example value for the `image` argument, formatted as a base64 data URL: +[source, url] +------------ +data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20viewBox%3D%22-3.948730230331421%20-1.7549896240234375%20245.25946044921875%20241.40370178222656%22%20width%3D%22245.25946044921875%22%20height%3D%22241.40370178222656%22%20style%3D%22enable-background%3Anew%200%200%20686.2%20235.7%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%09.st0%7Bfill%3A%232D2D2D%3B%7D%0A%3C%2Fstyle%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Cg%20transform%3D%22matrix%281%2C%200%2C%200%2C%201%2C%200%2C%200%29%22%3E%0A%20%20%20%20%3Cg%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M329.4%2C160.3l4.7-0.5l0.3%2C9.6c-12.4%2C1.7-23%2C2.6-31.8%2C2.6c-11.7%2C0-20-3.4-24.9-10.2%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-4.9-6.8-7.3-17.4-7.3-31.7c0-28.6%2C11.4-42.9%2C34.1-42.9c11%2C0%2C19.2%2C3.1%2C24.6%2C9.2c5.4%2C6.1%2C8.1%2C15.8%2C8.1%2C28.9l-0.7%2C9.3h-53.8%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc0%2C9%2C1.6%2C15.7%2C4.9%2C20c3.3%2C4.3%2C8.9%2C6.5%2C17%2C6.5C312.8%2C161.2%2C321.1%2C160.9%2C329.4%2C160.3z%20M325%2C124.9c0-10-1.6-17.1-4.8-21.2%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-3.2-4.1-8.4-6.2-15.6-6.2c-7.2%2C0-12.7%2C2.2-16.3%2C6.5c-3.6%2C4.3-5.5%2C11.3-5.6%2C20.9H325z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M354.3%2C171.4V64h12.2v107.4H354.3z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M443.5%2C113.5v41.1c0%2C4.1%2C10.1%2C3.9%2C10.1%2C3.9l-0.6%2C10.8c-8.6%2C0-15.7%2C0.7-20-3.4c-9.8%2C4.3-19.5%2C6.1-29.3%2C6.1%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-7.5%2C0-13.2-2.1-17.1-6.4c-3.9-4.2-5.9-10.3-5.9-18.3c0-7.9%2C2-13.8%2C6-17.5c4-3.7%2C10.3-6.1%2C18.9-6.9l25.6-2.4v-7%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc0-5.5-1.2-9.5-3.6-11.9c-2.4-2.4-5.7-3.6-9.8-3.6l-32.1%2C0V87.2h31.3c9.2%2C0%2C15.9%2C2.1%2C20.1%2C6.4C441.4%2C97.8%2C443.5%2C104.5%2C443.5%2C113.5%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bz%20M393.3%2C146.7c0%2C10%2C4.1%2C15%2C12.4%2C15c7.4%2C0%2C14.7-1.2%2C21.8-3.7l3.7-1.3v-26.9l-24.1%2C2.3c-4.9%2C0.4-8.4%2C1.8-10.6%2C4.2%26%2310%3B%26%239%3B%26%239%3B%26%239%3BC394.4%2C138.7%2C393.3%2C142.2%2C393.3%2C146.7z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M491.2%2C98.2c-11.8%2C0-17.8%2C4.1-17.8%2C12.4c0%2C3.8%2C1.4%2C6.5%2C4.1%2C8.1c2.7%2C1.6%2C8.9%2C3.2%2C18.6%2C4.9%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc9.7%2C1.7%2C16.5%2C4%2C20.5%2C7.1c4%2C3%2C6%2C8.7%2C6%2C17.1c0%2C8.4-2.7%2C14.5-8.1%2C18.4c-5.4%2C3.9-13.2%2C5.9-23.6%2C5.9c-6.7%2C0-29.2-2.5-29.2-2.5%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bl0.7-10.6c12.9%2C1.2%2C22.3%2C2.2%2C28.6%2C2.2c6.3%2C0%2C11.1-1%2C14.4-3c3.3-2%2C5-5.4%2C5-10.1c0-4.7-1.4-7.9-4.2-9.6c-2.8-1.7-9-3.3-18.6-4.8%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-9.6-1.5-16.4-3.7-20.4-6.7c-4-2.9-6-8.4-6-16.3c0-7.9%2C2.8-13.8%2C8.4-17.6c5.6-3.8%2C12.6-5.7%2C20.9-5.7c6.6%2C0%2C29.6%2C1.7%2C29.6%2C1.7%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bv10.7C508.1%2C99%2C498.2%2C98.2%2C491.2%2C98.2z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M581.7%2C99.5h-25.9v39c0%2C9.3%2C0.7%2C15.5%2C2%2C18.4c1.4%2C2.9%2C4.6%2C4.4%2C9.7%2C4.4l14.5-1l0.8%2C10.1%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-7.3%2C1.2-12.8%2C1.8-16.6%2C1.8c-8.5%2C0-14.3-2.1-17.6-6.2c-3.3-4.1-4.9-12-4.9-23.6V99.5h-11.6V88.9h11.6V63.9h12.1v24.9h25.9V99.5z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M598.7%2C78.4V64.3h12.2v14.2H598.7z%20M598.7%2C171.4V88.9h12.2v82.5H598.7z%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M663.8%2C87.2c3.6%2C0%2C9.7%2C0.7%2C18.3%2C2l3.9%2C0.5l-0.5%2C9.9c-8.7-1-15.1-1.5-19.2-1.5c-9.2%2C0-15.5%2C2.2-18.8%2C6.6%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-3.3%2C4.4-5%2C12.6-5%2C24.5c0%2C11.9%2C1.5%2C20.2%2C4.6%2C24.9c3.1%2C4.7%2C9.5%2C7%2C19.3%2C7l19.2-1.5l0.5%2C10.1c-10.1%2C1.5-17.7%2C2.3-22.7%2C2.3%26%2310%3B%26%239%3B%26%239%3B%26%239%3Bc-12.7%2C0-21.5-3.3-26.3-9.8c-4.8-6.5-7.3-17.5-7.3-33c0-15.5%2C2.6-26.4%2C7.8-32.6C643%2C90.4%2C651.7%2C87.2%2C663.8%2C87.2z%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3Cpath%20class%3D%22st0%22%20d%3D%22M236.6%2C123.5c0-19.8-12.3-37.2-30.8-43.9c0.8-4.2%2C1.2-8.4%2C1.2-12.7C207%2C30%2C177%2C0%2C140.2%2C0%26%2310%3B%26%239%3B%26%239%3BC118.6%2C0%2C98.6%2C10.3%2C86%2C27.7c-6.2-4.8-13.8-7.4-21.7-7.4c-19.6%2C0-35.5%2C15.9-35.5%2C35.5c0%2C4.3%2C0.8%2C8.5%2C2.2%2C12.4%26%2310%3B%26%239%3B%26%239%3BC12.6%2C74.8%2C0%2C92.5%2C0%2C112.2c0%2C19.9%2C12.4%2C37.3%2C30.9%2C44c-0.8%2C4.1-1.2%2C8.4-1.2%2C12.7c0%2C36.8%2C29.9%2C66.7%2C66.7%2C66.7%26%2310%3B%26%239%3B%26%239%3Bc21.6%2C0%2C41.6-10.4%2C54.1-27.8c6.2%2C4.9%2C13.8%2C7.6%2C21.7%2C7.6c19.6%2C0%2C35.5-15.9%2C35.5-35.5c0-4.3-0.8-8.5-2.2-12.4%26%2310%3B%26%239%3B%26%239%3BC223.9%2C160.9%2C236.6%2C143.2%2C236.6%2C123.5z%20M91.6%2C34.8c10.9-15.9%2C28.9-25.4%2C48.1-25.4c32.2%2C0%2C58.4%2C26.2%2C58.4%2C58.4%26%2310%3B%26%239%3B%26%239%3Bc0%2C3.9-0.4%2C7.7-1.1%2C11.5l-52.2%2C45.8L93%2C101.5L82.9%2C79.9L91.6%2C34.8z%20M65.4%2C29c6.2%2C0%2C12.1%2C2%2C17%2C5.7l-7.8%2C40.3l-35.5-8.4%26%2310%3B%26%239%3B%26%239%3Bc-1.1-3.1-1.7-6.3-1.7-9.7C37.4%2C41.6%2C49.9%2C29%2C65.4%2C29z%20M9.1%2C112.3c0-16.7%2C11-31.9%2C26.9-37.2L75%2C84.4l9.1%2C19.5l-49.8%2C45%26%2310%3B%26%239%3B%26%239%3BC19.2%2C143.1%2C9.1%2C128.6%2C9.1%2C112.3z%20M145.2%2C200.9c-10.9%2C16.1-29%2C25.6-48.4%2C25.6c-32.3%2C0-58.6-26.3-58.6-58.5c0-4%2C0.4-7.9%2C1.1-11.7%26%2310%3B%26%239%3B%26%239%3Bl50.9-46l52%2C23.7l11.5%2C22L145.2%2C200.9z%20M171.2%2C206.6c-6.1%2C0-12-2-16.9-5.8l7.7-40.2l35.4%2C8.3c1.1%2C3.1%2C1.7%2C6.3%2C1.7%2C9.7%26%2310%3B%26%239%3B%26%239%3BC199.2%2C194.1%2C186.6%2C206.6%2C171.2%2C206.6z%20M200.5%2C160.5l-39-9.1l-10.4-19.8l51-44.7c15.1%2C5.7%2C25.2%2C20.2%2C25.2%2C36.5%26%2310%3B%26%239%3B%26%239%3BC227.4%2C140.1%2C216.4%2C155.3%2C200.5%2C160.5z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E +------------ + +*Returns:* render + + +[float] +=== rounddate + +Rounds milliseconds since epoch using a Moment.js formatting string; returns +milliseconds since epoch. + +*Accepts:* number + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|string +|Moment.js Format with which to bucket. See the +https://momentjs.com/docs/#/displaying/[MomentJS documentation]. +For example, "YYYY-MM" rounds to the month. +|=== + +*Returns:* number + + +[float] +=== rowCount + +Returns the number of rows. Pairs with `ply` to get the count of unique column +values, or combinations of unique column values. + +*Accepts:* datatable + +*Returns:* number + +[float] +=== seriesStyle + +Creates an object used for describing the properties of a series on a chart. +You typically use this inside of a charting function. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|label* +|string +|The label of the line this style applies to, not the name you would like to give the line. + +|color +|string +|The color to assign the line + +|lines +|number +|The width of the line (default: `0`) + +|bars +|number +|The width of bars (default: `0`) + +|points +|number +|The size of points on line (default: `5`) + +|fill +|number, boolean +|Designates if points should be filled (default: `false`) + +|stack +|number +|Designates if the series should be stacked? This number is the stack "id"; series +with the same stack id are stacked together. + +|horizontalBars +|boolean +|Sets the orientation of bars in the chart to horizontal (default: `false`) +|=== + +*Returns:* Depends on your input and arguments + + +[float] +=== shape + +Creates a shape. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ (Alias: `shape`) +|string +|Pick a shape (default: `square`) + +|fill +|string +|Valid CSS color string (default: `black`) + +|border (Alias `stroke`) +|number +|Valid CSS color string + +|borderWidth (Alias: `strokeWidth`) +|number +|Thickness of the border (default: `0`) + +|maintainAspect +|boolean +|Select `true` to maintain aspect ratio (default: `false`) +|=== + +*Returns:* shape + + +[float] +=== sort + +Sorts a datatable on a column. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* (Alias: `column`) +|string +|The column to sort on. If column is not specified, the datatable is sorted on +the first column. + +|reverse* +|boolean +|Reverse the sort order. If reverse is not specified, the datatable is sorted +in ascending order. +|=== + +*Returns:* datatable + + +[float] +=== staticColumn + +Adds a column with a static value. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* (Alias: `column`) +|string +|The name of the new column + +|value +|string, number, boolean +|The value to insert in each column (default: is `null`). Tip: Use a sub-expression +to rollup other columns into a static value. +|=== + +*Returns:* datatable + + +[float] +=== string + +Outputs a string made of other strings. Mostly useful when combined with +sub-expressions that output a string, or something castable to a string. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|string +|One or more strings to join together; include spaces where needed +|=== + +*Returns:* string + + +[float] +=== switch + +Performs conditional logic with multiple conditions. See also the case function, +which builds a case to pass to the switch function. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* (Alias: `case`) +|case +|The list of conditions to check + +|default (Alias: `finally`) +|any +|The default case, if no cases match +|=== + +*Returns:* Depends on your input and arguments + + +[float] +=== table + +Configures a data table element. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|font +|style +|Font style (default: `{font}`) + +|paginate +|boolean +|Show pagination controls (default: `true`). If set to `false` only the first +page is displayed. + +|perPage +|number +|Show this many rows per page (default: `10`) + +|showHeader +|boolean +|Show or hide the header row with titles for each column (default: `true`) +|=== + +*Returns:* render + + +[float] +=== tail + +Gets the last N rows from the end of a datatable. See also, `head`. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* +|case +|Return this many rows from the end of the datatable +|=== + +*Returns:* datatable + + +[float] +=== timefilter + +Creates a time filter for querying a source. + +*Accepts:* filter + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|column (Aliases: `field`, `c`) +|any +|The column or field to attach the filter to (default: `@timestamp`) + +|from (Aliases: `f`, `start`) +|string +|Beginning of the range, in ISO8601 or {es} datemath format + +|to (Aliases: `t`, `end`) +|string +|End of the range, in ISO8601 or {es} datemath format +|=== + +*Returns:* filter + + +[float] +=== timefilterControl + +Configures a time filter control element. + +*Accepts:* null + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|column (Aliases: `field`, `c`) +|any +|The column or field to attach the filter to + +|compact +|any +|Show the time filter as a button that triggers a popover (default: `true`) +|=== + +*Returns:* render + + +[float] +=== to + +Explicitly casts from one type to another. + +*Accepts:* Anything or nothing + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* (Alias: `type`) +|string +|A known type +|=== + +*Returns:* Depends on your input and arguments + diff --git a/docs/canvas/canvas-function-reference.asciidoc b/docs/canvas/canvas-function-reference.asciidoc new file mode 100644 index 0000000000000..25de1b6e85077 --- /dev/null +++ b/docs/canvas/canvas-function-reference.asciidoc @@ -0,0 +1,16 @@ +[[canvas-function-reference]] +== Canvas function reference + +beta[] Behind the scenes, Canvas is driven by a powerful expression language, +with dozens of functions and other capabilities, including table transforms, +type casting, and sub-expressions. + +For the purpose of this documentation, +the Canvas functions are divided by the environment they run in: + +* <> can run anywhere +* <> can only execute on the server +* <> must execute in a browser + +The Canvas expression language also supports <>, which +perform complex math calculations. diff --git a/docs/canvas/canvas-server-functions.asciidoc b/docs/canvas/canvas-server-functions.asciidoc new file mode 100644 index 0000000000000..4d9d6b7bb57dd --- /dev/null +++ b/docs/canvas/canvas-server-functions.asciidoc @@ -0,0 +1,210 @@ +[[canvas-server-functions]] +=== Canvas server functions + +beta[]These functions can only execute on the server. This may be for performance +or security reasons, or because the function uses an API only available on the +{kib} server. If the expression is executing in the browser, it will transfer to +the server when it hits one of these functions. + +A *** denotes a required argument. + +[float] +=== demodata + +A mock data set that includes project CI times with usernames, countries, and run phases. + +*Accepts:* filter + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ (Alias: `type`) +|string +|The name of the demo data set to use (default: `ci`) +|=== + +*Returns:* datatable + + +[float] +=== esdocs + +Queries {es} and gets back raw documents. Specify the fields you want to receive, +especially if you are asking for a lot of rows. + +*Accepts:* filter + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|index +|string +|Specify an index pattern, for example, "logstash-*" (default is `_all`) + +|_Unnamed_ (Aliases: `query`, `q`) +|string +|A Lucene query string (default: `_index:.kibana`) + +|sort +|string +|Sort directions as "field, direction", for example, "@timestamp, desc" or "bytes, asc" + +|fields +|string +|Comma separated list of fields. Fewer fields will perform better + +|metaFields +|string +|Comma separated list of meta fields, for example, "_index,_type" + +|count +|number +|The number of docs to pull back. Smaller numbers perform better (default: `100`) +|=== + +*Returns:* datatable + + +[float] +=== escount + +Queries {es} for a count of the number of hits matching a query. + +*Accepts:* filter + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|index +|string +|Specify an index pattern, for example, "logstash-*" (default: `all`) + +|_Unnamed_ (Alias: `query`, `q`) +|string +|A Lucene query string (default: `"-_index:.kibana"`) +|=== + +*Returns:* number + + +[float] +=== essql + +Specifies an {es} SQL. + +*Accepts:* filter + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_* (Alias: `query`, `q`) +|string +|An SQL query + +|count +|number +|The default is `1000` +|=== + +*Returns:* datatable + + +[float] +=== pointseries + +Turns a datatable into a point series model. Currently Canvas differentiates measure +from dimensions by looking for a <>. If you enter a TinyMath +expression in your argument, Canvas treats that argument as a measure. Otherwise, it +is a dimension. Dimensions are combined to create unique keys. Measures are +then deduplicated by those keys using the specified TinyMath function. + +*Accepts:* datatable + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|x +|string +|The values along the X-axis + +|y +|string +|The values along the Y-axis + +|color +|string +|An expression to use in determining the mark's color + +|size +|string +|For elements that support it, the size of the marks + +|text +|string +|For use in charts that support it, the text to show in the mark +|=== + +*Returns:* pointseries + + +[float] +=== server + +Forces the interpreter to return to the server. + +*Accepts:* Anything or nothing + +*Returns:* Depends on your input and arguments +  + +[float] +=== timelion + +Uses Timelion to extract one or more time series from many sources. + +*Accepts:* filter + +[cols="3*^<"] +|=== +s|Argument +s|Type +s|Description + +|_Unnamed_ (Aliases: `query`, `q`) +|string +|A Timelion query (default: `".es(*)"`) + +|interval +|string +|Bucket interval for the time series (default: `auto`) + +|from +|any +|{es} date math string for the start of the time range (default: `now-1y`) + +|to +|any +|{es} date math string for the end of the time range (default: `now`) + +|timezone +|any +|Time zone for the time range (default: `UTC`) +|=== + +*Returns:* datatable + diff --git a/docs/canvas/canvas-tinymath-functions.asciidoc b/docs/canvas/canvas-tinymath-functions.asciidoc new file mode 100644 index 0000000000000..2cdc64d59e3a8 --- /dev/null +++ b/docs/canvas/canvas-tinymath-functions.asciidoc @@ -0,0 +1,1070 @@ + +[[canvas-tinymath-functions]] +=== TinyMath functions + +beta[]TinyMath provides a set of functions that can be used with the Canvas expression +language to perform complex math calculations. Read on for detailed information about +the functions available in TinyMath, including what parameters each function accepts, +the return value of that function, and examples of how each function behaves. + +Most of the functions below accept arrays and apply JavaScript Math methods to +each element of that array. For the functions that accept multiple arrays as +parameters, the function generally does the calculation index by index. + +Any function below can be wrapped by another function as long as the return type +of the inner function matches the acceptable parameter type of the outer function. + +[float] +=== abs( a ) + +Calculates the absolute value of a number. For arrays, the function will be +applied index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. The absolute value of `a`. Returns +an array with the absolute values of each element if `a` is an array. + +*Example* +[source, js] +------------ +abs(-1) // returns 1 +abs(2) // returns 2 +abs([-1 , -2, 3, -4]) // returns [1, 2, 3, 4] +------------ + +[float] +=== add( ...args ) + +Calculates the sum of one or more numbers/arrays passed into the function. If at +least one array of numbers is passed into the function, the function will calculate the sum by index. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|...args +|number \| Array. +|one or more numbers or arrays of numbers +|=== + +*Returns*: `number` | `Array.`. The sum of all numbers in `args` if `args` +contains only numbers. Returns an array of sums of the elements at each index, +including all scalar numbers in `args` in the calculation at each index if `args` +contains at least one array. + +*Throws*: `'Array length mismatch'` if `args` contains arrays of different lengths + +*Example* +[source, js] +------------ +add(1, 2, 3) // returns 6 +add([10, 20, 30, 40], 10, 20, 30) // returns [70, 80, 90, 100] +add([1, 2], 3, [4, 5], 6) // returns [(1 + 3 + 4 + 6), (2 + 3 + 5 + 6)] = [14, 16] +------------ + +[float] +=== cbrt( a ) + +Calculates the cube root of a number. For arrays, the function will be applied +index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. The cube root of `a`. Returns an array with +the cube roots of each element if `a` is an array. + +*Example* +[source, js] +------------ +cbrt(-27) // returns -3 +cbrt(94) // returns 4.546835943776344 +cbrt([27, 64, 125]) // returns [3, 4, 5] +------------ + +[float] +=== ceil( a ) + +Calculates the ceiling of a number, i.e., rounds a number towards positive infinity. +For arrays, the function will be applied index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. The ceiling of `a`. Returns an array with +the ceilings of each element if `a` is an array. + +*Example* +[source, js] +------------ +ceil(1.2) // returns 2 +ceil(-1.8) // returns -1 +ceil([1.1, 2.2, 3.3]) // returns [2, 3, 4] +------------ + +[float] +=== clamp( ...a, min, max ) + +Restricts value to a given range and returns closed available value. If only `min` +is provided, values are restricted to only a lower bound. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|...a +|number \| Array. +|one or more numbers or arrays of numbers + +|min +|number \| Array. +|(optional) The minimum value this function will return. + +|max +|number \| Array. +|(optional) The maximum value this function will return. +|=== + +*Returns*: `number` | `Array.`. The closest value between `min` (inclusive) +and `max` (inclusive). Returns an array with values greater than or equal to `min` +and less than or equal to `max` (if provided) at each index. + +*Throws*: + +- `'Array length mismatch'` if a `min` and/or `max` are arrays of different lengths + +- `'Min must be less than max'` if `max` is less than `min` + +*Example* +[source, js] +------------ +clamp(1, 2, 3) // returns 2 +clamp([10, 20, 30, 40], 15, 25) // returns [15, 20, 25, 25] +clamp(10, [15, 2, 4, 20], 25) // returns [15, 10, 10, 20] +clamp(35, 10, [20, 30, 40, 50]) // returns [20, 30, 35, 35] +clamp([1, 9], 3, [4, 5]) // returns [clamp([1, 3, 4]), clamp([9, 3, 5])] = [3, 5] +------------ + +[float] +=== count( a ) + +Returns the length of an array. Alias for size. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|Array. +|array of any values +|=== + +*Returns*: `number`. The length of the array. + +*Throws*: `'Must pass an array'` if `a` is not an array. + +*Example* +[source, js] +------------ +count([]) // returns 0 +count([-1, -2, -3, -4]) // returns 4 +count(100) // returns 1 +------------ + +[float] +=== cube( a ) + +Calculates the cube of a number. For arrays, the function will be applied +index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. The cube of `a`. Returns an array +with the cubes of each element if `a` is an array. + +*Example* +[source, js] +------------ +cube(-3) // returns -27 +cube([3, 4, 5]) // returns [27, 64, 125] +------------ + +[float] +=== divide( a, b ) + +Divides two numbers. If at least one array of numbers is passed into the function, +the function will be applied index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|dividend, a number or an array of numbers + +|b +|number \| Array. +|divisor, a number or an array of numbers, b != 0 +|=== + +*Returns*: `number` | `Array.`. Returns the quotient of `a` and `b` +if both are numbers. Returns an array with the quotients applied index-wise to +each element if `a` or `b` is an array. + +*Throws*: + +- `'Array length mismatch'` if `a` and `b` are arrays with different lengths + +- `'Cannot divide by 0'` if `b` equals 0 or contains 0 + +*Example* +[source, js] +------------ +divide(6, 3) // returns 2 +divide([10, 20, 30, 40], 10) // returns [1, 2, 3, 4] +divide(10, [1, 2, 5, 10]) // returns [10, 5, 2, 1] +divide([14, 42, 65, 108], [2, 7, 5, 12]) // returns [7, 6, 13, 9] +------------ + +[float] +=== exp( a ) + +Calculates _e^x_ where _e_ is Euler's number. For arrays, the function will be applied +index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. Returns an array with the values of +`e^x` evaluated where `x` is each element of `a` if `a` is an array. + +*Example* +[source, js] +------------ +exp(2) // returns e^2 = 7.3890560989306495 +exp([1, 2, 3]) // returns [e^1, e^2, e^3] = [2.718281828459045, 7.3890560989306495, 20.085536923187668] +------------ + +[float] +=== first( a ) + +Returns the first element of an array. If anything other than an array is passed +in, the input is returned. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|Array. +|array of any values +|=== + +*Returns*: `*`. The first element of `a`. Returns `a` if `a` is not an array. + +*Example* +[source, js] +------------ +first(2) // returns 2 +first([1, 2, 3]) // returns 1 +------------ + +[float] +=== fix( a ) + +Calculates the fix of a number, i.e., rounds a number towards 0. For arrays, the +function will be applied index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. The fix of `a`. Returns an array with +the fixes for each element if `a` is an array. + +*Example* +[source, js] +------------ +fix(1.2) // returns 1 +fix(-1.8) // returns -1 +fix([1.8, 2.9, -3.7, -4.6]) // returns [1, 2, -3, -4] +------------ + +[float] +=== floor( a ) + +Calculates the floor of a number, i.e., rounds a number towards negative infinity. +For arrays, the function will be applied index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. The floor of `a`. Returns an array +with the floor of each element if `a` is an array. + +*Example* +[source, js] +------------ +floor(1.8) // returns 1 +floor(-1.2) // returns -2 +floor([1.7, 2.8, 3.9]) // returns [1, 2, 3] +------------ + +[float] +=== last( a ) + +Returns the last element of an array. If anything other than an array is passed +in, the input is returned. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|Array. +|array of any values +|=== + +*Returns*: `*`. The last element of `a`. Returns `a` if `a` is not an array. + +*Example* +[source, js] +------------ +last(2) // returns 2 +last([1, 2, 3]) // returns 3 +------------ + +[float] +=== log( a, b ) + +Calculates the logarithm of a number. For arrays, the function will be applied +index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers, `a` must be greater than 0 + +|b +|Object +|(optional) base for the logarithm. If not provided a value, the default base is e, and the natural log is calculated. +|=== + +*Returns*: `number` | `Array.`. The logarithm of `a`. Returns an array +with the the logarithms of each element if `a` is an array. + +*Throws*: + +- `'Base out of range'` if `b` <= 0 + +- `'Must be greater than 0'` if `a` > 0 + +*Example* +[source, js] +------------ +log(1) // returns 0 +log(64, 8) // returns 2 +log(42, 5) // returns 2.322344707681546 +log([2, 4, 8, 16, 32], 2) // returns [1, 2, 3, 4, 5] +------------ + +[float] +=== log10( a ) + +Calculates the logarithm base 10 of a number. For arrays, the function will be +applied index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers, `a` must be greater than 0 +|=== + +*Returns*: `number` | `Array.`. The logarithm of `a`. Returns an array +with the the logarithms base 10 of each element if `a` is an array. + +*Throws*: `'Must be greater than 0'` if `a` < 0 + +*Example* +[source, js] +------------ +log(10) // returns 1 +log(100) // returns 2 +log(80) // returns 1.9030899869919433 +log([10, 100, 1000, 10000, 100000]) // returns [1, 2, 3, 4, 5] +------------ + +[float] +=== max( ...args ) + +Finds the maximum value of one of more numbers/arrays of numbers passed into the function. +If at least one array of numbers is passed into the function, the function will +find the maximum by index. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|...args +|number \| Array. +|one or more numbers or arrays of numbers +|=== + +*Returns*: `number` | `Array.`. The maximum value of all numbers if +`args` contains only numbers. Returns an array with the the maximum values at each +index, including all scalar numbers in `args` in the calculation at each index if +`args` contains at least one array. + +*Throws*: `'Array length mismatch'` if `args` contains arrays of different lengths + +*Example* +[source, js] +------------ +max(1, 2, 3) // returns 3 +max([10, 20, 30, 40], 15) // returns [15, 20, 30, 40] +max([1, 9], 4, [3, 5]) // returns [max([1, 4, 3]), max([9, 4, 5])] = [4, 9] +------------ + +[float] +=== mean( ...args ) + +Finds the mean value of one of more numbers/arrays of numbers passed into the function. +If at least one array of numbers is passed into the function, the function will +find the mean by index. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|...args +|number \| Array. +|one or more numbers or arrays of numbers +|=== + +*Returns*: `number` | `Array.`. The maximum value of all numbers if +`args` contains only numbers. Returns an array with the the maximum values at each +index, including all scalar numbers in `args` in the calculation at each index if +`args` contains at least one array. + +*Throws*: `'Array length mismatch'` if `args` contains arrays of different lengths + +*Example* +[source, js] +------------ +max(1, 2, 3) // returns 3 +max([10, 20, 30, 40], 15) // returns [15, 20, 30, 40] +max([1, 9], 4, [3, 5]) // returns [max([1, 4, 3]), max([9, 4, 5])] = [4, 9] +------------ + +[float] +=== mean( ...args ) + +Finds the mean value of one of more numbers/arrays of numbers passed into the function. +If at least one array of numbers is passed into the function, the function will +find the mean by index. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|...args +|number \| Array. +|one or more numbers or arrays of numbers +|=== + +*Returns*: `number` | `Array.`. The mean value of all numbers if `args` +contains only numbers. Returns an array with the the mean values of each index, +including all scalar numbers in `args` in the calculation at each index if `args` +contains at least one array. + +*Example* +[source, js] +------------ +mean(1, 2, 3) // returns 2 +mean([10, 20, 30, 40], 20) // returns [15, 20, 25, 30] +mean([1, 9], 5, [3, 4]) // returns [mean([1, 5, 3]), mean([9, 5, 4])] = [3, 6] +------------ + +[float] +=== median( ...args ) + +Finds the median value(s) of one of more numbers/arrays of numbers passed into the function. +If at least one array of numbers is passed into the function, the function will +find the median by index. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|...args +|number \| Array. +|one or more numbers or arrays of numbers +|=== + +*Returns*: `number` | `Array.`. The median value of all numbers if `args` +contains only numbers. Returns an array with the the median values of each index, +including all scalar numbers in `args` in the calculation at each index if `args` +contains at least one array. + +*Example* +[source, js] +------------ +median(1, 1, 2, 3) // returns 1.5 +median(1, 1, 2, 2, 3) // returns 2 +median([10, 20, 30, 40], 10, 20, 30) // returns [15, 20, 25, 25] +median([1, 9], 2, 4, [3, 5]) // returns [median([1, 2, 4, 3]), median([9, 2, 4, 5])] = [2.5, 4.5] +------------ + +[float] +=== min( ...args ) + +Finds the minimum value of one of more numbers/arrays of numbers passed into the function. +If at least one array of numbers is passed into the function, the function will +find the minimum by index. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|...args +|number \| Array. +|one or more numbers or arrays of numbers +|=== + +*Returns*: `number` | `Array.`. The minimum value of all numbers if +`args` contains only numbers. Returns an array with the the minimum values of each +index, including all scalar numbers in `args` in the calculation at each index if `a` +is an array. + +*Throws*: `'Array length mismatch'` if `args` contains arrays of different lengths. + +*Example* +[source, js] +------------ +min(1, 2, 3) // returns 1 +min([10, 20, 30, 40], 25) // returns [10, 20, 25, 25] +min([1, 9], 4, [3, 5]) // returns [min([1, 4, 3]), min([9, 4, 5])] = [1, 4] +------------ + +[float] +=== mod( a, b ) + +Remainder after dividing two numbers. If at least one array of numbers is passed +into the function, the function will be applied index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|dividend, a number or an array of numbers + +|b +|number \| Array. +|divisor, a number or an array of numbers, b != 0 +|=== + +*Returns*: `number` | `Array.`. The remainder of `a` divided by `b` if +both are numbers. Returns an array with the the remainders applied index-wise to +each element if `a` or `b` is an array. + +*Throws*: + +- `'Array length mismatch'` if `a` and `b` are arrays with different lengths + +- `'Cannot divide by 0'` if `b` equals 0 or contains 0 + +*Example* +[source, js] +------------ +mod(10, 7) // returns 3 +mod([11, 22, 33, 44], 10) // returns [1, 2, 3, 4] +mod(100, [3, 7, 11, 23]) // returns [1, 2, 1, 8] +mod([14, 42, 65, 108], [5, 4, 14, 2]) // returns [5, 2, 9, 0] +------------ + +[float] +=== mode( ...args ) + +Finds the mode value(s) of one of more numbers/arrays of numbers passed into the function. +If at least one array of numbers is passed into the function, the function will +find the mode by index. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|...args +|number \| Array. +|one or more numbers or arrays of numbers +|=== + +*Returns*: `number` | `Array.>`. An array of mode value(s) of all +numbers if `args` contains only numbers. Returns an array of arrays with mode value(s) +of each index, including all scalar numbers in `args` in the calculation at each index +if `args` contains at least one array. + +*Example* +[source, js] +------------ +mode(1, 1, 2, 3) // returns [1] +mode(1, 1, 2, 2, 3) // returns [1,2] +mode([10, 20, 30, 40], 10, 20, 30) // returns [[10], [20], [30], [10, 20, 30, 40]] +mode([1, 9], 1, 4, [3, 5]) // returns [mode([1, 1, 4, 3]), mode([9, 1, 4, 5])] = [[1], [4, 5, 9]] +------------ + +[float] +=== multiply( a, b ) + +Multiplies two numbers. If at least one array of numbers is passed into the function, +the function will be applied index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers + +|b +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. The product of `a` and `b` if both are +numbers. Returns an array with the the products applied index-wise to each element +if `a` or `b` is an array. + +*Throws*: `'Array length mismatch'` if `a` and `b` are arrays with different lengths + +*Example* +[source, js] +------------ +multiply(6, 3) // returns 18 +multiply([10, 20, 30, 40], 10) // returns [100, 200, 300, 400] +multiply(10, [1, 2, 5, 10]) // returns [10, 20, 50, 100] +multiply([1, 2, 3, 4], [2, 7, 5, 12]) // returns [2, 14, 15, 48] +------------ + +[float] +=== pow( a, b ) + +Calculates the cube root of a number. For arrays, the function will be applied +index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers + +|b +|number +|the power that `a` is raised to +|=== + +*Returns*: `number` | `Array.`. `a` raised to the power of `b`. Returns +an array with the each element raised to the power of `b` if `a` is an array. + +*Throws*: `'Missing exponent'` if `b` is not provided + +*Example* +[source, js] +------------ +pow(2,3) // returns 8 +pow([1, 2, 3], 4) // returns [1, 16, 81] +------------ + +[float] +=== random( a, b ) + +Generates a random number within the given range where the lower bound is inclusive +and the upper bound is exclusive. If no numbers are passed in, it will return a +number between 0 and 1. If only one number is passed in, it will return a number +between 0 and the number passed in. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number +|(optional) must be greater than 0 if `b` is not provided + +|b +|number +|(optional) must be greater than `a` +|=== + +*Returns*: `number`. A random number between 0 and 1 if no numbers are passed in. +Returns a random number between 0 and `a` if only one number is passed in. Returns +a random number between `a` and `b` if two numbers are passed in. + +*Throws*: `'Min must be greater than max'` if `a` < 0 when only `a` is passed in +or if `a` > `b` when both `a` and `b` are passed in + +*Example* +[source, js] +------------ +random() // returns a random number between 0 (inclusive) and 1 (exclusive) +random(10) // returns a random number between 0 (inclusive) and 10 (exclusive) +random(-10,10) // returns a random number between -10 (inclusive) and 10 (exclusive) +------------ + +[float] +=== range( ...args ) + +Finds the range of one of more numbers/arrays of numbers passed into the function. If at +least one array of numbers is passed into the function, the function will find +the range by index. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|...args +|number \| Array. +|one or more numbers or arrays of numbers +|=== + +*Returns*: `number` | `Array.`. The range value of all numbers if `args` +contains only numbers. Returns an array with the range values at each index, +including all scalar numbers in `args` in the calculation at each index if `args` +contains at least one array. + +*Example* +[source, js] +------------ +range(1, 2, 3) // returns 2 +range([10, 20, 30, 40], 15) // returns [5, 5, 15, 25] +range([1, 9], 4, [3, 5]) // returns [range([1, 4, 3]), range([9, 4, 5])] = [3, 5] +------------ + +[float] +=== range( ...args ) + +Finds the range of one of more numbers/arrays of numbers into the function. If at +least one array of numbers is passed into the function, the function will find +the range by index. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|...args +|number \| Array. +|one or more numbers or arrays of numbers +|=== + +*Returns*: `number` | `Array.`. The range value of all numbers if `args` +contains only numbers. Returns an array with the the range values at each index, +including all scalar numbers in `args` in the calculation at each index if `args` +contains at least one array. + +*Example* +[source, js] +------------ +range(1, 2, 3) // returns 2 +range([10, 20, 30, 40], 15) // returns [5, 5, 15, 25] +range([1, 9], 4, [3, 5]) // returns [range([1, 4, 3]), range([9, 4, 5])] = [3, 5] +------------ + +[float] +=== round( a, b ) + +Rounds a number towards the nearest integer by default, or decimal place (if passed in as `b`). +For arrays, the function will be applied index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers + +|b +|number +|(optional) number of decimal places, default value: 0 +|=== + +*Returns*: `number` | `Array.`. The rounded value of `a`. Returns an +array with the the rounded values of each element if `a` is an array. + +*Example* +[source, js] +------------ +round(1.2) // returns 2 +round(-10.51) // returns -11 +round(-10.1, 2) // returns -10.1 +round(10.93745987, 4) // returns 10.9375 +round([2.9234, 5.1234, 3.5234, 4.49234324], 2) // returns [2.92, 5.12, 3.52, 4.49] +------------ + +[float] +=== size( a ) + +Returns the length of an array. Alias for count. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|Array. +|array of any values +|=== + +*Returns*: `number`. The length of the array. + +*Throws*: `'Must pass an array'` if `a` is not an array + +*Example* +[source, js] +------------ +size([]) // returns 0 +size([-1, -2, -3, -4]) // returns 4 +size(100) // returns 1 +------------ + +[float] +=== sqrt( a ) + +Calculates the square root of a number. For arrays, the function will be applied +index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. The square root of `a`. Returns an array +with the the square roots of each element if `a` is an array. + +*Throws*: `'Unable find the square root of a negative number'` if `a` < 0 + +*Example* +[source, js] +------------ +sqrt(9) // returns 3 +sqrt(30) //5.477225575051661 +sqrt([9, 16, 25]) // returns [3, 4, 5] +------------ + +[float] +=== square( a ) + +Calculates the square of a number. For arrays, the function will be applied +index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. The square of `a`. Returns an array +with the the squares of each element if `a` is an array. + +*Example* +[source, js] +------------ +square(-3) // returns 9 +square([3, 4, 5]) // returns [9, 16, 25] +------------ + +[float] +=== subtract( a, b ) + +Subtracts two numbers. If at least one array of numbers is passed into the function, +the function will be applied index-wise to each element. + +[cols="3*^<"] +|=== +s|Param +s|Type +s|Description + +|a +|number \| Array. +|a number or an array of numbers + +|b +|number \| Array. +|a number or an array of numbers +|=== + +*Returns*: `number` | `Array.`. The difference of `a` and `b` if both are +numbers, or an array of differences applied index-wise to each element. + +*Throws*: `'Array length mismatch'` if `a` and `b` are arrays with different lengths + +*Example* +[source, js] +------------ +subtract(6, 3) // returns 3 +subtract([10, 20, 30, 40], 10) // returns [0, 10, 20, 30] +subtract(10, [1, 2, 5, 10]) // returns [9, 8, 5, 0] +subtract([14, 42, 65, 108], [2, 7, 5, 12]) // returns [12, 35, 52, 96] +------------ + +[float] +=== sum( ...args ) + +Calculates the sum of one or more numbers/arrays passed into the function. If at +least one array is passed, the function will sum up one or more numbers/arrays of +numbers and distinct values of an array. Sum accepts arrays of different lengths. + +*Returns*: `number`. The sum of one or more numbers/arrays of numbers including +distinct values in arrays + +*Example* +[source, js] +------------ +sum(1, 2, 3) // returns 6 +sum([10, 20, 30, 40], 10, 20, 30) // returns 160 +sum([1, 2], 3, [4, 5], 6) // returns sum(1, 2, 3, 4, 5, 6) = 21 +sum([10, 20, 30, 40], 10, [1, 2, 3], 22) // returns sum(10, 20, 30, 40, 10, 1, 2, 3, 22) = 138 +------------ + +[float] +=== unique( a ) + +Counts the number of unique values in an array. + +*Returns*: `number`. The number of unique values in the array. Returns 1 if `a` +is not an array. + +*Example* +[source, js] +------------ +unique(100) // returns 1 +unique([]) // returns 0 +unique([1, 2, 3, 4]) // returns 4 +unique([1, 2, 3, 4, 2, 2, 2, 3, 4, 2, 4, 5, 2, 1, 4, 2]) // returns 5 +------------ + diff --git a/docs/canvas/canvas-workpad.asciidoc b/docs/canvas/canvas-workpad.asciidoc index dc53ea099d5c2..041efa82bc888 100644 --- a/docs/canvas/canvas-workpad.asciidoc +++ b/docs/canvas/canvas-workpad.asciidoc @@ -1,5 +1,5 @@ [[canvas-workpad]] -== Using the workpad +=== Using the workpad beta[]Now that you have a workpad with sample data that you can mess with, let’s mess with it. We’ll start out by making a few stylistic changes. diff --git a/docs/dev-tools/console/console.asciidoc b/docs/dev-tools/console/console.asciidoc index 68cf8df25ed14..99f4507a6c233 100644 --- a/docs/dev-tools/console/console.asciidoc +++ b/docs/dev-tools/console/console.asciidoc @@ -4,6 +4,8 @@ The Console plugin provides a UI to interact with the REST API of Elasticsearch. Console has two main areas: the *editor*, where you compose requests to Elasticsearch, and the *response* pane, which displays the responses to the request. +NOTE: You cannot interact with Kibana API endpoints via the Console. + .The Console UI image::dev-tools/console/images/introduction_screen.png[Screenshot] diff --git a/docs/images/canvas_workpad_weblog.png b/docs/images/canvas_workpad_weblog.png new file mode 100755 index 0000000000000..7b6ebee5c9554 Binary files /dev/null and b/docs/images/canvas_workpad_weblog.png differ diff --git a/docs/management/managing-beats.asciidoc b/docs/management/managing-beats.asciidoc index 380a8a061beb2..a3802c2e301c7 100644 --- a/docs/management/managing-beats.asciidoc +++ b/docs/management/managing-beats.asciidoc @@ -1,6 +1,9 @@ [[managing-beats]] +[role="xpack"] == Managing {beats} +beta[] + Use the Central Management UI under *Management > {beats}* to define and manage configurations in a central location in {kib} and quickly deploy configuration changes to all {beats} running across your enterprise. For more diff --git a/src/legacy/core_plugins/kibana/public/home/components/home_app.js b/src/legacy/core_plugins/kibana/public/home/components/home_app.js index bb01836e64808..74d01a3bad703 100644 --- a/src/legacy/core_plugins/kibana/public/home/components/home_app.js +++ b/src/legacy/core_plugins/kibana/public/home/components/home_app.js @@ -43,6 +43,7 @@ export function HomeApp({ const apmUiEnabled = chrome.getInjected('apmUiEnabled', true); const mlEnabled = chrome.getInjected('mlEnabled', false); const savedObjectsClient = chrome.getSavedObjectsClient(); + const isK7Design = chrome.getUiSettingsClient().get('k7design', false); const renderTutorialDirectory = (props) => { return ( @@ -50,6 +51,7 @@ export function HomeApp({ addBasePath={chrome.addBasePath} openTab={props.match.params.tab} isCloudEnabled={isCloudEnabled} + isK7Design={isK7Design} /> ); }; @@ -63,6 +65,7 @@ export function HomeApp({ replaceTemplateStrings={replaceTemplateStrings} tutorialId={props.match.params.id} bulkCreate={savedObjectsClient.bulkCreate} + isK7Design={isK7Design} /> ); }; diff --git a/src/legacy/core_plugins/kibana/public/home/components/tutorial/__snapshots__/tutorial.test.js.snap b/src/legacy/core_plugins/kibana/public/home/components/tutorial/__snapshots__/tutorial.test.js.snap index 84a98a3a7b784..96a7ae1a4079d 100644 --- a/src/legacy/core_plugins/kibana/public/home/components/tutorial/__snapshots__/tutorial.test.js.snap +++ b/src/legacy/core_plugins/kibana/public/home/components/tutorial/__snapshots__/tutorial.test.js.snap @@ -8,26 +8,32 @@ exports[`isCloudEnabled is false should not render instruction toggle when ON_PR -
- - Home - - / - - Add Data - -
- + +
+ + Home + + / + + + Add data + + / + + jest test tutorial +
+ +
-
- - Home - - / - - Add Data - -
- + +
+ + Home + + / + + + Add data + + / + + jest test tutorial +
+ +
`; -exports[`should render ELASTIC_CLOUD instructions when isCloudEnabled is true 1`] = ` +exports[`should not render breadcrumbs when K7 1`] = `
- - Home - - / - + +
+ + - Add Data - + +
- + + +`; + +exports[`should render ELASTIC_CLOUD instructions when isCloudEnabled is true 1`] = ` + + + +
+ + Home + + / + + + Add data + + / + + jest test tutorial +
+ +
{ @@ -349,14 +370,27 @@ class TutorialUi extends React.Component {
); } - return ( - - + let breadcrumbs; + if (!this.props.isK7Design) { + breadcrumbs = ( +
- Home / Add Data + {homeTitle} /{' '} + {addDataTitle} /{' '} + {this.state.tutorial ? this.state.tutorial.name : this.props.tutorialId}
+
+ ); + } + + return ( + + + + {breadcrumbs} + {content} @@ -372,6 +406,7 @@ TutorialUi.propTypes = { replaceTemplateStrings: PropTypes.func.isRequired, tutorialId: PropTypes.string.isRequired, bulkCreate: PropTypes.func.isRequired, + isK7Design: PropTypes.bool.isRequired, }; export const Tutorial = injectI18n(TutorialUi); diff --git a/src/legacy/core_plugins/kibana/public/home/components/tutorial/tutorial.test.js b/src/legacy/core_plugins/kibana/public/home/components/tutorial/tutorial.test.js index 76b57643724f6..71b3250d78b69 100644 --- a/src/legacy/core_plugins/kibana/public/home/components/tutorial/tutorial.test.js +++ b/src/legacy/core_plugins/kibana/public/home/components/tutorial/tutorial.test.js @@ -71,6 +71,7 @@ describe('isCloudEnabled is false', () => { replaceTemplateStrings={replaceTemplateStrings} tutorialId={'my_testing_tutorial'} bulkCreate={() => { }} + isK7Design={false} />); await loadTutorialPromise; @@ -95,6 +96,7 @@ describe('isCloudEnabled is false', () => { replaceTemplateStrings={replaceTemplateStrings} tutorialId={'my_testing_tutorial'} bulkCreate={() => { }} + isK7Design={false} />); await loadBasicTutorialPromise; component.update(); @@ -109,6 +111,7 @@ describe('isCloudEnabled is false', () => { replaceTemplateStrings={replaceTemplateStrings} tutorialId={'my_testing_tutorial'} bulkCreate={() => { }} + isK7Design={false} />); await loadTutorialPromise; component.update(); @@ -127,6 +130,22 @@ test('should render ELASTIC_CLOUD instructions when isCloudEnabled is true', asy replaceTemplateStrings={replaceTemplateStrings} tutorialId={'my_testing_tutorial'} bulkCreate={() => { }} + isK7Design={false} + />); + await loadTutorialPromise; + component.update(); + expect(component).toMatchSnapshot(); // eslint-disable-line +}); + +test('should not render breadcrumbs when K7', async () => { + const component = shallowWithIntl( { }} + isK7Design={true} />); await loadTutorialPromise; component.update(); diff --git a/src/legacy/core_plugins/kibana/public/home/components/tutorial_directory.js b/src/legacy/core_plugins/kibana/public/home/components/tutorial_directory.js index 63e0ca2d71a8b..d21e1a8ac19b0 100644 --- a/src/legacy/core_plugins/kibana/public/home/components/tutorial_directory.js +++ b/src/legacy/core_plugins/kibana/public/home/components/tutorial_directory.js @@ -18,10 +18,11 @@ */ import _ from 'lodash'; -import React from 'react'; +import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { Synopsis } from './synopsis'; import { SampleDataSetCards } from './sample_data_set_cards'; +import chrome from 'ui/chrome'; import { EuiPage, @@ -32,16 +33,21 @@ import { EuiSpacer, EuiTitle, EuiPageBody, + EuiLink, } from '@elastic/eui'; import { getTutorials } from '../load_tutorials'; import { injectI18n, FormattedMessage } from '@kbn/i18n/react'; +import { i18n } from '@kbn/i18n'; const ALL_TAB_ID = 'all'; const SAMPLE_DATA_TAB_ID = 'sampleData'; +const homeTitle = i18n.translate('kbn.home.breadcrumbs.homeTitle', { defaultMessage: 'Home' }); +const addDataTitle = i18n.translate('kbn.home.breadcrumbs.addDataTitle', { defaultMessage: 'Add data' }); + class TutorialDirectoryUi extends React.Component { constructor(props) { @@ -81,6 +87,16 @@ class TutorialDirectoryUi extends React.Component { async componentDidMount() { this._isMounted = true; + if(this.props.isK7Design) { + chrome.breadcrumbs.set([ + { + text: homeTitle, + href: '#/home' + }, + { text: addDataTitle } + ]); + } + const tutorialConfigs = await getTutorials(); if (!this._isMounted) { @@ -181,17 +197,24 @@ class TutorialDirectoryUi extends React.Component { } render() { + let breadcrumbs; + if (!this.props.isK7Design) { + breadcrumbs = ( + +
+ {homeTitle} / {addDataTitle} +
+ +
+ ); + } + return ( - - - - + {breadcrumbs} +

[ + { text: homeTitle }, + ] }; } diff --git a/src/legacy/core_plugins/kibana/server/tutorials/apm/saved_objects/index_pattern.json b/src/legacy/core_plugins/kibana/server/tutorials/apm/saved_objects/index_pattern.json index 9a3b80205d88b..06377e07e19c3 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/apm/saved_objects/index_pattern.json +++ b/src/legacy/core_plugins/kibana/server/tutorials/apm/saved_objects/index_pattern.json @@ -1,7 +1,7 @@ { "attributes": { "fieldFormatMap": "{\"@timestamp\":{\"id\":\"date\"},\"context.service.name\":{\"id\":\"url\",\"params\":{\"labelTemplate\":\"{{value}}\",\"openLinkInCurrentTab\":true,\"urlTemplate\":\"../app/kibana#/dashboard/41b5d920-7821-11e7-8c47-65b845b5cfb3?_a=(query:(language:lucene,query:'context.service.name:\\\"{{value}}\\\"'))\"}},\"error id icon\":{\"id\":\"url\",\"params\":{\"labelTemplate\":\"-\"}},\"error.grouping_key\":{\"id\":\"url\",\"params\":{\"labelTemplate\":\"View Error Details\",\"openLinkInCurrentTab\":true,\"urlTemplate\":\"../app/kibana#/dashboard/5f08a870-7c6a-11e7-aa55-3b0d52c71c60?_a=(query:(language:lucene,query:'error.grouping_key:{{value}}'))\"}},\"span.duration.us\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"microseconds\",\"outputFormat\":\"asMilliseconds\",\"outputPrecision\":0}},\"system.cpu.total.norm.pct\":{\"id\":\"percent\"},\"system.memory.actual.free\":{\"id\":\"bytes\"},\"system.memory.total\":{\"id\":\"bytes\"},\"system.process.cpu.total.norm.pct\":{\"id\":\"percent\"},\"system.process.memory.rss.bytes\":{\"id\":\"bytes\"},\"system.process.memory.size\":{\"id\":\"bytes\"},\"transaction.duration.us\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"microseconds\",\"outputFormat\":\"asMilliseconds\",\"outputPrecision\":0}},\"transaction.id\":{\"id\":\"url\",\"params\":{\"labelTemplate\":\"View Spans\",\"openLinkInCurrentTab\":true,\"urlTemplate\":\"../app/kibana#/dashboard/3e3de700-7de0-11e7-b115-df9c90da2df1?_a=(query:(language:lucene,query:'transaction.id:{{value}}'))\"}},\"view errors\":{\"id\":\"url\",\"params\":{\"labelTemplate\":\"View Errors\",\"openLinkInCurrentTab\":true,\"urlTemplate\":\"../app/kibana#/dashboard/37f6fac0-7c6a-11e7-aa55-3b0d52c71c60?_a=(query:(language:lucene,query:'context.service.name:\\\"{{value}}\\\"'))\"}},\"view spans\":{\"id\":\"url\",\"params\":{\"labelTemplate\":\"View Spans\"}}}", - "fields": "[{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.ephemeral_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"base.@timestamp\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"base.tags\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"base.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"base.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.provider\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.availability_zone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.region\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.instance.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.instance.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.machine.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.account.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.runtime\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.image.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.image.tag\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.vendor\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.serial_number\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.timezone.offset.sec\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":4,\"doc_values\":true,\"indexed\":true,\"name\":\"error.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.category\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.action\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.module\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.dataset\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.severity\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"event.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.duration\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.created\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.risk_score\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.risk_score_norm\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.path.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.target_path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.target_path.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.extension\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.device\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.inode\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.uid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.owner\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.gid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.group\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.mode\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.size\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.mtime\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.ctime\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.timezone.offset.sec\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.architecture\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.method\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.status_code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.body\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.level\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"log.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.name.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.protocol\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.direction\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.forwarded_ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.inbound.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.inbound.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.outbound.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.outbound.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.total.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.total.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"organization.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.args\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.pid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.ppid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.title\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.state\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.ephemeral_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.scheme\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.path.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.query\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.query.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.fragment\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.username\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.password\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.device\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.major\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.minor\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.patch\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.major\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.minor\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"beat.name\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"beat.hostname\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"beat.timezone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"@timestamp\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"tags\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"fields\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"listening\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"processor.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"processor.event\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"timestamp.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.tags\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.http.status_code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.user.username\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.user.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.user.user-agent\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.protocol\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.port\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.pathname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.search\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.http_version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.method\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.response.status_code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.response.finished\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.system.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.system.architecture\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.system.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.system.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.process.pid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.process.ppid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.process.title\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.environment\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.language.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.language.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.runtime.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.runtime.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.framework.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.framework.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.agent.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.agent.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"trace.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"parent.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.provider\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.instance_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.instance_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.machine_type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.availability_zone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.project_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.region\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.image\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.pod.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.pod.uid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.namespace\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.node.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.annotations\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.container.image\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":true,\"lang\":\"painless\",\"name\":\"view errors\",\"script\":\"doc['context.service.name'].value\",\"scripted\":true,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":true,\"lang\":\"painless\",\"name\":\"error id icon\",\"script\":\"doc['error.grouping_key'].value\",\"scripted\":true,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.culprit\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.grouping_key\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.module\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":4,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.handled\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.level\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.logger_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.param_message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.cpu.total.norm.pct\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.memory.total\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.memory.actual.free\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.cpu.total.norm.pct\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.memory.size\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.memory.rss.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.service.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.bundle_filepath\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"view spans\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.id\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.hex_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.subtype\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.action\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.start.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.duration.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.sync\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.parent\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.name.keyword\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.duration.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.result\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.marks\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.marks.navigationTiming\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.sampled\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.span_count.dropped.total\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_id\",\"scripted\":false,\"searchable\":false,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_index\",\"scripted\":false,\"searchable\":false,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_score\",\"scripted\":false,\"searchable\":false,\"type\":\"number\"}]", + "fields": "[{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.ephemeral_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"base.@timestamp\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"base.tags\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"base.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"base.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.provider\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.availability_zone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.region\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.instance.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.instance.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.machine.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.account.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.runtime\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.image.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.image.tag\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.vendor\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.serial_number\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.timezone.offset.sec\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"device.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":4,\"doc_values\":true,\"indexed\":true,\"name\":\"error.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.category\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.action\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.module\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.dataset\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.severity\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"event.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.duration\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.created\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.risk_score\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.risk_score_norm\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.path.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.target_path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.target_path.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.extension\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.device\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.inode\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.uid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.owner\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.gid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.group\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.mode\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.size\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.mtime\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.ctime\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.timezone.offset.sec\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.architecture\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.method\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.status_code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.body\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.level\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"log.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.name.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.protocol\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.direction\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.forwarded_ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.inbound.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.inbound.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.outbound.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.outbound.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.total.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.total.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"organization.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.args\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.pid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.ppid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.title\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.state\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.ephemeral_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.scheme\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.path.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.query\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.query.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.fragment\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.username\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.password\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.device\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.major\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.minor\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.patch\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.major\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.minor\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"beat.name\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"beat.hostname\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"beat.timezone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"@timestamp\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"tags\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"fields\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"listening\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"processor.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"processor.event\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"timestamp.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.tags\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.http.status_code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.user.username\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.user.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.user.user-agent\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.raw\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.protocol\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.port\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.pathname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.search\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.url.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.http_version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.request.method\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.response.status_code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.response.finished\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.system.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.system.architecture\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.system.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.system.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.process.pid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.process.ppid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.process.title\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.environment\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.language.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.language.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.runtime.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.runtime.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.framework.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.framework.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.agent.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"context.service.agent.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"trace.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"parent.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.provider\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.instance_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.instance_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.machine_type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.availability_zone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.project_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.region\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.image\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.pod.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.pod.uid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.namespace\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.node.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.annotations\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.container.image\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":true,\"lang\":\"painless\",\"name\":\"view errors\",\"script\":\"doc['context.service.name'].value\",\"scripted\":true,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":true,\"lang\":\"painless\",\"name\":\"error id icon\",\"script\":\"doc['error.grouping_key'].size() == 0 ? null : doc['error.grouping_key'].value\",\"scripted\":true,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.culprit\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.grouping_key\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.module\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":4,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.handled\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.level\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.logger_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.param_message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.cpu.total.norm.pct\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.memory.total\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.memory.actual.free\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.cpu.total.norm.pct\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.memory.size\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.memory.rss.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.service.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.bundle_filepath\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"view spans\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.id\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.hex_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.subtype\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.action\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.start.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.duration.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.sync\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.parent\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.name.keyword\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.duration.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.result\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.marks\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.marks.navigationTiming\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.sampled\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.span_count.dropped.total\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_id\",\"scripted\":false,\"searchable\":false,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_index\",\"scripted\":false,\"searchable\":false,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_score\",\"scripted\":false,\"searchable\":false,\"type\":\"number\"}]", "sourceFilters": "[{\"value\":\"sourcemap.sourcemap\"}]", "timeFieldName": "@timestamp" }, diff --git a/src/legacy/core_plugins/timelion/public/_app.scss b/src/legacy/core_plugins/timelion/public/_app.scss index 591d1f801fef3..e15b047cba3a1 100644 --- a/src/legacy/core_plugins/timelion/public/_app.scss +++ b/src/legacy/core_plugins/timelion/public/_app.scss @@ -14,4 +14,5 @@ .timApp__stats { font-weight: $euiFontWeightRegular; + color: $euiColorMediumShade } diff --git a/src/legacy/core_plugins/timelion/public/app.js b/src/legacy/core_plugins/timelion/public/app.js index 210db2191e4b3..18e2862a52faa 100644 --- a/src/legacy/core_plugins/timelion/public/app.js +++ b/src/legacy/core_plugins/timelion/public/app.js @@ -25,6 +25,7 @@ import { notify, fatalError, toastNotifications } from 'ui/notify'; import { timezoneProvider } from 'ui/vis/lib/timezone'; import { recentlyAccessed } from 'ui/persisted_log'; import { timefilter } from 'ui/timefilter'; +import { getSavedSheetBreadcrumbs, getCreateBreadcrumbs } from './breadcrumbs'; // import the uiExports that we want to "use" import 'uiExports/fieldFormats'; @@ -57,6 +58,11 @@ require('ui/routes') .when('/:id?', { template: require('plugins/timelion/index.html'), reloadOnSearch: false, + k7Breadcrumbs: ($injector, $route) => $injector.invoke( + $route.current.params.id + ? getSavedSheetBreadcrumbs + : getCreateBreadcrumbs + ), resolve: { savedSheet: function (redirectWhenMissing, savedSheets, $route) { return savedSheets.get($route.current.params.id) @@ -73,6 +79,9 @@ require('ui/routes') 'search': '/' })); } + }, + controller($scope, config) { + config.bindToScope($scope, 'k7design'); } }); diff --git a/src/legacy/core_plugins/timelion/public/breadcrumbs.js b/src/legacy/core_plugins/timelion/public/breadcrumbs.js new file mode 100644 index 0000000000000..883c95dfdc1a6 --- /dev/null +++ b/src/legacy/core_plugins/timelion/public/breadcrumbs.js @@ -0,0 +1,48 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { i18n } from '@kbn/i18n'; + +const ROOT_BREADCRUMB = { + text: i18n.translate('timelion.breadcrumbs.root', { + defaultMessage: 'Timelion' + }), + href: '#' +}; + +export function getCreateBreadcrumbs() { + return [ + ROOT_BREADCRUMB, + { + text: i18n.translate('timelion.breadcrumbs.create', { + defaultMessage: 'Create' + }), + } + ]; +} + +export function getSavedSheetBreadcrumbs($route) { + const { savedSheet } = $route.current.locals; + return [ + ROOT_BREADCRUMB, + { + text: savedSheet.title, + } + ]; +} diff --git a/src/legacy/core_plugins/timelion/public/index.html b/src/legacy/core_plugins/timelion/public/index.html index 14cad2dd80542..c8afc5442196b 100644 --- a/src/legacy/core_plugins/timelion/public/index.html +++ b/src/legacy/core_plugins/timelion/public/index.html @@ -4,12 +4,15 @@
- - {{opts.savedSheet.lastSavedTitle}} -   - -   - + + + {{opts.savedSheet.lastSavedTitle}} +   + +   + + + { const expectedTableData = [ 'Missing', 'osx' ]; + await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.visualize.filterLegend('Other'); await PageObjects.header.waitUntilLoadingHasFinished(); const pieData = await PageObjects.visualize.getPieChartLabels(); diff --git a/test/functional/page_objects/discover_page.js b/test/functional/page_objects/discover_page.js index 32c9c10ff4651..96c01b09e6b52 100644 --- a/test/functional/page_objects/discover_page.js +++ b/test/functional/page_objects/discover_page.js @@ -203,17 +203,10 @@ export function DiscoverPageProvider({ getService, getPageObjects }) { return await testSubjects.getVisibleText('discoverQueryHits'); } - query(queryString) { - return find.byCssSelector('input[aria-label="Search input"]') - .clearValue() - .type(queryString) - .then(() => { - return find.byCssSelector('button[aria-label="Search"]') - .click(); - }) - .then(() => { - return PageObjects.header.waitUntilLoadingHasFinished(); - }); + async query(queryString) { + await find.setValue('input[aria-label="Search input"]', queryString); + await find.clickByCssSelector('button[aria-label="Search"]'); + await PageObjects.header.waitUntilLoadingHasFinished(); } async getDocHeader() { diff --git a/test/functional/page_objects/point_series_page.js b/test/functional/page_objects/point_series_page.js index a0a6aacda24fe..2b0c42e7f8bc4 100644 --- a/test/functional/page_objects/point_series_page.js +++ b/test/functional/page_objects/point_series_page.js @@ -97,7 +97,7 @@ export function PointSeriesPageProvider({ getService }) { } async setValue(newValue) { - await find.click('button[ng-click="numberListCntr.add()"]'); + await find.clickByCssSelector('button[ng-click="numberListCntr.add()"]'); await find.setValue('input[ng-model="numberListCntr.getList()[$index]"]', newValue); } diff --git a/test/functional/page_objects/settings_page.js b/test/functional/page_objects/settings_page.js index 43f84c4c46a9b..c49a133bd3aba 100644 --- a/test/functional/page_objects/settings_page.js +++ b/test/functional/page_objects/settings_page.js @@ -597,7 +597,7 @@ export function SettingsPageProvider({ getService, getPageObjects }) { async getSavedObjectsInTable() { const table = await testSubjects.find('savedObjectsTable'); - const cells = await table.findAll('css selector', 'td:nth-child(3)'); + const cells = await table.findAllByCssSelector('td:nth-child(3)'); const objects = []; for (const cell of cells) { diff --git a/test/functional/page_objects/visual_builder_page.js b/test/functional/page_objects/visual_builder_page.js index 43979ea35cc2a..10a0645eb71eb 100644 --- a/test/functional/page_objects/visual_builder_page.js +++ b/test/functional/page_objects/visual_builder_page.js @@ -23,6 +23,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }) { const find = getService('find'); const retry = getService('retry'); const log = getService('log'); + const browser = getService('browser'); const testSubjects = getService('testSubjects'); const comboBox = getService('comboBox'); const PageObjects = getPageObjects(['common', 'header', 'visualize']); @@ -64,12 +65,12 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }) { // a textarea we must really select all text and remove it, and cannot use // clearValue(). if (process.platform === 'darwin') { - await input.session.pressKeys([Keys.COMMAND, 'a']); // Select all Mac + await browser.pressKeys([Keys.COMMAND, 'a']); // Select all Mac } else { - await input.session.pressKeys([Keys.CONTROL, 'a']); // Select all for everything else + await browser.pressKeys([Keys.CONTROL, 'a']); // Select all for everything else } - await input.session.pressKeys(Keys.NULL); // Release modifier keys - await input.session.pressKeys(Keys.BACKSPACE); // Delete all content + await browser.pressKeys(Keys.NULL); // Release modifier keys + await browser.pressKeys(Keys.BACKSPACE); // Delete all content await input.type(markdown); await PageObjects.header.waitUntilLoadingHasFinished(); } @@ -104,7 +105,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }) { async getRhythmChartLegendValue() { const metricValue = await find.byCssSelector('.tvbLegend__itemValue'); - await metricValue.session.moveMouseTo(metricValue); + await metricValue.moveMouseTo(); return await metricValue.getVisibleText(); } @@ -207,7 +208,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }) { const el = await testSubjects.find('comboBoxSearchInput'); await el.clearValue(); await el.type(timeField); - await el.session.pressKeys(Keys.RETURN); + await browser.pressKeys(Keys.RETURN); await PageObjects.header.waitUntilLoadingHasFinished(); } } diff --git a/test/functional/page_objects/visualize_page.js b/test/functional/page_objects/visualize_page.js index 8bf93b97c7cc4..1d21a96e6f995 100644 --- a/test/functional/page_objects/visualize_page.js +++ b/test/functional/page_objects/visualize_page.js @@ -492,14 +492,14 @@ export function VisualizePageProvider({ getService, getPageObjects }) { const advancedLinkState = await advancedLink.getAttribute('class'); if (advancedLinkState.includes('fa-caret-right')) { - await advancedLink.session.moveMouseTo(advancedLink); + await advancedLink.moveMouseTo(); log.debug('click advancedLink'); await advancedLink.click(); } const checkbox = await find.byCssSelector('input[ng-model="axis.scale.setYExtents"]'); const checkboxState = await checkbox.getAttribute('class'); if (checkboxState.includes('ng-empty')) { - await checkbox.session.moveMouseTo(checkbox); + await checkbox.moveMouseTo(); await checkbox.click(); } const maxField = await find.byCssSelector('[ng-model="axis.scale.max"]'); @@ -1139,10 +1139,12 @@ export function VisualizePageProvider({ getService, getPageObjects }) { } async toggleLegend(show = true) { - const isVisible = find.byCssSelector('vislib-legend .legend-ul'); - if ((show && !isVisible) || (!show && isVisible)) { - await testSubjects.click('vislibToggleLegend'); - } + await retry.try(async () => { + const isVisible = find.byCssSelector('vislib-legend'); + if ((show && !isVisible) || (!show && isVisible)) { + await testSubjects.click('vislibToggleLegend'); + } + }); } async filterLegend(name) { diff --git a/test/functional/services/browser.js b/test/functional/services/browser.js index 1435aacf51231..9af6563bfc5d7 100644 --- a/test/functional/services/browser.js +++ b/test/functional/services/browser.js @@ -93,8 +93,12 @@ export function BrowserProvider({ getService }) { * @param {number} yOffset Optional * @return {Promise} */ - async moveMouseTo(...args) { - await leadfoot.moveMouseTo(...args); + async moveMouseTo(element, xOffset, yOffset) { + if (element) { + await element.moveMouseTo(xOffset, yOffset); + } else { + await leadfoot.moveMouseTo(null, xOffset, yOffset); + } } /** diff --git a/test/functional/services/find.js b/test/functional/services/find.js index 39daed1f72105..f05f8024063e6 100644 --- a/test/functional/services/find.js +++ b/test/functional/services/find.js @@ -17,6 +17,8 @@ * under the License. */ +import { LeadfootElementWrapper } from './lib/leadfoot_element_wrapper'; + // Many of our tests use the `exists` functions to determine where the user is. For // example, you'll see a lot of code like: // if (!testSubjects.exists('someElementOnPageA')) { @@ -40,6 +42,14 @@ export function FindProvider({ getService }) { const defaultFindTimeout = config.get('timeouts.find'); + const wrap = leadfootElement => ( + new LeadfootElementWrapper(leadfootElement, leadfoot) + ); + + const wrapAll = leadfootElements => ( + leadfootElements.map(wrap) + ); + class Find { async _withTimeout(timeout, block) { try { @@ -76,26 +86,26 @@ export function FindProvider({ getService }) { async byName(selector, timeout = defaultFindTimeout) { log.debug(`find.byName(${selector})`); return await this._ensureElementWithTimeout(timeout, async leadfoot => { - return await leadfoot.findByName(selector); + return wrap(await leadfoot.findByName(selector)); }); } async byCssSelector(selector, timeout = defaultFindTimeout) { log.debug(`findByCssSelector ${selector}`); return await this._ensureElementWithTimeout(timeout, async leadfoot => { - return await leadfoot.findByCssSelector(selector); + return wrap(await leadfoot.findByCssSelector(selector)); }); } async byClassName(selector, timeout = defaultFindTimeout) { log.debug(`findByCssSelector ${selector}`); return await this._ensureElementWithTimeout(timeout, async leadfoot => { - return await leadfoot.findByClassName(selector); + return wrap(await leadfoot.findByClassName(selector)); }); } async activeElement() { - return await leadfoot.getActiveElement(); + return wrap(await leadfoot.getActiveElement()); } async setValue(selector, text) { @@ -126,57 +136,70 @@ export function FindProvider({ getService }) { async allByLinkText(selector, timeout = defaultFindTimeout) { log.debug('find.allByLinkText: ' + selector); - return await this.allByCustom(leadfoot => leadfoot.findAllByLinkText(selector), timeout); + return await this.allByCustom( + async leadfoot => wrapAll(await leadfoot.findAllByLinkText(selector)), + timeout + ); } async allByCssSelector(selector, timeout = defaultFindTimeout) { log.debug('in findAllByCssSelector: ' + selector); - return await this.allByCustom(leadfoot => leadfoot.findAllByCssSelector(selector), timeout); + return await this.allByCustom( + async leadfoot => wrapAll(await leadfoot.findAllByCssSelector(selector)), + timeout + ); } async descendantExistsByCssSelector(selector, parentElement, timeout = WAIT_FOR_EXISTS_TIME) { log.debug('Find.descendantExistsByCssSelector: ' + selector); - return await this.exists(async () => await parentElement.findDisplayedByCssSelector(selector), timeout); + return await this.exists( + async () => wrap(await parentElement.findDisplayedByCssSelector(selector)), + timeout + ); } async descendantDisplayedByCssSelector(selector, parentElement) { log.debug('Find.descendantDisplayedByCssSelector: ' + selector); - return await this._ensureElement(async () => await parentElement.findDisplayedByCssSelector(selector)); + return await this._ensureElement( + async () => wrap(await parentElement.findDisplayedByCssSelector(selector)) + ); } async allDescendantDisplayedByCssSelector(selector, parentElement) { log.debug(`Find.allDescendantDisplayedByCssSelector(${selector})`); const allElements = await parentElement.findAllByCssSelector(selector); return await Promise.all( - allElements.map((element) => this._ensureElement(async () => element)) + allElements.map((element) => ( + this._ensureElement(async () => wrap(element)) + )) ); } - async displayedByCssSelector(selector, timeout = defaultFindTimeout, parentElement) { + async displayedByCssSelector(selector, timeout = defaultFindTimeout) { log.debug('in displayedByCssSelector: ' + selector); return await this._ensureElementWithTimeout(timeout, async leadfoot => { - return await leadfoot.findDisplayedByCssSelector(selector); - }, parentElement); + return wrap(await leadfoot.findDisplayedByCssSelector(selector)); + }); } async byLinkText(selector, timeout = defaultFindTimeout) { log.debug('Find.byLinkText: ' + selector); return await this._ensureElementWithTimeout(timeout, async leadfoot => { - return await leadfoot.findByLinkText(selector); + return wrap(await leadfoot.findByLinkText(selector)); }); } async findDisplayedByLinkText(selector, timeout = defaultFindTimeout) { log.debug('Find.byLinkText: ' + selector); return await this._ensureElementWithTimeout(timeout, async leadfoot => { - return await leadfoot.findDisplayedByLinkText(selector); + return wrap(await leadfoot.findDisplayedByLinkText(selector)); }); } async byPartialLinkText(partialLinkText, timeout = defaultFindTimeout) { log.debug(`find.byPartialLinkText(${partialLinkText})`); return await this._ensureElementWithTimeout(timeout, async leadfoot => { - return await leadfoot.findByPartialLinkText(partialLinkText); + return wrap(await leadfoot.findByPartialLinkText(partialLinkText)); }); } @@ -193,26 +216,27 @@ export function FindProvider({ getService }) { async existsByLinkText(linkText, timeout = WAIT_FOR_EXISTS_TIME) { log.debug(`existsByLinkText ${linkText}`); - return await this.exists(async leadfoot => await leadfoot.findDisplayedByLinkText(linkText), timeout); + return await this.exists(async leadfoot => wrap(await leadfoot.findDisplayedByLinkText(linkText)), timeout); } async existsByDisplayedByCssSelector(selector, timeout = WAIT_FOR_EXISTS_TIME) { log.debug(`existsByDisplayedByCssSelector ${selector}`); - return await this.exists(async leadfoot => await leadfoot.findDisplayedByCssSelector(selector), timeout); + return await this.exists(async leadfoot => wrap(await leadfoot.findDisplayedByCssSelector(selector)), timeout); } async existsByCssSelector(selector, timeout = WAIT_FOR_EXISTS_TIME) { log.debug(`existsByCssSelector ${selector}`); - return await this.exists(async leadfoot => await leadfoot.findByCssSelector(selector), timeout); + return await this.exists(async leadfoot => wrap(await leadfoot.findByCssSelector(selector)), timeout); } async clickByCssSelectorWhenNotDisabled(selector, { timeout } = { timeout: defaultFindTimeout }) { log.debug(`Find.clickByCssSelectorWhenNotDisabled`); + // Don't wrap this code in a retry, or stale element checks may get caught here and the element // will never be re-grabbed. Let errors bubble, but continue checking for disabled property until // it's gone. const element = await this.byCssSelector(selector, timeout); - await leadfoot.moveMouseTo(element); + await element.moveMouseTo(); const clickIfNotDisabled = async (element, resolve) => { const disabled = await element.getProperty('disabled'); @@ -232,7 +256,7 @@ export function FindProvider({ getService }) { log.debug(`clickByPartialLinkText(${linkText})`); await retry.try(async () => { const element = await this.byPartialLinkText(linkText, timeout); - await leadfoot.moveMouseTo(element); + await element.moveMouseTo(); await element.click(); }); } @@ -241,7 +265,7 @@ export function FindProvider({ getService }) { log.debug(`clickByLinkText(${linkText})`); await retry.try(async () => { const element = await this.byLinkText(linkText, timeout); - await leadfoot.moveMouseTo(element); + await element.moveMouseTo(); await element.click(); }); } @@ -257,7 +281,7 @@ export function FindProvider({ getService }) { if (index === -1) { throw new Error('Button not found'); } - return allButtons[index]; + return wrap(allButtons[index]); }); } @@ -273,7 +297,7 @@ export function FindProvider({ getService }) { log.debug(`clickByCssSelector(${selector})`); await retry.try(async () => { const element = await this.byCssSelector(selector, timeout); - await leadfoot.moveMouseTo(element); + await element.moveMouseTo(); await element.click(); }); } @@ -281,14 +305,14 @@ export function FindProvider({ getService }) { log.debug(`clickByDisplayedLinkText(${linkText})`); await retry.try(async () => { const element = await this.findDisplayedByLinkText(linkText, timeout); - await leadfoot.moveMouseTo(element); + await element.moveMouseTo(); await element.click(); }); } async clickDisplayedByCssSelector(selector, timeout = defaultFindTimeout) { await retry.try(async () => { const element = await this.findDisplayedByCssSelector(selector, timeout); - await leadfoot.moveMouseTo(element); + await element.moveMouseTo(); await element.click(); }); } diff --git a/test/functional/services/lib/leadfoot_element_wrapper.js b/test/functional/services/lib/leadfoot_element_wrapper.js new file mode 100644 index 0000000000000..303162b67e4bb --- /dev/null +++ b/test/functional/services/lib/leadfoot_element_wrapper.js @@ -0,0 +1,316 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export class LeadfootElementWrapper { + constructor(leadfootElement, leadfoot) { + if (leadfootElement instanceof LeadfootElementWrapper) { + return leadfootElement; + } + + this._leadfootElement = leadfootElement; + this._leadfoot = leadfoot; + } + + _wrap(otherLeadfootElement) { + return new LeadfootElementWrapper(otherLeadfootElement, this._leadfoot); + } + + _wrapAll(otherLeadfootElements) { + return otherLeadfootElements.map(e => this._wrap(e)); + } + + /** + * Clicks the element. This method works on both mouse and touch platforms + * https://theintern.io/leadfoot/module-leadfoot_Element.html#click + * + * @return {Promise} + */ + async click() { + await this._leadfootElement.click(); + } + + /** + * Gets all elements inside this element matching the given CSS class name. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#findAllByClassName + * + * @param {string} className + * @return {Promise} + */ + async findAllByClassName(className) { + return await this._wrapAll( + await this._leadfootElement.findAllByClassName(className) + ); + } + + /** + * Clears the value of a form element. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#clearValue + * + * @return {Promise} + */ + async clearValue() { + await this._leadfootElement.clearValue(); + } + + /** + * Types into the element. This method works the same as the leadfoot/Session#pressKeys method + * except that any modifier keys are automatically released at the end of the command. This + * method should be used instead of leadfoot/Session#pressKeys to type filenames into file + * upload fields. + * + * Since 1.5, if the WebDriver server supports remote file uploads, and you type a path to + * a file on your local computer, that file will be transparently uploaded to the remote + * server and the remote filename will be typed instead. If you do not want to upload local + * files, use leadfoot/Session#pressKeys instead. + * + * @param {string|string[]} value + * @return {Promise} + */ + async type(value) { + await this._leadfootElement.type(value); + } + + /** + * Gets the first element inside this element matching the given CSS class name. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#findByClassName + * + * @param {string} className + * @return {Promise} + */ + async findByClassName(className) { + return this._wrap(await this._leadfootElement.findByClassName(className)); + } + + /** + * Returns whether or not the element would be visible to an actual user. This means + * that the following types of elements are considered to be not displayed: + * + * - Elements with display: none + * - Elements with visibility: hidden + * - Elements positioned outside of the viewport that cannot be scrolled into view + * - Elements with opacity: 0 + * - Elements with no offsetWidth or offsetHeight + * + * https://theintern.io/leadfoot/module-leadfoot_Element.html#isDisplayed + * + * @return {Promise} + */ + async isDisplayed() { + return await this._leadfootElement.isDisplayed(); + } + + /** + * Gets an attribute of the element. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#getAttribute + * + * @param {string} name + */ + async getAttribute(name) { + return await this._leadfootElement.getAttribute(name); + } + + /** + * Gets the visible text within the element.
elements are converted to line breaks + * in the returned text, and whitespace is normalised per the usual XML/HTML whitespace + * normalisation rules. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#getVisibleText + * + * @return {Promise} + */ + async getVisibleText() { + return await this._leadfootElement.getVisibleText(); + } + + /** + * Gets the tag name of the element. For HTML documents, the value is always lowercase. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#getTagName + * + * @return {Promise} + */ + async getTagName() { + return await this._leadfootElement.getTagName(); + } + + /** + * Gets the position of the element relative to the top-left corner of the document, + * taking into account scrolling and CSS transformations (if they are supported). + * https://theintern.io/leadfoot/module-leadfoot_Element.html#getPosition + * + * @return {Promise<{x: number, y: number}>} + */ + async getPosition() { + return await this._leadfootElement.getPosition(); + } + + /** + * Gets all elements inside this element matching the given CSS selector. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#findAllByCssSelector + * + * @param {string} selector + * @return {Promise} + */ + async findAllByCssSelector(selector) { + return this._wrapAll(await this._leadfootElement.findAllByCssSelector(selector)); + } + + /** + * Gets the first element inside this element matching the given CSS selector. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#findByCssSelector + * + * @param {string} selector + * @return {Promise} + */ + async findByCssSelector(selector) { + return this._wrap(await this._leadfootElement.findByCssSelector(selector)); + } + + /** + * Returns whether or not a form element can be interacted with. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#isEnabled + * + * @return {Promise} + */ + async isEnabled() { + return await this._leadfootElement.isEnabled(); + } + + /** + * Gets all elements inside this element matching the given HTML tag name. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#findAllByTagName + * + * @param {string} tagName + * @return {Promise} + */ + async findAllByTagName(tagName) { + return this._wrapAll(await this._leadfootElement.findAllByTagName(tagName)); + } + + /** + * Gets a property of the element. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#getProperty + * + * @param {string} name + * @return {Promise} + */ + async getProperty(name) { + return await this._leadfootElement.getProperty(name); + } + + /** + * Moves the remote environment’s mouse cursor to this element. If the element is outside + * of the viewport, the remote driver will attempt to scroll it into view automatically. + * https://theintern.io/leadfoot/module-leadfoot_Session.html#moveMouseTo + * + * @param {number} xOffset optional - The x-offset of the cursor, maybe in CSS pixels, relative to the left edge of the specified element’s bounding client rectangle. + * @param {number} yOffset optional - The y-offset of the cursor, maybe in CSS pixels, relative to the top edge of the specified element’s bounding client rectangle. + * @return {Promise} + */ + async moveMouseTo(xOffset, yOffset) { + return await this._leadfoot.moveMouseTo(this._leadfootElement, xOffset, yOffset); + } + + /** + * Gets a CSS computed property value for the element. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#getComputedStyle + * + * @param {string} propertyName + * @return {Promise} + */ + async getComputedStyle(propertyName) { + return await this._leadfootElement.getComputedStyle(propertyName); + } + + /** + * Gets the size of the element, taking into account CSS transformations (if they are supported). + * https://theintern.io/leadfoot/module-leadfoot_Element.html#getSize + * + * @return {Promise<{width: number, height: number}>} + */ + async getSize() { + return await this._leadfootElement.getSize(); + } + + /** + * Gets the first element inside this element matching the given HTML tag name. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#findByTagName + * + * @param {string} tagName + * @return {Promise} + */ + async findByTagName(tagName) { + return this._wrap(await this._leadfootElement.findByTagName(tagName)); + } + + /** + * Returns whether or not a form element is currently selected (for drop-down options and radio buttons), + * or whether or not the element is currently checked (for checkboxes). + * https://theintern.io/leadfoot/module-leadfoot_Element.html#isSelected + * + * @return {Promise} + */ + async isSelected() { + return await this._leadfootElement.isSelected(); + } + + /** + * Gets the first displayed element inside this element matching the given CSS selector. This is + * inherently slower than leadfoot/Element#find, so should only be used in cases where the + * visibility of an element cannot be ensured in advance. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#findDisplayedByCssSelector + * + * @param {string} selector + * @return {Promise} + */ + async findDisplayedByCssSelector(selector) { + return this._wrap(await this._leadfootElement.findDisplayedByCssSelector(selector)); + } + + /** + * Waits for all elements inside this element matching the given CSS class name to be destroyed. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#waitForDeletedByClassName + * + * @param {string} className + * @return {Promise} + */ + async waitForDeletedByClassName(className) { + await this._leadfootElement.waitForDeletedByClassName(className); + } + + /** + * Gets the first element inside this element partially matching the given case-insensitive link text. + * https://theintern.io/leadfoot/module-leadfoot_Element.html#findByPartialLinkText + * + * @param {string} text + * @return {Promise} + */ + async findByPartialLinkText(text) { + return this._wrap(await this._leadfootElement.findByPartialLinkText(text)); + } + + /** + * https://theintern.io/leadfoot/module-leadfoot_Element.html#findByXpath + * + * @deprecated + * @param {string} xpath + * @return {Promise} + */ + async findByXpath(xpath) { + return this._wrap(await this._leadfootElement.findByXpath(xpath)); + } +} diff --git a/test/scripts/jenkins_xpack_ci_group.sh b/test/scripts/jenkins_xpack_ci_group.sh index 4df6041639116..11b16ba27a328 100755 --- a/test/scripts/jenkins_xpack_ci_group.sh +++ b/test/scripts/jenkins_xpack_ci_group.sh @@ -14,7 +14,8 @@ node scripts/functional_tests --assert-none-excluded \ --include-tag ciGroup3 \ --include-tag ciGroup4 \ --include-tag ciGroup5 \ - --include-tag ciGroup6 + --include-tag ciGroup6 \ + --include-tag ciGroup7 echo " -> building and extracting default Kibana distributable for use in functional tests" cd "$KIBANA_DIR" diff --git a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap index d0a6b69f71ed2..9ca7ebbed2b04 100644 --- a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap +++ b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap @@ -13,22 +13,17 @@ exports[`DetailView should render with data 1`] = ` Error occurrence - View 18 occurences in Discover + + View 18 occurences in Discover + diff --git a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/index.js b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/index.js index 39dcba9ba1920..461df0cc66776 100644 --- a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/index.js +++ b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/index.js @@ -5,6 +5,7 @@ */ import React from 'react'; +import { EuiButtonEmpty } from '@elastic/eui'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import { @@ -18,15 +19,13 @@ import { get, capitalize, isEmpty } from 'lodash'; import { STATUS } from '../../../../constants'; import { StickyProperties } from '../../../shared/StickyProperties'; import { Tab, HeaderMedium } from '../../../shared/UIComponents'; -import { DiscoverButton } from '../../../shared/DiscoverButton'; +import { DiscoverErrorButton } from '../../../shared/DiscoverButtons/DiscoverErrorButton'; import { PropertiesTable, getPropertyTabNames } from '../../../shared/PropertiesTable'; import Stacktrace from '../../../shared/Stacktrace'; import { - SERVICE_NAME, - ERROR_GROUP_ID, SERVICE_AGENT_NAME, SERVICE_LANGUAGE_NAME, USER_ID, @@ -132,18 +131,6 @@ function DetailView({ errorGroup, urlParams, location }) { const occurencesCount = errorGroup.data.occurrencesCount; const groupId = errorGroup.data.groupId; const agentName = get(errorGroup.data.error, SERVICE_AGENT_NAME); - const discoverQuery = { - _a: { - interval: 'auto', - query: { - language: 'lucene', - query: `${SERVICE_NAME}:"${serviceName}" AND ${ERROR_GROUP_ID}:"${groupId}"${ - urlParams.kuery ? ` AND ${urlParams.kuery}` : `` - }` - }, - sort: { '@timestamp': 'desc' } - } - }; return ( @@ -155,9 +142,15 @@ function DetailView({ errorGroup, urlParams, location }) { > Error occurrence - - {`View ${occurencesCount} occurences in Discover`} - + + + {`View ${occurencesCount} occurences in Discover`} + + diff --git a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/ActionMenu.tsx b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/ActionMenu.tsx index bce2ba669644a..8486059b3f6fd 100644 --- a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/ActionMenu.tsx +++ b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/ActionMenu.tsx @@ -11,29 +11,9 @@ import { EuiPopover } from '@elastic/eui'; import React from 'react'; -import { - PROCESSOR_EVENT, - TRACE_ID, - TRANSACTION_ID -} from 'x-pack/plugins/apm/common/constants'; import { KibanaLink } from 'x-pack/plugins/apm/public/utils/url'; import { Transaction } from 'x-pack/plugins/apm/typings/Transaction'; - -function getDiscoverQuery(transactionId: string, traceId?: string) { - let query = `${PROCESSOR_EVENT}:"transaction" AND ${TRANSACTION_ID}:"${transactionId}"`; - if (traceId) { - query += ` AND ${TRACE_ID}:"${traceId}"`; - } - return { - _a: { - interval: 'auto', - query: { - language: 'lucene', - query - } - } - }; -} +import { DiscoverTransactionButton } from '../../../shared/DiscoverButtons/DiscoverTransactionButton'; function getInfraMetricsQuery(transaction: Transaction) { const plus5 = new Date(transaction['@timestamp']); @@ -64,22 +44,6 @@ interface ActionMenuState { readonly isOpen: boolean; } -export const DiscoverTransactionLink: React.SFC = ({ - transaction, - children -}) => { - const traceId = - transaction.version === 'v2' ? transaction.trace.id : undefined; - return ( - - ); -}; - export class ActionMenu extends React.Component< ActionMenuProps, ActionMenuState @@ -130,9 +94,9 @@ export class ActionMenu extends React.Component< const items = [ - + View sample document - + , ...this.getInfraActions(transaction) ]; diff --git a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/SpanFlyout/index.tsx b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/SpanFlyout/index.tsx index 8bef7300ec80d..471e610daef3f 100644 --- a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/SpanFlyout/index.tsx +++ b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/SpanFlyout/index.tsx @@ -6,6 +6,7 @@ import { EuiBasicTable, + EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiFlyout, @@ -21,12 +22,7 @@ import { get, keys } from 'lodash'; import React, { Fragment } from 'react'; import styled from 'styled-components'; -// @ts-ignore -import { - SERVICE_LANGUAGE_NAME, - SPAN_HEX_ID, - SPAN_ID -} from '../../../../../../../../common/constants'; +import { SERVICE_LANGUAGE_NAME } from '../../../../../../../../common/constants'; import { px, unit } from '../../../../../../../style/variables'; // @ts-ignore @@ -36,9 +32,9 @@ import { DatabaseContext } from './DatabaseContext'; import { HttpContext } from './HttpContext'; import { StickySpanProperties } from './StickySpanProperties'; +import { DiscoverSpanButton } from 'x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverSpanButton'; import { Transaction } from 'x-pack/plugins/apm/typings/Transaction'; import { Span } from '../../../../../../../../typings/Span'; -import { DiscoverButton } from '../../../../../../shared/DiscoverButton'; import { FlyoutTopLevelProperties } from '../FlyoutTopLevelProperties'; const StackTraceContainer = styled.div` @@ -49,21 +45,6 @@ const TagName = styled.div` font-weight: bold; `; -function getDiscoverQuery(span: Span) { - return { - _a: { - interval: 'auto', - query: { - language: 'lucene', - query: - span.version === 'v2' - ? `${SPAN_HEX_ID}:"${span.span.hex_id}"` - : `${SPAN_ID}:"${span.span.id}"` - } - } - }; -} - interface Props { span?: Span; parentTransaction?: Transaction; @@ -102,9 +83,11 @@ export function SpanFlyout({ - - {`View span in Discover`} - + + + {`View span in Discover`} + + diff --git a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/TransactionFlyout/index.tsx b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/TransactionFlyout/index.tsx index e3d380ae9fb35..897e0d71035ef 100644 --- a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/TransactionFlyout/index.tsx +++ b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/TransactionFlyout/index.tsx @@ -20,10 +20,10 @@ import { import { get } from 'lodash'; import React from 'react'; import styled from 'styled-components'; +import { DiscoverTransactionButton } from 'x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverTransactionButton'; import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams'; import { APM_AGENT_DROPPED_SPANS_DOCS } from 'x-pack/plugins/apm/public/utils/documentation/agents'; import { Transaction } from 'x-pack/plugins/apm/typings/Transaction'; -import { DiscoverTransactionLink } from '../../../ActionMenu'; import { StickyTransactionProperties } from '../../../StickyTransactionProperties'; import { TransactionPropertiesTableForFlyout } from '../../../TransactionPropertiesTableForFlyout'; import { FlyoutTopLevelProperties } from '../FlyoutTopLevelProperties'; @@ -115,11 +115,11 @@ export function TransactionFlyout({ - + View transaction in Discover - + diff --git a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/index.tsx b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/index.tsx index a21293abef9df..cea8e117e628f 100644 --- a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/index.tsx +++ b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/index.tsx @@ -17,8 +17,8 @@ import { import React from 'react'; import { Transaction as ITransaction } from '../../../../../typings/Transaction'; import { IUrlParams } from '../../../../store/urlParams'; +import { DiscoverTransactionButton } from '../../../shared/DiscoverButtons/DiscoverTransactionButton'; import { TransactionLink } from '../../../shared/TransactionLink'; -import { DiscoverTransactionLink } from './ActionMenu'; import { StickyTransactionProperties } from './StickyTransactionProperties'; import { TransactionPropertiesTable } from './TransactionPropertiesTable'; import { IWaterfall } from './WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers'; @@ -95,11 +95,11 @@ export const Transaction: React.SFC = ({ - + View transaction in Discover - + = ({ - query, - children, - ...rest -}) => { - return ( - - - {children || 'View in Discover'} - - - ); -}; diff --git a/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverButton.tsx b/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverButton.tsx new file mode 100644 index 0000000000000..5d48d7e87b9a8 --- /dev/null +++ b/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverButton.tsx @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { StringMap } from 'x-pack/plugins/apm/typings/common'; +import { + getAPMIndexPattern, + ISavedObject +} from '../../../services/rest/savedObjects'; +import { KibanaLink } from '../../../utils/url'; + +interface Props { + query: StringMap; +} + +interface State { + indexPattern?: ISavedObject; +} + +export class DiscoverButton extends React.Component { + public state: State = {}; + public async componentDidMount() { + const indexPattern = await getAPMIndexPattern(); + this.setState({ indexPattern }); + } + + public render() { + const { query, children, ...rest } = this.props; + const id = this.state.indexPattern && this.state.indexPattern.id; + + if (!query._a.index) { + query._a.index = id; + } + + return ( + + ); + } +} diff --git a/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverErrorButton.tsx b/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverErrorButton.tsx new file mode 100644 index 0000000000000..c07ffa6d704a5 --- /dev/null +++ b/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverErrorButton.tsx @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { + ERROR_GROUP_ID, + SERVICE_NAME +} from 'x-pack/plugins/apm/common/constants'; +import { DiscoverButton } from './DiscoverButton'; + +function getDiscoverQuery(serviceName: string, groupId: string, kuery: string) { + let query = `${SERVICE_NAME}:"${serviceName}" AND ${ERROR_GROUP_ID}:"${groupId}"`; + if (kuery) { + query = ` AND ${kuery}`; + } + + return { + _a: { + interval: 'auto', + query: { + language: 'lucene', + query + }, + sort: { '@timestamp': 'desc' } + } + }; +} + +export const DiscoverErrorButton: React.SFC<{ + readonly serviceName: string; + readonly groupId: string; + readonly kuery: string; +}> = ({ serviceName, groupId, kuery, children }) => { + return ( + + ); +}; diff --git a/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverSpanButton.tsx b/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverSpanButton.tsx new file mode 100644 index 0000000000000..baf4435a07542 --- /dev/null +++ b/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverSpanButton.tsx @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { SPAN_HEX_ID, SPAN_ID } from 'x-pack/plugins/apm/common/constants'; +import { Span } from 'x-pack/plugins/apm/typings/Span'; +import { DiscoverButton } from './DiscoverButton'; + +function getDiscoverQuery(span: Span) { + const query = + span.version === 'v2' + ? `${SPAN_HEX_ID}:"${span.span.hex_id}"` + : `${SPAN_ID}:"${span.span.id}"`; + + return { + _a: { + interval: 'auto', + query: { + language: 'lucene', + query + } + } + }; +} + +export const DiscoverSpanButton: React.SFC<{ + readonly span: Span; +}> = ({ span, children }) => { + return ; +}; diff --git a/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverTransactionButton.tsx b/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverTransactionButton.tsx new file mode 100644 index 0000000000000..d2ed79b7f9cae --- /dev/null +++ b/x-pack/plugins/apm/public/components/shared/DiscoverButtons/DiscoverTransactionButton.tsx @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { + PROCESSOR_EVENT, + TRACE_ID, + TRANSACTION_ID +} from 'x-pack/plugins/apm/common/constants'; +import { Transaction } from 'x-pack/plugins/apm/typings/Transaction'; +import { DiscoverButton } from './DiscoverButton'; + +function getDiscoverQuery(transaction: Transaction) { + const transactionId = transaction.transaction.id; + const traceId = + transaction.version === 'v2' ? transaction.trace.id : undefined; + + let query = `${PROCESSOR_EVENT}:"transaction" AND ${TRANSACTION_ID}:"${transactionId}"`; + if (traceId) { + query += ` AND ${TRACE_ID}:"${traceId}"`; + } + return { + _a: { + interval: 'auto', + query: { + language: 'lucene', + query + } + } + }; +} + +export const DiscoverTransactionButton: React.SFC<{ + readonly transaction: Transaction; +}> = ({ transaction, children }) => { + return ( + + ); +}; diff --git a/x-pack/plugins/apm/public/components/shared/HistoryTabs/__test__/HistoryTabs.test.tsx b/x-pack/plugins/apm/public/components/shared/HistoryTabs/__test__/HistoryTabs.test.tsx index 25aae9d253293..c24f63d124ab3 100644 --- a/x-pack/plugins/apm/public/components/shared/HistoryTabs/__test__/HistoryTabs.test.tsx +++ b/x-pack/plugins/apm/public/components/shared/HistoryTabs/__test__/HistoryTabs.test.tsx @@ -55,11 +55,11 @@ describe('HistoryTabs', () => { } ]; - testProps = ({ + testProps = { location: mockLocation, history: mockHistory, tabs: testTabs - } as unknown) as HistoryTabsProps; + } as HistoryTabsProps; }); it('should render correctly', () => { diff --git a/x-pack/plugins/apm/public/components/shared/KueryBar/view.js b/x-pack/plugins/apm/public/components/shared/KueryBar/view.js index 3e8bf1caa66b5..0465db41ddb77 100644 --- a/x-pack/plugins/apm/public/components/shared/KueryBar/view.js +++ b/x-pack/plugins/apm/public/components/shared/KueryBar/view.js @@ -17,8 +17,11 @@ import { } from '../../../utils/url'; import { Typeahead } from './Typeahead'; import chrome from 'ui/chrome'; -import { getAPMIndexPattern } from '../../../services/rest/savedObjects'; -import { convertKueryToEsQuery, getSuggestions } from '../../../services/kuery'; +import { + convertKueryToEsQuery, + getSuggestions, + getAPMIndexPatternForKuery +} from '../../../services/kuery'; import styled from 'styled-components'; import { getBoolFilter } from './get_bool_filter'; @@ -36,7 +39,7 @@ class KueryBarView extends Component { }; async componentDidMount() { - const indexPattern = await getAPMIndexPattern(); + const indexPattern = await getAPMIndexPatternForKuery(); this.setState({ indexPattern, isLoadingIndexPattern: false }); } diff --git a/x-pack/plugins/apm/public/services/kuery.js b/x-pack/plugins/apm/public/services/kuery.ts similarity index 56% rename from x-pack/plugins/apm/public/services/kuery.js rename to x-pack/plugins/apm/public/services/kuery.ts index 02cfd94661a86..37cca8febe166 100644 --- a/x-pack/plugins/apm/public/services/kuery.js +++ b/x-pack/plugins/apm/public/services/kuery.ts @@ -6,20 +6,25 @@ import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; import { getAutocompleteProvider } from 'ui/autocomplete_providers'; +// @ts-ignore +import { getFromSavedObject } from 'ui/index_patterns/static_utils'; +import { getAPMIndexPattern } from './rest/savedObjects'; -export function convertKueryToEsQuery(kuery, indexPattern) { +export function convertKueryToEsQuery(kuery: string, indexPattern: any) { const ast = fromKueryExpression(kuery); return toElasticsearchQuery(ast, indexPattern); } export async function getSuggestions( - query, - selectionStart, - apmIndexPattern, - boolFilter + query: string, + selectionStart: number, + apmIndexPattern: any, + boolFilter: any ) { const autocompleteProvider = getAutocompleteProvider('kuery'); - if (!autocompleteProvider) return []; + if (!autocompleteProvider) { + return []; + } const config = { get: () => true }; @@ -35,3 +40,18 @@ export async function getSuggestions( selectionEnd: selectionStart }); } + +interface IIndexPatternForKuery { + title: string; + fields: any[]; +} + +export async function getAPMIndexPatternForKuery(): Promise< + IIndexPatternForKuery | undefined +> { + const apmIndexPattern = await getAPMIndexPattern(); + if (!apmIndexPattern) { + return; + } + return getFromSavedObject(apmIndexPattern); +} diff --git a/x-pack/plugins/apm/public/services/rest/apm/apm.ts b/x-pack/plugins/apm/public/services/rest/apm/apm.ts index b43c8e73df19a..8d457ea758ce3 100644 --- a/x-pack/plugins/apm/public/services/rest/apm/apm.ts +++ b/x-pack/plugins/apm/public/services/rest/apm/apm.ts @@ -6,17 +6,14 @@ import { Span } from 'x-pack/plugins/apm/typings/Span'; import { Transaction } from 'x-pack/plugins/apm/typings/Transaction'; -// @ts-ignore -import { convertKueryToEsQuery } from '../../kuery'; -// @ts-ignore -import { getAPMIndexPattern } from '../savedObjects'; +import { convertKueryToEsQuery, getAPMIndexPatternForKuery } from '../../kuery'; export async function getEncodedEsQuery(kuery?: string) { if (!kuery) { return; } - const indexPattern = await getAPMIndexPattern(); + const indexPattern = await getAPMIndexPatternForKuery(); if (!indexPattern) { return; } diff --git a/x-pack/plugins/apm/public/services/rest/savedObjects.js b/x-pack/plugins/apm/public/services/rest/savedObjects.ts similarity index 65% rename from x-pack/plugins/apm/public/services/rest/savedObjects.js rename to x-pack/plugins/apm/public/services/rest/savedObjects.ts index 145c3a08a3f89..a99a6d2ae306e 100644 --- a/x-pack/plugins/apm/public/services/rest/savedObjects.js +++ b/x-pack/plugins/apm/public/services/rest/savedObjects.ts @@ -4,14 +4,27 @@ * you may not use this file except in compliance with the Elastic License. */ -import { memoize, isEmpty, first } from 'lodash'; +import { first, isEmpty, memoize } from 'lodash'; import chrome from 'ui/chrome'; -import { getFromSavedObject } from 'ui/index_patterns/static_utils'; import { callApi } from './callApi'; +export interface ISavedObject { + attributes: { + title: string; + }; + id: string; + type: string; +} + +interface ISavedObjectAPIResponse { + savedObjects: ISavedObject[]; +} + export const getAPMIndexPattern = memoize(async () => { - const apmIndexPatternTitle = chrome.getInjected('apmIndexPatternTitle'); - const res = await callApi({ + const apmIndexPatternTitle: string = chrome.getInjected( + 'apmIndexPatternTitle' + ); + const res = await callApi({ pathname: `/api/saved_objects/_find`, query: { type: 'index-pattern', @@ -31,9 +44,5 @@ export const getAPMIndexPattern = memoize(async () => { ) ); - if (!apmSavedObject) { - return; - } - - return getFromSavedObject(apmSavedObject); + return apmSavedObject; }); diff --git a/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts b/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts new file mode 100644 index 0000000000000..751b349b186f3 --- /dev/null +++ b/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { setupRequest } from './setup_request'; + +describe('setupRequest', () => { + let callWithRequestSpy: jest.Mock; + let mockReq: any; + + beforeEach(() => { + callWithRequestSpy = jest.fn(); + mockReq = { + params: {}, + query: {}, + server: { + config: () => 'myConfig', + plugins: { + elasticsearch: { + getCluster: () => ({ + callWithRequest: callWithRequestSpy + }) + } + } + } + }; + + const setup = setupRequest(mockReq); + setup.client('myType', { body: 'foo' }); + }); + + it('should call callWithRequest with correct args', () => { + expect(callWithRequestSpy).toHaveBeenCalledWith(mockReq, 'myType', { + body: 'foo', + rest_total_hits_as_int: true + }); + }); + + it('should update params with rest_total_hits_as_int', () => { + expect(callWithRequestSpy.mock.calls[0][2]).toEqual({ + body: 'foo', + rest_total_hits_as_int: true + }); + }); +}); diff --git a/x-pack/plugins/apm/server/lib/helpers/setup_request.ts b/x-pack/plugins/apm/server/lib/helpers/setup_request.ts index 9bf11b98a2126..774ea7ef1690a 100644 --- a/x-pack/plugins/apm/server/lib/helpers/setup_request.ts +++ b/x-pack/plugins/apm/server/lib/helpers/setup_request.ts @@ -63,7 +63,12 @@ export function setupRequest(req: Request): Setup { console.log(`GET ${params.index}/_search`); console.log(JSON.stringify(params.body, null, 4)); } - return cluster.callWithRequest(req, type, params); + + const nextParams = { + ...params, + rest_total_hits_as_int: true // ensure that ES returns accurate hits.total with pre-6.6 format + }; + return cluster.callWithRequest(req, type, nextParams); }; return { diff --git a/x-pack/plugins/canvas/public/components/border_connection/border_connection.scss b/x-pack/plugins/canvas/public/components/border_connection/border_connection.scss index aa5d9ad1e0f41..ba09edd1090db 100644 --- a/x-pack/plugins/canvas/public/components/border_connection/border_connection.scss +++ b/x-pack/plugins/canvas/public/components/border_connection/border_connection.scss @@ -4,9 +4,6 @@ width: 100%; height: 100%; pointer-events: none; - //box-shadow: inset 0 0 1px 2px $euiColorPrimary; - border-top: $euiBorderThin; - border-left: $euiBorderThin; - border-style: dashed; - border-color: #d9d9d9; + border-top: 1px dashed $euiColorLightShade; + border-left: 1px dashed $euiColorLightShade; } diff --git a/x-pack/plugins/canvas/public/components/rotation_handle/rotation_handle.scss b/x-pack/plugins/canvas/public/components/rotation_handle/rotation_handle.scss index cd52e29e4f411..820107ff47a51 100644 --- a/x-pack/plugins/canvas/public/components/rotation_handle/rotation_handle.scss +++ b/x-pack/plugins/canvas/public/components/rotation_handle/rotation_handle.scss @@ -7,7 +7,8 @@ width: 0; margin-left: -1px; margin-top: -12px; - border: 1px dashed #d9d9d9; + border-top: 1px dashed $euiColorLightShade; + border-left: 1px dashed $euiColorLightShade; } .canvasRotationHandle--handle { @@ -15,10 +16,10 @@ transform-style: preserve-3d; display: block; position: absolute; - height: 8px; - width: 8px; - margin-left: -4px; + height: 9px; + width: 9px; + margin-left: -5px; margin-top: -3px; border-radius: 50%; - background-color: #999; + background-color: $euiColorMediumShade; } diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.delete_lifecycle.json b/x-pack/plugins/console_extensions/spec/generated/ilm.delete_lifecycle.json new file mode 100644 index 0000000000000..edfbf80b000ef --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.delete_lifecycle.json @@ -0,0 +1,11 @@ +{ + "ilm.delete_lifecycle": { + "methods": [ + "DELETE" + ], + "patterns": [ + "_ilm/policy/{policy}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.explain_lifecycle.json b/x-pack/plugins/console_extensions/spec/generated/ilm.explain_lifecycle.json new file mode 100644 index 0000000000000..2e23b590f59d0 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.explain_lifecycle.json @@ -0,0 +1,14 @@ +{ + "ilm.explain_lifecycle": { + "url_params": { + "human": "__flag__" + }, + "methods": [ + "GET" + ], + "patterns": [ + "{indices}/_ilm/explain" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.get_lifecycle.json b/x-pack/plugins/console_extensions/spec/generated/ilm.get_lifecycle.json new file mode 100644 index 0000000000000..f956c8843c534 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.get_lifecycle.json @@ -0,0 +1,12 @@ +{ + "ilm.get_lifecycle": { + "methods": [ + "GET" + ], + "patterns": [ + "_ilm/policy/{policy}", + "_ilm/policy" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.get_status.json b/x-pack/plugins/console_extensions/spec/generated/ilm.get_status.json new file mode 100644 index 0000000000000..23ed5ac9a2188 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.get_status.json @@ -0,0 +1,11 @@ +{ + "ilm.get_status": { + "methods": [ + "GET" + ], + "patterns": [ + "_ilm/status" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.move_to_step.json b/x-pack/plugins/console_extensions/spec/generated/ilm.move_to_step.json new file mode 100644 index 0000000000000..84f7dad83be62 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.move_to_step.json @@ -0,0 +1,11 @@ +{ + "ilm.move_to_step": { + "methods": [ + "POST" + ], + "patterns": [ + "_ilm/move/{indices}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.put_lifecycle.json b/x-pack/plugins/console_extensions/spec/generated/ilm.put_lifecycle.json new file mode 100644 index 0000000000000..5cab010aa20b4 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.put_lifecycle.json @@ -0,0 +1,11 @@ +{ + "ilm.put_lifecycle": { + "methods": [ + "PUT" + ], + "patterns": [ + "_ilm/policy/{policy}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.remove_policy.json b/x-pack/plugins/console_extensions/spec/generated/ilm.remove_policy.json new file mode 100644 index 0000000000000..fc835953c2c6d --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.remove_policy.json @@ -0,0 +1,12 @@ +{ + "ilm.remove_policy": { + "methods": [ + "POST" + ], + "patterns": [ + "{indices}/_ilm/remove", + "_ilm/remove" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.retry.json b/x-pack/plugins/console_extensions/spec/generated/ilm.retry.json new file mode 100644 index 0000000000000..07fc3a94bca03 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.retry.json @@ -0,0 +1,11 @@ +{ + "ilm.retry": { + "methods": [ + "POST" + ], + "patterns": [ + "{indices}/_ilm/retry" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.set_policy.json b/x-pack/plugins/console_extensions/spec/generated/ilm.set_policy.json new file mode 100644 index 0000000000000..6c57973eaabae --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.set_policy.json @@ -0,0 +1,11 @@ +{ + "ilm.set_policy": { + "methods": [ + "PUT" + ], + "patterns": [ + "{indices}/_ilm/{new_policy}" + ], + "documentation": "http://www.elastic.co/guide/en/index_lifecycle/current/index_lifecycle.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.start.json b/x-pack/plugins/console_extensions/spec/generated/ilm.start.json new file mode 100644 index 0000000000000..f93a08773bf64 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.start.json @@ -0,0 +1,11 @@ +{ + "ilm.start": { + "methods": [ + "POST" + ], + "patterns": [ + "_ilm/start" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ilm.stop.json b/x-pack/plugins/console_extensions/spec/generated/ilm.stop.json new file mode 100644 index 0000000000000..15ac1f1fd6733 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ilm.stop.json @@ -0,0 +1,11 @@ +{ + "ilm.stop": { + "methods": [ + "POST" + ], + "patterns": [ + "_ilm/stop" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/overrides/ilm.move_to_step.json b/x-pack/plugins/console_extensions/spec/overrides/ilm.move_to_step.json new file mode 100644 index 0000000000000..823efa25dc3a6 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/overrides/ilm.move_to_step.json @@ -0,0 +1,16 @@ +{ + "ilm.move_to_step": { + "data_autocomplete_rules": { + "current_step": { + "phase": "", + "action": "", + "name": "" + }, + "next_step": { + "phase": "", + "action": "", + "name": "" + } + } + } +} diff --git a/x-pack/plugins/console_extensions/spec/overrides/ilm.put_lifecycle.json b/x-pack/plugins/console_extensions/spec/overrides/ilm.put_lifecycle.json new file mode 100644 index 0000000000000..7aec67b0b4403 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/overrides/ilm.put_lifecycle.json @@ -0,0 +1,132 @@ +{ + "ilm.put_lifecycle": { + "data_autocomplete_rules": { + "phases": { + "warm": { + "__template": { + "after": "1d", + "actions": { + "allocate": { + "number_of_replicas": 1, + "include": { + "_name": "", + "_ip": "" + }, + "exclude": { + "_name": "", + "_ip": "" + }, + "require": { + "_name": "", + "_ip": "" + } + }, + "shrink": { + "number_of_shards": 1 + }, + "forcemerge": { + "max_num_segments": 1 + } + } + }, + "after": "1d", + "actions": { + "allocate": { + "number_of_replicas": 1, + "include": { + "_name": "", + "_ip": "" + }, + "exclude": { + "_name": "", + "_ip": "" + }, + "require": { + "_name": "", + "_ip": "" + } + }, + "shrink": { + "number_of_shards": 1 + }, + "forcemerge": { + "max_num_segments": 1 + } + } + }, + "cold": { + "__template": { + "after": "1d", + "actions": { + "allocate": { + "number_of_replicas": 1, + "include": { + "_name": "", + "_ip": "" + }, + "exclude": { + "_name": "", + "_ip": "" + }, + "require": { + "_name": "", + "_ip": "" + } + } + } + }, + "after": "1d", + "actions": { + "allocate": { + "number_of_replicas": 1, + "include": { + "_name": "", + "_ip": "" + }, + "exclude": { + "_name": "", + "_ip": "" + }, + "require": { + "_name": "", + "_ip": "" + } + } + } + }, + "hot": { + "__template": { + "after": "1d", + "actions": { + "rollover": { + "max_age": "7d", + "max_docs": 1000, + "max_size": "5gb" + } + } + }, + "after": "1d", + "actions": { + "rollover": { + "max_age": "7d", + "max_docs": 1000, + "max_size": "5gb" + } + } + }, + "delete": { + "__template": { + "after": "1d", + "actions": { + "delete": {} + } + }, + "after": "1d", + "actions": { + "delete": {} + } + } + } + } + } +} \ No newline at end of file diff --git a/x-pack/plugins/index_management/public/register_routes.js b/x-pack/plugins/index_management/public/register_routes.js index 02666e81a0b5c..a9623231e57d9 100644 --- a/x-pack/plugins/index_management/public/register_routes.js +++ b/x-pack/plugins/index_management/public/register_routes.js @@ -8,6 +8,7 @@ import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { HashRouter } from 'react-router-dom'; +import { i18n } from '@kbn/i18n'; import { I18nProvider } from '@kbn/i18n/react'; import { setHttpClient } from './services/api'; @@ -15,6 +16,7 @@ import { App } from './app'; import { BASE_PATH } from '../common/constants/base_path'; import routes from 'ui/routes'; +import { MANAGEMENT_BREADCRUMB } from 'ui/management'; import template from './main.html'; import { manageAngularLifecycle } from './lib/manage_angular_lifecycle'; @@ -35,6 +37,14 @@ const renderReact = async (elem) => { routes.when(`${BASE_PATH}:view?/:id?`, { template: template, + k7Breadcrumbs: () => [ + MANAGEMENT_BREADCRUMB, + { + text: i18n.translate('xpack.idxMgmt.breadcrumb', { + defaultMessage: 'Index management' + }), + } + ], controllerAs: 'indexManagement', controller: class IndexManagementController { constructor($scope, $route, $http) { diff --git a/x-pack/plugins/license_management/public/breadcrumbs.js b/x-pack/plugins/license_management/public/breadcrumbs.js new file mode 100644 index 0000000000000..0de04f4bd70fc --- /dev/null +++ b/x-pack/plugins/license_management/public/breadcrumbs.js @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; +import { MANAGEMENT_BREADCRUMB } from 'ui/management'; +import { BASE_PATH } from '../common/constants'; + +export function getDashboardBreadcrumbs() { + return [ + MANAGEMENT_BREADCRUMB, + { + text: i18n.translate('xpack.licenseMgmt.dashboard.breadcrumb', { + defaultMessage: 'License management' + }), + href: `#${BASE_PATH}home` + } + ]; +} + +export function getUploadBreadcrumbs() { + return [ + ...getDashboardBreadcrumbs(), + { + text: i18n.translate('xpack.licenseMgmt.upload.breadcrumb', { + defaultMessage: 'Upload' + }) + } + ]; +} diff --git a/x-pack/plugins/license_management/public/register_route.js b/x-pack/plugins/license_management/public/register_route.js index edb2542f3b1be..99ff1e57b5761 100644 --- a/x-pack/plugins/license_management/public/register_route.js +++ b/x-pack/plugins/license_management/public/register_route.js @@ -10,7 +10,7 @@ import { Provider } from 'react-redux'; import { HashRouter } from 'react-router-dom'; import { setTelemetryOptInService, setTelemetryEnabled, setHttpClient, TelemetryOptInProvider } from './lib/telemetry'; import { I18nProvider } from '@kbn/i18n/react'; - +import chrome from 'ui/chrome'; import App from './app'; import { BASE_PATH } from "../common/constants/base_path"; @@ -20,6 +20,7 @@ import { XPackInfoProvider as xpackInfoProvider } from 'plugins/xpack_main/servi import template from './main.html'; import { licenseManagementStore } from './store'; +import { getDashboardBreadcrumbs, getUploadBreadcrumbs } from './breadcrumbs'; const renderReact = (elem, store) => { render( @@ -44,6 +45,8 @@ const manageAngularLifecycle = ($scope, $route, elem) => { const currentRoute = $route.current; // if templates are the same we are on the same route if (lastRoute.$$route.template === currentRoute.$$route.template) { + // update the breadcrumbs by re-running the k7Breadcrumbs function + chrome.breadcrumbs.set(currentRoute.$$route.k7Breadcrumbs($route)); // this prevents angular from destroying scope $route.current = lastRoute; } @@ -65,6 +68,14 @@ const initializeTelemetry = ($injector) => { routes .when(`${BASE_PATH}:view?`, { template: template, + k7Breadcrumbs($route) { + switch ($route.current.params.view) { + case 'upload_license': + return getUploadBreadcrumbs(); + default: + return getDashboardBreadcrumbs(); + } + }, controllerAs: 'licenseManagement', controller: class LicenseManagementController { diff --git a/x-pack/plugins/ml/public/explorer/explorer.html b/x-pack/plugins/ml/public/explorer/explorer.html index baea7a6b90113..49188f6754f0f 100644 --- a/x-pack/plugins/ml/public/explorer/explorer.html +++ b/x-pack/plugins/ml/public/explorer/explorer.html @@ -84,14 +84,14 @@
-
+

No {{swimlaneViewByFieldName}} influencers found

diff --git a/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.js b/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.js index 7e78b2fc8fcda..4c58095504d9a 100644 --- a/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.js +++ b/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.js @@ -209,7 +209,16 @@ export function explorerChartsContainerServiceFactory( const filterField = records[0].by_field_value || records[0].over_field_value; chartData = eventDistribution.filter(d => (d.entity !== filterField)); _.map(metricData, (value, time) => { - if (value > 0) { + // The filtering for rare/event_distribution charts needs to be handled + // differently because of how the source data is structured. + // For rare chart values we are only interested wether a value is either `0` or not, + // `0` acts like a flag in the chart whether to display the dot/marker. + // All other charts (single metric, population) are metric based and with + // those a value of `null` acts as the flag to hide a datapoint. + if ( + (chartType === CHART_TYPE.EVENT_DISTRIBUTION && value > 0) || + (chartType !== CHART_TYPE.EVENT_DISTRIBUTION && value !== null) + ) { chartData.push({ date: +time, value: value, @@ -246,7 +255,7 @@ export function explorerChartsContainerServiceFactory( if (chartPoint !== undefined) { chartPoint.anomalyScore = record.record_score; - if (_.has(record, 'actual')) { + if (record.actual !== undefined) { chartPoint.actual = record.actual; chartPoint.typical = record.typical; } else { @@ -263,7 +272,7 @@ export function explorerChartsContainerServiceFactory( } } - if (_.has(record, 'multi_bucket_impact')) { + if (record.multi_bucket_impact !== undefined) { chartPoint.multiBucketImpact = record.multi_bucket_impact; } } @@ -388,13 +397,13 @@ export function explorerChartsContainerServiceFactory( return; } const jobId = record.job_id; - if (!_.has(aggregatedData, jobId)) { + if (aggregatedData[jobId] === undefined) { aggregatedData[jobId] = {}; } const detectorsForJob = aggregatedData[jobId]; const detectorIndex = record.detector_index; - if (!_.has(detectorsForJob, detectorIndex)) { + if (detectorsForJob[detectorIndex] === undefined) { detectorsForJob[detectorIndex] = {}; } @@ -404,11 +413,11 @@ export function explorerChartsContainerServiceFactory( if (firstFieldName !== undefined) { const groupsForDetector = detectorsForJob[detectorIndex]; - if (!_.has(groupsForDetector, firstFieldName)) { + if (groupsForDetector[firstFieldName] === undefined) { groupsForDetector[firstFieldName] = {}; } const valuesForGroup = groupsForDetector[firstFieldName]; - if (!_.has(valuesForGroup, firstFieldValue)) { + if (valuesForGroup[firstFieldValue] === undefined) { valuesForGroup[firstFieldValue] = {}; } @@ -423,7 +432,7 @@ export function explorerChartsContainerServiceFactory( } if (isSecondSplit === false) { - if (!_.has(dataForGroupValue, 'maxScoreRecord')) { + if (dataForGroupValue.maxScoreRecord === undefined) { dataForGroupValue.maxScore = record.record_score; dataForGroupValue.maxScoreRecord = record; } else { @@ -437,17 +446,17 @@ export function explorerChartsContainerServiceFactory( const secondFieldName = record.over_field_name || record.by_field_name; const secondFieldValue = record.over_field_value || record.by_field_value; - if (!_.has(dataForGroupValue, secondFieldName)) { + if (dataForGroupValue[secondFieldName] === undefined) { dataForGroupValue[secondFieldName] = {}; } const splitsForGroup = dataForGroupValue[secondFieldName]; - if (!_.has(splitsForGroup, secondFieldValue)) { + if (splitsForGroup[secondFieldValue] === undefined) { splitsForGroup[secondFieldValue] = {}; } const dataForSplitValue = splitsForGroup[secondFieldValue]; - if (!_.has(dataForSplitValue, 'maxScoreRecord')) { + if (dataForSplitValue.maxScoreRecord === undefined) { dataForSplitValue.maxScore = record.record_score; dataForSplitValue.maxScoreRecord = record; } else { @@ -460,7 +469,7 @@ export function explorerChartsContainerServiceFactory( } else { // Detector with no partition or by field. const dataForDetector = detectorsForJob[detectorIndex]; - if (!_.has(dataForDetector, 'maxScoreRecord')) { + if (dataForDetector.maxScoreRecord === undefined) { dataForDetector.maxScore = record.record_score; dataForDetector.maxScoreRecord = record; } else { @@ -478,13 +487,13 @@ export function explorerChartsContainerServiceFactory( // Convert to an array of the records with the highest record_score per unique series. _.each(aggregatedData, (detectorsForJob) => { _.each(detectorsForJob, (groupsForDetector) => { - if (_.has(groupsForDetector, 'maxScoreRecord')) { + if (groupsForDetector.maxScoreRecord !== undefined) { // Detector with no partition / by field. recordsForSeries.push(groupsForDetector.maxScoreRecord); } else { _.each(groupsForDetector, (valuesForGroup) => { _.each(valuesForGroup, (dataForGroupValue) => { - if (_.has(dataForGroupValue, 'maxScoreRecord')) { + if (dataForGroupValue.maxScoreRecord !== undefined) { recordsForSeries.push(dataForGroupValue.maxScoreRecord); } else { // Second level of aggregation for partition and by/over. diff --git a/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.test.js b/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.test.js index c966bb11721d0..2609019e826b1 100644 --- a/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.test.js +++ b/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.test.js @@ -4,22 +4,57 @@ * you may not use this file except in compliance with the Elastic License. */ +import _ from 'lodash'; + import mockAnomalyChartRecords from './__mocks__/mock_anomaly_chart_records.json'; import mockDetectorsByJob from './__mocks__/mock_detectors_by_job.json'; import mockJobConfig from './__mocks__/mock_job_config.json'; import mockSeriesPromisesResponse from './__mocks__/mock_series_promises_response.json'; +// Some notes on the tests and mocks: +// +// 'call anomalyChangeListener with actual series config' +// This test uses the standard mocks and uses the data as is provided via the mock files. +// The mocked services check for values in the data (e.g. 'mock-job-id', 'farequore-2017') +// and return the mock data from the files. +// +// 'filtering should skip values of null' +// This is is used to verify that values of `null` get filtered out but `0` is kept. +// The test clones mock data from files and adjusts job_id and indices to trigger +// suitable responses from the mocked services. The mocked services check against the +// provided alternative values and return specific modified mock responses for the test case. + +const mockJobConfigClone = _.cloneDeep(mockJobConfig); + +// adjust mock data to tests against null/0 values +const mockMetricClone = _.cloneDeep(mockSeriesPromisesResponse[0][0]); +mockMetricClone.results['1486712700000'] = null; +mockMetricClone.results['1486713600000'] = 0; + jest.mock('../../services/job_service', () => ({ mlJobService: { - getJob() { return mockJobConfig; }, + getJob(jobId) { + // this is for 'call anomalyChangeListener with actual series config' + if (jobId === 'mock-job-id') { + return mockJobConfig; + } + // this is for 'filtering should skip values of null' + mockJobConfigClone.datafeed_config.indices = [`farequote-2017-${jobId}`]; + return mockJobConfigClone; + }, detectorsByJob: mockDetectorsByJob } })); jest.mock('../../services/results_service', () => ({ mlResultsService: { - getMetricData() { - return Promise.resolve(mockSeriesPromisesResponse[0][0]); + getMetricData(indices) { + // this is for 'call anomalyChangeListener with actual series config' + if (indices[0] === 'farequote-2017') { + return Promise.resolve(mockSeriesPromisesResponse[0][0]); + } + // this is for 'filtering should skip values of null' + return Promise.resolve(mockMetricClone); }, getRecordsForCriteria() { return Promise.resolve(mockSeriesPromisesResponse[0][1]); @@ -27,8 +62,17 @@ jest.mock('../../services/results_service', () => ({ getScheduledEventsByBucket() { return Promise.resolve(mockSeriesPromisesResponse[0][2]); }, - getEventDistributionData() { - return Promise.resolve([]); + getEventDistributionData(indices) { + // this is for 'call anomalyChangeListener with actual series config' + if (indices[0] === 'farequote-2017') { + return Promise.resolve([]); + } + // this is for 'filtering should skip values of null' and + // resolves with a dummy object to trigger the processing + // of the event distribution chartdata filtering + return Promise.resolve([{ + entity: 'mock' + }]); } } })); @@ -112,7 +156,7 @@ describe('explorerChartsContainerService', () => { }); test('call anomalyChangeListener with actual series config', (done) => { - let testCount = 0; + let callbackCount = 0; const expectedTestCount = 3; const anomalyDataChangeListener = explorerChartsContainerServiceFactory( @@ -128,9 +172,84 @@ describe('explorerChartsContainerService', () => { ); function callback(data) { - testCount++; + callbackCount++; expect(data).toMatchSnapshot(); - if (testCount === expectedTestCount) { + if (callbackCount === expectedTestCount) { + done(); + } + } + }); + + test('filtering should skip values of null', (done) => { + let callbackCount = 0; + const expectedTestCount = 3; + + const anomalyDataChangeListener = explorerChartsContainerServiceFactory( + mockMlSelectSeverityService, + callback, + mockChartContainer + ); + + const mockAnomalyChartRecordsClone = _.cloneDeep(mockAnomalyChartRecords).map((d) => { + d.job_id = 'mock-job-id-distribution'; + return d; + }); + + anomalyDataChangeListener( + mockAnomalyChartRecordsClone, + 1486656000000, + 1486670399999 + ); + + function callback(data) { + callbackCount++; + + if (callbackCount === 1) { + expect(data.seriesToPlot).toHaveLength(0); + } + if (callbackCount === 3) { + expect(data.seriesToPlot).toHaveLength(1); + + // the mock source dataset has a length of 115. one data point has a value of `null`, + // and another one `0`. the received dataset should have a length of 114, + // it should remove the datapoint with `null` and keep the one with `0`. + const chartData = data.seriesToPlot[0].chartData; + expect(chartData).toHaveLength(114); + expect(chartData.filter(d => d.value === 0)).toHaveLength(1); + expect(chartData.filter(d => d.value === null)).toHaveLength(0); + } + if (callbackCount === expectedTestCount) { + done(); + } + } + }); + + test('field value with trailing dot should not throw an error', (done) => { + let callbackCount = 0; + const expectedTestCount = 3; + + const anomalyDataChangeListener = explorerChartsContainerServiceFactory( + mockMlSelectSeverityService, + callback, + mockChartContainer + ); + + const mockAnomalyChartRecordsClone = _.cloneDeep(mockAnomalyChartRecords); + mockAnomalyChartRecordsClone[1].partition_field_value = 'AAL.'; + + expect(() => { + anomalyDataChangeListener( + mockAnomalyChartRecordsClone, + 1486656000000, + 1486670399999 + ); + + }).not.toThrow(); + + function callback() { + callbackCount++; + + if (callbackCount === expectedTestCount) { done(); } } diff --git a/x-pack/plugins/ml/public/explorer/explorer_controller.js b/x-pack/plugins/ml/public/explorer/explorer_controller.js index 78d20575c349b..3b83d478cb866 100644 --- a/x-pack/plugins/ml/public/explorer/explorer_controller.js +++ b/x-pack/plugins/ml/public/explorer/explorer_controller.js @@ -398,9 +398,13 @@ module.controller('MlExplorerController', function ( $scope.initializeVis(); - $scope.showViewBySwimlane = function () { - return $scope.viewBySwimlaneData !== null && $scope.viewBySwimlaneData.laneLabels && $scope.viewBySwimlaneData.laneLabels.length > 0; - }; + function setShowViewBySwimlane() { + $scope.showViewBySwimlane = ( + $scope.viewBySwimlaneData !== null && + $scope.viewBySwimlaneData.laneLabels && + $scope.viewBySwimlaneData.laneLabels.length > 0 + ); + } function getSelectionTimeRange(cellData) { // Returns the time range of the cell(s) currently selected in the swimlane. @@ -635,7 +639,7 @@ module.controller('MlExplorerController', function ( }); } - function loadViewBySwimlaneOptions() { + function setViewBySwimlaneOptions() { // Obtain the list of 'View by' fields per job. $scope.swimlaneViewByFieldName = null; let viewByOptions = []; // Unique influencers for the selected job(s). @@ -733,9 +737,6 @@ module.controller('MlExplorerController', function ( $scope.appState.mlExplorerSwimlane.viewBy = $scope.swimlaneViewByFieldName; $scope.appState.save(); } - - loadViewBySwimlane([]); - } function loadOverallData() { @@ -782,7 +783,7 @@ module.controller('MlExplorerController', function ( // Trigger loading of the 'view by' swimlane - // only load once the overall swimlane so that we can match the time span. - loadViewBySwimlaneOptions(); + setViewBySwimlaneOptions(); } else { $scope.hasResults = false; } @@ -791,8 +792,8 @@ module.controller('MlExplorerController', function ( // Tell the result components directives to render. // Need to use $timeout to ensure the broadcast happens after the child scope is updated with the new data. $timeout(() => { - $scope.$broadcast('render'); mlExplorerDashboardService.swimlaneDataChange.changed(mapScopeToSwimlaneProps(SWIMLANE_TYPE.OVERALL)); + loadViewBySwimlane([]); }, 0); }); @@ -852,6 +853,7 @@ module.controller('MlExplorerController', function ( } // Fire event to indicate swimlane data has changed. // Need to use $timeout to ensure this happens after the child scope is updated with the new data. + setShowViewBySwimlane(); $timeout(() => { mlExplorerDashboardService.swimlaneDataChange.changed(mapScopeToSwimlaneProps(SWIMLANE_TYPE.VIEW_BY)); }, 0); @@ -1006,28 +1008,32 @@ module.controller('MlExplorerController', function ( // would fail because the Explorer Charts Container's directive wasn't linked yet and not being subscribed // to the anomalyDataChange listener used in loadDataForCharts(). function finish() { - if ($scope.overallSwimlaneData !== undefined) { - mlExplorerDashboardService.swimlaneDataChange.changed(mapScopeToSwimlaneProps(SWIMLANE_TYPE.OVERALL)); - } - if ($scope.viewBySwimlaneData !== undefined) { - mlExplorerDashboardService.swimlaneDataChange.changed(mapScopeToSwimlaneProps(SWIMLANE_TYPE.VIEW_BY)); - } - mlExplorerDashboardService.anomalyDataChange.changed($scope.anomalyChartRecords || [], timerange.earliestMs, timerange.latestMs); + setShowViewBySwimlane(); - if (cellData !== undefined && cellData.fieldName === undefined) { - // Click is in one of the cells in the Overall swimlane - reload the 'view by' swimlane - // to show the top 'view by' values for the selected time. - loadViewBySwimlaneForSelectedTime(timerange.earliestMs, timerange.latestMs); - $scope.viewByLoadedForTimeFormatted = moment(timerange.earliestMs).format('MMMM Do YYYY, HH:mm'); - } + $timeout(() => { + if ($scope.overallSwimlaneData !== undefined) { + mlExplorerDashboardService.swimlaneDataChange.changed(mapScopeToSwimlaneProps(SWIMLANE_TYPE.OVERALL)); + } + if ($scope.viewBySwimlaneData !== undefined) { + mlExplorerDashboardService.swimlaneDataChange.changed(mapScopeToSwimlaneProps(SWIMLANE_TYPE.VIEW_BY)); + } + mlExplorerDashboardService.anomalyDataChange.changed($scope.anomalyChartRecords || [], timerange.earliestMs, timerange.latestMs); - if (influencers.length === 0) { - loadTopInfluencers(jobIds, timerange.earliestMs, timerange.latestMs); - loadDataForCharts(jobIds, timerange.earliestMs, timerange.latestMs); - } else { - loadDataForCharts(jobIds, timerange.earliestMs, timerange.latestMs, influencers); - } - loadAnomaliesTableData(); + if (cellData !== undefined && cellData.fieldName === undefined) { + // Click is in one of the cells in the Overall swimlane - reload the 'view by' swimlane + // to show the top 'view by' values for the selected time. + loadViewBySwimlaneForSelectedTime(timerange.earliestMs, timerange.latestMs); + $scope.viewByLoadedForTimeFormatted = moment(timerange.earliestMs).format('MMMM Do YYYY, HH:mm'); + } + + if (influencers.length === 0) { + loadTopInfluencers(jobIds, timerange.earliestMs, timerange.latestMs); + loadDataForCharts(jobIds, timerange.earliestMs, timerange.latestMs); + } else { + loadDataForCharts(jobIds, timerange.earliestMs, timerange.latestMs, influencers); + } + loadAnomaliesTableData(); + }, 0); } if (isChartsContainerInitialized) { diff --git a/x-pack/plugins/reporting/public/views/management/jobs.js b/x-pack/plugins/reporting/public/views/management/jobs.js index ecbb2d36eca0d..3ed5cee088c99 100644 --- a/x-pack/plugins/reporting/public/views/management/jobs.js +++ b/x-pack/plugins/reporting/public/views/management/jobs.js @@ -12,12 +12,22 @@ import routes from 'ui/routes'; import template from 'plugins/reporting/views/management/jobs.html'; import { ReportListing } from '../../components/report_listing'; +import { i18n } from '@kbn/i18n'; import { I18nProvider } from '@kbn/i18n/react'; +import { MANAGEMENT_BREADCRUMB } from 'ui/management'; const REACT_ANCHOR_DOM_ELEMENT_ID = 'reportListingAnchor'; routes.when('/management/kibana/reporting', { template, + k7Breadcrumbs: () => [ + MANAGEMENT_BREADCRUMB, + { + text: i18n.translate('xpack.reporting.breadcrumb', { + defaultMessage: 'Reporting' + }) + } + ], controllerAs: 'jobsCtrl', controller($scope, kbnUrl, Private) { const xpackInfo = Private(XPackInfoProvider); diff --git a/x-pack/plugins/security/server/lib/authentication/providers/__tests__/saml.js b/x-pack/plugins/security/server/lib/authentication/providers/__tests__/saml.js index 0000afe96a0b5..ad9720422cfa3 100644 --- a/x-pack/plugins/security/server/lib/authentication/providers/__tests__/saml.js +++ b/x-pack/plugins/security/server/lib/authentication/providers/__tests__/saml.js @@ -236,7 +236,7 @@ describe('SAMLAuthenticationProvider', () => { expect(request.headers).to.not.have.property('authorization'); expect(authenticationResult.failed()).to.be(true); expect(authenticationResult.error).to.be(failureReason); - sinon.assert.neverCalledWith(callWithRequest, 'shield.samlRefreshAccessToken'); + sinon.assert.neverCalledWith(callWithRequest, 'shield.getAccessToken'); }); it('succeeds if token from the state is expired, but has been successfully refreshed.', async () => { @@ -259,7 +259,7 @@ describe('SAMLAuthenticationProvider', () => { callWithInternalUser .withArgs( - 'shield.samlRefreshAccessToken', + 'shield.getAccessToken', { body: { grant_type: 'refresh_token', refresh_token: 'valid-refresh-token' } } ) .returns(Promise.resolve({ access_token: 'new-access-token', refresh_token: 'new-refresh-token' })); @@ -291,7 +291,7 @@ describe('SAMLAuthenticationProvider', () => { const refreshFailureReason = new Error('Something is wrong with refresh token.'); callWithInternalUser .withArgs( - 'shield.samlRefreshAccessToken', + 'shield.getAccessToken', { body: { grant_type: 'refresh_token', refresh_token: 'invalid-refresh-token' } } ) .returns(Promise.reject(refreshFailureReason)); @@ -318,7 +318,7 @@ describe('SAMLAuthenticationProvider', () => { callWithInternalUser .withArgs( - 'shield.samlRefreshAccessToken', + 'shield.getAccessToken', { body: { grant_type: 'refresh_token', refresh_token: 'invalid-refresh-token' } } ) .returns(Promise.reject({ body: { error_description: 'token has already been refreshed' } })); @@ -352,7 +352,7 @@ describe('SAMLAuthenticationProvider', () => { callWithInternalUser .withArgs( - 'shield.samlRefreshAccessToken', + 'shield.getAccessToken', { body: { grant_type: 'refresh_token', refresh_token: 'invalid-refresh-token' } } ) .returns(Promise.reject({ body: { error_description: 'token has already been refreshed' } })); @@ -388,7 +388,7 @@ describe('SAMLAuthenticationProvider', () => { callWithInternalUser .withArgs( - 'shield.samlRefreshAccessToken', + 'shield.getAccessToken', { body: { grant_type: 'refresh_token', refresh_token: 'expired-refresh-token' } } ) .returns(Promise.reject({ body: { error_description: 'refresh token is expired' } })); @@ -422,7 +422,7 @@ describe('SAMLAuthenticationProvider', () => { callWithInternalUser .withArgs( - 'shield.samlRefreshAccessToken', + 'shield.getAccessToken', { body: { grant_type: 'refresh_token', refresh_token: 'expired-refresh-token' } } ) .returns(Promise.reject({ body: { error_description: 'refresh token is expired' } })); diff --git a/x-pack/plugins/security/server/lib/authentication/providers/saml.js b/x-pack/plugins/security/server/lib/authentication/providers/saml.js index fc364736e395b..dbe6091d987dd 100644 --- a/x-pack/plugins/security/server/lib/authentication/providers/saml.js +++ b/x-pack/plugins/security/server/lib/authentication/providers/saml.js @@ -34,7 +34,7 @@ function isAccessTokenExpiredError(err) { } /** - * Checks the error returned by Elasticsearch as the result of `samlRefreshAccessToken` call and returns `true` if + * Checks the error returned by Elasticsearch as the result of `getAccessToken` call and returns `true` if * request has been rejected because of invalid refresh token (expired after 24 hours or have been used already), * otherwise returns `false`. * @param {Object} err Error returned from Elasticsearch. @@ -269,7 +269,7 @@ export class SAMLAuthenticationProvider { access_token: newAccessToken, refresh_token: newRefreshToken } = await this._options.client.callWithInternalUser( - 'shield.samlRefreshAccessToken', + 'shield.getAccessToken', { body: { grant_type: 'refresh_token', refresh_token: refreshToken } } ); diff --git a/x-pack/plugins/spaces/public/views/nav_control/nav_control.tsx b/x-pack/plugins/spaces/public/views/nav_control/nav_control.tsx index 1c03e1a85db95..8535358fc8fbf 100644 --- a/x-pack/plugins/spaces/public/views/nav_control/nav_control.tsx +++ b/x-pack/plugins/spaces/public/views/nav_control/nav_control.tsx @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ +import { I18nProvider } from '@kbn/i18n/react'; import { constant } from 'lodash'; import { SpacesManager } from 'plugins/spaces/lib/spaces_manager'; // @ts-ignore @@ -13,8 +14,8 @@ import { NavControlPopover } from 'plugins/spaces/views/nav_control/nav_control_ import { PathProvider } from 'plugins/xpack_main/services/path'; import { UserProfileProvider } from 'plugins/xpack_main/services/user_profile'; import React from 'react'; -import ReactDOM from 'react-dom'; import { render, unmountComponentAtNode } from 'react-dom'; +import ReactDOM from 'react-dom'; import { NavControlSide } from 'ui/chrome/directives/header_global_nav'; // @ts-ignore import { uiModules } from 'ui/modules'; @@ -59,13 +60,15 @@ module.controller( $scope.$parent.$watch('isVisible', function isVisibleWatcher(isVisible: boolean) { if (isVisible && !mounted && !pathProvider.isUnauthenticated()) { render( - , + + + , domNode ); mounted = true; @@ -113,13 +116,15 @@ chromeHeaderNavControlsRegistry.register( spacesManager = new SpacesManager($http, chrome, spaceSelectorURL); ReactDOM.render( - , + + + , el ); }, diff --git a/x-pack/plugins/watcher/public/lib/breadcrumbs.js b/x-pack/plugins/watcher/public/lib/breadcrumbs.js new file mode 100644 index 0000000000000..c30bc4175375a --- /dev/null +++ b/x-pack/plugins/watcher/public/lib/breadcrumbs.js @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import chrome from 'ui/chrome'; +import { i18n } from '@kbn/i18n'; + +import { MANAGEMENT_BREADCRUMB } from 'ui/management'; + +const uiSettings = chrome.getUiSettingsClient(); + +export function getWatchListBreadcrumbs() { + return [ + MANAGEMENT_BREADCRUMB, + { + text: i18n.translate('xpack.watcher.list.breadcrumb', { + defaultMessage: 'Watcher' + }), + href: '#/management/elasticsearch/watcher/watches/' + } + ]; +} + +export function getWatchDetailBreadcrumbs($route) { + const watch = $route.current.locals.watch || $route.current.locals.xpackWatch; + + return [ + ...getWatchListBreadcrumbs(), + { + text: !watch.isNew + ? watch.name + : i18n.translate('xpack.watcher.create.breadcrumb', { defaultMessage: 'Create' }), + href: '#/management/elasticsearch/watcher/watches/watch/23eebf28-94fd-47e9-ac44-6fee6e427c33' + } + ]; +} + +export function getWatchHistoryBreadcrumbs($route) { + const { watchHistoryItem } = $route.current.locals; + + return [ + ...getWatchDetailBreadcrumbs($route), + { + text: watchHistoryItem.startTime.format(uiSettings.get('dateFormat')) + } + ]; +} diff --git a/x-pack/plugins/watcher/public/sections/watch_detail/watch_detail_route.js b/x-pack/plugins/watcher/public/sections/watch_detail/watch_detail_route.js index 2f7ee6e99265b..28830f7eb31fe 100644 --- a/x-pack/plugins/watcher/public/sections/watch_detail/watch_detail_route.js +++ b/x-pack/plugins/watcher/public/sections/watch_detail/watch_detail_route.js @@ -13,6 +13,7 @@ import './components/watch_detail'; import { WATCH_HISTORY } from '../../../common/constants'; import { updateWatchSections } from 'plugins/watcher/lib/update_management_sections'; import 'plugins/watcher/services/license'; +import { getWatchDetailBreadcrumbs } from '../../lib/breadcrumbs'; routes .when('/management/elasticsearch/watcher/watches/watch/:id', { @@ -22,6 +23,7 @@ routes routes .when('/management/elasticsearch/watcher/watches/watch/:id/status', { template: template, + k7Breadcrumbs: getWatchDetailBreadcrumbs, resolve: { watchTabs: ($injector) => { const $route = $injector.get('$route'); diff --git a/x-pack/plugins/watcher/public/sections/watch_edit/watch_edit_route.js b/x-pack/plugins/watcher/public/sections/watch_edit/watch_edit_route.js index 2dc2c47dfdc72..dc01f31e7cbdb 100644 --- a/x-pack/plugins/watcher/public/sections/watch_edit/watch_edit_route.js +++ b/x-pack/plugins/watcher/public/sections/watch_edit/watch_edit_route.js @@ -14,12 +14,14 @@ import './components/threshold_watch_edit'; import { WATCH_TYPES } from 'plugins/watcher/../common/constants'; import { updateWatchSections } from 'plugins/watcher/lib/update_management_sections'; import 'plugins/watcher/services/license'; +import { getWatchDetailBreadcrumbs } from '../../lib/breadcrumbs'; routes .when('/management/elasticsearch/watcher/watches/watch/:id/edit') .when('/management/elasticsearch/watcher/watches/new-watch/:watchType') .defaults(/management\/elasticsearch\/watcher\/watches\/(new-watch\/:watchType|watch\/:id\/edit)/, { template: template, + k7Breadcrumbs: getWatchDetailBreadcrumbs, controller: class WatchEditRouteController { constructor($injector) { const $route = $injector.get('$route'); diff --git a/x-pack/plugins/watcher/public/sections/watch_history_item/watch_history_item_route.js b/x-pack/plugins/watcher/public/sections/watch_history_item/watch_history_item_route.js index c6033ff7dcce1..491aaa2364cb7 100644 --- a/x-pack/plugins/watcher/public/sections/watch_history_item/watch_history_item_route.js +++ b/x-pack/plugins/watcher/public/sections/watch_history_item/watch_history_item_route.js @@ -12,10 +12,12 @@ import 'plugins/watcher/services/watch'; import 'plugins/watcher/services/watch_history'; import './components/watch_history_item'; import { updateHistorySection } from 'plugins/watcher/lib/update_management_sections'; +import { getWatchHistoryBreadcrumbs } from '../../lib/breadcrumbs'; routes .when('/management/elasticsearch/watcher/watches/watch/:watchId/history-item/:watchHistoryItemId', { template: template, + k7Breadcrumbs: getWatchHistoryBreadcrumbs, resolve: { watch: function ($injector) { const $route = $injector.get('$route'); diff --git a/x-pack/plugins/watcher/public/sections/watch_list/watch_list_route.js b/x-pack/plugins/watcher/public/sections/watch_list/watch_list_route.js index d37ea75a1a916..822ac71eaebfc 100644 --- a/x-pack/plugins/watcher/public/sections/watch_list/watch_list_route.js +++ b/x-pack/plugins/watcher/public/sections/watch_list/watch_list_route.js @@ -10,6 +10,7 @@ import { toastNotifications } from 'ui/notify'; import template from './watch_list_route.html'; import './components/watch_list'; import 'plugins/watcher/services/license'; +import { getWatchListBreadcrumbs } from '../../lib/breadcrumbs'; routes .when('/management/elasticsearch/watcher/', { @@ -26,6 +27,7 @@ routes } }, controllerAs: 'watchListRoute', + k7Breadcrumbs: getWatchListBreadcrumbs, resolve: { watches: ($injector) => { const watchesService = $injector.get('xpackWatcherWatchesService'); diff --git a/x-pack/scripts/functional_tests.js b/x-pack/scripts/functional_tests.js index 65fa2787c09af..a9192077791f4 100644 --- a/x-pack/scripts/functional_tests.js +++ b/x-pack/scripts/functional_tests.js @@ -6,10 +6,10 @@ require('@kbn/plugin-helpers').babelRegister(); require('@kbn/test').runTestsCli([ - require.resolve('../test/reporting/configs/chromium_api.js'), - require.resolve('../test/reporting/configs/chromium_functional.js'), - require.resolve('../test/reporting/configs/phantom_api.js'), - require.resolve('../test/reporting/configs/phantom_functional.js'), + // require.resolve('../test/reporting/configs/chromium_api.js'), + // require.resolve('../test/reporting/configs/chromium_functional.js'), + // require.resolve('../test/reporting/configs/phantom_api.js'), + // require.resolve('../test/reporting/configs/phantom_functional.js'), require.resolve('../test/functional/config.js'), require.resolve('../test/api_integration/config.js'), require.resolve('../test/saml_api_integration/config.js'), diff --git a/x-pack/server/lib/esjs_shield_plugin.js b/x-pack/server/lib/esjs_shield_plugin.js index fd1552e38bb5c..e8b962e89e7b8 100644 --- a/x-pack/server/lib/esjs_shield_plugin.js +++ b/x-pack/server/lib/esjs_shield_plugin.js @@ -360,14 +360,14 @@ }); /** - * Refreshes SAML access token. + * Refreshes an access token. * * @param {string} grant_type Currently only "refresh_token" grant type is supported. * @param {string} refresh_token One-time refresh token that will be exchanged to the new access/refresh token pair. * * @returns {{access_token: string, type: string, expires_in: number, refresh_token: string}} */ - shield.samlRefreshAccessToken = ca({ + shield.getAccessToken = ca({ method: 'POST', needBody: true, url: { @@ -375,6 +375,26 @@ } }); + /** + * Invalidates an access token. + * + * @param {string} token The access token to invalidate + * + * @returns {{created: boolean}} + */ + shield.deleteAccessToken = ca({ + method: 'DELETE', + needBody: true, + params: { + token: { + type: 'string' + } + }, + url: { + fmt: '/_xpack/security/oauth2/token' + } + }); + shield.getPrivilege = ca({ method: 'GET', urls: [{ diff --git a/x-pack/test/functional/apps/infra/index.ts b/x-pack/test/functional/apps/infra/index.ts index 117f309d9470e..322aea31e1263 100644 --- a/x-pack/test/functional/apps/infra/index.ts +++ b/x-pack/test/functional/apps/infra/index.ts @@ -9,7 +9,7 @@ import { KibanaFunctionalTestDefaultProviders } from '../../../types/providers'; // tslint:disable-next-line:no-default-export export default ({ loadTestFile }: KibanaFunctionalTestDefaultProviders) => { describe('InfraOps app', function() { - this.tags('ciGroup4'); + this.tags('ciGroup7'); loadTestFile(require.resolve('./home_page')); }); diff --git a/x-pack/test/reporting/api/chromium_tests.js b/x-pack/test/reporting/api/chromium_tests.js index b983f290eb085..892f561539387 100644 --- a/x-pack/test/reporting/api/chromium_tests.js +++ b/x-pack/test/reporting/api/chromium_tests.js @@ -11,7 +11,7 @@ export default function ({ loadTestFile, getService }) { const kibanaServer = getService('kibanaServer'); describe('chromium', function () { - this.tags('ciGroup6'); + this.tags('ciGroup2'); before(async () => { await esArchiver.load(OSS_KIBANA_ARCHIVE_PATH); diff --git a/x-pack/test/reporting/api/phantom_tests.js b/x-pack/test/reporting/api/phantom_tests.js index e0c8c11b326bd..62993ec40208e 100644 --- a/x-pack/test/reporting/api/phantom_tests.js +++ b/x-pack/test/reporting/api/phantom_tests.js @@ -11,7 +11,7 @@ export default function ({ loadTestFile, getService }) { const kibanaServer = getService('kibanaServer'); describe('phantom', function () { - this.tags('ciGroup6'); + this.tags('ciGroup7'); before(async () => { await esArchiver.load(OSS_KIBANA_ARCHIVE_PATH);