Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into watcher_updat…
Browse files Browse the repository at this point in the history
…e_tests
  • Loading branch information
alisonelizabeth committed Jan 13, 2021
2 parents 3063308 + badd2b3 commit 31a0c9e
Show file tree
Hide file tree
Showing 390 changed files with 4,204 additions and 2,685 deletions.
4 changes: 2 additions & 2 deletions docs/developer/advanced/upgrading-nodejs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Theses files must be updated when upgrading Node.js:

- {kib-repo}blob/{branch}/.ci/Dockerfile[`.ci/Dockerfile`] - The version is specified in the `NODE_VERSION` constant.
This is used to pull the relevant image from https://hub.docker.com/_/node[Docker Hub].
Note that Docker Hub can take 24+ hours to be updated with the new images after a new release of Node.js, so if you're upgrading Node.js in Kibana _just_ after the official Node.js release, you have to check if the new images are present on Docker Hub.
Note that Docker Hub can take 24+ hours to be updated with the new images after a new release of Node.js, so if you're upgrading Node.js in Kibana just after the official Node.js release, you have to check if the new images are present on Docker Hub.
If they are not, and the update is urgent, you can skip this file and update it later once Docker Hub has been updated.
- {kib-repo}blob/{branch}/.node-version[`.node-version`]
- {kib-repo}blob/{branch}/.nvmrc[`.nvmrc`]
Expand All @@ -29,7 +29,7 @@ Hence, upgrades to either Node.js 14 or Node.js 10 shold be done as separate PRs

==== Node.js patch upgrades

Typically, you want to backport Node.js *patch* upgrades to all supported release branches that run the same _major_ Node.js version:
Typically, you want to backport Node.js *patch* upgrades to all supported release branches that run the same *major* Node.js version:

