Skip to content

Commit

Permalink
Merge branch 'master' into Add_A11y_Tests_To_Upgrade_Assistant
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 8, 2021
2 parents e520215 + 7a2b755 commit 63a0022
Show file tree
Hide file tree
Showing 178 changed files with 4,273 additions and 2,098 deletions.
42 changes: 23 additions & 19 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,14 @@
/src/cli/keystore/ @elastic/kibana-operations
/src/legacy/server/warnings/ @elastic/kibana-operations
/.ci/es-snapshots/ @elastic/kibana-operations
/.github/workflows/ @elastic/kibana-operations
/vars/ @elastic/kibana-operations
/.bazelignore @elastic/kibana-operations
/.bazeliskversion @elastic/kibana-operations
/.bazelrc @elastic/kibana-operations
/.bazelrc.common @elastic/kibana-operations
/.bazelversion @elastic/kibana-operations
/WORKSPACE.bazel @elastic/kibana-operations
#CC# /packages/kbn-expect/ @elastic/kibana-operations

# Quality Assurance
Expand Down Expand Up @@ -238,7 +245,6 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
/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
#CC# /x-pack/plugins/security_solution/ @elastic/kibana-security
#CC# /x-pack/plugins/security/ @elastic/kibana-security

# Kibana Alerting Services
Expand Down Expand Up @@ -306,25 +312,22 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
#CC# /x-pack/plugins/console_extensions/ @elastic/es-ui
#CC# /x-pack/plugins/cross_cluster_replication/ @elastic/es-ui

# Endpoint
/x-pack/plugins/endpoint/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/endpoint_api_integration_no_ingest/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/security_solution_endpoint/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/functional/es_archives/endpoint/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/plugin_functional/plugins/resolver_test/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/plugin_functional/test_suites/resolver/ @elastic/endpoint-app-team @elastic/siem
#CC# /x-pack/legacy/plugins/siem/ @elastic/siem
#CC# /x-pack/plugins/siem/ @elastic/siem
#CC# /x-pack/plugins/security_solution/ @elastic/siem

# Security Solution
/x-pack/plugins/security_solution/ @elastic/siem @elastic/endpoint-app-team
/x-pack/test/detection_engine_api_integration @elastic/siem @elastic/endpoint-app-team
/x-pack/test/lists_api_integration @elastic/siem @elastic/endpoint-app-team
/x-pack/test/api_integration/apis/security_solution @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/case @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/lists @elastic/siem @elastic/endpoint-app-team
#CC# /x-pack/plugins/security_solution/ @elastic/siem
/x-pack/test/endpoint_api_integration_no_ingest/ @elastic/security-solution
/x-pack/test/security_solution_endpoint/ @elastic/security-solution
/x-pack/test/functional/es_archives/endpoint/ @elastic/security-solution
/x-pack/test/plugin_functional/plugins/resolver_test/ @elastic/security-solution
/x-pack/test/plugin_functional/test_suites/resolver/ @elastic/security-solution
/x-pack/plugins/security_solution/ @elastic/security-solution
/x-pack/test/detection_engine_api_integration @elastic/security-solution
/x-pack/test/lists_api_integration @elastic/security-solution
/x-pack/test/api_integration/apis/security_solution @elastic/security-solution
#CC# /x-pack/plugins/security_solution/ @elastic/security-solution

# Security Solution sub teams
/x-pack/plugins/case @elastic/security-threat-hunting
/x-pack/test/case_api_integration @elastic/security-threat-hunting
/x-pack/plugins/lists @elastic/security-detections-response

# Security Intelligence And Analytics
/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics
Expand Down Expand Up @@ -356,3 +359,4 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
# Reporting
#CC# /x-pack/plugins/reporting/ @elastic/kibana-reporting-services


46 changes: 46 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
pull_request_target:
branches:
- master
types:
- labeled
- closed

jobs:
backport:
name: Backport PR
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'auto-backport')
runs-on: ubuntu-latest

steps:
- name: 'Get backport config'
run: |
curl 'https://raw.githubusercontent.com/elastic/kibana/master/.backportrc.json' > .backportrc.json
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install backport CLI
run: npm install -g backport@5.6.4

