Skip to content

Commit

Permalink
Merge branch 'master' into reporting/feature-control-example
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Dec 29, 2020
2 parents f7d8a70 + d843450 commit 4240dc4
Show file tree
Hide file tree
Showing 529 changed files with 12,519 additions and 43,114 deletions.
2 changes: 1 addition & 1 deletion .ci/jobs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is needed by functionalTests:ensureAllTestsInCiGroup for the list of ciGroups. That must be changed before this file can be removed
# This file is needed by node scripts/ensure_all_tests_in_ci_group for the list of ciGroups. That must be changed before this file can be removed

JOB:
- kibana-intake
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export declare type EmbeddableInput = {
disabledActions?: string[];
disableTriggers?: boolean;
searchSessionId?: string;
syncColors?: boolean;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export declare function openAddPanelFlyout(options: {
overlays: OverlayStart;
notifications: NotificationsStart;
SavedObjectFinder: React.ComponentType<any>;
}): Promise<void>;
}): OverlayRef;
```

## Parameters
Expand All @@ -25,5 +25,5 @@ export declare function openAddPanelFlyout(options: {

<b>Returns:</b>

`Promise<void>`
`OverlayRef`

Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Constructs a new instance of the `ExpressionRenderHandler` class
<b>Signature:</b>

```typescript
constructor(element: HTMLElement, { onRenderError, renderMode, hasCompatibleActions, }?: ExpressionRenderHandlerParams);
constructor(element: HTMLElement, { onRenderError, renderMode, syncColors, hasCompatibleActions, }?: ExpressionRenderHandlerParams);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| element | <code>HTMLElement</code> | |
| { onRenderError, renderMode, hasCompatibleActions, } | <code>ExpressionRenderHandlerParams</code> | |
| { onRenderError, renderMode, syncColors, hasCompatibleActions, } | <code>ExpressionRenderHandlerParams</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export declare class ExpressionRenderHandler

| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(element, { onRenderError, renderMode, hasCompatibleActions, })](./kibana-plugin-plugins-expressions-public.expressionrenderhandler._constructor_.md) | | Constructs a new instance of the <code>ExpressionRenderHandler</code> class |
| [(constructor)(element, { onRenderError, renderMode, syncColors, hasCompatibleActions, })](./kibana-plugin-plugins-expressions-public.expressionrenderhandler._constructor_.md) | | Constructs a new instance of the <code>ExpressionRenderHandler</code> class |

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface IExpressionLoaderParams
| [renderMode](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.rendermode.md) | <code>RenderMode</code> | |
| [searchContext](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.searchcontext.md) | <code>SerializableState</code> | |
| [searchSessionId](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.searchsessionid.md) | <code>string</code> | |
| [syncColors](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.synccolors.md) | <code>boolean</code> | |
| [uiState](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.uistate.md) | <code>unknown</code> | |
| [variables](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.variables.md) | <code>Record&lt;string, any&gt;</code> | |

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

[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [IExpressionLoaderParams](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.md) &gt; [syncColors](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.synccolors.md)

## IExpressionLoaderParams.syncColors property

<b>Signature:</b>

```typescript
syncColors?: boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [IInterpreterRenderHandlers](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.md) &gt; [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.issynccolorsenabled.md)

## IInterpreterRenderHandlers.isSyncColorsEnabled property

<b>Signature:</b>

```typescript
isSyncColorsEnabled: () => boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface IInterpreterRenderHandlers
| [event](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.event.md) | <code>(event: any) =&gt; void</code> | |
| [getRenderMode](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.getrendermode.md) | <code>() =&gt; RenderMode</code> | |
| [hasCompatibleActions](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.hascompatibleactions.md) | <code>(event: any) =&gt; Promise&lt;boolean&gt;</code> | |
| [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.issynccolorsenabled.md) | <code>() =&gt; boolean</code> | |
| [onDestroy](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.ondestroy.md) | <code>(fn: () =&gt; void) =&gt; void</code> | |
| [reload](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.reload.md) | <code>() =&gt; void</code> | |
| [uiState](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.uistate.md) | <code>unknown</code> | This uiState interface is actually <code>PersistedState</code> from the visualizations plugin, but expressions cannot know about vis or it creates a mess of circular dependencies. Downstream consumers of the uiState handler will need to cast for now. |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-server](./kibana-plugin-plugins-expressions-server.md) &gt; [IInterpreterRenderHandlers](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.md) &gt; [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.issynccolorsenabled.md)

