Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into saved_objects…
Browse files Browse the repository at this point in the history
…/export_import_hidden_types
  • Loading branch information
Bamieh committed Feb 9, 2021
2 parents 96d7096 + a62a229 commit 497b322
Show file tree
Hide file tree
Showing 216 changed files with 4,838 additions and 2,010 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import %workspace%/.bazelrc.common

# BuildBuddy
## Metadata settings
build --workspace_status_command=$(pwd)/src/dev/bazel_workspace_status.sh
build --workspace_status_command="node ./src/dev/bazel_workspace_status.js"
# Enable this in case you want to share your build info
# build --build_metadata=VISIBILITY=PUBLIC
build --build_metadata=TEST_GROUPS=//packages
Expand Down
1 change: 0 additions & 1 deletion .ci/packer_cache_for_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ source src/dev/ci_setup/setup.sh;

# download es snapshots
node scripts/es snapshot --download-only;
node scripts/es snapshot --license=oss --download-only;

# download reporting browsers
(cd "x-pack" && node ../node_modules/.bin/gulp downloadChromium);
Expand Down
37 changes: 18 additions & 19 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
/src/plugins/dashboard/ @elastic/kibana-presentation
/src/plugins/input_control_vis/ @elastic/kibana-presentation
/src/plugins/vis_type_markdown/ @elastic/kibana-presentation
/test/functional/apps/dashboard/ @elastic/kibana-presentation
/x-pack/plugins/canvas/ @elastic/kibana-presentation
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-presentation
/x-pack/test/functional/apps/canvas/ @elastic/kibana-presentation
Expand Down Expand Up @@ -149,6 +150,7 @@
/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
Expand Down Expand Up @@ -244,7 +246,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 @@ -312,25 +313,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 @@ -362,3 +360,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 [email protected]

- name: Backport PR
run: |
git config --global user.name "kibanamachine"
git config --global user.email "[email protected]"
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 }}
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) |

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
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class CiStatsReporter {
},
});

return;
return true;
} catch (error) {
if (!error?.request) {
// not an axios error, must be a usage error that we should notify user about
Expand Down
14 changes: 11 additions & 3 deletions packages/kbn-dev-utils/src/ci_stats_reporter/ship_ci_stats_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Path from 'path';
import Fs from 'fs';

import { CiStatsReporter } from './ci_stats_reporter';
import { run, createFlagError } from '../run';
import { run, createFlagError, createFailError } from '../run';

export function shipCiStatsCli() {
run(
Expand All @@ -23,12 +23,20 @@ export function shipCiStatsCli() {
}

const reporter = CiStatsReporter.fromEnv(log);

if (!reporter.isEnabled()) {
throw createFailError('unable to initilize the CI Stats reporter');
}

for (const path of metricPaths) {
// resolve path from CLI relative to CWD
const abs = Path.resolve(path);
const json = Fs.readFileSync(abs, 'utf8');
await reporter.metrics(JSON.parse(json));
log.success('shipped metrics from', path);
if (await reporter.metrics(JSON.parse(json))) {
log.success('shipped metrics from', path);
} else {
throw createFailError('failed to ship metrics');
}
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export const schema = Joi.object()

esTestCluster: Joi.object()
.keys({
license: Joi.string().default('oss'),
license: Joi.string().default('basic'),
from: Joi.string().default('snapshot'),
serverArgs: Joi.array(),
serverEnvVars: Joi.object(),
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-test/src/legacy_es/legacy_es_test_cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function createLegacyEsTestCluster(options = {}) {
const {
port = esTestConfig.getPort(),
password = 'changeme',
license = 'oss',
license = 'basic',
log,
basePath = resolve(KIBANA_ROOT, '.es'),
esFrom = esTestConfig.getBuildFrom(),
Expand Down
2 changes: 1 addition & 1 deletion renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
groupName: 'vega related modules',
packageNames: ['vega', 'vega-lite', 'vega-schema-url-parser', 'vega-tooltip'],
reviewers: ['team:kibana-app'],
labels: ['Feature:Lens', 'Team:KibanaApp'],
labels: ['Feature:Vega', 'Team:KibanaApp'],
enabled: true,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('migration v2', () => {
adjustTimeout: (t: number) => jest.setTimeout(t),
settings: {
es: {
license: oss ? 'oss' : 'trial',
license: 'trial',
dataArchive,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe.skip('migration from 7.7.2-xpack with 100k objects', () => {
adjustTimeout: (t: number) => jest.setTimeout(600000),
settings: {
es: {
license: oss ? 'oss' : 'trial',
license: 'trial',
dataArchive,
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/core/test_helpers/kbn_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export function createTestServers({
adjustTimeout: (timeout: number) => void;
settings?: {
es?: {
license: 'oss' | 'basic' | 'gold' | 'trial';
license: 'basic' | 'gold' | 'trial';
[key: string]: any;
};
kbn?: {
Expand All @@ -208,7 +208,7 @@ export function createTestServers({
if (!adjustTimeout) {
throw new Error('adjustTimeout is required in order to avoid flaky tests');
}
const license = get(settings, 'es.license', 'oss');
const license = get(settings, 'es.license', 'basic');
const usersToBeAdded = get(settings, 'users', []);
if (usersToBeAdded.length > 0) {
if (license !== 'trial') {
Expand Down
Loading

0 comments on commit 497b322

Please sign in to comment.