Skip to content

Commit

Permalink
Merge branch 'master' into alerts/rename-resolved-to-recovered
Browse files Browse the repository at this point in the history
* master: (25 commits)
  [Alerting] fixes buggy default message behaviour (#84202)
  [Graph] Use new ES client and change license API (#84398)
  [DOCS] Adds redirect to known plugins page (#84001)
  Update IndexPatternSelect to get fields from indexPatternService instead of savedObject attributes (#84376)
  Adding timestamps to created events so the sorting is stable (#84515)
  [DOCS] Redirects for drilldown links (#83846)
  [Fleet] Support for showing an Integration Detail Custom (UI Extension) tab (#83805)
  [Enterprise Search] Migrate shared Schema components (#84381)
  [Discover] Unskip date_nanos and shard links functional tests (#82878)
  [APM] ML anomaly detection integration: Displaying anomaly job results in the Transaction duration chart is not as intended  (#84415)
  Support for painless language autocomplete within monaco (#80577)
  [Lens] Time scale ui (#83904)
  removing beta callouts (#84510)
  [Lens] (Accessibility) add aria-label to chart type icon (#84493)
  Trusted Apps signer API. (#83661)
  increase stdout max listeners for legacy logging (#84497)
  [APM] Service overview: Add throughput chart (#84439)
  [Discover] Unskip main functional tests (#84300)
  Uptime overview overhaul (#83406)
  [APM] Adjust time formats based on the difference between start and end (#84470)
  ...
  • Loading branch information
gmmorris committed Nov 30, 2020
2 parents 1abc873 + bc1fd6c commit e066f65
Show file tree
Hide file tree
Showing 277 changed files with 436,827 additions and 2,983 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@
/x-pack/test/saved_object_tagging/ @elastic/kibana-core
/packages/kbn-config-schema/ @elastic/kibana-core
/packages/kbn-std/ @elastic/kibana-core
/packages/kbn-config/ @elastic/kibana-core
/packages/kbn-logging/ @elastic/kibana-core
/packages/kbn-legacy-logging/ @elastic/kibana-core
/src/legacy/server/config/ @elastic/kibana-core
/src/legacy/server/http/ @elastic/kibana-core
/src/legacy/server/logging/ @elastic/kibana-core
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"src/plugins/management"
],
"maps_legacy": "src/plugins/maps_legacy",
"monaco": "packages/kbn-monaco/src",
"indexPatternManagement": "src/plugins/index_pattern_management",
"advancedSettings": "src/plugins/advanced_settings",
"kibana_legacy": "src/plugins/kibana_legacy",
Expand Down
1 change: 0 additions & 1 deletion docs/apm/apm-alerts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<titleabbrev>Create an alert</titleabbrev>
++++

beta::[]

The APM app integrates with Kibana's {kibana-ref}/alerting-getting-started.html[alerting and actions] feature.
It provides a set of built-in **actions** and APM specific threshold **alerts** for you to use
Expand Down
71 changes: 71 additions & 0 deletions docs/developer/plugin/migrating-legacy-plugins-examples.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,77 @@ router.get(
);
----

==== Accessing the client from a collector's `fetch` method

At the moment, the `fetch` method's context receives preconfigured
<<scoped-services, scoped clients>> for Elasticsearch and SavedObjects.
To help in the transition, both, the legacy (`callCluster`) and new clients are provided,
but we strongly discourage using the deprecated legacy ones for any new implementation.

[source,typescript]
----
usageCollection.makeUsageCollector<MyUsage>({
type: 'my-collector',
isReady: async () => true, // Logic to confirm the `fetch` method is ready to be called
schema: {...},
async fetch(context) {
const { callCluster, esClient, soClient } = context;
// Before:
const result = callCluster('search', options)
// After:
const { body: result } = esClient.search(options);
return result;
}
});
----

Regarding the `soClient`, it is encouraged to use it instead of the plugin's owned SavedObject's repository
as we used to do in the past.

Before:

[source,typescript]
----
function getUsageCollector(
usageCollection: UsageCollectionSetup,
getSavedObjectsRepository: () => ISavedObjectsRepository | undefined
) {
usageCollection.makeUsageCollector<MyUsage>({
type: 'my-collector',
isReady: () => typeof getSavedObjectsRepository() !== 'undefined',
schema: {...},
async fetch() {
const savedObjectsRepository = getSavedObjectsRepository();
const { attributes: result } = await savedObjectsRepository.get('my-so-type', 'my-so-id');
return result;
}
});
}
----

After:

[source,typescript]
----
function getUsageCollector(usageCollection: UsageCollectionSetup) {
usageCollection.makeUsageCollector<MyUsage>({
type: 'my-collector',
isReady: () => true,
schema: {...},
async fetch({ soClient }) {
const { attributes: result } = await soClient.get('my-so-type', 'my-so-id');
return result;
}
});
}
----

==== Creating a custom client

Note that the `plugins` option is no longer available on the new
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[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)

## IndexPatternsService.find property

<b>Signature:</b>

```typescript
find: (search: string, size?: number) => Promise<IndexPattern[]>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export declare class IndexPatternsService
| [clearCache](./kibana-plugin-plugins-data-public.indexpatternsservice.clearcache.md) | | <code>(id?: string &#124; undefined) =&gt; void</code> | Clear index pattern list cache |
| [ensureDefaultIndexPattern](./kibana-plugin-plugins-data-public.indexpatternsservice.ensuredefaultindexpattern.md) | | <code>EnsureDefaultIndexPattern</code> | |
| [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 |
| [find](./kibana-plugin-plugins-data-public.indexpatternsservice.find.md) | | <code>(search: string, size?: number) =&gt; Promise&lt;IndexPattern[]&gt;</code> | |
| [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 |
| [getCache](./kibana-plugin-plugins-data-public.indexpatternsservice.getcache.md) | | <code>() =&gt; Promise&lt;SavedObject&lt;IndexPatternSavedObjectAttrs&gt;[] &#124; null &#124; undefined&gt;</code> | |
| [getDefault](./kibana-plugin-plugins-data-public.indexpatternsservice.getdefault.md) | | <code>() =&gt; Promise&lt;IndexPattern &#124; null&gt;</code> | Get default index pattern |
Expand Down
1 change: 0 additions & 1 deletion docs/management/alerting/alert-details.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[[alert-details]]
=== Alert details

beta[]

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

Expand Down
1 change: 0 additions & 1 deletion docs/management/alerting/alert-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[[alert-management]]
=== Managing Alerts

beta[]

The *Alerts* tab provides a cross-app view of alerting. Different {kib} apps like <<metrics-app,Metrics>>, <<xpack-apm,APM>>, <<uptime-app,Uptime>>, and <<xpack-siem,SIEM>> can offer their own alerts, and the *Alerts* tab provides a central place to:

Expand Down
1 change: 0 additions & 1 deletion docs/management/alerting/alerts-and-actions-intro.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[[managing-alerts-and-actions]]
== Alerts and Actions

beta[]

The *Alerts and Actions* UI lets you <<alert-management, see and control all the alerts>> in a space, and provides tools to <<connector-management, create and manage connectors>> so that alerts can trigger actions like notification, indexing, and ticketing.

Expand Down
28 changes: 26 additions & 2 deletions docs/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,11 @@ This content has moved. See {ref}/index-mgmt.html[Index management].

This content has moved. See <<discover, **Discover**>>.


[role="exclude",id="document-context"]
== View a document in context

This content has moved. See <<discover, **Discover**>>.


[role="exclude",id="document-data"]
== View document data

Expand All @@ -169,3 +167,29 @@ This content has moved. See <<discover, **Discover**>>.
== View field data statistics

This content has moved. See <<discover, **Discover**>>.

[role="exclude",id="known-plugins"]
== Known plugins

This content has moved. See <<known-kibana-plugins>>.

[role="exclude",id="url-drilldown"]
== URL drilldown

[float]
[[trigger-picker]]
=== Picking a trigger for a URL drilldown

This page has moved. Refer to <<url-drilldowns>>.

[float]
[[templating]]
=== URL templating

This page has moved. Refer to <<url_templating-language>>.

[float]
[[variables]]
=== Variables

This page has moved. Refer to <<url-template-variables>>.
1 change: 0 additions & 1 deletion docs/user/alerting/alerting-getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[[alerting-getting-started]]
= Alerting and Actions

beta[]

--

Expand Down
8 changes: 4 additions & 4 deletions docs/user/dashboard/drilldowns.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ refer https://www.elastic.co/subscriptions[the subscription page].
==============================================

[float]
[[dashboard-drilldown]]
[[dashboard-drilldowns]]
==== Dashboard drilldowns

Dashboard drilldowns enable you to open a dashboard from another dashboard,
Expand All @@ -33,16 +33,16 @@ you can create a drilldown that navigates from the overall status dashboard to a
that shows a single data center or server.

[float]
[[url-drilldown]]
[[url-drilldowns]]
==== URL drilldowns

beta[] URL drilldowns enable you to navigate from a dashboard to internal or external URLs.
Destination URLs can be dynamic, depending on the dashboard context or user interaction with a panel.
For example, if you have a dashboard that shows data from a Github repository, you can create a URL drilldown
that opens Github from the dashboard.

Some panels support multiple interactions, also known as triggers.
The <<variables,variables>> you use to create a <<url_templating, URL template>> depends on the trigger you choose. URL drilldowns support these types of triggers:
Some panels support multiple interactions, also known as triggers.
The <<url-template-variables,variables>> you use to create a <<url_templating-language, URL template>> depends on the trigger you choose. URL drilldowns support these types of triggers:

* *Single click* &mdash; A single data point in the visualization.

Expand Down
4 changes: 2 additions & 2 deletions docs/user/dashboard/url-drilldown.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[[url_templating]]
[[url_templating-language]]
=== URL templating

beta[]
Expand Down Expand Up @@ -137,7 +137,7 @@ Example:


[float]
[[variables]]
[[url-template-variables]]
==== URL template variables

The URL drilldown template has three sources for variables:
Expand Down
2 changes: 1 addition & 1 deletion docs/user/plugins.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Plugin developers must release a new version of their plugin for each new {kib}
==============================================

[float]
[[known-plugins]]
[[known-kibana-plugins]]
== Known plugins

The known plugins were tested for {kib} *5.x*, so we are unable to guarantee compatibility with your version of {kib}. The {kib} installer rejects any plugins that haven't been published for your specific version of {kib}.
Expand Down
2 changes: 1 addition & 1 deletion docs/user/whats-new.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ coming[8.0.0]

// tag::notable-highlights[]

// end::notable-highlights[]
// end::notable-highlights[]
2 changes: 1 addition & 1 deletion packages/kbn-legacy-logging/src/setup_logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function setupLogging(
// thrown every time we start the server.
// In order to keep using the legacy logger until we remove it I'm just adding
// a new hard limit here.
process.stdout.setMaxListeners(25);
process.stdout.setMaxListeners(40);

return await server.register({
plugin: good,
Expand Down
52 changes: 52 additions & 0 deletions packages/kbn-monaco/scripts/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* 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.
*/

module.exports = {
licenseHeader: `/*
* 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.
*/
`,
supportedContexts: [
'boolean_script_field_script_field',
'date_script_field',
'double_script_field_script_field',
'filter',
'ip_script_field_script_field',
'long_script_field_script_field',
'painless_test',
'processor_conditional',
'score',
'string_script_field_script_field',
],
};
Loading

0 comments on commit e066f65

Please sign in to comment.