## IInterpreterRenderHandlers.isSyncColorsEnabled property

<b>Signature:</b>

```typescript
isSyncColorsEnabled: () => boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface IInterpreterRenderHandlers
| [event](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.event.md) | <code>(event: any) =&gt; void</code> | |
| [getRenderMode](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.getrendermode.md) | <code>() =&gt; RenderMode</code> | |
| [hasCompatibleActions](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.hascompatibleactions.md) | <code>(event: any) =&gt; Promise&lt;boolean&gt;</code> | |
| [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.issynccolorsenabled.md) | <code>() =&gt; boolean</code> | |
| [onDestroy](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.ondestroy.md) | <code>(fn: () =&gt; void) =&gt; void</code> | |
| [reload](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.reload.md) | <code>() =&gt; void</code> | |
| [uiState](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.uistate.md) | <code>unknown</code> | This uiState interface is actually <code>PersistedState</code> from the visualizations plugin, but expressions cannot know about vis or it creates a mess of circular dependencies. Downstream consumers of the uiState handler will need to cast for now. |
Expand Down
5 changes: 3 additions & 2 deletions docs/discover/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ status codes, you could enter `status:[400 TO 499]`.
codes and have an extension of `php` or `html`, you could enter `status:[400 TO
499] AND (extension:php OR extension:html)`.

IMPORTANT: When you use the Lucene Query Syntax in the *KQL* search bar, {kib} is unable to search on nested objects and perform aggregations across fields that contain nested objects.
IMPORTANT: When you use the Lucene Query Syntax in the *KQL* search bar, {kib} is unable to search on nested objects and perform aggregations across fields that contain nested objects.
Using `include_in_parent` or `copy_to` as a workaround can cause {kib} to fail.

For more detailed information about the Lucene query syntax, see the
Expand Down Expand Up @@ -107,7 +107,8 @@ To save the current search:
. Click *Save* in the Kibana toolbar.
. Enter a name for the search and click *Save*.

To import, export, and delete saved searches, open the main menu, then click *Stack Management > Saved Ojbects*.
To import, export, and delete saved searches, open the main menu,
then click *Stack Management > Saved Objects*.

==== Open a saved search
To load a saved search into Discover:
Expand Down
4 changes: 4 additions & 0 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ Hides the "Time" column in *Discover* and in all saved searches on dashboards.
Highlights results in *Discover* and saved searches on dashboards. Highlighting
slows requests when working on big documents.

[[doctable-legacy]]`doc_table:legacy`::
Control the way the Discover's table looks and works. Set this property to `true` to revert to the legacy implementation.


[float]
[[kibana-ml-settings]]
==== Machine learning
Expand Down
11 changes: 6 additions & 5 deletions docs/user/alerting/alerting-getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,15 @@ image::images/alert-concepts-connectors.svg[Connectors provide a central place t
[float]
=== Summary

An _alert_ consists of conditions, _actions_, and a schedule. When conditions are met, _alert instances_ are created that render _actions_ and invoke them. To make action setup and update easier, actions refer to _connectors_ that centralize the information used to connect with {kib} services and third-party integrations.
An _alert_ consists of conditions, _actions_, and a schedule. When conditions are met, _alert instances_ are created that render _actions_ and invoke them. To make action setup and update easier, actions refer to _connectors_ that centralize the information used to connect with {kib} services and third-party integrations. The following example ties these concepts together:

image::images/alert-concepts-summary.svg[Alerts, actions, alert instances and connectors work together to convert detection into action]

* *Alert*: a specification of the conditions to be detected, the schedule for detection, and the response when detection occurs.
* *Action*: the response to a detected condition defined in the alert. Typically actions specify a service or third party integration along with alert details that will be sent to it.
* *Alert instance*: state tracked by {kib} for every occurrence of a detected condition. Actions as well as controls like muting and re-notification are controlled at the instance level.
* *Connector*: centralized configurations for services and third party integration that are referenced by actions.
. Anytime an *alert*'s conditions are met, an *alert instance* is created. This example checks for servers with average CPU > 0.9. Three servers meet the condition, so three instances are created.
. Instances create *actions* as long as they are not muted or throttled. When actions are created, the template that was setup in the alert is filled with actual values. In this example three actions are created, and the template string {{server}} is replaced with the server name for each instance.
. {kib} invokes the actions, sending them to a 3rd party *integration* like an email service.
. If the 3rd party integration has connection parameters or credentials, {kib} will fetch these from the *connector* referenced in the action.


[float]
[[alerting-concepts-differences]]
Expand Down
2 changes: 1 addition & 1 deletion docs/user/alerting/images/alert-concepts-summary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions docs/user/dashboard/edit-dashboards.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,21 @@ Put the dashboard in *Edit* mode, then use the following options:
* To delete, open the panel menu, then select *Delete from dashboard*. When you delete a panel from the dashboard, the
visualization or saved search from the panel is still available in Kibana.

[float]
[[sync-colors]]
=== Synchronize colors

By default, dashboard panels that share a non-gradient based color palette will synchronize their color assignment to improve readability.
Color assignment is based on the series name, and the total number of colors is based on the number of unique series names.

The color synchronizing logic can make the dashboard less readable when there are too many unique series names. It is possible to disable the synchronization behavior:

. Put the dashboard in *Edit* mode.

. Click the "Options" button in the top navigation bar.

. Disable "Sync color palettes across panels".

[float]
[[clone-panels]]
=== Clone panels
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,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": "30.6.0",
"@elastic/eui": "31.0.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "^9.0.1-kibana3",
"@elastic/node-crypto": "1.2.1",
Expand Down Expand Up @@ -824,7 +824,7 @@
"url-loader": "^2.2.0",
"use-resize-observer": "^6.0.0",
"val-loader": "^1.1.1",
"vega": "^5.17.0",
"vega": "^5.17.3",
"vega-lite": "^4.17.0",
"vega-schema-url-parser": "^2.1.0",
"vega-tooltip": "^0.24.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-apm-config-loader/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ export class ApmConfiguration {

return {
globalLabels: {
branch: process.env.ghprbSourceBranch || '',
targetBranch: process.env.ghprbTargetBranch || '',
branch: process.env.GIT_BRANCH || '',
targetBranch: process.env.PR_TARGET_BRANCH || '',
ciBuildNumber: process.env.BUILD_NUMBER || '',
isPr: process.env.GITHUB_PR_NUMBER ? true : false,
prId: process.env.GITHUB_PR_NUMBER || '',
Expand Down
37 changes: 21 additions & 16 deletions packages/kbn-test/src/functional_test_runner/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,27 @@ export function runFtrCli() {
config: 'test/functional/config.js',
},
help: `
--config=path path to a config file
--bail stop tests after the first failure
--grep <pattern> pattern used to select which tests to run
--invert invert grep to exclude tests
--include=file a test file to be included, pass multiple times for multiple files
--exclude=file a test file to be excluded, pass multiple times for multiple files
--include-tag=tag a tag to be included, pass multiple times for multiple tags
--exclude-tag=tag a tag to be excluded, pass multiple times for multiple tags
--test-stats print the number of tests (included and excluded) to STDERR
--updateBaselines replace baseline screenshots with whatever is generated from the test
--updateSnapshots replace inline and file snapshots with whatever is generated from the test
-u replace both baseline screenshots and snapshots
--kibana-install-dir directory where the Kibana install being tested resides
--throttle enable network throttling in Chrome browser
--headless run browser in headless mode
`,
--config=path path to a config file
--bail stop tests after the first failure
--grep <pattern> pattern used to select which tests to run
--invert invert grep to exclude tests
--include=file a test file to be included, pass multiple times for multiple files
--exclude=file a test file to be excluded, pass multiple times for multiple files
--include-tag=tag a tag to be included, pass multiple times for multiple tags. Only
suites which have one of the passed include-tag tags will be executed.
When combined with the --exclude-tag flag both conditions must be met
for a suite to run.
--exclude-tag=tag a tag to be excluded, pass multiple times for multiple tags. Any suite
which has any of the exclude-tags will be excluded. When combined with
the --include-tag flag both conditions must be met for a suite to run.
--test-stats print the number of tests (included and excluded) to STDERR
--updateBaselines replace baseline screenshots with whatever is generated from the test
--updateSnapshots replace inline and file snapshots with whatever is generated from the test
-u replace both baseline screenshots and snapshots
--kibana-install-dir directory where the Kibana install being tested resides
--throttle enable network throttling in Chrome browser
--headless run browser in headless mode
`,
},
}
);
Expand Down
21 changes: 21 additions & 0 deletions scripts/ensure_all_tests_in_ci_group.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

