Skip to content

Commit

Permalink
Merge branch 'master' into folding_for_code_editor
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 6, 2021
2 parents 34600a9 + 826a1ec commit 35f6aba
Show file tree
Hide file tree
Showing 570 changed files with 13,350 additions and 5,571 deletions.
9 changes: 9 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@
# Import shared settings first so we can override below
import %workspace%/.bazelrc.common

## Disabled for now
# Remote cache settings for local env
# build --remote_cache=https://storage.googleapis.com/kibana-bazel-cache
# build --incompatible_remote_results_ignore_disk=true
# build --remote_accept_cached=true
# build --remote_upload_local_results=false

# BuildBuddy
## Metadata settings
build --workspace_status_command=$(pwd)/src/dev/bazel_workspace_status.sh
# Enable this in case you want to share your build info
# build --build_metadata=VISIBILITY=PUBLIC
build --build_metadata=TEST_GROUPS=//packages

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ target
snapshots.js

!/.eslintrc.js
!.storybook

# plugin overrides
/src/core/lib/kbn_internal_native_observable
Expand Down
22 changes: 21 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1112,12 +1112,22 @@ module.exports = {

/**
* Enterprise Search overrides
* NOTE: We also have a single rule at the bottom of the file that
* overrides Prettier's default of not linting unnecessary backticks
*/
{
// All files
files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'],
excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock}.{ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'react/jsx-boolean-value': ['error', 'never'],
},
},
{
// Source files only - allow `any` in test/mock files
files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'],
excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock}.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
},
},
Expand Down Expand Up @@ -1260,6 +1270,16 @@ module.exports = {
...require('eslint-config-prettier/@typescript-eslint').rules,
},
},
/**
* Enterprise Search Prettier override
* Lints unnecessary backticks - @see https://github.com/prettier/eslint-config-prettier/blob/main/README.md#forbid-unnecessary-backticks
*/
{
files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'],
rules: {
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }],
},
},