- If upgrading Node.js 14, and the current release is 7.11.1, the main PR should target `master` and be backported to `7.x` and `7.11`.
- If upgrading Node.js 10, the main PR should target `6.8` only.
Expand Down
8 changes: 2 additions & 6 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ Content is fetched from the remote (https://feeds.elastic.co and https://feeds-s
|Create choropleth maps. Display the results of a term-aggregation as e.g. countries, zip-codes, states.
|{kib-repo}blob/{branch}/src/plugins/runtime_fields/README.mdx[runtimeFields]
|The runtime fields plugin provides types and constants for OSS and xpack runtime field related code.
|{kib-repo}blob/{branch}/src/plugins/saved_objects/README.md[savedObjects]
|The savedObjects plugin exposes utilities to manipulate saved objects on the client side.
Expand Down Expand Up @@ -491,8 +487,8 @@ Elastic.
|Welcome to the Kibana rollup plugin! This plugin provides Kibana support for Elasticsearch's rollup feature. Please refer to the Elasticsearch documentation to understand rollup indices and how to create rollup jobs.
|{kib-repo}blob/{branch}/x-pack/plugins/runtime_field_editor/README.md[runtimeFieldEditor]
|Welcome to the home of the runtime field editor!
|{kib-repo}blob/{branch}/x-pack/plugins/runtime_fields/README.md[runtimeFields]
|Welcome to the home of the runtime field editor and everything related to runtime fields!
|{kib-repo}blob/{branch}/x-pack/plugins/saved_objects_tagging/README.md[savedObjectsTagging]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- 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; [ExecutionContext](./kibana-plugin-plugins-expressions-public.executioncontext.md) &gt; [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-public.executioncontext.issynccolorsenabled.md)

## ExecutionContext.isSyncColorsEnabled property

Returns the state (true\|false) of the sync colors across panels switch.

<b>Signature:</b>

```typescript
isSyncColorsEnabled?: () => boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters,
| [getSearchContext](./kibana-plugin-plugins-expressions-public.executioncontext.getsearchcontext.md) | <code>() =&gt; ExecutionContextSearch</code> | Get search context of the expression. |
| [getSearchSessionId](./kibana-plugin-plugins-expressions-public.executioncontext.getsearchsessionid.md) | <code>() =&gt; string &#124; undefined</code> | Search context in which expression should operate. |
| [inspectorAdapters](./kibana-plugin-plugins-expressions-public.executioncontext.inspectoradapters.md) | <code>InspectorAdapters</code> | Adapters for <code>inspector</code> plugin. |
| [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-public.executioncontext.issynccolorsenabled.md) | <code>() =&gt; boolean</code> | Returns the state (true\|false) of the sync colors across panels switch. |
| [types](./kibana-plugin-plugins-expressions-public.executioncontext.types.md) | <code>Record&lt;string, ExpressionType&gt;</code> | A map of available expression types. |
| [variables](./kibana-plugin-plugins-expressions-public.executioncontext.variables.md) | <code>Record&lt;string, unknown&gt;</code> | Context variables that can be consumed using <code>var</code> and <code>var_set</code> functions. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- 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; [ExecutionContext](./kibana-plugin-plugins-expressions-server.executioncontext.md) &gt; [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-server.executioncontext.issynccolorsenabled.md)

## ExecutionContext.isSyncColorsEnabled property

Returns the state (true\|false) of the sync colors across panels switch.

<b>Signature:</b>

```typescript
isSyncColorsEnabled?: () => boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters,
| [getSearchContext](./kibana-plugin-plugins-expressions-server.executioncontext.getsearchcontext.md) | <code>() =&gt; ExecutionContextSearch</code> | Get search context of the expression. |
| [getSearchSessionId](./kibana-plugin-plugins-expressions-server.executioncontext.getsearchsessionid.md) | <code>() =&gt; string &#124; undefined</code> | Search context in which expression should operate. |
| [inspectorAdapters](./kibana-plugin-plugins-expressions-server.executioncontext.inspectoradapters.md) | <code>InspectorAdapters</code> | Adapters for <code>inspector</code> plugin. |
| [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-server.executioncontext.issynccolorsenabled.md) | <code>() =&gt; boolean</code> | Returns the state (true\|false) of the sync colors across panels switch. |
| [types](./kibana-plugin-plugins-expressions-server.executioncontext.types.md) | <code>Record&lt;string, ExpressionType&gt;</code> | A map of available expression types. |
| [variables](./kibana-plugin-plugins-expressions-server.executioncontext.variables.md) | <code>Record&lt;string, unknown&gt;</code> | Context variables that can be consumed using <code>var</code> and <code>var_set</code> functions. |

Binary file modified docs/discover/images/Discover-Start.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/document-table-expanded.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/document-table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/visualize-from-discover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 24 additions & 2 deletions docs/discover/kuery.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,35 @@ tags:(success and info and security)
[discrete]
=== Range queries

KQL supports `>`, `>=`, `<`, and `<=` on numeric and date types. For example:
KQL supports `>`, `>=`, `<`, and `<=` on numeric and date types.

[source,yaml]
-------------------
account_number >= 100 and items_sold <= 200 and @timestamp >= now-5m
account_number >= 100 and items_sold <= 200
-------------------

[discrete]
=== Date range queries

Typically, Kibana's <<set-time-filter,time filter>> is sufficient for setting a time range,
but in some cases you might need to search on dates. Include the date range in quotes.

[source,yaml]
-------------------
@timestamp < "2021-01-02T21:55:59"
-------------------

[source,yaml]
-------------------
@timestamp < "2021-01"
-------------------

[source,yaml]
-------------------
@timestamp < "2021"
-------------------


[discrete]
=== Exist queries

Expand Down
10 changes: 10 additions & 0 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,16 @@ This value must be a whole number greater than zero. *Default: `"1000"`*
suggestions. This value must be a whole number greater than zero.
*Default: `"100000"`*

|===

[NOTE]
============
To reload the logging settings, send a SIGHUP signal to {kib}.
============

[cols="2*<"]
|===

|[[logging-dest]] `logging.dest:`
| Enables you to specify a file where {kib} stores log output.
*Default: `stdout`*
Expand Down
3 changes: 1 addition & 2 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ pageLoadAssetSize:
visualizations: 295025
visualize: 57431
watcher: 43598
runtimeFields: 10000
runtimeFields: 41752
stackAlerts: 29684
presentationUtil: 28545
runtimeFieldEditor: 46986
spacesOss: 18817
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
* under the License.
*/

export * from './constants';
export * from './types';
require('../src/setup_node_env');
require('../src/dev/run_licenses_csv_report');
128 changes: 128 additions & 0 deletions src/dev/run_licenses_csv_report.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
/*
* 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.
*/

import { writeFileSync } from 'fs';
import { resolve } from 'path';
import { isNull, isUndefined } from 'lodash';

import { run } from '@kbn/dev-utils';

import { getInstalledPackages } from './npm';
import { engines } from '../../package';
import { LICENSE_OVERRIDES } from './license_checker';

const allDoubleQuoteRE = /"/g;

function escapeValue(value) {
if (isNull(value)) {
return;
}

return `"${value.replace(allDoubleQuoteRE, '""')}"`;
}

function formatCsvValues(fields, values) {
return fields
.map((field) => {
const value = values[field];

if (isNull(value) || isUndefined(value)) {
return null;
}

return value.toString();
})
.map(escapeValue)
.join(',');
}

run(
async ({ log, flags }) => {
const fields = ['name', 'version', 'url', 'license', 'sourceURL'];

const file = flags.csv;
const directory = flags.directory;
const dev = flags.dev;

const root = resolve(__dirname, '..', '..');
const packages = await getInstalledPackages({
directory: directory ? resolve(directory) : root,
licenseOverrides: LICENSE_OVERRIDES,
dev,
});

packages.unshift(
{
name: 'Node.js',
version: engines.node,
repository: 'https://nodejs.org',
licenses: ['MIT'],
},
{
name: 'Red Hat Universal Base Image minimal',
version: '8',
repository:
'https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8',
licenses: [
'Custom;https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf',
],
sourceURL: 'https://oss-dependencies.elastic.co/redhat/ubi/ubi-minimal-8-source.tar.gz',
}
);

const csv = packages
.map((pkg) => {
const data = {
name: pkg.name,
version: pkg.version,
url: pkg.repository || `https://www.npmjs.com/package/${pkg.name}`,
license: pkg.licenses.join(','),
sourceURL: pkg.sourceURL,
};

return formatCsvValues(fields, data);
})
.join('\n');

if (file) {
writeFileSync(file, `${fields.join(',')}\n${csv}`);
log.success(`wrote to ${file}`);
} else {
log.success(csv);
log.debug('\nspecify "--csv [filepath]" to write the data to a specific file');
}
},
{
description: `
Report of 3rd party dependencies
`,
flags: {
boolean: ['dev'],
string: ['csv', 'directory'],
default: {
dev: false,
},
help: `
--dev Include development dependencies
--csv Write csv report to file
--directory Directory to check for licenses
`,
},
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function EditorUI({ initialTextValue }: EditorProps) {

if (textareaElement) {
textareaElement.setAttribute('id', inputId);
textareaElement.setAttribute('data-test-subj', 'console-textarea');
}

const readQueryParams = () => {
Expand Down Expand Up @@ -204,7 +205,7 @@ function EditorUI({ initialTextValue }: EditorProps) {
}, [sendCurrentRequestToES, openDocumentation]);

return (
<div style={abs} className="conApp">
<div style={abs} data-test-subj="console-application" className="conApp">
<div className="conApp__editor">
<ul className="conApp__autoComplete" id="autocomplete" />
<EuiFlexGroup
Expand Down
37 changes: 33 additions & 4 deletions src/plugins/dashboard/public/application/dashboard_state.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

import { createBrowserHistory } from 'history';
import { getSavedDashboardMock } from './test_helpers';
import { DashboardContainer, DashboardContainerInput } from '.';
import { DashboardContainer, DashboardContainerInput, DashboardPanelState } from '.';
import { DashboardStateManager } from './dashboard_state_manager';
import { DashboardContainerServices } from './embeddable/dashboard_container';

import { ViewMode } from '../services/embeddable';
import { EmbeddableInput, ViewMode } from '../services/embeddable';
import { createKbnUrlStateStorage } from '../services/kibana_utils';
import { InputTimeRange, TimefilterContract, TimeRange } from '../services/data';

Expand Down Expand Up @@ -134,6 +134,11 @@ describe('DashboardState', function () {

const dashboardContainer = initDashboardContainer({
expandedPanelId: 'theCoolestPanelOnThisDashboard',
panels: {
theCoolestPanelOnThisDashboard: {
explicitInput: { id: 'theCoolestPanelOnThisDashboard' },
} as DashboardPanelState<EmbeddableInput>,
},
});

dashboardState.handleDashboardContainerChanges(dashboardContainer);
Expand All @@ -149,15 +154,39 @@ describe('DashboardState', function () {

const dashboardContainer = initDashboardContainer({
expandedPanelId: 'theCoolestPanelOnThisDashboard',
panels: {
theCoolestPanelOnThisDashboard: {
explicitInput: { id: 'theCoolestPanelOnThisDashboard' },
} as DashboardPanelState<EmbeddableInput>,
},
});

dashboardState.handleDashboardContainerChanges(dashboardContainer);
dashboardState.handleDashboardContainerChanges(dashboardContainer);
expect(dashboardState.setExpandedPanelId).toHaveBeenCalledTimes(1);
});

test('expandedPanelId is set to undefined if panel does not exist in input', () => {
dashboardState.setExpandedPanelId = jest
.fn()
.mockImplementation(dashboardState.setExpandedPanelId);
const dashboardContainer = initDashboardContainer({
expandedPanelId: 'theCoolestPanelOnThisDashboard',
panels: {
theCoolestPanelOnThisDashboard: {
explicitInput: { id: 'theCoolestPanelOnThisDashboard' },
} as DashboardPanelState<EmbeddableInput>,
},
});

dashboardState.handleDashboardContainerChanges(dashboardContainer);
expect(dashboardState.setExpandedPanelId).toHaveBeenCalledWith(
'theCoolestPanelOnThisDashboard'
);

dashboardContainer.updateInput({ expandedPanelId: 'woah it changed' });
dashboardContainer.updateInput({ expandedPanelId: 'theLeastCoolPanelOnThisDashboard' });
dashboardState.handleDashboardContainerChanges(dashboardContainer);
expect(dashboardState.setExpandedPanelId).toHaveBeenCalledTimes(2);
expect(dashboardState.setExpandedPanelId).toHaveBeenCalledWith(undefined);
});
});

Expand Down
Loading

0 comments on commit 31a0c9e

Please sign in to comment.