Skip to content

Commit

Permalink
Merge branch 'task-manager/docs-monitoring' of github.com:gmmorris/ki…
Browse files Browse the repository at this point in the history
…bana into task-manager/docs-monitoring

* 'task-manager/docs-monitoring' of github.com:gmmorris/kibana: (120 commits)
  Bump the CI Node.js version from 14.15.4 to 14.16.0 (elastic#92578)
  [Uptime] Search made easy (elastic#88581)
  [Lens] Stop requesting stats on Records field (elastic#92508)
  [APM] Correlations style polish in prep for release (elastic#92514)
  [Lens] Fix sorting undefined, null and NaN values (elastic#92575)
  Put environment back in uiFilters (elastic#92561)
  [Discover] Fix sorting by _score behavior (elastic#92132)
  Add metricbeat steps to jenkins_build_load_testing.sh (elastic#90290)
  [Usage Collection] Remove unused UI Metric APIs (elastic#91620)
  Fix timelion deprecation documentation links (elastic#92576)
  [TSVB] Enable `dual mode`, support index patterns and strings (elastic#92395)
  Fix text align in Safari (elastic#92374)
  [Actions][Doc] Clean up Actions README (elastic#91789)
  chore(NA): add missing files to exclude when building bazel prod packages (elastic#92506)
  [Security Solution][Endpoint][Admin] Match Policy Details in Security Solution with Fleet (elastic#92047)
  Revert "[build] Add task skips intended for partial builds (elastic#92076)"
  [Enterprise Search] Change icon for error in EuiCallouts (elastic#92527)
  [Alerts][Docs] Alert types doc update. Added refs to applications specific alerts groups. (elastic#91787)
  [Security Solution][Exceptions] - Update exceptions modal to use existing lists plugin useApi hook (elastic#92348)
  [DOCS] Updates refresh text in index pattern doc (elastic#92469)
  ...
  • Loading branch information
gmmorris committed Feb 25, 2021
2 parents 5b00ce1 + 759d1a6 commit 26bdc8d
Show file tree
Hide file tree
Showing 829 changed files with 4,170,536 additions and 9,010 deletions.
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=14.15.4
ARG NODE_VERSION=14.16.0

FROM node:${NODE_VERSION} AS base

Expand Down
4 changes: 3 additions & 1 deletion .ci/Jenkinsfile_security_cypress
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ kibanaPipeline(timeoutMinutes: 180) {

workers.ci(name: job, size: 'l', ramDisk: true) {
kibanaPipeline.bash('test/scripts/jenkins_xpack_build_kibana.sh', 'Build Default Distributable')
kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress.sh')()
kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_chrome.sh')()
// Temporarily disabled to figure out test flake
// kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_firefox.sh')()
}
}
}
Expand Down
54 changes: 20 additions & 34 deletions .ci/es-snapshots/Jenkinsfile_verify_es
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,22 @@ kibanaPipeline(timeoutMinutes: 210) {
"ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}",
'IGNORE_SHIP_CI_STATS_ERROR=true',
]) {
parallel([
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1),
'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2),
'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3),
'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4),
'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5),
'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6),
'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7),
'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8),
'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9),
'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10),
'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11),
'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12),
]),
'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1),
'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2),
'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3),
'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4),
'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5),
'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6),
'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7),
'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8),
'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
'xpack-ciGroup11': kibanaPipeline.xpackCiGroupProcess(11),
'xpack-ciGroup12': kibanaPipeline.xpackCiGroupProcess(12),
'xpack-ciGroup13': kibanaPipeline.xpackCiGroupProcess(13),
]),
])
kibanaPipeline.withTasks {
tasks([
kibanaPipeline.scriptTaskDocker('Jest Integration Tests', 'test/scripts/test/jest_integration.sh'),
kibanaPipeline.scriptTask('API Integration Tests', 'test/scripts/test/api_integration.sh'),
])

task {
kibanaPipeline.buildOss(6)
tasks.ossCiGroups()
}

task {
kibanaPipeline.buildXpack(10)
tasks.xpackCiGroups()
}
}
}

promoteSnapshot(SNAPSHOT_VERSION, SNAPSHOT_ID)
Expand All @@ -72,7 +56,9 @@ kibanaPipeline(timeoutMinutes: 210) {
}

def promoteSnapshot(snapshotVersion, snapshotId) {
node(workers.label('s')) {
esSnapshots.promote(snapshotVersion, snapshotId)
if (buildUtils.getBuildStatus() == 'SUCCESS') {
node(workers.label('s')) {
esSnapshots.promote(snapshotVersion, snapshotId)
}
}
}
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/
/x-pack/test/security_api_integration/ @elastic/kibana-security
/x-pack/test/security_functional/ @elastic/kibana-security
/x-pack/test/spaces_api_integration/ @elastic/kibana-security
/x-pack/test/saved_object_api_integration/ @elastic/kibana-security
#CC# /x-pack/plugins/security/ @elastic/kibana-security

# Kibana Alerting Services
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.15.4
14.16.0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.15.4
14.16.0
3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
303 See Other

Location: https://www.elastic.co/community/codeofconduct
34 changes: 17 additions & 17 deletions dev_docs/kibana_platform_plugin_intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ date: 2021-01-06
tags: ['kibana','onboarding', 'dev', 'architecture']
---

From an end user perspective, Kibana is a tool for interacting with Elasticsearch, providing an easy way
From an end user perspective, Kibana is a tool for interacting with Elasticsearch, providing an easy way
to visualize and analyze data.

From a developer perspective, Kibana is a platform that provides a set of tools to build not only the UI you see in Kibana today, but
a wide variety of applications that can be used to explore, visualize, and act upon data in Elasticsearch. The platform provides developers the ability
to build applications, or inject extra functionality into
a wide variety of applications that can be used to explore, visualize, and act upon data in Elasticsearch. The platform provides developers the ability
to build applications, or inject extra functionality into
already existing applications. Did you know that almost everything you see in the
Kibana UI is built inside a plugin? If you removed all plugins from Kibana, you'd be left with an empty navigation menu, and a set of
developer tools. The Kibana platform is a blank canvas, just waiting for a developer to come along and create something!

![Kibana personas](assets/kibana_platform_plugin_end_user.png)

## Platform services

Plugins have access to three kinds of public services:

- Platform services provided by `core` (<DocLink id="kibPlatformIntro" section="core-services" text="Core services"/>)
- Platform services provided by plugins (<DocLink id="kibPlatformIntro" section="platform-plugins" text="Platform plugins"/>)
- Shared services provided by plugins, that are only relevant for only a few, specific plugins (e.g. "presentation utils").
- Shared services provided by plugins, that are only relevant for only a few, specific plugins (e.g. "presentation utils").

The first two items are what make up "Platform services".

Expand All @@ -37,9 +37,9 @@ clear, and we haven't done a great job of sticking to it. For example, notificat
Today it looks something like this.

![Core vs platform plugins vs plugins](assets/platform_plugins_core.png)

<DocAccordion buttonContent="A bit of history">
When the Kibana platform and plugin infrastructure was built, we thought of two types of code: core services, and other plugin services. We planned to keep the most stable and fundamental
When the Kibana platform and plugin infrastructure was built, we thought of two types of code: core services, and other plugin services. We planned to keep the most stable and fundamental
code needed to build plugins inside core.

In reality, we ended up with many platform-like services living outside of core, with no (short term) intention of moving them. We highly encourage plugin developers to use
Expand All @@ -54,7 +54,7 @@ In reality, our plugin model ended up being used like micro-services. Plugins ar
they desire, without the need to build a plugin.

Another side effect of having many small plugins is that common code often ends up extracted into another plugin. Use case specific utilities are exported,
that are not meant to be used in a general manner. This makes our definition of "platform code" a bit trickier to define. We'd like to say "The platform is made up of
that are not meant to be used in a general manner. This makes our definition of "platform code" a bit trickier to define. We'd like to say "The platform is made up of
every publically exposed service", but in today's world, that wouldn't be a very accurate picture.

We recognize the need to better clarify the relationship between core functionality, platform-like plugin functionality, and functionality exposed by other plugins.
Expand All @@ -69,19 +69,19 @@ We will continue to focus on adding clarity around these types of services and w
### Core services

Sometimes referred to just as Core, Core services provide the most basic and fundamental tools neccessary for building a plugin, like creating saved objects,
routing, application registration, and notifications. The Core platform is not a plugin itself, although
routing, application registration, notifications and <DocLink id="kibCoreLogging" text="logging"/>. The Core platform is not a plugin itself, although
there are some plugins that provide platform functionality. We call these <DocLink id="kibPlatformIntro" section="platform-plugins" text="Platform plugins"/>.

### Platform plugins

Plugins that provide fundamental services and functionality to extend and customize Kibana, for example, the
Plugins that provide fundamental services and functionality to extend and customize Kibana, for example, the
<DocLink id="kibDataPlugin" text="data"/> plugin. There is no official way to tell if a plugin is a platform plugin or not.
Platform plugins are _usually_ plugins that are managed by the Platform Group, but we are starting to see some exceptions.

## Plugins

Plugins are code that is written to extend and customize Kibana. Plugin's don't have to be part of the Kibana repo, though the Kibana
repo does contain many plugins! Plugins add customizations by
Plugins are code that is written to extend and customize Kibana. Plugin's don't have to be part of the Kibana repo, though the Kibana
repo does contain many plugins! Plugins add customizations by
using <DocLink id="kibPlatformIntro" section="extension-points" text="extension points"/> provided by <DocLink id="kibPlatformIntro" section="platform-services" text="platform services"/>.
Sometimes people confuse the term "plugin" and "application". While often there is a 1:1 relationship between a plugin and an application, it is not always the case.
A plugin may register many applications, or none.
Expand All @@ -97,7 +97,7 @@ adding it to core's application <DocLink id="kibPlatformIntro" section="registry

### Public plugin API

A plugin's public API consists of everything exported from a plugin's <DocLink id="kibPlatformIntro" section="plugin-lifecycle" text="start or setup lifecycle methods"/>,
A plugin's public API consists of everything exported from a plugin's <DocLink id="kibPlatformIntro" section="plugin-lifecycle" text="start or setup lifecycle methods"/>,
as well as from the top level `index.ts` files that exist in the three "scope" folders:

- common/index.ts
Expand All @@ -113,18 +113,18 @@ Core, and plugins, expose different features at different parts of their lifecyc
specifically-named functions on the service definition.

Kibana has three lifecycles: setup, start, and stop. Each plugin’s setup function is called sequentially while Kibana is setting up
on the server or when it is being loaded in the browser. The start functions are called sequentially after setup has been completed for all plugins.
on the server or when it is being loaded in the browser. The start functions are called sequentially after setup has been completed for all plugins.
The stop functions are called sequentially while Kibana is gracefully shutting down the server or when the browser tab or window is being closed.

The table below explains how each lifecycle relates to the state of Kibana.

| lifecycle | purpose | server | browser |
| ---------- | ------ | ------- | ----- |
| setup | perform "registration" work to setup environment for runtime |configure REST API endpoint, register saved object types, etc. | configure application routes in SPA, register custom UI elements in extension points, etc. |
| start | bootstrap runtime logic | respond to an incoming request, request Elasticsearch server, etc. | start polling Kibana server, update DOM tree in response to user interactions, etc.|
| start | bootstrap runtime logic | respond to an incoming request, request Elasticsearch server, etc. | start polling Kibana server, update DOM tree in response to user interactions, etc.|
| stop | cleanup runtime | dispose of active handles before the server shutdown. | store session data in the LocalStorage when the user navigates away from Kibana, etc. |

Different service interfaces can and will be passed to setup, start, and stop because certain functionality makes sense in the context of a running plugin while other types
Different service interfaces can and will be passed to setup, start, and stop because certain functionality makes sense in the context of a running plugin while other types
of functionality may have restrictions or may only make sense in the context of a plugin that is stopping.

## Extension points
Expand All @@ -141,4 +141,4 @@ plugins to customize the Kibana experience. Examples of extension points are:

## Follow up material

Learn how to build your own plugin by following <DocLink id="kibDevTutorialBuildAPlugin" />
Learn how to build your own plugin by following <DocLink id="kibDevTutorialBuildAPlugin" />
2 changes: 2 additions & 0 deletions docs/api/actions-and-connectors/create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Creates an action.
`secrets`::
(Required, object) The secrets configuration for the action. Secrets configuration properties vary
depending on the action type. For information about the secrets configuration properties, refer to <<action-types,Action and connector types>>.
+
WARNING: Remember these values. You must provide them each time you call the <<actions-and-connectors-api-update, update>> API.

[[actions-and-connectors-api-create-request-codes]]
==== Response code
Expand Down
8 changes: 7 additions & 1 deletion docs/api/alerts/create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ Create {kib} alerts.
[[alerts-api-create-request]]
==== Request

`POST <kibana host>:<port>/api/alerts/alert`
`POST <kibana host>:<port>/api/alerts/alert/<id>`

[[alerts-api-create-path-params]]
==== Path parameters

`<id>`::
(Optional, string) Specifies a UUID v1 or v4 to use instead of a randomly generated ID.

[[alerts-api-create-request-body]]
==== Request body
Expand Down
8 changes: 5 additions & 3 deletions docs/api/alerts/find.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

Retrieve a paginated set of alerts based on condition.

NOTE: As alerts change in {kib}, the results on each page of the response also
change. Use the find API for traditional paginated results, but avoid using it to export large amounts of data.

[[alerts-api-find-request]]
==== Request

Expand All @@ -14,6 +17,8 @@ Retrieve a paginated set of alerts based on condition.
[[alerts-api-find-query-params]]
==== Query Parameters

NOTE: Alert `params` are stored as a {ref}/flattened.html[flattened field type] and analyzed as keywords.

`per_page`::
(Optional, number) The number of alerts to return per page.

Expand Down Expand Up @@ -46,9 +51,6 @@ Retrieve a paginated set of alerts based on condition.
It should look like savedObjectType.attributes.title: "myTitle". However, If you used a direct attribute of a saved object, such as `updatedAt`,
you will have to define your filter, for example, savedObjectType.updatedAt > 2018-12-22.

NOTE: As alerts change in {kib}, the results on each page of the response also
change. Use the find API for traditional paginated results, but avoid using it to export large amounts of data.

[[alerts-api-find-request-codes]]
==== Response code

Expand Down
2 changes: 2 additions & 0 deletions docs/dev-tools/console/console.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ curl -XGET "http://localhost:9200/_search" -d'
When you paste the command into Console, {kib} automatically converts it
to Console syntax. Alternatively, if you want to see Console syntax in cURL,
click the action icon (image:dev-tools/console/images/wrench.png[]) and select *Copy as cURL*.
Once copied, the username and password will need to be provided
for the calls to work from external environments.

[float]
[[console-autocomplete]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## AppLeaveHandler type

> Warning: This API is now obsolete.
>
> [AppMountParameters.onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md) has been deprecated in favor of [ScopedHistory.block](./kibana-plugin-core-public.scopedhistory.block.md)
>
A handler that will be executed before leaving the application, either when going to another application or when closing the browser tab or manually changing the url. Should return `confirm` to to prompt a message to the user before leaving the page, or `default` to keep the default behavior (doing nothing).

See [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) for detailed usage examples.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## AppMountParameters.onAppLeave property

> Warning: This API is now obsolete.
>
> [ScopedHistory.block](./kibana-plugin-core-public.scopedhistory.block.md) should be used instead.
>
A function that can be used to register a handler that will be called when the user is leaving the current application, allowing to prompt a confirmation message before actually changing the page.

This will be called either when the user goes to another application, or when trying to close the tab or manually changing the url.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@

## ScopedHistory.block property

Not supported. Use [AppMountParameters.onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md)<!-- -->.
Add a block prompt requesting user confirmation when navigating away from the current page.

<b>Signature:</b>

```typescript
block: (prompt?: string | boolean | History.TransitionPromptHook<HistoryLocationState> | undefined) => UnregisterCallback;
```

## Remarks

We prefer that applications use the `onAppLeave` API because it supports a more graceful experience that prefers a modal when possible, falling back to a confirm dialog box in the beforeunload case.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export declare class ScopedHistory<HistoryLocationState = unknown> implements Hi
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [action](./kibana-plugin-core-public.scopedhistory.action.md) | | <code>Action</code> | The last action dispatched on the history stack. |
| [block](./kibana-plugin-core-public.scopedhistory.block.md) | | <code>(prompt?: string &#124; boolean &#124; History.TransitionPromptHook&lt;HistoryLocationState&gt; &#124; undefined) =&gt; UnregisterCallback</code> | Not supported. Use [AppMountParameters.onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md)<!-- -->. |
| [block](./kibana-plugin-core-public.scopedhistory.block.md) | | <code>(prompt?: string &#124; boolean &#124; History.TransitionPromptHook&lt;HistoryLocationState&gt; &#124; undefined) =&gt; UnregisterCallback</code> | Add a block prompt requesting user confirmation when navigating away from the current page. |
| [createHref](./kibana-plugin-core-public.scopedhistory.createhref.md) | | <code>(location: LocationDescriptorObject&lt;HistoryLocationState&gt;, { prependBasePath }?: {</code><br/><code> prependBasePath?: boolean &#124; undefined;</code><br/><code> }) =&gt; Href</code> | Creates an href (string) to the location. If <code>prependBasePath</code> is true (default), it will prepend the location's path with the scoped history basePath. |
| [createSubHistory](./kibana-plugin-core-public.scopedhistory.createsubhistory.md) | | <code>&lt;SubHistoryLocationState = unknown&gt;(basePath: string) =&gt; ScopedHistory&lt;SubHistoryLocationState&gt;</code> | Creates a <code>ScopedHistory</code> for a subpath of this <code>ScopedHistory</code>. Useful for applications that may have sub-apps that do not need access to the containing application's history. |
| [go](./kibana-plugin-core-public.scopedhistory.go.md) | | <code>(n: number) =&gt; void</code> | Send the user forward or backwards in the history stack. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
iconType?: string;
iconType?: EuiIconProps['type'];
```
Loading

0 comments on commit 26bdc8d

Please sign in to comment.