Skip to content

Commit

Permalink
Merge branch 'master' into reporting/csv_deprecations_logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jul 1, 2021
2 parents 73ea0ad + c78c350 commit 62eb82c
Show file tree
Hide file tree
Showing 563 changed files with 13,980 additions and 6,494 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ module.exports = {
'(src|x-pack)/plugins/**/(public|server)/**/*',
'!(src|x-pack)/plugins/**/(public|server)/mocks/index.{js,mjs,ts}',
'!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,mjs,ts,tsx}',
'!(src|x-pack)/plugins/**/__stories__/index.{js,mjs,ts,tsx}',
],
allowSameFolder: true,
errorMessage: 'Plugins may only import from top-level public and server modules.',
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Delete any items that are not applicable to this PR.
- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the [cloud](https://github.com/elastic/cloud) and added to the [docker list](https://github.com/elastic/kibana/blob/c29adfef29e921cc447d2a5ed06ac2047ceab552/src/dev/build/tasks/os_packages/docker_generator/resources/bin/kibana-docker)
- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/master/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"esUi": "src/plugins/es_ui_shared",
"devTools": "src/plugins/dev_tools",
"expressions": "src/plugins/expressions",
"expressionRevealImage": "src/plugins/expression_reveal_image",
"inputControl": "src/plugins/input_control_vis",
"inspector": "src/plugins/inspector",
"inspectorViews": "src/legacy/core_plugins/inspector_views",
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch Node.js rules
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "4a5d654a4ccd4a4c24eca5d319d85a88a650edf119601550c95bf400c8cc897e",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.5.1/rules_nodejs-3.5.1.tar.gz"],
sha256 = "0fa2d443571c9e02fcb7363a74ae591bdcce2dd76af8677a95965edf329d778a",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.6.0/rules_nodejs-3.6.0.tar.gz"],
)

# Now that we have the rules let's import from them to complete the work
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")

# Assure we have at least a given rules_nodejs version
check_rules_nodejs_version(minimum_version_string = "3.5.1")
check_rules_nodejs_version(minimum_version_string = "3.6.0")

# Setup the Node.js toolchain for the architectures we want to support
#
Expand Down
4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ This API doesn't support angular, for registering angular dev tools, bootstrap a
|This plugin contains reusable code in the form of self-contained modules (or libraries). Each of these modules exports a set of functionality relevant to the domain of the module.
|{kib-repo}blob/{branch}/src/plugins/expression_reveal_image/README.md[expressionRevealImage]
|Expression Reveal Image plugin adds a revealImage function to the expression plugin and an associated renderer. The renderer will display the given percentage of a given image.
|<<kibana-expressions-plugin>>
|Expression pipeline is a chain of functions that *pipe* its output to the
input of the next function. Functions can be configured using arguments provided
Expand Down
50 changes: 48 additions & 2 deletions docs/setup/upgrade.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,54 @@
[[upgrade]]
== Upgrade {kib}

Depending on the {kib} version you're upgrading from, the upgrade process to 7.0
varies.
Depending on the {kib} version you're upgrading from, the upgrade process to {version}
varies. The following upgrades are supported:

* Between minor versions
* From 5.6 to 6.8
* From 6.8 to {prev-major-version}
* From {prev-major-version} to {version}
ifeval::[ "{version}" != "{minor-version}.0" ]
* From any version since {minor-version}.0 to {version}
endif::[]

The following table shows the recommended upgrade paths to {version}.

[cols="<1,3",options="header",]
|====
|Upgrade from
|Recommended upgrade path to {version}

ifeval::[ "{version}" != "{minor-version}.0" ]
|A previous {minor-version} version (e.g., {minor-version}.0)
|Upgrade to {version}
endif::[]

|{prev-major-version}
|Upgrade to {version}

|7.0–7.7
a|
. Upgrade to {prev-major-version}
. Upgrade to {version}

|6.8
a|
. Upgrade to {prev-major-version}
. Upgrade to {version}

|6.0–6.7
a|

. Upgrade to 6.8
. Upgrade to {prev-major-version}
. Upgrade to {version}
|====

[WARNING]
====
The upgrade path from 6.8 to 7.0 is *not* supported.
====