{
files: [
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/architecture/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ To begin plugin development, we recommend reading our overview of how plugins wo
* <<kibana-platform-plugin-api>>

Our developer services are changing all the time. One of the best ways to discover and learn about them is to read the available
READMEs from all the plugins inside our {kib-repo}tree/{branch}/src/plugins[open source plugins folder] and our
{kib-repo}/tree/{branch}/x-pack/plugins[commercial plugins folder].
READMEs inside our plugins folders: {kib-repo}tree/{branch}/src/plugins[src/plugins] and
{kib-repo}/tree/{branch}/x-pack/plugins[x-pack/plugins].

A few services also automatically generate api documentation which can be browsed inside the {kib-repo}tree/{branch}/docs/development[docs/development section of our repo]

Expand Down
18 changes: 0 additions & 18 deletions docs/developer/getting-started/running-kibana-advanced.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ By default, you can log in with username `elastic` and password
`changeme`. See the `--help` options on `yarn es <command>` if
you’d like to configure a different password.

[discrete]
=== Running {kib} in Open-Source mode

If you’re looking to only work with the open-source software, supply the
license type to `yarn es`:

[source,bash]
----
yarn es snapshot --license oss
----

And start {kib} with only open-source code:

[source,bash]
----
yarn start --oss
----

[discrete]
=== Unsupported URL Type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ readonly links: {
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly elasticsearchModule: string;
readonly startup: string;
readonly exportedFields: string;
};
Expand All @@ -29,6 +30,10 @@ readonly links: {
};
readonly metricbeat: {
readonly base: string;
readonly configure: string;
readonly httpEndpoint: string;
readonly install: string;
readonly start: string;
};
readonly enterpriseSearch: {
readonly base: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export declare class IndexPatternsFetcher
| --- | --- | --- |
| [getFieldsForTimePattern(options)](./kibana-plugin-plugins-data-server.indexpatternsfetcher.getfieldsfortimepattern.md) | | Get a list of field objects for a time pattern |
| [getFieldsForWildcard(options)](./kibana-plugin-plugins-data-server.indexpatternsfetcher.getfieldsforwildcard.md) | | Get a list of field objects for an index pattern that may contain wildcards |
| [validatePatternListActive(patternList)](./kibana-plugin-plugins-data-server.indexpatternsfetcher.validatepatternlistactive.md) | | Returns an index pattern list of only those index pattern strings in the given list that return indices |

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [IndexPatternsFetcher](./kibana-plugin-plugins-data-server.indexpatternsfetcher.md) &gt; [validatePatternListActive](./kibana-plugin-plugins-data-server.indexpatternsfetcher.validatepatternlistactive.md)

## IndexPatternsFetcher.validatePatternListActive() method

Returns an index pattern list of only those index pattern strings in the given list that return indices

<b>Signature:</b>

```typescript
validatePatternListActive(patternList: string[]): Promise<string[]>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| patternList | <code>string[]</code> | |

<b>Returns:</b>

`Promise<string[]>`

4 changes: 2 additions & 2 deletions docs/maps/connect-to-ems.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ endif::[]

[cols="2*<"]
|===
| [[ems-hostname]]`hostname`
| [[ems-host]]`host`
| Specifies the host of the backend server. To allow remote users to connect, set the value to the IP address or DNS name of the {hosted-ems} container. *Default: _your-hostname_*. <<server-host,Equivalent {kib} setting>>.

| `port`
Expand Down Expand Up @@ -199,7 +199,7 @@ TIP: The available basemaps and boundaries can be explored from the `/maps` endp
[[elastic-maps-server-kibana]]
==== Kibana configuration

With {hosted-ems} running, add the `map.emsUrl` configuration key in your <<settings, kibana.yml>> file pointing to the root of the service. This setting will point {kib} to request EMS basemaps and boundaries from {hosted-ems}. Typically this will be the URL to the <<ems-hostname,hostname and port>> of {hosted-ems}. For example, `map.emsUrl: https://my-ems-server:8080`.
With {hosted-ems} running, add the `map.emsUrl` configuration key in your <<settings, kibana.yml>> file pointing to the root of the service. This setting will point {kib} to request EMS basemaps and boundaries from {hosted-ems}. Typically this will be the URL to the <<ems-host,host and port>> of {hosted-ems}. For example, `map.emsUrl: https://my-ems-server:8080`.


[float]
Expand Down
4 changes: 2 additions & 2 deletions docs/maps/maps-aggregations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ To enable a blended layer that dynamically shows clusters or documents:

[role="xpack"]
[[maps-top-hits-aggregation]]
=== Top hits per entity
=== Display the most relevant documents per entity

You can display the most relevant documents per entity, for example, the most recent GPS tracks per flight.
Use *Top hits per entity* to display the most relevant documents per entity, for example, the most recent GPS tracks per flight route.
To get this data, {es} first groups your data using a {ref}/search-aggregations-bucket-terms-aggregation.html[terms aggregation],
then accumulates the most relevant documents based on sort order for each entry using a {ref}/search-aggregations-metrics-top-hits-aggregation.html[top hits metric aggregation].

Expand Down
11 changes: 10 additions & 1 deletion docs/migration/migrate_8_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,16 @@ for example, `logstash-*`.
==== Responses are never logged by default
*Details:* Previously responses would be logged if either `logging.json` was true, `logging.dest` was specified, or a `TTY` was detected.

*Impact:* To restore the previous behavior, in kibana.yml set `logging.events.response=*`.
*Impact:* To restore the previous behavior, in kibana.yml enable `debug` logs for the `http.server.response` context under `logging.loggers`:
[source,yaml]
-------------------
logging:
loggers:
- context: http.server.response
appenders: [console]
level: debug
-------------------
See https://github.com/elastic/kibana/pull/87939 for more details.

[float]
==== `xpack.security.authProviders` is no longer valid
Expand Down
8 changes: 2 additions & 6 deletions docs/setup/docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ A list of all published Docker images and tags is available at
https://www.docker.elastic.co[www.docker.elastic.co]. The source code is in
https://github.com/elastic/dockerfiles/tree/{branch}/kibana[GitHub].

These images are free to use under the Elastic license. They contain open source
and free commercial features and access to paid commercial features.
<<managing-licenses,Start a 30-day trial>> to try out all of the
paid commercial features. See the
https://www.elastic.co/subscriptions[Subscriptions] page for information about
Elastic license levels.
These images contain both free and subscription features.
<<managing-licenses,Start a 30-day trial>> to try out all of the features.

[float]
[[pull-image]]
Expand Down
8 changes: 2 additions & 6 deletions docs/setup/install/deb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ The Debian package for Kibana can be <<install-deb,downloaded from our website>>
or from our <<deb-repo,APT repository>>. It can be used to install
Kibana on any Debian-based system such as Debian and Ubuntu.

This package is free to use under the Elastic license. It contains open source
and free commercial features and access to paid commercial features.
<<managing-licenses,Start a 30-day trial>> to try out all of the
paid commercial features. See the
https://www.elastic.co/subscriptions[Subscriptions] page for information about
Elastic license levels.
This package contains both free and subscription features.
<<managing-licenses,Start a 30-day trial>> to try out all of the features.

The latest stable version of Kibana can be found on the
link:/downloads/kibana[Download Kibana] page. Other versions can
Expand Down
8 changes: 2 additions & 6 deletions docs/setup/install/rpm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ and Oracle Enterprise.
NOTE: RPM install is not supported on distributions with old versions of RPM,
such as SLES 11 and CentOS 5. Please see <<targz>> instead.

This package is free to use under the Elastic license. It contains open source
and free commercial features and access to paid commercial features.
<<managing-licenses,Start a 30-day trial>> to try out all of the
paid commercial features. See the
https://www.elastic.co/subscriptions[Subscriptions] page for information about
Elastic license levels.
This package contains both free and subscription features.
<<managing-licenses,Start a 30-day trial>> to try out all of the features.

The latest stable version of Kibana can be found on the
link:/downloads/kibana[Download Kibana] page. Other versions can
Expand Down
8 changes: 2 additions & 6 deletions docs/setup/install/targz.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
Kibana is provided for Linux and Darwin as a `.tar.gz` package. These packages
are the easiest formats to use when trying out Kibana.

These packages are free to use under the Elastic license. They contain open
source and free commercial features and access to paid commercial features.
<<managing-licenses,Start a 30-day trial>> to try out all of the
paid commercial features. See the
https://www.elastic.co/subscriptions[Subscriptions] page for information about
Elastic license levels.
This package contains both free and subscription features.
<<managing-licenses,Start a 30-day trial>> to try out all of the features.

The latest stable version of Kibana can be found on the
link:/downloads/kibana[Download Kibana] page.
Expand Down
8 changes: 2 additions & 6 deletions docs/setup/install/windows.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@

Kibana can be installed on Windows using the `.zip` package.

This package is free to use under the Elastic license. It contains open source
and free commercial features and access to paid commercial features.
<<managing-licenses,Start a 30-day trial>> to try out all of the
paid commercial features. See the
https://www.elastic.co/subscriptions[Subscriptions] page for information about
Elastic license levels.
This package contains both free and subscription features.
<<managing-licenses,Start a 30-day trial>> to try out all of the features.

The latest stable version of Kibana can be found on the
link:/downloads/kibana[Download Kibana] page.
Expand Down
9 changes: 2 additions & 7 deletions docs/user/alerting/geo-alert-types.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
[[geo-alert-types]]
== Geo alert types

experimental[] Two additional stack alerts are available:
<<alert-type-tracking-threshold>> and <<alert-type-tracking-containment>>. To enable,
add the following configuration to your `kibana.yml`:

```yml
xpack.stack_alerts.enableGeoAlerting: true
```
Two additional stack alerts are available:
<<alert-type-tracking-threshold>> and <<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.
Expand Down
7 changes: 7 additions & 0 deletions docs/user/reporting/reporting-troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Having trouble? Here are solutions to common problems you might encounter while
* <<reporting-troubleshooting-error-messages>>
* <<reporting-troubleshooting-puppeteer-debug-logs>>
* <<reporting-troubleshooting-system-requirements>>
* <<reporting-troubleshooting-arm-systems>>

[float]
[[reporting-diagnostics]]
Expand Down Expand Up @@ -156,3 +157,9 @@ requests to render.

If the {kib} instance doesn't have enough memory to run the report, the report fails with an error such as `Error: Page crashed!`
In this case, try increasing the memory for the {kib} instance to 2GB.

[float]
[[reporting-troubleshooting-arm-systems]]
=== ARM systems

Chromium is not compatible with ARM RHEL/CentOS.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@elastic/datemath": "link:packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary",
"@elastic/ems-client": "7.11.0",
"@elastic/eui": "31.3.0",
"@elastic/eui": "31.4.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "^9.0.1-kibana3",
"@elastic/node-crypto": "1.2.1",
Expand Down Expand Up @@ -636,7 +636,7 @@
"eslint-plugin-ban": "^1.4.0",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.0.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-mocha": "^6.2.2",
Expand Down
13 changes: 7 additions & 6 deletions packages/kbn-legacy-logging/src/get_logging_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ export function getLoggingConfiguration(config: LegacyLoggingConfig, opsInterval
});
} else if (config.verbose) {
_.defaults(events, {
error: '*',
log: '*',
// To avoid duplicate logs, we explicitly disable this in verbose
// mode as it is already provided by the new logging config under
// the `metrics.ops` context.
// To avoid duplicate logs, we explicitly disable these in verbose
// mode as they are already provided by the new logging config under
// the `http.server.response` and `metrics.ops` contexts.
ops: '!',
request: '*',
response: '*',
error: '*',
request: '!',
response: '!',
});
} else {
_.defaults(events, {
Expand Down Expand Up @@ -75,6 +75,7 @@ export function getLoggingConfiguration(config: LegacyLoggingConfig, opsInterval
},
includes: {
request: ['headers', 'payload'],
response: ['headers', 'payload'],
},
reporters: {
logReporter: [loggerStream],
Expand Down
4 changes: 3 additions & 1 deletion packages/kbn-legacy-logging/src/log_events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Side Public License, v 1.
*/

import type { ResponseObject } from '@hapi/hapi';
import { EventData, isEventData } from './metadata';

export interface BaseEvent {
Expand All @@ -21,7 +22,8 @@ export interface ResponseEvent extends BaseEvent {
statusCode: number;
path: string;
headers: Record<string, string | string[]>;
responsePayload: string;
responseHeaders: Record<string, string | string[]>;
responsePayload: ResponseObject['source'];
responseTime: string;
query: Record<string, any>;
}
Expand Down
Loading

0 comments on commit 35f6aba

Please sign in to comment.