- name: Backport PR
run: |
git config --global user.name "kibanamachine"
git config --global user.email "42973632+kibanamachine@users.noreply.github.com"
backport --fork true --username kibanamachine --accessToken "${{ secrets.KIBANAMACHINE_TOKEN }}" --ci --pr "$PR_NUMBER" --labels backport --assignee "$PR_OWNER" | tee 'output.log'
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_OWNER: ${{ github.event.pull_request.user.login }}

- name: Report backport status
run: |
COMMENT="Backport result
\`\`\`
$(cat output.log)
\`\`\`"
GITHUB_TOKEN="${{ secrets.KIBANAMACHINE_TOKEN }}" gh api -X POST repos/elastic/kibana/issues/$PR_NUMBER/comments -F body="$COMMENT"
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
6 changes: 0 additions & 6 deletions docs/developer/contributing/development-ci-metrics.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,9 @@ All metrics are collected from the `tar.gz` archive produced for the linux platf
[[ci-metric-distributable-file-count]] `distributable file count` ::
The number of files included in the default distributable.

[[ci-metric-oss-distributable-file-count]] `oss distributable file count` ::
The number of files included in the OSS distributable.

[[ci-metric-distributable-size]] `distributable size` ::
The size, in bytes, of the default distributable. _(not reported on PRs)_

[[ci-metric-oss-distributable-size]] `oss distributable size` ::
The size, in bytes, of the OSS distributable. _(not reported on PRs)_


[[ci-metric-types-saved-object-field-counts]]
==== Saved Object field counts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ You can use the <<automatic-plugin-generator>> to get a basic structure for a ne
{kib} repo should be developed inside the `plugins` folder. If you are building a new plugin to check in to the {kib} repo,
you will choose between a few locations:

- {kib-repo}tree/{branch}/x-pack/plugins[x-pack/plugins] for commercially licensed plugins
- {kib-repo}tree/{branch}/src/plugins[src/plugins] for open source licensed plugins
- {kib-repo}tree/{branch}/x-pack/plugins[x-pack/plugins] for plugins related to subscription features
- {kib-repo}tree/{branch}/src/plugins[src/plugins] for plugins related to free features
- {kib-repo}tree/{branch}/examples[examples] for developer example plugins (these will not be included in the distributables)

[discrete]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@

## EmbeddableStateTransfer.clearEditorState() method

Clears the [editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) from the sessionStorage for the provided app id

<b>Signature:</b>

```typescript
clearEditorState(): void;
clearEditorState(appId: string): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| appId | <code>string</code> | The app to fetch incomingEditorState for |

<b>Returns:</b>

`void`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@

## EmbeddableStateTransfer.getIncomingEditorState() method

Fetches an [originating app](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) argument from the sessionStorage
Fetches an [editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) from the sessionStorage for the provided app id

<b>Signature:</b>

```typescript
getIncomingEditorState(removeAfterFetch?: boolean): EmbeddableEditorState | undefined;
getIncomingEditorState(appId: string, removeAfterFetch?: boolean): EmbeddableEditorState | undefined;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| appId | <code>string</code> | The app to fetch incomingEditorState for |
| removeAfterFetch | <code>boolean</code> | Whether to remove the package state after fetch to prevent duplicates. |

<b>Returns:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@

## EmbeddableStateTransfer.getIncomingEmbeddablePackage() method

Fetches an [embeddable package](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) argument from the sessionStorage
Fetches an [embeddable package](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) from the sessionStorage for the given AppId

<b>Signature:</b>

```typescript
getIncomingEmbeddablePackage(removeAfterFetch?: boolean): EmbeddablePackageState | undefined;
getIncomingEmbeddablePackage(appId: string, removeAfterFetch?: boolean): EmbeddablePackageState | undefined;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| appId | <code>string</code> | The app to fetch EmbeddablePackageState for |
| removeAfterFetch | <code>boolean</code> | Whether to remove the package state after fetch to prevent duplicates. |

<b>Returns:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export declare class EmbeddableStateTransfer

