Skip to content

Commit

Permalink
Merge branch 'master' into fix-apm-ui-via-ui-clear-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Dec 2, 2019
2 parents 17db757 + d2846b6 commit f5cf6af
Show file tree
Hide file tree
Showing 1,415 changed files with 26,079 additions and 18,591 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ bower_components
/plugins
/built_assets
/html_docs
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
/src/fixtures/vislib/mock_data
/src/legacy/ui/public/angular-bootstrap
/src/legacy/ui/public/flot-charts
Expand All @@ -19,7 +20,6 @@ bower_components
/src/core/lib/kbn_internal_native_observable
/packages/*/target
/packages/eslint-config-kibana
/packages/kbn-es-query/src/kuery/ast/kuery.js
/packages/kbn-pm/dist
/packages/kbn-plugin-generator/sao_template/template
/packages/kbn-ui-framework/dist
Expand Down
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,21 @@ module.exports = {
],
allowSameFolder: true,
},
{
target: ['src/core/**/*'],
from: ['x-pack/**/*'],
errorMessage: 'OSS cannot import x-pack files.',
},
{
target: ['src/core/**/*'],
from: [
'plugins/**/*',
'src/plugins/**/*',
'src/legacy/core_plugins/**/*',
'src/legacy/ui/**/*',
],
errorMessage: 'The core cannot depend on any plugins.',
},
{
from: ['src/legacy/ui/**/*', 'ui/**/*'],
target: [
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
/src/dev/i18n @elastic/kibana-stack-services
/packages/kbn-analytics/ @elastic/kibana-stack-services
/src/legacy/core_plugins/ui_metric/ @elastic/kibana-stack-services
/src/plugins/usage_collection/ @elastic/kibana-stack-services
/x-pack/legacy/plugins/telemetry @elastic/kibana-stack-services
/x-pack/legacy/plugins/alerting @elastic/kibana-stack-services
/x-pack/legacy/plugins/actions @elastic/kibana-stack-services
Expand Down
1 change: 0 additions & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"interpreter": "src/legacy/core_plugins/interpreter",
"kbn": "src/legacy/core_plugins/kibana",
"kbnDocViews": "src/legacy/core_plugins/kbn_doc_views",
"kbnESQuery": "packages/kbn-es-query",
"kbnVislibVisTypes": "src/legacy/core_plugins/kbn_vislib_vis_types",
"kibana_react": "src/legacy/core_plugins/kibana_react",
"kibana-react": "src/plugins/kibana_react",
Expand Down
4 changes: 3 additions & 1 deletion docs/api/role-management/put.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ To use the create or update role API, you must have the `manage_security` cluste
(Optional, object) In the `metadata` object, keys that begin with `_` are reserved for system usage.

`elasticsearch`::
(Optional, object) {es} cluster and index privileges. Valid keys include `cluster`, `indices`, and `run_as`. For more information, see {xpack-ref}/defining-roles.html[Defining Roles].
(Optional, object) {es} cluster and index privileges. Valid keys include
`cluster`, `indices`, and `run_as`. For more information, see
{ref}/defining-roles.html[Defining roles].

`kibana`::
(list) Objects that specify the <<kibana-privileges, Kibana privileges>> for the role:
Expand Down
9 changes: 8 additions & 1 deletion docs/developer/security/rbac.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
[[development-security-rbac]]
=== Role-based access control

Role-based access control (RBAC) in {kib} relies upon the {xpack-ref}/security-privileges.html#application-privileges[application privileges] that Elasticsearch exposes. This allows {kib} to define the privileges that {kib} wishes to grant to users, assign them to the relevant users using roles, and then authorize the user to perform a specific action. This is handled within a secured instance of the `SavedObjectsClient` and available transparently to consumers when using `request.getSavedObjectsClient()` or `savedObjects.getScopedSavedObjectsClient()`.
Role-based access control (RBAC) in {kib} relies upon the
{ref}/security-privileges.html#application-privileges[application privileges]
that Elasticsearch exposes. This allows {kib} to define the privileges that
{kib} wishes to grant to users, assign them to the relevant users using roles,
and then authorize the user to perform a specific action. This is handled within
a secured instance of the `SavedObjectsClient` and available transparently to
consumers when using `request.getSavedObjectsClient()` or
`savedObjects.getScopedSavedObjectsClient()`.

[[development-rbac-privileges]]
==== {kib} Privileges
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ core: {
i18n: I18nStart;
notifications: NotificationsStart;
overlays: OverlayStart;
uiSettings: UiSettingsClientContract;
uiSettings: IUiSettingsClient;
injectedMetadata: {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface AppMountContext

| Property | Type | Description |
| --- | --- | --- |
| [core](./kibana-plugin-public.appmountcontext.core.md) | <code>{</code><br/><code> application: Pick&lt;ApplicationStart, 'capabilities' &#124; 'navigateToApp'&gt;;</code><br/><code> chrome: ChromeStart;</code><br/><code> docLinks: DocLinksStart;</code><br/><code> http: HttpStart;</code><br/><code> i18n: I18nStart;</code><br/><code> notifications: NotificationsStart;</code><br/><code> overlays: OverlayStart;</code><br/><code> uiSettings: UiSettingsClientContract;</code><br/><code> injectedMetadata: {</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> };</code><br/><code> }</code> | Core service APIs available to mounted applications. |
| [core](./kibana-plugin-public.appmountcontext.core.md) | <code>{</code><br/><code> application: Pick&lt;ApplicationStart, 'capabilities' &#124; 'navigateToApp'&gt;;</code><br/><code> chrome: ChromeStart;</code><br/><code> docLinks: DocLinksStart;</code><br/><code> http: HttpStart;</code><br/><code> i18n: I18nStart;</code><br/><code> notifications: NotificationsStart;</code><br/><code> overlays: OverlayStart;</code><br/><code> uiSettings: IUiSettingsClient;</code><br/><code> injectedMetadata: {</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> };</code><br/><code> }</code> | Core service APIs available to mounted applications. |

Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Say we're creating a plugin for rendering visualizations that allows new renderi
export interface VizRenderContext {
core: {
i18n: I18nStart;
uiSettings: UISettingsClientContract;
uiSettings: IUiSettingsClient;
}
[contextName: string]: unknown;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ export interface CoreSetup
| [http](./kibana-plugin-public.coresetup.http.md) | <code>HttpSetup</code> | [HttpSetup](./kibana-plugin-public.httpsetup.md) |
| [injectedMetadata](./kibana-plugin-public.coresetup.injectedmetadata.md) | <code>{</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> }</code> | exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. Use the legacy platform API instead. |
| [notifications](./kibana-plugin-public.coresetup.notifications.md) | <code>NotificationsSetup</code> | [NotificationsSetup](./kibana-plugin-public.notificationssetup.md) |
| [uiSettings](./kibana-plugin-public.coresetup.uisettings.md) | <code>UiSettingsClientContract</code> | [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) |
| [uiSettings](./kibana-plugin-public.coresetup.uisettings.md) | <code>IUiSettingsClient</code> | [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) |

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

## CoreSetup.uiSettings property

[UiSettingsClient](./kibana-plugin-public.uisettingsclient.md)
[IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md)

<b>Signature:</b>

```typescript
uiSettings: UiSettingsClientContract;
uiSettings: IUiSettingsClient;
```
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export interface CoreStart
| [notifications](./kibana-plugin-public.corestart.notifications.md) | <code>NotificationsStart</code> | [NotificationsStart](./kibana-plugin-public.notificationsstart.md) |
| [overlays](./kibana-plugin-public.corestart.overlays.md) | <code>OverlayStart</code> | [OverlayStart](./kibana-plugin-public.overlaystart.md) |
| [savedObjects](./kibana-plugin-public.corestart.savedobjects.md) | <code>SavedObjectsStart</code> | [SavedObjectsStart](./kibana-plugin-public.savedobjectsstart.md) |
| [uiSettings](./kibana-plugin-public.corestart.uisettings.md) | <code>UiSettingsClientContract</code> | [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) |
| [uiSettings](./kibana-plugin-public.corestart.uisettings.md) | <code>IUiSettingsClient</code> | [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) |

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

## CoreStart.uiSettings property

[UiSettingsClient](./kibana-plugin-public.uisettingsclient.md)
[IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md)

<b>Signature:</b>

```typescript
uiSettings: UiSettingsClientContract;
uiSettings: IUiSettingsClient;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) &gt; [get](./kibana-plugin-public.iuisettingsclient.get.md)

## IUiSettingsClient.get property

Gets the value for a specific uiSetting. If this setting has no user-defined value then the `defaultOverride` parameter is returned (and parsed if setting is of type "json" or "number). If the parameter is not defined and the key is not registered by any plugin then an error is thrown, otherwise reads the default value defined by a plugin.

<b>Signature:</b>

```typescript
get: <T = any>(key: string, defaultOverride?: T) => T;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) &gt; [get$](./kibana-plugin-public.iuisettingsclient.get_.md)

## IUiSettingsClient.get$ property

Gets an observable of the current value for a config key, and all updates to that config key in the future. Providing a `defaultOverride` argument behaves the same as it does in \#get()

<b>Signature:</b>

```typescript
get$: <T = any>(key: string, defaultOverride?: T) => Observable<T>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) &gt; [getAll](./kibana-plugin-public.iuisettingsclient.getall.md)

## IUiSettingsClient.getAll property

Gets the metadata about all uiSettings, including the type, default value, and user value for each key.

<b>Signature:</b>

```typescript
getAll: () => Readonly<Record<string, UiSettingsParams & UserProvidedValues>>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) &gt; [getSaved$](./kibana-plugin-public.iuisettingsclient.getsaved_.md)

## IUiSettingsClient.getSaved$ property

Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed.

<b>Signature:</b>

```typescript
getSaved$: <T = any>() => Observable<{
key: string;
newValue: T;
oldValue: T;
}>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) &gt; [getUpdate$](./kibana-plugin-public.iuisettingsclient.getupdate_.md)

## IUiSettingsClient.getUpdate$ property

Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed.

<b>Signature:</b>

```typescript
getUpdate$: <T = any>() => Observable<{
key: string;
newValue: T;
oldValue: T;
}>;
```
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) &gt; [getUpdateErrors$](./kibana-plugin-public.uisettingsclient.getupdateerrors_.md)
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) &gt; [getUpdateErrors$](./kibana-plugin-public.iuisettingsclient.getupdateerrors_.md)

## UiSettingsClient.getUpdateErrors$() method
## IUiSettingsClient.getUpdateErrors$ property

Returns an Observable that notifies subscribers of each error while trying to update the settings, containing the actual Error class.

<b>Signature:</b>

```typescript
getUpdateErrors$(): Rx.Observable<Error>;
getUpdateErrors$: () => Observable<Error>;
```
<b>Returns:</b>

`Rx.Observable<Error>`

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) &gt; [isCustom](./kibana-plugin-public.iuisettingsclient.iscustom.md)

## IUiSettingsClient.isCustom property

Returns true if the setting wasn't registered by any plugin, but was either added directly via `set()`<!-- -->, or is an unknown setting found in the uiSettings saved object

<b>Signature:</b>

```typescript
isCustom: (key: string) => boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) &gt; [isDeclared](./kibana-plugin-public.iuisettingsclient.isdeclared.md)

## IUiSettingsClient.isDeclared property

Returns true if the key is a "known" uiSetting, meaning it is either registered by any plugin or was previously added as a custom setting via the `set()` method.

<b>Signature:</b>

```typescript
isDeclared: (key: string) => boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) &gt; [isDefault](./kibana-plugin-public.iuisettingsclient.isdefault.md)

## IUiSettingsClient.isDefault property

Returns true if the setting has no user-defined value or is unknown

<b>Signature:</b>

```typescript
isDefault: (key: string) => boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) &gt; [isOverridden](./kibana-plugin-public.iuisettingsclient.isoverridden.md)

## IUiSettingsClient.isOverridden property

Shows whether the uiSettings value set by the user.

<b>Signature:</b>

```typescript
isOverridden: (key: string) => boolean;
```
Loading

0 comments on commit f5cf6af

Please sign in to comment.