Skip to content

Commit 1ec8e98

Browse files
committed
Merge branch 'master' of github.com:elastic/kibana into feature-fleet-update-design-agent-details-page
2 parents 0271964 + cb0a359 commit 1ec8e98

File tree

392 files changed

+445485
-3772
lines changed

Some content is hidden

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

392 files changed

+445485
-3772
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@
187187
/x-pack/test/saved_object_tagging/ @elastic/kibana-core
188188
/packages/kbn-config-schema/ @elastic/kibana-core
189189
/packages/kbn-std/ @elastic/kibana-core
190+
/packages/kbn-config/ @elastic/kibana-core
191+
/packages/kbn-logging/ @elastic/kibana-core
192+
/packages/kbn-legacy-logging/ @elastic/kibana-core
190193
/src/legacy/server/config/ @elastic/kibana-core
191194
/src/legacy/server/http/ @elastic/kibana-core
192195
/src/legacy/server/logging/ @elastic/kibana-core

.i18nrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"src/plugins/management"
2828
],
2929
"maps_legacy": "src/plugins/maps_legacy",
30+
"monaco": "packages/kbn-monaco/src",
3031
"indexPatternManagement": "src/plugins/index_pattern_management",
3132
"advancedSettings": "src/plugins/advanced_settings",
3233
"kibana_legacy": "src/plugins/kibana_legacy",

docs/apm/apm-alerts.asciidoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<titleabbrev>Create an alert</titleabbrev>
77
++++
88

9-
beta::[]
109

1110
The APM app integrates with Kibana's {kibana-ref}/alerting-getting-started.html[alerting and actions] feature.
1211
It provides a set of built-in **actions** and APM specific threshold **alerts** for you to use

docs/developer/plugin/migrating-legacy-plugins-examples.asciidoc

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,77 @@ router.get(
11431143
);
11441144
----
11451145

1146+
==== Accessing the client from a collector's `fetch` method
1147+
1148+
At the moment, the `fetch` method's context receives preconfigured
1149+
<<scoped-services, scoped clients>> for Elasticsearch and SavedObjects.
1150+
To help in the transition, both, the legacy (`callCluster`) and new clients are provided,
1151+
but we strongly discourage using the deprecated legacy ones for any new implementation.
1152+
1153+
[source,typescript]
1154+
----
1155+
usageCollection.makeUsageCollector<MyUsage>({
1156+
type: 'my-collector',
1157+
isReady: async () => true, // Logic to confirm the `fetch` method is ready to be called
1158+
schema: {...},
1159+
async fetch(context) {
1160+
const { callCluster, esClient, soClient } = context;
1161+
1162+
// Before:
1163+
const result = callCluster('search', options)
1164+
1165+
// After:
1166+
const { body: result } = esClient.search(options);
1167+
1168+
return result;
1169+
}
1170+
});
1171+
----
1172+
1173+
Regarding the `soClient`, it is encouraged to use it instead of the plugin's owned SavedObject's repository
1174+
as we used to do in the past.
1175+
1176+
Before:
1177+
1178+
[source,typescript]
1179+
----
1180+
function getUsageCollector(
1181+
usageCollection: UsageCollectionSetup,
1182+
getSavedObjectsRepository: () => ISavedObjectsRepository | undefined
1183+
) {
1184+
usageCollection.makeUsageCollector<MyUsage>({
1185+
type: 'my-collector',
1186+
isReady: () => typeof getSavedObjectsRepository() !== 'undefined',
1187+
schema: {...},
1188+
async fetch() {
1189+
const savedObjectsRepository = getSavedObjectsRepository();
1190+
1191+
const { attributes: result } = await savedObjectsRepository.get('my-so-type', 'my-so-id');
1192+
1193+
return result;
1194+
}
1195+
});
1196+
}
1197+
----
1198+
1199+
After:
1200+
1201+
[source,typescript]
1202+
----
1203+
function getUsageCollector(usageCollection: UsageCollectionSetup) {
1204+
usageCollection.makeUsageCollector<MyUsage>({
1205+
type: 'my-collector',
1206+
isReady: () => true,
1207+
schema: {...},
1208+
async fetch({ soClient }) {
1209+
const { attributes: result } = await soClient.get('my-so-type', 'my-so-id');
1210+
1211+
return result;
1212+
}
1213+
});
1214+
}
1215+
----
1216+
11461217
==== Creating a custom client
11471218