| Method | Modifiers | Description |
| --- | --- | --- |
| [clearEditorState()](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.cleareditorstate.md) | | |
| [getIncomingEditorState(removeAfterFetch)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingeditorstate.md) | | Fetches an [originating app](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) argument from the sessionStorage |
| [getIncomingEmbeddablePackage(removeAfterFetch)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingembeddablepackage.md) | | Fetches an [embeddable package](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) argument from the sessionStorage |
| [clearEditorState(appId)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.cleareditorstate.md) | | Clears the [editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) from the sessionStorage for the provided app id |
| [getIncomingEditorState(appId, removeAfterFetch)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingeditorstate.md) | | Fetches an [editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) from the sessionStorage for the provided app id |
| [getIncomingEmbeddablePackage(appId, removeAfterFetch)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingembeddablepackage.md) | | Fetches an [embeddable package](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) from the sessionStorage for the given AppId |
| [navigateToEditor(appId, options)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetoeditor.md) | | A wrapper around the method which navigates to the specified appId with [embeddable editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) |
| [navigateToWithEmbeddablePackage(appId, options)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetowithembeddablepackage.md) | | A wrapper around the method which navigates to the specified appId with [embeddable package state](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) |

67 changes: 7 additions & 60 deletions docs/user/alerting/geo-alert-types.asciidoc
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
[role="xpack"]
[[geo-alert-types]]
== Geo alert types
[[geo-alerting]]
== Geo alerting

Two additional stack alerts are available:
<<alert-type-tracking-threshold>> and <<alert-type-tracking-containment>>.
Alerting now includes one additional stack alert: <<alert-type-tracking-containment>>.

As with other stack alerts, you need `all` access to the *Stack Alerts* feature
to be able to create and edit either of the geo alerts.
to be able to create and edit a geo alert.
See <<kibana-feature-privileges, feature privileges>> for more information on configuring roles that provide access to this feature.

[float]
=== Geo alert requirements

To create either a *Tracking threshold* or a *Tracking containment* alert, the
following requirements must be present:
=== Geo alerting requirements
To create a *Tracking containment* alert, the following requirements must be present:

- *Tracks index or index pattern*: An index containing a `geo_point` field, `date` field,
and some form of entity identifier. An entity identifier is a `keyword` or `number`
Expand All @@ -33,62 +30,12 @@ than the current time minus the amount of the interval. If data older than

[float]
=== Creating a geo alert
Both *threshold* and *containment* alerts can be created by clicking the *Create*
button in the <<alert-management, alert management UI>>.
Click the *Create* button in the <<alert-management, alert management UI>>.
Complete the <<defining-alerts-general-details, general alert details>>.
Select <<alert-type-tracking-threshold>> to generate an alert when an entity crosses a boundary, and you desire the
ability to highlight lines of crossing on a custom map.
Select
<<alert-type-tracking-containment>> if an entity should send out constant alerts
while contained within a boundary (this feature is optional) or if the alert is generally
just more focused around activity when an entity exists within a shape.

[role="screenshot"]
image::images/alert-types-tracking-select.png[Choosing a tracking alert type]

[NOTE]
==================================================
With recent advances in the alerting framework, most of the features
available in Tracking threshold alerts can be replicated with just
a little more work in Tracking containment alerts. The capabilities of Tracking
threshold alerts may be deprecated or folded into Tracking containment alerts
in the future.
==================================================

[float]
[[alert-type-tracking-threshold]]
=== Tracking threshold
The Tracking threshold alert type runs an {es} query over indices, comparing the latest
entity locations with their previous locations. In the event that an entity has crossed a
boundary from the selected boundary index, an alert may be generated.

[float]
==== Defining the conditions
Tracking threshold has a *Delayed evaluation offset* and 4 clauses that define the
condition to detect, as well as 2 Kuery bars used to provide additional filtering
context for each of the indices.

[role="screenshot"]
image::images/alert-types-tracking-threshold-conditions.png[Five clauses define the condition to detect]


Delayed evaluation offset:: If a data source lags or is intermittent, you may supply
an optional value to evaluate alert conditions following a fixed delay. For instance, if data
is consistently indexed 5-10 minutes following its original timestamp, a *Delayed evaluation
offset* of `10 minutes` would ensure that alertable instances are still captured.
Index (entity):: This clause requires an *index or index pattern*, a *time field* that will be used for the *time window*, and a *`geo_point` field* for tracking.
By:: This clause specifies the field to use in the previously provided
*index or index pattern* for tracking Entities. An entity is a `keyword`
or `number` field that consistently identifies the entity to be tracked.
When entity:: This clause specifies which crossing option to track. The values
*Entered*, *Exited*, and *Crossed* can be selected to indicate which crossing conditions
should trigger an alert. *Entered* alerts on entry into a boundary, *Exited* alerts on exit
from a boundary, and *Crossed* alerts on all boundary crossings whether they be entrances
or exits.
Index (Boundary):: This clause requires an *index or index pattern*, a *`geo_shape` field*
identifying boundaries, and an optional *Human-readable boundary name* for better alerting
messages.