require('../src/setup_node_env');
require('../src/dev/run_ensure_all_tests_in_ci_group');
14 changes: 14 additions & 0 deletions src/core/public/chrome/ui/header/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
@include euiHeaderAffordForFixed;

.euiDataGrid__restrictBody {
.headerGlobalNav,
.kbnQueryBar {
display: none;
}
}

.euiDataGrid__restrictBody.euiBody--headerIsFixed {
.euiFlyout {
top: 0;
height: 100%;
}
}

.chrHeaderHelpMenu__version {
text-transform: none;
}
Expand Down
8 changes: 7 additions & 1 deletion src/core/server/http/http_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ export class HttpConfig {
rawExternalUrlConfig: ExternalUrlConfig
) {
this.autoListen = rawHttpConfig.autoListen;
this.host = rawHttpConfig.host;
// TODO: Consider dropping support for '0' in v8.0.0. This value is passed
// to hapi, which validates it. Prior to hapi v20, '0' was considered a
// valid host, however the validation logic internally in hapi was
// re-written for v20 and hapi no longer considers '0' a valid host. For
// details, see:
// https://github.com/elastic/kibana/issues/86716#issuecomment-749623781
this.host = rawHttpConfig.host === '0' ? '0.0.0.0' : rawHttpConfig.host;
this.port = rawHttpConfig.port;
this.cors = rawHttpConfig.cors;
this.customResponseHeaders = Object.entries(rawHttpConfig.customResponseHeaders ?? {}).reduce(
Expand Down
33 changes: 15 additions & 18 deletions src/core/server/logging/layouts/json_layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import moment from 'moment-timezone';
import { merge } from 'lodash';
import { merge } from '@kbn/std';
import { schema } from '@kbn/config-schema';
import { LogRecord, Layout } from '@kbn/logging';

Expand Down Expand Up @@ -53,22 +53,19 @@ export class JsonLayout implements Layout {
}

public format(record: LogRecord): string {
return JSON.stringify(
merge(
{
'@timestamp': moment(record.timestamp).format('YYYY-MM-DDTHH:mm:ss.SSSZ'),
message: record.message,
error: JsonLayout.errorToSerializableObject(record.error),
log: {
level: record.level.id.toUpperCase(),
logger: record.context,
},
process: {
pid: record.pid,
},
},
record.meta
)
);
const log = {
'@timestamp': moment(record.timestamp).format('YYYY-MM-DDTHH:mm:ss.SSSZ'),
message: record.message,
error: JsonLayout.errorToSerializableObject(record.error),
log: {
level: record.level.id.toUpperCase(),
logger: record.context,
},
process: {
pid: record.pid,
},
};
const output = record.meta ? merge(log, record.meta) : log;
return JSON.stringify(output);
}
}
Loading

0 comments on commit 4240dc4

Please sign in to comment.