[float]
[[upgrade-before-you-begin]]
Expand Down
2 changes: 2 additions & 0 deletions docs/spaces/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Kibana supports spaces in several ways. You can:

The `kibana_admin` role or equivilent is required to manage **Spaces**.

TIP: Looking to support multiple tenants? See <<xpack-security-multiple-tenants, the Security documentation>> for more information.

[float]
[[spaces-managing]]
=== View, create, and delete spaces
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 24 additions & 1 deletion docs/user/dashboard/tsvb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,29 @@ By default, *TSVB* drops the last bucket because the time filter intersects the

.. In the *Panel filter* field, enter <<kuery-query, KQL filters>> to view specific documents.

[float]
[[tsvb-index-pattern-mode]]
==== Index pattern mode
Create *TSVB* visualizations with {kib} index patterns.

IMPORTANT: Creating *TSVB* visualizations with an {es} index string is deprecated and will be removed in a future release.
It is the default one for new visualizations but it can also be switched for the old implementations:

. Click *Panel options*, then click the gear icon to open the *Index pattern selection mode* options.
. Select *Use only Kibana index patterns*.
. Reselect the index pattern from the dropdown, then select the *Time field*.

image::images/tsvb_index_pattern_selection_mode.png[Change index pattern selection mode action]

The index pattern mode unlocks many new features, such as:
* Runtime fields

* URL drilldowns

* Interactive filters for time series visualizations

* Better performance

[float]
[[configure-the-data-series]]
==== Configure the series
Expand Down Expand Up @@ -177,4 +200,4 @@ To group with multiple fields, create runtime fields in the index pattern you ar
[role="screenshot"]
image::images/tsvb_group_by_multiple_fields.png[Group by multiple fields]

