Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into issue-move-autocomp…
Browse files Browse the repository at this point in the history
…lete-to-unified-search
  • Loading branch information
nlatipov committed Apr 21, 2022
2 parents bc59a0f + 1303044 commit 68ab513
Show file tree
Hide file tree
Showing 1,300 changed files with 5,028 additions and 2,100 deletions.
1 change: 0 additions & 1 deletion .buildkite/pipelines/es_snapshots/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ steps:
queue: kibana-default
depends_on:
- default-cigroup
- default-cigroup-docker
- oss-cigroup
- jest-integration
- api-integration
Expand Down
1 change: 1 addition & 0 deletions .buildkite/scripts/steps/artifacts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ download "kibana-$FULL_VERSION-x86_64.rpm"
download "kibana-$FULL_VERSION-aarch64.rpm"

download "kibana-$FULL_VERSION-docker-build-context.tar.gz"
download "kibana-cloud-$FULL_VERSION-docker-build-context.tar.gz"
download "kibana-ironbank-$FULL_VERSION-docker-build-context.tar.gz"
download "kibana-ubi8-$FULL_VERSION-docker-build-context.tar.gz"

Expand Down
4 changes: 2 additions & 2 deletions .buildkite/scripts/steps/functional/uptime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ echo "--- Uptime @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Uptime @elastic/synthetics Tests" \
node plugins/uptime/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
checks-reporter-with-killswitch "uptime plugin @elastic/synthetics Tests" \
node plugins/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
54 changes: 29 additions & 25 deletions docs/concepts/data-views.asciidoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[[data-views]]
=== Create a data view
=== Create a {data-source}

{kib} requires a data view to access the {es} data that you want to explore.
A data view selects the data to use and allows you to define properties of the fields.
{kib} requires a {data-source} to access the {es} data that you want to explore.
A {data-source} selects the data to use and allows you to define properties of the fields.

A data view can point to one or more indices, {ref}/data-streams.html[data stream], or {ref}/alias.html[index aliases].
For example, a data view can point to your log data from yesterday,
A {data-source} can point to one or more indices, {ref}/data-streams.html[data streams], or {ref}/alias.html[index aliases].
For example, a {data-source} can point to your log data from yesterday,
or all indices that contain your data.

[float]
Expand All @@ -15,12 +15,12 @@ or all indices that contain your data.
* Access to *Data Views* requires the <<kibana-role-management, {kib} privilege>>
`Data View Management`.

* To create a data view, you must have the <<kibana-role-management,{es} privilege>>
* To create a {data-source}, you must have the <<kibana-role-management,{es} privilege>>
`view_index_metadata`.

* If a read-only indicator appears in {kib}, you have insufficient privileges
to create or save data views. The buttons to create new data views or
save existing data views are not visible. For more information,
to create or save {data-sources}. The buttons to create {data-sources} or
save existing {data-sources} are not visible. For more information,
refer to <<xpack-security-authorization,Granting access to {kib}>>.

[float]
Expand All @@ -29,12 +29,12 @@ refer to <<xpack-security-authorization,Granting access to {kib}>>.

If you collected data using one of the {kib} <<connect-to-elasticsearch,ingest options>>,
uploaded a file, or added sample data,
you get a data view for free, and can start exploring your data.
If you loaded your own data, follow these steps to create a data view.
you get a {data-source} for free, and can start exploring your data.
If you loaded your own data, follow these steps to create a {data-source}.

. Open the main menu, then click *Stack Management > Data Views*.

. Click *Create data view*.
. Click *Create {data-source}*.

. Start typing in the *name* field, and {kib} looks for the names of
indices, data streams, and aliases that match your input.
Expand All @@ -61,21 +61,25 @@ global time filters on your dashboards. This is useful if
you have multiple time fields and want to create dashboards that combine visualizations
based on different timestamps.

. Click *Create data view*.
. To display all indices, click *Show advanced settings*, then select *Allow hidden and system indices*.

. To specify your own {data-source} name, click *Show advanced settings*, then enter the name in the *Custom {data-source} ID* field. For example, enter your {es} index alias name.

. Click *Create {data-source}*.
+
[[reload-fields]] {kib} is now configured to use your {es} data. When a new field is added to an index,
the data view field list is updated
the next time the data view is loaded, for example, when you load the page or
the {data-source} field list is updated
the next time the {data-source} is loaded, for example, when you load the page or
move between {kib} apps.