11481219
Note that the `plugins` option is no longer available on the new

docs/development/core/server/kibana-plugin-core-server.legacyclusterclient.callasinternaluser.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
## LegacyClusterClient.callAsInternalUser property
66

7+
> Warning: This API is now obsolete.
8+
>
9+
> Use [IClusterClient.asInternalUser](./kibana-plugin-core-server.iclusterclient.asinternaluser.md)<!-- -->.
10+
>
11+
712
Calls specified endpoint with provided clientParams on behalf of the Kibana internal user. See [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md)<!-- -->.
813

914
<b>Signature:</b>

docs/development/core/server/kibana-plugin-core-server.legacyscopedclusterclient.callascurrentuser.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
## LegacyScopedClusterClient.callAsCurrentUser() method
66

7+
> Warning: This API is now obsolete.
8+
>
9+
> Use [IScopedClusterClient.asCurrentUser](./kibana-plugin-core-server.iscopedclusterclient.ascurrentuser.md)<!-- -->.
10+
>
11+
712
Calls specified `endpoint` with provided `clientParams` on behalf of the user initiated request to the Kibana server (via HTTP request headers). See [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md)<!-- -->.
813

914
<b>Signature:</b>

docs/development/core/server/kibana-plugin-core-server.legacyscopedclusterclient.callasinternaluser.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
## LegacyScopedClusterClient.callAsInternalUser() method
66

7+
> Warning: This API is now obsolete.
8+
>
9+
> Use [IScopedClusterClient.asInternalUser](./kibana-plugin-core-server.iscopedclusterclient.asinternaluser.md)<!-- -->.
10+
>
11+
712
Calls specified `endpoint` with provided `clientParams` on behalf of the Kibana internal user. See [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md)<!-- -->.
813

914
<b>Signature:</b>
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-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [IndexPatternsService](./kibana-plugin-plugins-data-public.indexpatternsservice.md) &gt; [find](./kibana-plugin-plugins-data-public.indexpatternsservice.find.md)
4+
5+
## IndexPatternsService.find property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
find: (search: string, size?: number) => Promise<IndexPattern[]>;
11+
```

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export declare class IndexPatternsService
2323
| [clearCache](./kibana-plugin-plugins-data-public.indexpatternsservice.clearcache.md) | | <code>(id?: string &#124; undefined) =&gt; void</code> | Clear index pattern list cache |
2424
| [ensureDefaultIndexPattern](./kibana-plugin-plugins-data-public.indexpatternsservice.ensuredefaultindexpattern.md) | | <code>EnsureDefaultIndexPattern</code> | |
2525
| [fieldArrayToMap](./kibana-plugin-plugins-data-public.indexpatternsservice.fieldarraytomap.md) | | <code>(fields: FieldSpec[], fieldAttrs?: FieldAttrs &#124; undefined) =&gt; Record&lt;string, FieldSpec&gt;</code> | Converts field array to map |
26+
| [find](./kibana-plugin-plugins-data-public.indexpatternsservice.find.md) | | <code>(search: string, size?: number) =&gt; Promise&lt;IndexPattern[]&gt;</code> | |
2627
| [get](./kibana-plugin-plugins-data-public.indexpatternsservice.get.md) | | <code>(id: string) =&gt; Promise&lt;IndexPattern&gt;</code> | Get an index pattern by id. Cache optimized |
2728
| [getCache](./kibana-plugin-plugins-data-public.indexpatternsservice.getcache.md) | | <code>() =&gt; Promise&lt;SavedObject&lt;IndexPatternSavedObjectAttrs&gt;[] &#124; null &#124; undefined&gt;</code> | |
2829
| [getDefault](./kibana-plugin-plugins-data-public.indexpatternsservice.getdefault.md) | | <code>() =&gt; Promise&lt;IndexPattern &#124; null&gt;</code> | Get default index pattern |

docs/management/alerting/alert-details.asciidoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
[[alert-details]]
33
=== Alert details
44

5-
beta[]
65

76
The *Alert details* page tells you about the state of the alert and provides granular control over the actions it is taking.
87

0 commit comments

Comments
 (0)