. Create a new TSVB visualization and group by this field.
. Create a new TSVB visualization and group by this field.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ The API returns the following:
"overdue": 10,
"overdue_non_recurring": 10,
"estimated_schedule_density": [0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0],
"capacity_requirments": {
"capacity_requirements": {
"per_minute": 6,
"per_hour": 28,
"per_day": 2
Expand Down Expand Up @@ -737,7 +737,7 @@ Evaluating the preceding health stats in the previous example, you see the follo
0, 3, 0, 0, 0, 1, 0, 1, 0, 1,
0, 0, 0, 1, 0, 0, 1, 1, 1, 0
],
"capacity_requirments": { # <10>
"capacity_requirements": { # <10>
"per_minute": 14,
"per_hour": 240,
"per_day": 0
Expand Down Expand Up @@ -819,7 +819,7 @@ Suppose the output of `stats.workload.value` looked something like this:
0, 31, 0, 12, 16, 31, 0, 10, 0, 10,
3, 22, 0, 10, 0, 2, 10, 10, 1, 0
],
"capacity_requirments": {
"capacity_requirements": {
"per_minute": 329, # <4>
"per_hour": 4272, # <5>
"per_day": 61 # <6>
Expand Down
16 changes: 15 additions & 1 deletion docs/user/security/authorization/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@ The Elastic Stack comes with the `kibana_admin` {ref}/built-in-roles.html[built-

When you assign a user multiple roles, the user receives a union of the roles’ privileges. Therefore, assigning the `kibana_admin` role in addition to a custom role that grants {kib} privileges is ineffective because `kibana_admin` has access to all the features in all spaces.

NOTE: When running multiple tenants of {kib} by changing the `kibana.index` in your `kibana.yml`, you cannot use `kibana_admin` to grant access. You must create custom roles that authorize the user for that specific tenant. Although multi-tenant installations are supported, the recommended approach to securing access to {kib} segments is to grant users access to specific spaces.
[[xpack-security-multiple-tenants]]
==== Supporting multiple tenants

There are two approaches to supporting multi-tenancy in {kib}:

1. *Recommended:* Create a space and a limited role for each tenant, and configure each user with the appropriate role. See
<<tutorial-secure-access-to-kibana, Securing access to {kib}>> for more details.
2. deprecated:[7.13.0,"In 8.0 and later, the `kibana.index` setting will no longer be supported."] Set up separate {kib} instances to work
with a single {es} cluster by changing the `kibana.index` setting in your `kibana.yml` file.
+
NOTE: When using multiple {kib} instances this way, you cannot use the `kibana_admin` role to grant access. You must create custom roles
that authorize the user for each specific instance.

Whichever approach you use, be careful when granting cluster privileges and index privileges. Both of these approaches share the same {es}
cluster, and {kib} spaces do not prevent you from granting users of two different tenants access to the same index.

[role="xpack"]
[[xpack-kibana-role-management]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This guide introduces you to three of {kib}'s security features: spaces, roles,
[float]
=== Spaces

Do you have multiple teams using {kib}? Do you want a “playground” to experiment with new visualizations or alerts? If so, then <<xpack-spaces,{kib} Spaces>> can help.
Do you have multiple teams or tenants using {kib}? Do you want a “playground” to experiment with new visualizations or alerts? If so, then <<xpack-spaces,{kib} Spaces>> can help.

Think of a space as another instance of {kib}. A space allows you to organize your <<dashboard, dashboards>>, <<alerting-getting-started, alerts>>, <<xpack-ml, machine learning jobs>>, and much more into their own categories. For example, you might have a Marketing space for your marketeers to track the results of their campaigns, and an Engineering space for your developers to {apm-get-started-ref}/overview.html[monitor application performance].

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
"@babel/traverse": "^7.12.12",
"@babel/types": "^7.12.12",
"@bazel/ibazel": "^0.15.10",
"@bazel/typescript": "^3.5.1",
"@bazel/typescript": "^3.6.0",
"@cypress/snapshot": "^2.1.7",
"@cypress/webpack-preprocessor": "^5.6.0",
"@elastic/eslint-config-kibana": "link:bazel-bin/packages/elastic-eslint-config-kibana",
Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pageLoadAssetSize:
watcher: 43598
runtimeFields: 41752
stackAlerts: 29684
presentationUtil: 49767
presentationUtil: 94301
spacesOss: 18817
indexPatternFieldEditor: 90489
osquery: 107090
Expand All @@ -110,4 +110,5 @@ pageLoadAssetSize:
timelines: 230410
screenshotMode: 17856
visTypePie: 35583
expressionRevealImage: 25675
cases: 144442
5 changes: 3 additions & 2 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ export class DocLinksService {
lensPanels: `${KIBANA_DOCS}lens.html`,
maps: `${ELASTIC_WEBSITE_URL}maps`,
vega: `${KIBANA_DOCS}vega.html`,
tsvbIndexPatternMode: `${KIBANA_DOCS}tsvb.html#tsvb-index-pattern-mode`,
},
observability: {
guide: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/index.html`,
Expand Down Expand Up @@ -328,7 +329,7 @@ export class DocLinksService {
},
apis: {
bulkIndexAlias: `${ELASTICSEARCH_DOCS}indices-aliases.html`,
byteSizeUnits: `${ELASTICSEARCH_DOCS}common-options.html#byte-units`,
byteSizeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#byte-units`,
createAutoFollowPattern: `${ELASTICSEARCH_DOCS}ccr-put-auto-follow-pattern.html`,
createFollower: `${ELASTICSEARCH_DOCS}ccr-put-follow.html`,
createIndex: `${ELASTICSEARCH_DOCS}indices-create-index.html`,
Expand All @@ -352,7 +353,7 @@ export class DocLinksService {
putSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
putWatch: `${ELASTICSEARCH_DOCS}watcher-api-put-watch.html`,
simulatePipeline: `${ELASTICSEARCH_DOCS}simulate-pipeline-api.html`,
timeUnits: `${ELASTICSEARCH_DOCS}common-options.html#time-units`,
timeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#time-units`,
updateTransform: `${ELASTICSEARCH_DOCS}update-transform.html`,
},
plugins: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,16 @@ kibana_vars=(
xpack.security.session.idleTimeout
xpack.security.session.lifespan
xpack.security.sessionTimeout
xpack.securitySolution.alertMergeStrategy
xpack.securitySolution.alertResultListDefaultDateRange
xpack.securitySolution.endpointResultListDefaultFirstPageIndex
xpack.securitySolution.endpointResultListDefaultPageSize
xpack.securitySolution.maxRuleImportExportSize
xpack.securitySolution.maxRuleImportPayloadBytes
xpack.securitySolution.maxTimelineImportExportSize
xpack.securitySolution.maxTimelineImportPayloadBytes
xpack.securitySolution.packagerTaskInterval
xpack.securitySolution.validateArtifactDownloads
xpack.spaces.enabled
xpack.spaces.maxSpaces
xpack.task_manager.enabled
Expand Down
1 change: 1 addition & 0 deletions src/dev/storybook/aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const storybookAliases = {
dashboard_enhanced: 'x-pack/plugins/dashboard_enhanced/.storybook',
data_enhanced: 'x-pack/plugins/data_enhanced/.storybook',
embeddable: 'src/plugins/embeddable/.storybook',
expression_reveal_image: 'src/plugins/expression_reveal_image/.storybook',
infra: 'x-pack/plugins/infra/.storybook',
security_solution: 'x-pack/plugins/security_solution/.storybook',
ui_actions_enhanced: 'x-pack/plugins/ui_actions_enhanced/.storybook',
Expand Down
28 changes: 28 additions & 0 deletions src/plugins/data/common/field_formats/converters/string.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@

import { StringFormat } from './string';

/**
* Removes a wrapping span, that is created by the field formatter infrastructure
* and we're not caring about in these tests.
*/
function stripSpan(input: string): string {
return input.replace(/^\<span ng-non-bindable\>(.*)\<\/span\>$/, '$1');
}

describe('String Format', () => {
test('convert a string to lower case', () => {
const string = new StringFormat(
Expand All @@ -17,6 +25,7 @@ describe('String Format', () => {
jest.fn()
);
expect(string.convert('Kibana')).toBe('kibana');
expect(stripSpan(string.convert('Kibana', 'html'))).toBe('kibana');
});

test('convert a string to upper case', () => {
Expand All @@ -27,6 +36,7 @@ describe('String Format', () => {
jest.fn()
);
expect(string.convert('Kibana')).toBe('KIBANA');
expect(stripSpan(string.convert('Kibana', 'html'))).toBe('KIBANA');
});

test('decode a base64 string', () => {
Expand All @@ -37,6 +47,7 @@ describe('String Format', () => {
jest.fn()
);
expect(string.convert('Zm9vYmFy')).toBe('foobar');
expect(stripSpan(string.convert('Zm9vYmFy', 'html'))).toBe('foobar');
});

test('convert a string to title case', () => {
Expand All @@ -47,10 +58,15 @@ describe('String Format', () => {
jest.fn()
);
expect(string.convert('PLEASE DO NOT SHOUT')).toBe('Please Do Not Shout');
expect(stripSpan(string.convert('PLEASE DO NOT SHOUT', 'html'))).toBe('Please Do Not Shout');
expect(string.convert('Mean, variance and standard_deviation.')).toBe(
'Mean, Variance And Standard_deviation.'
);
expect(stripSpan(string.convert('Mean, variance and standard_deviation.', 'html'))).toBe(
'Mean, Variance And Standard_deviation.'
);
expect(string.convert('Stay CALM!')).toBe('Stay Calm!');
expect(stripSpan(string.convert('Stay CALM!', 'html'))).toBe('Stay Calm!');
});

test('convert a string to short case', () => {
Expand All @@ -61,6 +77,7 @@ describe('String Format', () => {
jest.fn()
);
expect(string.convert('dot.notated.string')).toBe('d.n.string');
expect(stripSpan(string.convert('dot.notated.string', 'html'))).toBe('d.n.string');
});

test('convert a string to unknown transform case', () => {
Expand All @@ -82,5 +99,16 @@ describe('String Format', () => {
jest.fn()
);
expect(string.convert('%EC%95%88%EB%85%95%20%ED%82%A4%EB%B0%94%EB%82%98')).toBe('안녕 키바나');
expect(
stripSpan(string.convert('%EC%95%88%EB%85%95%20%ED%82%A4%EB%B0%94%EB%82%98', 'html'))
).toBe('안녕 키바나');
});

test('outputs specific empty value', () => {
const string = new StringFormat();
expect(string.convert('')).toBe('(empty)');
expect(stripSpan(string.convert('', 'html'))).toBe(
'<span class="ffString__emptyValue">(empty)</span>'
);
});
});
Loading

0 comments on commit 62eb82c

Please sign in to comment.