. Select this data view when you search and visualize your data.
. Select this {data-source} when you search and visualize your data.

[float]
[[rollup-data-view]]
==== Create a data view for rolled up data

A data view can match one rollup index. For a combination rollup
data view with both raw and rolled up data, use the standard notation:
A {data-source} can match one rollup index. For a combination rollup
{data-source} with both raw and rolled up data, use the standard notation:

```ts
rollup_logstash,kibana_sample_data_logs
Expand Down Expand Up @@ -130,20 +134,20 @@ To exclude a cluster having a name starting with `cluster_`:
`cluster_*:logstash-*,cluster_one:-*`
```

Once you configure a data view to use the {ccs} syntax, all searches and
aggregations using that data view in {kib} take advantage of {ccs}.
Once you configure a {data-source} to use the {ccs} syntax, all searches and
aggregations using that {data-source} in {kib} take advantage of {ccs}.

[float]
[[delete-data-view]]
=== Delete data views
=== Delete {data-sources}

When you delete a data view, you cannot recover the associated field formatters, runtime fields, source filters,
and field popularity data. Deleting a data view does not remove any indices or data documents from {es}.
When you delete a {data-source}, you cannot recover the associated field formatters, runtime fields, source filters,
and field popularity data. Deleting a {data-source} does not remove any indices or data documents from {es}.

WARNING: Deleting a data view breaks all visualizations, saved searches, and other saved objects that reference the data view.
WARNING: Deleting a {data-source} breaks all visualizations, saved searches, and other saved objects that reference the data view.

. Open the main menu, then click *Stack Management > Data Views*.

. Click the data view to delete.
. Click the {data-source} to delete.

