Skip to content

Commit

Permalink
Merge branch 'main' into deprecate_endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Feb 7, 2022
2 parents 15bb9d9 + 781f808 commit 8e4a776
Show file tree
Hide file tree
Showing 1,376 changed files with 19,814 additions and 6,320 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -853,12 +853,13 @@ module.exports = {
},

/**
* APM and Observability overrides
* APM, UX and Observability overrides
*/
{
files: [
'x-pack/plugins/apm/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/observability/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/ux/**/*.{js,mjs,ts,tsx}',
],
rules: {
'no-console': ['warn', { allow: ['error'] }],
Expand Down
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/src/plugins/chart_expressions/expression_metric/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_heatmap/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_gauge/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_pie/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_partition_vis/ @elastic/kibana-vis-editors
/src/plugins/url_forwarding/ @elastic/kibana-vis-editors
/packages/kbn-tinymath/ @elastic/kibana-vis-editors
/x-pack/test/functional/apps/lens @elastic/kibana-vis-editors
Expand Down Expand Up @@ -96,6 +96,7 @@

# Observability Shared
/x-pack/plugins/observability/ @elastic/observability-ui
/x-pack/plugins/observability/public/components/shared/date_picker/ @elastic/uptime

# Unified Observability
/x-pack/plugins/observability/public/components/shared/exploratory_view @elastic/unified-observability
Expand Down Expand Up @@ -136,6 +137,8 @@

# Uptime
/x-pack/plugins/uptime @elastic/uptime
/x-pack/plugins/ux @elastic/uptime
/x-pack/plugins/observability/public/components/shared/exploratory_view @elastic/uptime
/x-pack/test/functional_with_es_ssl/apps/uptime @elastic/uptime
/x-pack/test/functional/apps/uptime @elastic/uptime
/x-pack/test/functional/es_archives/uptime @elastic/uptime
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/dev-doc-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dev docs
on:
pull_request_target:
paths:
- '**.mdx'
- '**.docnav.json'
- '**.docapi.json'
- '**.devdocs.json'
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.gif'
types: [closed, opened, synchronize, reopened]

jobs:
internal-docs:
uses: elastic/workflows/.github/workflows/dev-docs-builder.yml@main
secrets:
VERCEL_GITHUB_TOKEN: ${{ secrets.VERCEL_GITHUB_TOKEN }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID_DOCS_DEV: ${{ secrets.VERCEL_PROJECT_ID_DOCS_DEV }}
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"expressionImage": "src/plugins/expression_image",
"expressionMetric": "src/plugins/expression_metric",
"expressionMetricVis": "src/plugins/chart_expressions/expression_metric",
"expressionPie": "src/plugins/chart_expressions/expression_pie",
"expressionPartitionVis": "src/plugins/chart_expressions/expression_partition_vis",
"expressionRepeatImage": "src/plugins/expression_repeat_image",
"expressionRevealImage": "src/plugins/expression_reveal_image",
"expressions": "src/plugins/expressions",
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/api_welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: kibDevDocsApiWelcome
slug: /kibana-dev-docs/api-meta/welcome
title: Welcome
summary: How to use our automatically generated API documentation
description: How to use our automatically generated API documentation
date: 2021-02-25
tags: ['kibana','dev', 'contributor', 'api docs']
---
Expand Down
14 changes: 11 additions & 3 deletions dev_docs/getting_started/add_data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
id: kibDevAddData
slug: /kibana-dev-docs/getting-started/sample-data
title: Add data
summary: Learn how to add data to Kibana
description: Learn how to add data to Kibana
date: 2021-08-11
tags: ['kibana', 'onboarding', 'dev', 'architecture', 'tutorials']
---

Building a feature and need an easy way to test it out with some data? Below are three options.

## 1. Add Sample Data from the UI
## Sample data

Kibana ships with sample data that you can install at the click of the button. If you are building a feature and need some data to test it out with, sample data is a great option. The only limitation is that this data will not work for Security or Observability solutions (see [#62962](https://github.com/elastic/kibana/issues/62962)).

Expand All @@ -20,7 +20,7 @@ Kibana ships with sample data that you can install at the click of the button. I

![Sample Data](../assets/sample_data.png)

## CSV Upload
## CSV upload

1. If you don't have any data, navigate to Stack Management > Index Patterns and click the link to the uploader. If you do have data, navigate to the **Machine Learning** application.
2. Click on the **Data Visualizer** tab.
Expand All @@ -35,3 +35,11 @@ The makelogs script generates sample web server logs. Make sure Elasticsearch is
```sh
node scripts/makelogs --auth <username>:<password>
```

## Realistic solution data

<DocCallOut color="warning" title="Internal only">

Security and Observability solution applications only work if data exists in particularly named indices, abiding by our [ECS format](https://www.elastic.co/guide/en/ecs/current/index.html). If you would like to use these applications with realistic data, check out the [oblt_cli tool](https://github.com/elastic/observability-test-environments/blob/master/tools/oblt_cli/README.md). This tool sets you up to connect to a remote Elasticsearch cluster that contains the appropriate data via CCS.

</DocCallOut>
2 changes: 1 addition & 1 deletion dev_docs/kibana_server_core_components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: kibServerAndCoreComponents
slug: /kibana-dev-docs/core-intro
title: Kibana Server and Core components
summary: An introduction to the Kibana server and core components.
description: An introduction to the Kibana server and core components.
date: 2021-02-26
tags: ['kibana','onboarding', 'dev', 'architecture']
---
Expand Down
2 changes: 0 additions & 2 deletions docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Review important information about the {kib} 8.0.0 releases.
[[release-notes-8.0.0-rc2]]
== {kib} 8.0.0-rc2

coming::[8.0.0-rc2]

For information about the {kib} 8.0.0-rc2 release, review the following information.

[float]
Expand Down
132 changes: 127 additions & 5 deletions docs/developer/architecture/core/uisettings-service.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,71 @@

NOTE: The UI settings service is available both server and client side.

=== Server side usage
=== Overview

UI settings are configurable from the Advanced Settings page in Management and control the behavior of {kib}. uiSettings are stored in a config saved object and, as such, conform to the same conditions as other <<saved-objects-service, Saved Objects>>.

There are several ways to configure an advanced setting:

- <<advanced-settings-ui, Through the Advanced Settings UI>>
- <<uisettings-overrides, Locked via kibana.yml's uiSettings.overrides>>
- <<client-side-usage, Through the client-side uiSettings Service>>
- <<server-side-usage, Through the server-side uiSettings Service>>

Keep in mind that once you add a new advanced setting, you cannot change or remove it without <<uisettings-migrations, registering a migration in core>>.

[[advanced-settings-ui]]
=== Configuration with Advanced Settings UI
The uiSettings service is the programmatic interface to Kibana's Advanced Settings UI. Kibana plugins use the service to extend Kibana UI Settings Management with custom settings for their plugin.

Configuration through the Advanced Settings UI is restricted to users authorised to acces the Advanced Settings page. Users who don't have permissions to change these values default to using the settings configured to the space they are in. Config saved objects can be shared between spaces.

[[uisettings-overrides]]
=== Configuration with UI settings overrides
experimental[] When a setting is configured as an override in kibana.yml, it will override any other value stored in the config saved object. If an override is misconfigured, it will fail config validation and prevent Kibana from starting up. The override applies to Kibana as a whole for all spaces and users and the option will be disabled in the Advanced Settings page. We refer to these as "global" overrides.

[[client-side-usage]]
=== Client side usage
On the client, the `uiSettings` service is exposed directly from `core` and the {kib-repo}blob/{branch}/docs/development/core/public/kibana-plugin-core-public.iuisettingsclient.md[client] provides plugins access to the `config` entries stored in {es}.

In the interest of performance, `uiSettings` are cached. Any changes that require cache refreshes should register an instruction to reload the page when settings are configured in Advanced Settings using the `requiresPageReload` {kib-repo}blob/{branch}/docs/development/core/public/kibana-plugin-core-public.uisettingsparams.md[parameter].

[source,typescript]
----
import { CoreSetup, Plugin } from 'src/core/public';
export class MyPlugin implements Plugin<MyPluginSetup, MyPluginStart> {
public setup(core: CoreSetup): MyPluginSetup {
core.uiSettings.getUpdate$().subscribe(({ key, newValue }) => {
if (key === 'custom') {
// do something with changes...
myPluginService.register({
})
}
});
}
public start(core: CoreStart): MyPluginStart {
return {
settings: {
getCustomValue: () => core.uiSettings.get('custom'),
},
};
}
}
The program interface to <<advanced-options, UI settings>>.
It makes it possible for Kibana plugins to extend Kibana UI Settings Management with custom settings.
----

See:
[[server-side-usage]]
=== Server side usage
On the server, `uiSettings` are exposed directly from `core`.

- {kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.uisettingsservicesetup.register.md[UI settings service Setup API docs]
The following example shows how to {kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.uisettingsservicesetup.register.md[register] a new `custom` setting with a default value of '42'. When registering a new setting, you must provide a schema against which validations are performed on read and write. All the other {kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.uisettingsparams.md[parameters] are optional.

[source,typescript]
----
Expand Down Expand Up @@ -38,3 +95,68 @@ export class MyPlugin implements Plugin {
}
----

[[uisettings-migrations]]
=== Migrations

[IMPORTANT]
==============================================
Migrations for 3rd party plugin advanced settings are not currently supported. If a 3rd party plugin registers an advanced setting, the setting is essentially permanent and cannot be fixed without manual intervention.
==============================================

To change or remove a `uiSetting`, the whole `config` Saved Object needs to be migrated. `uiSettings` {kib-repo}blob/{branch}/src/core/server/ui_settings/saved_objects/migrations.ts[migrations] are declared directly in the service.

For example, if we wanted to remove a `custom` setting, or rename `my_setting:fourtyTwo` to `my_other_setting:fourtyTwo`, we'd need two migration entries, one for each change targeting the version in which these changes apply:

[source,typescript]
----
export const migrations = {
...
'8.1.0': (doc: SavedObjectUnsanitizedDoc<any>): SavedObjectSanitizedDoc<any> => ({
...doc,
...(doc.attributes && {
attributes: Object.keys(doc.attributes).reduce(
(acc, key) =>
[
// other settings to remove for 8.1.0...
'custom',
].includes(key)
? {
...acc,
}
: {
...acc,
[key]: doc.attributes[key],
},
{}
),
}),
references: doc.references || [],
}),
'8.2.0': (doc: SavedObjectUnsanitizedDoc<any>): SavedObjectSanitizedDoc<any> => ({
...doc,
...(doc.attributes && {
attributes: Object.keys(doc.attributes).reduce(
(acc, key) =>
key.startsWith('my_setting:')
? {
...acc,
[key.replace('my_setting', 'my_other_setting')]: doc.attributes[key],
}
: {
...acc,
[key]: doc.attributes[key],
},
{}
),
}),
references: doc.references || [],
}),
}
----

[TIP]
==============================================
Plugins can leverage the optional deprecation parameter on registration for handling deprecation notices and renames. The deprecation warnings are rendered in the Advanced Settings UI and should also be added to the <<settings,Configure Kibana>> guide.
==============================================
8 changes: 6 additions & 2 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ This API doesn't support angular, for registering angular dev tools, bootstrap a
|Expression MetricVis plugin adds a metric renderer and function to the expression plugin. The renderer will display the metric chart.
|{kib-repo}blob/{branch}/src/plugins/chart_expressions/expression_pie/README.md[expressionPie]
|Expression Pie plugin adds a pie renderer and function to the expression plugin. The renderer will display the Pie chart.
|{kib-repo}blob/{branch}/src/plugins/chart_expressions/expression_partition_vis/README.md[expressionPartitionVis]
|Expression Partition Visualization plugin adds a partitionVis renderer and pieVis, mosaicVis, treemapVis, waffleVis functions to the expression plugin. The renderer will display the pie, waffle, treemap and mosaic charts.
|{kib-repo}blob/{branch}/src/plugins/expression_repeat_image/README.md[expressionRepeatImage]
Expand Down Expand Up @@ -635,6 +635,10 @@ in their infrastructure.
|NOTE: This plugin contains implementation of URL drilldown. For drilldowns infrastructure code refer to ui_actions_enhanced plugin.
|{kib-repo}blob/{branch}/x-pack/plugins/ux/readme.md[ux]
|https://docs.elastic.dev/kibana-dev-docs/welcome
|{kib-repo}blob/{branch}/x-pack/plugins/watcher/README.md[watcher]
|This plugins adopts some conventions in addition to or in place of conventions in Kibana (at the time of the plugin's creation):
Expand Down
2 changes: 1 addition & 1 deletion docs/development/core/server/kibana-plugin-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| --- | --- |
| [APP\_WRAPPER\_CLASS](./kibana-plugin-core-server.app_wrapper_class.md) | The class name for top level \*and\* nested application wrappers to ensure proper layout |
| [kibanaResponseFactory](./kibana-plugin-core-server.kibanaresponsefactory.md) | Set of helpers used to create <code>KibanaResponse</code> to form HTTP response on an incoming request. Should be returned as a result of [RequestHandler](./kibana-plugin-core-server.requesthandler.md) execution. |
| [mergeSavedObjectMigrationMaps](./kibana-plugin-core-server.mergesavedobjectmigrationmaps.md) | Merges two saved object migration maps. |
| [mergeSavedObjectMigrationMaps](./kibana-plugin-core-server.mergesavedobjectmigrationmaps.md) | Merges two saved object migration maps.<!-- -->If there is a migration for a given version on only one of the maps, that migration function will be used:<!-- -->mergeSavedObjectMigrationMaps(<!-- -->{ '1.2.3': f }<!-- -->, { '4.5.6': g }<!-- -->) -<!-- -->&gt; { '1.2.3': f, '4.5.6': g }<!-- -->If there is a migration for a given version on both maps, the migrations will be composed:<!-- -->mergeSavedObjectMigrationMaps(<!-- -->{ '1.2.3': f }<!-- -->, { '1.2.3': g }<!-- -->) -<!-- -->&gt; { '1.2.3': (doc, context) =<!-- -->&gt; f(g(doc, context), context) } |
| [pollEsNodesVersion](./kibana-plugin-core-server.pollesnodesversion.md) | |
| [ServiceStatusLevels](./kibana-plugin-core-server.servicestatuslevels.md) | The current "level" of availability of a service. |
| [validBodyOutput](./kibana-plugin-core-server.validbodyoutput.md) | The set of valid body.output |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@

Merges two saved object migration maps.

If there is a migration for a given version on only one of the maps, that migration function will be used:

mergeSavedObjectMigrationMaps(<!-- -->{ '1.2.3': f }<!-- -->, { '4.5.6': g }<!-- -->) -<!-- -->&gt; { '1.2.3': f, '4.5.6': g }

If there is a migration for a given version on both maps, the migrations will be composed:

mergeSavedObjectMigrationMaps(<!-- -->{ '1.2.3': f }<!-- -->, { '1.2.3': g }<!-- -->) -<!-- -->&gt; { '1.2.3': (doc, context) =<!-- -->&gt; f(g(doc, context), context) }

<b>Signature:</b>

```typescript
Expand Down
2 changes: 1 addition & 1 deletion docs/management/connectors/action-types/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ experimental[] {kib} offers a preconfigured index connector to facilitate indexi

[WARNING]
==================================================
This functionality is experimental and may be changed or removed completely in a future release.
This functionality is in technical preview and may be changed or removed completely in a future release.
==================================================

To use this connector, set the <<action-settings, `xpack.actions.preconfiguredAlertHistoryEsIndex`>> configuration to `true`.
Expand Down
7 changes: 5 additions & 2 deletions docs/management/upgrade-assistant/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ enables you to see if you are using deprecated features,
and guides you through the process of resolving issues.

If you have indices that were created prior to 7.0,
you can use the assistant to reindex them so they can be accessed from 8.0.
you can use the assistant to reindex them so they can be accessed from 8.0+.

IMPORTANT: To see the most up-to-date deprecation information before
upgrading to 8.0, upgrade to the latest 7.n release.
upgrading to 8.0, upgrade to the latest {prev-major-last} release.

For more information about upgrading,
refer to {stack-ref}/upgrading-elastic-stack.html[Upgrading to Elastic {version}.]

[discrete]
=== Required permissions
Expand Down
10 changes: 10 additions & 0 deletions docs/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,13 @@ This content has moved. Refer to <<managing-data-views>>.
== Kibana role management.

This content has moved. Refer to <<kibana-role-management>>.

[role="exclude" logging-configuration-changes]
== Logging configuration changes

This content has moved. Refer to <<logging-config-changes>>.

[role="exclude" upgrade-migrations]
== Upgrade migrations

This content has moved. Refer to <<saved-object-migrations>>.
2 changes: 1 addition & 1 deletion docs/settings/task-manager-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This flag will enable automatic warn and error logging if task manager self dete
The amount of seconds we allow a task to delay before printing a warning server log. Defaults to 60.

`xpack.task_manager.ephemeral_tasks.enabled`::
Enables an experimental feature that executes a limited (and configurable) number of actions in the same task as the alert which triggered them.
Enables a technical preview feature that executes a limited (and configurable) number of actions in the same task as the alert which triggered them.
These action tasks will reduce the latency of the time it takes an action to run after it's triggered, but are not persisted as SavedObjects.
These non-persisted action tasks have a risk that they won't be run at all if the Kibana instance running them exits unexpectedly. Defaults to false.

Expand Down
Loading

0 comments on commit 8e4a776

Please sign in to comment.