Skip to content

Commit 54f8e90

Browse files
committed
Merge branch 'master' of github.com:elastic/kibana into feature-use-agentyml-template-for-stream
2 parents 153063b + f84773f commit 54f8e90

511 files changed

Lines changed: 6769 additions & 2955 deletions

File tree

Some content is hidden

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

.eslintrc.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,6 @@ module.exports = {
6969
'jsx-a11y/no-onchange': 'off',
7070
},
7171
},
72-
{
73-
files: ['src/legacy/core_plugins/expressions/**/*.{js,ts,tsx}'],
74-
rules: {
75-
'react-hooks/exhaustive-deps': 'off',
76-
},
77-
},
78-
{
79-
files: [
80-
'src/legacy/core_plugins/vis_default_editor/public/components/controls/**/*.{ts,tsx}',
81-
],
82-
rules: {
83-
'react-hooks/exhaustive-deps': 'off',
84-
},
85-
},
86-
{
87-
files: ['src/legacy/ui/public/vis/**/*.{js,ts,tsx}'],
88-
rules: {
89-
'react-hooks/exhaustive-deps': 'off',
90-
},
91-
},
9272
{
9373
files: ['src/plugins/es_ui_shared/**/*.{js,ts,tsx}'],
9474
rules: {

.i18nrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"tileMap": "src/legacy/core_plugins/tile_map",
4444
"timelion": ["src/legacy/core_plugins/timelion", "src/legacy/core_plugins/vis_type_timelion", "src/plugins/timelion"],
4545
"uiActions": "src/plugins/ui_actions",
46-
"visDefaultEditor": "src/legacy/core_plugins/vis_default_editor",
46+
"visDefaultEditor": "src/plugins/vis_default_editor",
4747
"visTypeMarkdown": "src/legacy/core_plugins/vis_type_markdown",
4848
"visTypeMetric": "src/legacy/core_plugins/vis_type_metric",
4949
"visTypeTable": "src/legacy/core_plugins/vis_type_table",

docs/developer/plugin/development-plugin-feature-registration.asciidoc

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,15 @@ Registering a feature consists of the following fields. For more information, co
4545
|An array of applications this feature enables. Typically, all of your plugin's apps (from `uiExports`) will be included here.
4646

4747
|`privileges` (required)
48-
|{repo}blob/{branch}/x-pack/plugins/features/server/feature.ts[`FeatureWithAllOrReadPrivileges`].
48+
|{repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`].
4949
|See <<example-1-canvas,Example 1>> and <<example-2-dev-tools,Example 2>>
5050
|The set of privileges this feature requires to function.
5151

52+
|`subFeatures` (optional)
53+
|{repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`].
54+
|See <<example-3-discover,Example 3>>
55+
|The set of subfeatures that enables finer access control than the `all` and `read` feature privileges. These options are only available in the Gold subscription level and higher.
56+
5257
|`icon`
5358
|`string`
5459
|"discoverApp"
@@ -192,3 +197,78 @@ server.route({
192197
}
193198
});
194199
-----------
200+
201+
[[example-3-discover]]
202+
==== Example 3: Discover
203+
204+
Discover takes advantage of subfeature privileges to allow fine-grained access control. In this example,
205+
a single "Create Short URLs" subfeature privilege is defined, which allows users to grant access to this feature without having to grant the `all` privilege to Discover. In other words, you can grant `read` access to Discover, and also grant the ability to create short URLs.
206+
207+
["source","javascript"]
208+
-----------
209+
init(server) {
210+
const xpackMainPlugin = server.plugins.xpack_main;
211+
xpackMainPlugin.registerFeature({
212+
{
213+
id: 'discover',
214+
name: i18n.translate('xpack.features.discoverFeatureName', {
215+
defaultMessage: 'Discover',
216+
}),
217+
order: 100,
218+
icon: 'discoverApp',
219+
navLinkId: 'kibana:discover',
220+
app: ['kibana'],
221+
catalogue: ['discover'],
222+
privileges: {
223+
all: {
224+
app: ['kibana'],
225+
catalogue: ['discover'],
226+
savedObject: {
227+
all: ['search', 'query'],
228+
read: ['index-pattern'],
229+
},
230+
ui: ['show', 'save', 'saveQuery'],
231+
},
232+
read: {
233+
app: ['kibana'],
234+
catalogue: ['discover'],
235+
savedObject: {
236+
all: [],
237+
read: ['index-pattern', 'search', 'query'],
238+
},
239+
ui: ['show'],
240+
},
241+
},
242+
subFeatures: [
243+
{
244+
name: i18n.translate('xpack.features.ossFeatures.discoverShortUrlSubFeatureName', {
245+
defaultMessage: 'Short URLs',
246+
}),
247+
privilegeGroups: [
248+
{
249+
groupType: 'independent',
250+
privileges: [
251+
{
252+
id: 'url_create',
253+
name: i18n.translate(
254+
'xpack.features.ossFeatures.discoverCreateShortUrlPrivilegeName',
255+
{
256+
defaultMessage: 'Create Short URLs',
257+
}
258+
),
259+
includeIn: 'all',
260+
savedObject: {
261+
all: ['url'],
262+
read: [],
263+
},
264+
ui: ['createShortUrl'],
265+
},
266+
],
267+
},
268+
],
269+
},
270+
],
271+
}
272+
});
273+
}
274+
-----------

docs/development/core/server/kibana-plugin-core-server.coresetup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface CoreSetup<TPluginsStart extends object = object, TStart = unkno
2323
| [http](./kibana-plugin-core-server.coresetup.http.md) | <code>HttpServiceSetup</code> | [HttpServiceSetup](./kibana-plugin-core-server.httpservicesetup.md) |
2424
| [metrics](./kibana-plugin-core-server.coresetup.metrics.md) | <code>MetricsServiceSetup</code> | [MetricsServiceSetup](./kibana-plugin-core-server.metricsservicesetup.md) |
2525
| [savedObjects](./kibana-plugin-core-server.coresetup.savedobjects.md) | <code>SavedObjectsServiceSetup</code> | [SavedObjectsServiceSetup](./kibana-plugin-core-server.savedobjectsservicesetup.md) |
26+
| [status](./kibana-plugin-core-server.coresetup.status.md) | <code>StatusServiceSetup</code> | [StatusServiceSetup](./kibana-plugin-core-server.statusservicesetup.md) |
2627
| [uiSettings](./kibana-plugin-core-server.coresetup.uisettings.md) | <code>UiSettingsServiceSetup</code> | [UiSettingsServiceSetup](./kibana-plugin-core-server.uisettingsservicesetup.md) |
2728
| [uuid](./kibana-plugin-core-server.coresetup.uuid.md) | <code>UuidServiceSetup</code> | [UuidServiceSetup](./kibana-plugin-core-server.uuidservicesetup.md) |
2829

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [CoreSetup](./kibana-plugin-core-server.coresetup.md) &gt; [status](./kibana-plugin-core-server.coresetup.status.md)
4+
5+
## CoreSetup.status property
6+
7+
[StatusServiceSetup](./kibana-plugin-core-server.statusservicesetup.md)
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
status: StatusServiceSetup;
13+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [CoreStatus](./kibana-plugin-core-server.corestatus.md) &gt; [elasticsearch](./kibana-plugin-core-server.corestatus.elasticsearch.md)
4+
5+
## CoreStatus.elasticsearch property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
elasticsearch: ServiceStatus;
11+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [CoreStatus](./kibana-plugin-core-server.corestatus.md)
4+
5+
## CoreStatus interface
6+
7+
Status of core services.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export interface CoreStatus
13+
```
14+
15+
## Properties
16+
17+
| Property | Type | Description |
18+
| --- | --- | --- |
19+
| [elasticsearch](./kibana-plugin-core-server.corestatus.elasticsearch.md) | <code>ServiceStatus</code> | |
20+
| [savedObjects](./kibana-plugin-core-server.corestatus.savedobjects.md) | <code>ServiceStatus</code> | |
21+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [CoreStatus](./kibana-plugin-core-server.corestatus.md) &gt; [savedObjects](./kibana-plugin-core-server.corestatus.savedobjects.md)
4+
5+
## CoreStatus.savedObjects property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
savedObjects: ServiceStatus;
11+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [ElasticsearchStatusMeta](./kibana-plugin-core-server.elasticsearchstatusmeta.md) &gt; [incompatibleNodes](./kibana-plugin-core-server.elasticsearchstatusmeta.incompatiblenodes.md)
4+
5+
## ElasticsearchStatusMeta.incompatibleNodes property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
incompatibleNodes: NodesVersionCompatibility['incompatibleNodes'];
11+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [ElasticsearchStatusMeta](./kibana-plugin-core-server.elasticsearchstatusmeta.md)
4+
5+
## ElasticsearchStatusMeta interface
6+
7+
8+
<b>Signature:</b>
9+
10+
```typescript
11+
export interface ElasticsearchStatusMeta
12+
```
13+
14+
## Properties
15+
16+
| Property | Type | Description |
17+
| --- | --- | --- |
18+
| [incompatibleNodes](./kibana-plugin-core-server.elasticsearchstatusmeta.incompatiblenodes.md) | <code>NodesVersionCompatibility['incompatibleNodes']</code> | |
19+
| [warningNodes](./kibana-plugin-core-server.elasticsearchstatusmeta.warningnodes.md) | <code>NodesVersionCompatibility['warningNodes']</code> | |
20+

0 commit comments

Comments
 (0)