[float]
[[alert-type-tracking-containment]]
=== Tracking containment
Expand Down
Binary file modified docs/user/alerting/images/alert-types-tracking-select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 10 additions & 11 deletions docs/user/dashboard/dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,17 @@ image::dashboard/images/dashboard-filters.png[Labeled interface with semi-struct
Semi-structured search::
Combine free text search with field-based search using the <<kuery-query,{kib} Query Language>>.
Type a search term to match across all fields, or begin typing a field name to
get prompted with field names and operators you can use to build a structured query.
+
get prompted with field names and operators you can use to build a structured query.
For example, in the sample web logs data, this query displays data only for the US:

. Enter `g`, and then select *geo.source*.
. Select *equals some value* and *US*, and then click *Update*.
. Enter `g`, then select *geo.source*.
. Select *equals some value* and *US*, then click *Update*.
. For a more complex search, try:

`geo.src : "US" and url.keyword : "https://www.elastic.co/downloads/beats/metricbeat"`
[source,text]
-------------------
geo.src : "US" and url.keyword : "https://www.elastic.co/downloads/beats/metricbeat"
-------------------

Time filter::
Dashboards have a global time filter that restricts the data that displays, but individual panels can
Expand All @@ -152,21 +154,18 @@ Time filter::
. Open the panel menu, then select *More > Customize time range*.

. On the *Customize panel time range* window, specify the new time range, then click *Add to panel*.

[role="screenshot"]
image:images/time_range_per_panel.gif[Time range per dashboard panel]

Additional filters with AND::
You can add filters to a dashboard, or pin filters to multiple places in {kib}. To add filters, using a basic editor or an advanced JSON editor for the {es} {ref}/query-dsl.html[query DSL].

Add filters to a dashboard, or pin filters to multiple places in {kib}. To add filters, using a basic editor or an advanced JSON editor for the {es} {ref}/query-dsl.html[query DSL].
When you use more than one index pattern on a dashboard, the filter editor allows you to filter only one dashboard.

To dynamically add filters, click a series on a dashboard. For example, to filter the dashboard to display only ios data:

. Click *Add filter*.
. Set *Field* to *machine.os*, *Operator* to *is*, and *Value* to *ios*.
. *Save* the filter.
. To remove the filter, click *x* next to the filter.
. To remove the filter, click *x*.

[float]
[[clone-panels]]
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@
"@types/webpack": "^4.41.3",
"@types/webpack-env": "^1.15.3",
"@types/webpack-merge": "^4.1.5",
"@types/webpack-sources": "^0.1.4",
"@types/write-pkg": "^3.1.0",
"@types/xml-crypto": "^1.4.1",
"@types/xml2js": "^0.4.5",
Expand Down Expand Up @@ -714,7 +715,6 @@
"leaflet": "1.5.1",
"leaflet-draw": "0.4.14",
"leaflet-responsive-popup": "0.6.4",
"leaflet-vega": "^0.8.6",
"leaflet.heat": "0.2.0",
"less": "npm:@elastic/less@2.7.3-kibana",
"license-checker": "^16.0.0",
Expand Down Expand Up @@ -833,6 +833,7 @@
"val-loader": "^1.1.1",
"vega": "^5.19.1",
"vega-lite": "^4.17.0",
"vega-spec-injector": "^0.0.2",
"vega-schema-url-parser": "^2.1.0",
"vega-tooltip": "^0.25.0",
"venn.js": "0.2.20",
Expand All @@ -843,6 +844,7 @@
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2",
"webpack-sources": "^1.4.1",
"write-pkg": "^4.0.0",
"xml-crypto": "^2.0.0",
"xmlbuilder": "13.0.2",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-dev-utils/src/ci_stats_reporter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
*/

export * from './ci_stats_reporter';
export * from './ship_ci_stats_cli';
Loading

0 comments on commit 63a0022

Please sign in to comment.