Skip to content

Commit

Permalink
Merge branch 'master' into fix/72243
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Oct 2, 2020
2 parents ae31d2c + e52884c commit d057806
Show file tree
Hide file tree
Showing 947 changed files with 26,021 additions and 12,330 deletions.
3 changes: 1 addition & 2 deletions .telemetryrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"exclude": [
"src/plugins/kibana_react/",
"src/plugins/testbed/",
"src/plugins/kibana_utils/",
"src/plugins/kibana_usage_collection/server/collectors/ui_metric/telemetry_ui_metric_collector.ts"
"src/plugins/kibana_utils/"
]
}
]
2 changes: 1 addition & 1 deletion docs/developer/contributing/development-github.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Pull requests are made into the `master` branch and then backported when it is s
* Breaking changes do not get backported and only go into `master`.
* All non-breaking changes can be backported to the `<major>.x` branch.
* Features should not be backported to a `<major>.<minor>` branch.
* Bugs can be backported to a `<major>.<minor>` branch if the changes are safe and appropriate. Safety is a judgment call you make based on factors like the bug's severity, test coverage, confidence in the changes, etc. Your reasoning should be included in the pull request description.
* Bug fixes can be backported to a `<major>.<minor>` branch if the changes are safe and appropriate. Safety is a judgment call you make based on factors like the bug's severity, test coverage, confidence in the changes, etc. Your reasoning should be included in the pull request description.
* Documentation changes can be backported to any branch at any time.

[discrete]
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ NOTE:
|{kib-repo}blob/{branch}/src/plugins/data/README.md[data]
|data plugin provides common data access services.
|The data plugin provides common data access services, such as search and query, for solutions and application developers.
|{kib-repo}blob/{branch}/src/plugins/dev_tools/README.md[devTools]
Expand Down Expand Up @@ -168,7 +168,7 @@ It also provides a stateful version of it on the start contract.
|{kib-repo}blob/{branch}/src/plugins/telemetry_management_section/README.md[telemetryManagementSection]
|This plugin adds the Advanced Settings section for the Usage Data collection (aka Telemetry).
|This plugin adds the Advanced Settings section for the Usage and Security Data collection (aka Telemetry).
|{kib-repo}blob/{branch}/src/plugins/tile_map[tileMap]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

## ApplicationStart.getUrlForApp() method