. Delete (image:management/index-patterns/images/delete.png[Delete icon]) the data view.
. Delete (image:management/index-patterns/images/delete.png[Delete icon]) the {data-source}.
10 changes: 5 additions & 5 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,11 @@ the alertTypes by the Stack in the alerting plugin, register associated HTTP
routes, etc.
|{kib-repo}blob/{branch}/x-pack/plugins/synthetics/README.md[synthetics]
|The purpose of this plugin is to provide users of Heartbeat more visibility of what's happening
in their infrastructure.
|{kib-repo}blob/{branch}/x-pack/plugins/task_manager/README.md[taskManager]
|The task manager is a generic system for running background tasks.
Documentation: https://www.elastic.co/guide/en/kibana/master/task-manager-production-considerations.html
Expand Down Expand Up @@ -648,11 +653,6 @@ As a developer you can reuse and extend built-in alerts and actions UI functiona
|Upgrade Assistant helps users prepare their Stack for being upgraded to the next major. It will only be enabled on the last minor before the next major release. This is controlled via the config: xpack.upgrade_assistant.readonly (#101296).
|{kib-repo}blob/{branch}/x-pack/plugins/uptime/README.md[uptime]
|The purpose of this plugin is to provide users of Heartbeat more visibility of what's happening
in their infrastructure.
|{kib-repo}blob/{branch}/x-pack/plugins/drilldowns/url_drilldown/README.md[urlDrilldown]
|NOTE: This plugin contains implementation of URL drilldown. For drilldowns infrastructure code refer to ui_actions_enhanced plugin.
Expand Down
14 changes: 9 additions & 5 deletions docs/user/alerting/create-and-manage-rules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,21 @@ Actions are not required on rules. You can run a rule without actions to underst

[float]
[[controlling-rules]]
=== Mute and disable rules
=== Snooze and disable rules

The rule listing allows you to quickly mute/unmute, disable/enable, and delete individual rules by clicking menu button to open the actions menu. Muting means that the rule checks continue to run on a schedule, but that alert will not trigger any action.
The rule listing enables you to quickly snooze, disable or enable, and delete individual rules using the colored dropdown.

[role="screenshot"]
image:images/individual-mute-disable.png[The actions button allows an individual rule to be muted, disabled, or deleted]
image:images/individual-snooze-disable.png[The rule status dropdown enables you to snooze or disable an individual rule]

You can perform these operations in bulk by multi-selecting rules, and then clicking the *Manage rules* button:
When you snooze a rule, the rule checks continue to run on a schedule but the alert will not trigger any actions. You can snooze for a specified period of time or indefinitely.

[role="screenshot"]
image:images/bulk-mute-disable.png[The Manage rules button lets you mute/unmute, enable/disable, and delete in bulk,width=75%]
image:images/snooze-panel.png[The snooze panel allows you to set the length of a rule's snooze period]

When a rule is in a `snoozed` state, you can cancel or change the duration of this state. You can perform these operations in bulk by multi-selecting rules, and then clicking the *Manage rules* button.

TIP: In this context, "Mute" refers to an indefinite snooze. preview:[]

[float]
=== Rule status
Expand Down
Binary file removed docs/user/alerting/images/bulk-mute-disable.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/alerting/images/snooze-panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
"@kbn/i18n-react": "link:bazel-bin/packages/kbn-i18n-react",
"@kbn/interpreter": "link:bazel-bin/packages/kbn-interpreter",
"@kbn/io-ts-utils": "link:bazel-bin/packages/kbn-io-ts-utils",
"@kbn/kibana-json-schema": "link:bazel-bin/packages/kbn-kibana-json-schema",
"@kbn/logging": "link:bazel-bin/packages/kbn-logging",
"@kbn/logging-mocks": "link:bazel-bin/packages/kbn-logging-mocks",
"@kbn/mapbox-gl": "link:bazel-bin/packages/kbn-mapbox-gl",
Expand Down Expand Up @@ -635,6 +636,7 @@
"@types/kbn__interpreter": "link:bazel-bin/packages/kbn-interpreter/npm_module_types",
"@types/kbn__io-ts-utils": "link:bazel-bin/packages/kbn-io-ts-utils/npm_module_types",
"@types/kbn__jest-serializers": "link:bazel-bin/packages/kbn-jest-serializers/npm_module_types",
"@types/kbn__kibana-json-schema": "link:bazel-bin/packages/kbn-kibana-json-schema/npm_module_types",
"@types/kbn__logging": "link:bazel-bin/packages/kbn-logging/npm_module_types",
"@types/kbn__logging-mocks": "link:bazel-bin/packages/kbn-logging-mocks/npm_module_types",
"@types/kbn__mapbox-gl": "link:bazel-bin/packages/kbn-mapbox-gl/npm_module_types",
Expand Down Expand Up @@ -877,6 +879,7 @@
"jest-styled-components": "^7.0.3",
"jimp": "^0.14.0",
"jsdom": "13.1.0",
"json-schema-typed": "^7.0.3",
"json5": "^1.0.1",
"jsondiffpatch": "0.4.1",
"license-checker": "^16.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ filegroup(
"//packages/kbn-interpreter:build",
"//packages/kbn-io-ts-utils:build",
"//packages/kbn-jest-serializers:build",
"//packages/kbn-kibana-json-schema:build",
"//packages/kbn-logging-mocks:build",
"//packages/kbn-logging:build",
"//packages/kbn-mapbox-gl:build",
Expand Down Expand Up @@ -149,6 +150,7 @@ filegroup(
"//packages/kbn-interpreter:build_types",
"//packages/kbn-io-ts-utils:build_types",
"//packages/kbn-jest-serializers:build_types",
"//packages/kbn-kibana-json-schema:build_types",
"//packages/kbn-logging-mocks:build_types",
"//packages/kbn-logging:build_types",
"//packages/kbn-mapbox-gl:build_types",
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics/client/src/events/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export interface EventContext {
*/
userId?: string;
/**
* The user's organization ID.
* The Cloud ID.
*/
esOrgId?: string;
cloudId?: string;
/**
* The product's version.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ describe('FullStoryShipper', () => {
});
});

test('calls `setUserVars` when esOrgId is provided', () => {
fullstoryShipper.extendContext({ esOrgId: 'test-es-org-id' });
test('calls `setUserVars` when cloudId is provided', () => {
fullstoryShipper.extendContext({ cloudId: 'test-es-org-id' });
expect(fullStoryApiMock.setUserVars).toHaveBeenCalledWith({ org_id_str: 'test-es-org-id' });
});

test('merges both: version and esOrgId if both are provided', () => {
fullstoryShipper.extendContext({ version: '1.2.3', esOrgId: 'test-es-org-id' });
test('merges both: version and cloudId if both are provided', () => {
fullstoryShipper.extendContext({ version: '1.2.3', cloudId: 'test-es-org-id' });
expect(fullStoryApiMock.setUserVars).toHaveBeenCalledWith({
org_id_str: 'test-es-org-id',
version_str: '1.2.3',
Expand All @@ -84,7 +84,7 @@ describe('FullStoryShipper', () => {
const context = {
userId: 'test-user-id',
version: '1.2.3',
esOrgId: 'test-es-org-id',
cloudId: 'test-es-org-id',
foo: 'bar',
};
fullstoryShipper.extendContext(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class FullStoryShipper implements IShipper {
this.initContext.logger.debug(`Received context ${JSON.stringify(newContext)}`);

// FullStory requires different APIs for different type of contexts.
const { userId, version, esOrgId, ...nonUserContext } = newContext;
const { userId, version, cloudId, ...nonUserContext } = newContext;

// Call it only when the userId changes
if (userId && userId !== this.lastUserId) {
Expand All @@ -47,13 +47,13 @@ export class FullStoryShipper implements IShipper {
}

// User-level context
if (version || esOrgId) {
if (version || cloudId) {
this.initContext.logger.debug(
`Calling FS.setUserVars with version ${version} and esOrgId ${esOrgId}`
`Calling FS.setUserVars with version ${version} and cloudId ${cloudId}`
);
this.fullStoryApi.setUserVars({
...(version ? getParsedVersion(version) : {}),
...(esOrgId ? { org_id_str: esOrgId } : {}),
...(cloudId ? { org_id_str: cloudId } : {}),
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-babel-preset/styled_components_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
USES_STYLED_COMPONENTS: [
/packages[\/\\]kbn-ui-shared-deps-(npm|src)[\/\\]/,
/src[\/\\]plugins[\/\\](unified_search|kibana_react)[\/\\]/,
/x-pack[\/\\]plugins[\/\\](apm|beats_management|cases|fleet|infra|lists|observability|osquery|security_solution|timelines|uptime|ux)[\/\\]/,
/x-pack[\/\\]plugins[\/\\](apm|beats_management|cases|fleet|infra|lists|observability|osquery|security_solution|timelines|synthetics|ux)[\/\\]/,
/x-pack[\/\\]test[\/\\]plugin_functional[\/\\]plugins[\/\\]resolver_test[\/\\]/,
],
};
2 changes: 2 additions & 0 deletions packages/kbn-dev-utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ RUNTIME_DEPS = [
"//packages/kbn-stdio-dev-helpers",
"//packages/kbn-ci-stats-reporter",
"//packages/kbn-jest-serializers",
"//packages/kbn-kibana-json-schema",
"@npm//@babel/core",
"@npm//axios",
"@npm//chalk",
Expand Down Expand Up @@ -77,6 +78,7 @@ TYPES_DEPS = [
"//packages/kbn-stdio-dev-helpers:npm_module_types",
"//packages/kbn-ci-stats-reporter:npm_module_types",
"//packages/kbn-jest-serializers:npm_module_types",
"//packages/kbn-kibana-json-schema:npm_module_types",
"@npm//@babel/parser",
"@npm//@babel/types",
"@npm//@types/babel__core",
Expand Down
15 changes: 15 additions & 0 deletions packages/kbn-dev-utils/src/vscode_config/managed_config_keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* Side Public License, v 1.
*/

import { KibanaJsonSchema } from '@kbn/kibana-json-schema';

export interface ManagedConfigKey {
key: string;
value: string | Record<string, any> | boolean | number;
Expand Down Expand Up @@ -58,4 +60,17 @@ export const MANAGED_CONFIG_KEYS: ManagedConfigKey[] = [
key: 'typescript.tsserver.maxTsServerMemory',
value: 4096,
},
{
key: 'json.schemas',
value: [
{
fileMatch: ['kibana.json'],
url: './.vscode/kibana-json-schema.json',
},
],
},
];

export const MANAGED_CONFIG_FILES = [
{ name: 'kibana-json-schema.json', content: JSON.stringify(KibanaJsonSchema, null, 2) },
];
Loading

0 comments on commit 68ab513

Please sign in to comment.