Returns an URL to a given app, including the global base path. By default, the URL is relative (/basePath/app/my-app). Use the `absolute` option to generate an absolute url (http://host:port/basePath/app/my-app)
Returns the absolute path (or URL) to a given app, including the global base path.

Note that when generating absolute urls, the origin (protocol, host and port) are determined from the browser's location.
By default, it returns the absolute path of the application (e.g `/basePath/app/my-app`<!-- -->). Use the `absolute` option to generate an absolute url instead (e.g `http://host:port/basePath/app/my-app`<!-- -->)

Note that when generating absolute urls, the origin (protocol, host and port) are determined from the browser's current location.

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export interface ApplicationStart

| Method | Description |
| --- | --- |
| [getUrlForApp(appId, options)](./kibana-plugin-core-public.applicationstart.geturlforapp.md) | Returns an URL to a given app, including the global base path. By default, the URL is relative (/basePath/app/my-app). Use the <code>absolute</code> option to generate an absolute url (http://host:port/basePath/app/my-app)<!-- -->Note that when generating absolute urls, the origin (protocol, host and port) are determined from the browser's location. |
| [getUrlForApp(appId, options)](./kibana-plugin-core-public.applicationstart.geturlforapp.md) | Returns the absolute path (or URL) to a given app, including the global base path.<!-- -->By default, it returns the absolute path of the application (e.g <code>/basePath/app/my-app</code>). Use the <code>absolute</code> option to generate an absolute url instead (e.g <code>http://host:port/basePath/app/my-app</code>)<!-- -->Note that when generating absolute urls, the origin (protocol, host and port) are determined from the browser's current location. |
| [navigateToApp(appId, options)](./kibana-plugin-core-public.applicationstart.navigatetoapp.md) | Navigate to a given app |
| [navigateToUrl(url)](./kibana-plugin-core-public.applicationstart.navigatetourl.md) | Navigate to given url, which can either be an absolute url or a relative path, in a SPA friendly way when possible.<!-- -->If all these criteria are true for the given url: - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location - The pathname of the URL starts with the current basePath (eg. /mybasepath/s/my-space) - The pathname segment after the basePath matches any known application route (eg. /app/<id>/ or any application's <code>appRoute</code> configuration)<!-- -->Then a SPA navigation will be performed using <code>navigateToApp</code> using the corresponding application and path. Otherwise, fallback to a full page reload to navigate to the url using <code>window.location.assign</code> |
| [navigateToUrl(url)](./kibana-plugin-core-public.applicationstart.navigatetourl.md) | Navigate to given URL in a SPA friendly way when possible (when the URL will redirect to a valid application within the current basePath).<!-- -->The method resolves pathnames the same way browsers do when resolving a <code>&lt;a href&gt;</code> value. The provided <code>url</code> can be: - an absolute URL - an absolute path - a path relative to the current URL (window.location.href)<!-- -->If all these criteria are true for the given URL: - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location - The resolved pathname of the provided URL/path starts with the current basePath (eg. /mybasepath/s/my-space) - The pathname segment after the basePath matches any known application route (eg. /app/<id>/ or any application's <code>appRoute</code> configuration)<!-- -->Then a SPA navigation will be performed using <code>navigateToApp</code> using the corresponding application and path. Otherwise, fallback to a full page reload to navigate to the url using <code>window.location.assign</code> |
| [registerMountContext(contextName, provider)](./kibana-plugin-core-public.applicationstart.registermountcontext.md) | Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. Deprecated, use [CoreSetup.getStartServices](./kibana-plugin-core-public.coresetup.getstartservices.md)<!-- -->. |

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

## ApplicationStart.navigateToUrl() method

Navigate to given url, which can either be an absolute url or a relative path, in a SPA friendly way when possible.
Navigate to given URL in a SPA friendly way when possible (when the URL will redirect to a valid application within the current basePath).

If all these criteria are true for the given url: - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location - The pathname of the URL starts with the current basePath (eg. /mybasepath/s/my-space) - The pathname segment after the basePath matches any known application route (eg. /app/<id>/ or any application's `appRoute` configuration)
The method resolves pathnames the same way browsers do when resolving a `<a href>` value. The provided `url` can be: - an absolute URL - an absolute path - a path relative to the current URL (window.location.href)

If all these criteria are true for the given URL: - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location - The resolved pathname of the provided URL/path starts with the current basePath (eg. /mybasepath/s/my-space) - The pathname segment after the basePath matches any known application route (eg. /app/<id>/ or any application's `appRoute` configuration)

Then a SPA navigation will be performed using `navigateToApp` using the corresponding application and path. Otherwise, fallback to a full page reload to navigate to the url using `window.location.assign`

Expand All @@ -20,7 +22,7 @@ navigateToUrl(url: string): Promise<void>;

| Parameter | Type | Description |
| --- | --- | --- |
| url | <code>string</code> | an absolute url, or a relative path, to navigate to. |
| url | <code>string</code> | an absolute URL, an absolute path or a relative path, to navigate to. |

<b>Returns:</b>

Expand All @@ -35,11 +37,14 @@ navigateToUrl(url: string): Promise<void>;
// will call `application.navigateToApp('discover', { path: '/some-path?foo=bar'})`
application.navigateToUrl('https://kibana:8080/base-path/s/my-space/app/discover/some-path?foo=bar')
application.navigateToUrl('/base-path/s/my-space/app/discover/some-path?foo=bar')
application.navigateToUrl('./discover/some-path?foo=bar')

// will perform a full page reload using `window.location.assign`
application.navigateToUrl('https://elsewhere:8080/base-path/s/my-space/app/discover/some-path') // origin does not match
application.navigateToUrl('/app/discover/some-path') // does not include the current basePath
application.navigateToUrl('/base-path/s/my-space/app/unknown-app/some-path') // unknown application
application.navigateToUrl('../discover') // resolve to `/base-path/s/my-space/discover` which is not a path of a known app.
application.navigateToUrl('../../other-space/discover') // resolve to `/base-path/s/other-space/discover` which is not within the current basePath.

```

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ A user friendly name of the renderer as will be displayed to user in UI.
<b>Signature:</b>

```typescript
displayName: string;
displayName?: string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ A user friendly name of the renderer as will be displayed to user in UI.
<b>Signature:</b>

```typescript
displayName: string;
displayName?: string;
```
2 changes: 2 additions & 0 deletions docs/user/alerting/action-types/jira.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Priority:: The priority of the incident.
Labels:: The labels of the incident.
Title:: A title for the issue, used for searching the contents of the knowledge base.
Description:: The details about the incident.
Parent:: The parent issue id or key. Only for `Sub-task` issue types.
Priority:: The priority of the incident.
Additional comments:: Additional information for the client, such as how to troubleshoot the issue.

[[configuring-jira]]
Expand Down
21 changes: 21 additions & 0 deletions docs/user/dashboard/dashboard-drilldown.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,26 @@ This example shows a dashboard panel that contains a pie chart with a configured
[role="screenshot"]
image::images/drilldown_on_piechart.gif[Drilldown on pie chart that navigates to another dashboard]

[float]
[[dashboard-drilldown-supported-panels]]
==== Supported panels

The following panels support dashboard drilldowns:

* Lens
* Area
* Data table
* Heat map
* Horizontal bar
* Line
* Maps
* Pie
* TSVB
* Tag cloud
* Timelion
* Vega
* Vertical bar

[float]
[[drilldowns-example]]
==== Try it: Create a dashboard drilldown
Expand Down Expand Up @@ -74,3 +94,4 @@ image::images/drilldown_on_panel.png[Drilldown on pie chart that navigates to an
+
You are navigated to your destination dashboard. Verify that the search query, filters,
and time range are carried over.

16 changes: 16 additions & 0 deletions docs/user/dashboard/url-drilldown.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ image:images/url_drilldown_go_to_github.gif[Drilldown on pie chart that navigate

NOTE: URL drilldown is available with the https://www.elastic.co/subscriptions[Gold subscription] and higher.

[float]
[[url-drilldown-supported-panels]]
==== Supported panels

The following panels support URL drilldowns:

* Lens
* Area
* Data table
* Heat map
* Horizontal bar
* Line
* Pie
* Tag cloud
* Vertical bar

[float]
[[try-it]]
==== Try it: Create a URL drilldown
Expand Down
35 changes: 29 additions & 6 deletions docs/user/dashboard/vega-reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ For additional *Vega* and *Vega-Lite* information, refer to the reference sectio

{kib} has extended Vega and Vega-Lite with extensions that support:

* Default height and width
* Automatic sizing
* Default theme to match {kib}
* Writing {es} queries using the time range and filters from dashboards
* Using the Elastic Map Service in Vega maps
Expand All @@ -22,12 +22,35 @@ For additional *Vega* and *Vega-Lite* information, refer to the reference sectio

[float]
[[vega-sizing-and-positioning]]
==== Default height and width
==== Automatic sizing

By default, Vega visualizations use the `autosize = { type: 'fit', contains: 'padding' }` layout.
`fit` uses all available space, ignores `width` and `height` values,
and respects the padding values. To override this behavior, change the
`autosize` value.
Most users will want their Vega visualizations to take the full available space, so unlike
Vega examples, `width` and `height` are not required parameters in {kib}. To set the width
or height manually, set `autosize: none`. For example, to set the height to a specific pixel value:

```
autosize: none
width: container
height: 200
```

The default {kib} settings which are inherited by your visualizations are:

```
autosize: {
type: fit
contains: padding
}
width: container
height: container
```

{kib} is able to merge your custom `autosize` settings with the defaults. The options `fit-x`
and `fit-y` are supported but not recommended over the default `fit` setting.

To learn more, read about
https://vega.github.io/vega/docs/specification/#autosize[autosize]
in the Vega documentation.

[float]
[[vega-theme]]
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"angular-sanitize": "^1.8.0",
"bluebird": "3.5.5",
"boom": "^7.2.0",
"chalk": "^2.4.2",
"chalk": "^4.1.0",
"check-disk-space": "^2.1.0",
"chokidar": "^3.4.2",
"color": "1.0.3",
Expand Down Expand Up @@ -229,7 +229,7 @@
"devDependencies": {
"@babel/parser": "^7.11.2",
"@babel/types": "^7.11.0",
"@elastic/apm-rum": "^5.6.0",
"@elastic/apm-rum": "^5.6.1",
"@elastic/charts": "21.1.2",
"@elastic/ems-client": "7.10.0",
"@elastic/eslint-config-kibana": "0.15.0",
Expand Down Expand Up @@ -291,7 +291,7 @@
"@types/hjson": "^2.4.2",
"@types/hoek": "^4.1.3",
"@types/inert": "^5.1.2",
"@types/jest": "^25.2.3",
"@types/jest": "^26.0.14",
"@types/jest-when": "^2.7.1",
"@types/joi": "^13.4.2",
"@types/jquery": "^3.3.31",
Expand Down Expand Up @@ -331,19 +331,19 @@
"@types/selenium-webdriver": "^4.0.9",
"@types/semver": "^5.5.0",
"@types/sinon": "^7.0.13",
"@types/strip-ansi": "^3.0.0",
"@types/strip-ansi": "^5.2.1",
"@types/styled-components": "^5.1.0",
"@types/supertest": "^2.0.5",
"@types/supertest-as-promised": "^2.0.38",
"@types/tapable": "^1.0.6",
"@types/tar": "^4.0.3",
"@types/testing-library__jest-dom": "^5.9.2",
"@types/testing-library__jest-dom": "^5.9.3",
"@types/testing-library__react-hooks": "^3.4.0",
"@types/type-detect": "^4.0.1",
"@types/uuid": "^3.4.4",
"@types/vinyl": "^2.0.4",
"@types/vinyl-fs": "^2.4.11",
"@types/webpack": "^4.41.21",
"@types/webpack": "^4.41.3",
"@types/webpack-env": "^1.15.2",
"@types/zen-observable": "^0.8.0",
"@typescript-eslint/eslint-plugin": "^3.10.0",
Expand All @@ -356,7 +356,7 @@
"archiver": "^3.1.1",
"axe-core": "^4.0.2",
"babel-eslint": "^10.0.3",
"babel-jest": "^25.5.1",
"babel-jest": "^26.3.0",
"babel-plugin-istanbul": "^6.0.0",
"backport": "5.6.0",
"brace": "0.11.1",
Expand All @@ -382,7 +382,7 @@
"eslint-plugin-cypress": "^2.8.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jest": "^23.10.0",
"eslint-plugin-jest": "^24.0.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-mocha": "^6.2.2",
"eslint-plugin-no-unsanitized": "^3.0.2",
Expand Down Expand Up @@ -411,10 +411,10 @@
"iedriver": "^3.14.2",
"immer": "^1.5.0",
"intl-messageformat-parser": "^1.4.0",
"jest": "^25.5.4",
"jest": "^26.4.2",
"jest-canvas-mock": "^2.2.0",
"jest-circus": "^25.5.4",
"jest-cli": "^25.5.4",
"jest-circus": "^26.4.2",
"jest-cli": "^26.4.2",
"jest-environment-jsdom-thirteen": "^1.0.1",
"jest-raw-loader": "^1.0.1",
"jest-when": "^2.7.2",
Expand Down Expand Up @@ -470,15 +470,15 @@
"selenium-webdriver": "^4.0.0-alpha.7",
"simple-git": "1.116.0",
"sinon": "^7.4.2",
"strip-ansi": "^3.0.1",
"strip-ansi": "^6.0.0",
"supertest": "^3.1.0",
"supertest-as-promised": "^4.0.2",
"tape": "^4.13.0",
"tape": "^5.0.1",
"topojson-client": "3.0.0",
"tree-kill": "^1.2.2",
"typescript": "4.0.2",
"ui-select": "0.19.8",
"vega": "^5.16.1",
"vega": "^5.17.0",
"vega-lite": "^4.16.8",
"vega-schema-url-parser": "^2.1.0",
"vega-tooltip": "^0.24.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/elastic-eslint-config-kibana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jest": "^23.10.0",
"eslint-plugin-jest": "^24.0.2",
"eslint-plugin-mocha": "^6.2.2",
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-prefer-object-spread": "^1.2.1",
Expand Down
19 changes: 17 additions & 2 deletions packages/kbn-ace/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# @kbn/ace

Contains all Kibana-specific brace related code. Excluding the code that still inside of Console because that code is only used inside of console at the moment.
This package contains the XJSON mode for brace. This is an extension of the `brace/mode/json` mode.

This package enables plugins to use this functionality and import it as needed -- behind an async import so that brace does not bloat the JS code needed for first page load of Kibana.
This package also contains an import of the entire brace editor which is used for creating the custom XJSON worker.

## Note to plugins
_This code should not be eagerly loaded_.

Make sure imports of this package are behind a lazy-load `import()` statement.

Your plugin should already be loading application code this way in the `mount` function.

## Deprecated

This package is considered deprecated and will be removed in future.

New and existing editor functionality should use Monaco.

_Do not add new functionality to this package_. Build new functionality for Monaco and use it instead.
2 changes: 1 addition & 1 deletion packages/kbn-apm-config-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
},
"devDependencies": {
"typescript": "4.0.2",
"tsd": "^0.7.4"
"tsd": "^0.13.1"
}
}
18 changes: 0 additions & 18 deletions packages/kbn-babel-preset/node_preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,6 @@
*/

module.exports = (_, options = {}) => {
const overrides = [];
if (!process.env.ALLOW_PERFORMANCE_HOOKS_IN_TASK_MANAGER) {
overrides.push({
test: [/x-pack[\/\\]legacy[\/\\]plugins[\/\\]task_manager/],
plugins: [
[
require.resolve('babel-plugin-filter-imports'),
{
imports: {
perf_hooks: ['performance'],
},
},
],
],
});
}

return {
presets: [
[
Expand Down Expand Up @@ -74,6 +57,5 @@ module.exports = (_, options = {}) => {
},
],
],
overrides,
};
};
Loading

0 comments on commit d057806

Please sign in to comment.