Skip to content

Commit

Permalink
Merge branch 'master' into issue-60119-audit-trail
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Jul 6, 2020
2 parents d283755 + 564e91f commit 14bc4b2
Show file tree
Hide file tree
Showing 1,131 changed files with 22,608 additions and 8,068 deletions.
9 changes: 8 additions & 1 deletion .ci/Jenkinsfile_coverage
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,22 @@ kibanaPipeline(timeoutMinutes: 240) {
}

def handleIngestion(timestamp) {
def previousSha = handlePreviousSha()
kibanaPipeline.downloadCoverageArtifacts()
kibanaCoverage.prokLinks("### Process HTML Links")
kibanaCoverage.collectVcsInfo("### Collect VCS Info")
kibanaCoverage.generateReports("### Merge coverage reports")
kibanaCoverage.uploadCombinedReports()
kibanaCoverage.ingest(env.JOB_NAME, BUILD_NUMBER, BUILD_URL, timestamp, '### Ingest && Upload')
kibanaCoverage.ingest(env.JOB_NAME, BUILD_NUMBER, BUILD_URL, timestamp, previousSha, '### Ingest && Upload')
kibanaCoverage.uploadCoverageStaticSite(timestamp)
}

def handlePreviousSha() {
def previous = kibanaCoverage.downloadPrevious('### Download OLD Previous')
kibanaCoverage.uploadPrevious('### Upload NEW Previous')
return previous
}

def handleFail() {
def buildStatus = buildUtils.getBuildStatus()
if(params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED' && buildStatus != 'UNSTABLE') {
Expand Down
1 change: 1 addition & 0 deletions .ci/end2end.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pipeline {
HOME = "${env.WORKSPACE}"
E2E_DIR = 'x-pack/plugins/apm/e2e'
PIPELINE_LOG_LEVEL = 'DEBUG'
KBN_OPTIMIZER_THEMES = 'v7light'
}
options {
timeout(time: 1, unit: 'HOURS')
Expand Down
7 changes: 4 additions & 3 deletions .ci/es-snapshots/Jenkinsfile_build_es
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def PROMOTE_WITHOUT_VERIFY = !!params.PROMOTE_WITHOUT_VERIFICATION
timeout(time: 120, unit: 'MINUTES') {
timestamps {
ansiColor('xterm') {
node(workers.label('s')) {
node(workers.label('l')) {
catchErrors {
def VERSION
def SNAPSHOT_ID
Expand Down Expand Up @@ -154,9 +154,10 @@ def buildArchives(destination) {
"NODE_NAME=",
]) {
sh """
./gradlew -p distribution/archives assemble --parallel
./gradlew -Dbuild.docker=true assemble --parallel
mkdir -p ${destination}
find distribution/archives -type f \\( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elasticsearch-*-*-*-*.zip' \\) -not -path *no-jdk* -exec cp {} ${destination} \\;
find distribution -type f \\( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elasticsearch-*-*-*-*.zip' \\) -not -path *no-jdk* -not -path *build-context* -exec cp {} ${destination} \\;
docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}" | xargs -n1 bash -c 'docker save docker.elastic.co/elasticsearch/elasticsearch:\${0} | gzip > ${destination}/elasticsearch-\${0}-docker-image.tar.gz'
"""
}
}
15 changes: 15 additions & 0 deletions .fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
# Visit https://fossa.com to learn more

version: 2
cli:
server: https://app.fossa.com
fetcher: custom
project: kibana
analyze:
modules:
- name: kibana
type: nodejs
strategy: yarn.lock
target: .
path: .
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ We are still to develop a proper process to accept any contributed translations.

When writing a new component, create a sibling SASS file of the same name and import directly into the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint).

Any JavaScript (or TypeScript) file that imports SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`styling_constants.scss` file](https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/styles/_styling_constants.scss). However, any Legacy (file path includes `/legacy`) files will not.
All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/legacy/ui/public/styles/_globals_v7light.scss).

**Example:**

Expand Down Expand Up @@ -679,15 +679,15 @@ Part of this process only applies to maintainers, since it requires access to Gi
Kibana publishes [Release Notes](https://www.elastic.co/guide/en/kibana/current/release-notes.html) for major and minor releases. The Release Notes summarize what the PRs accomplish in language that is meaningful to users. To generate the Release Notes, the team runs a script against this repo to collect the merged PRs against the release.

#### Create the Release Notes text
The text that appears in the Release Notes is pulled directly from your PR title, or a single paragraph of text that you specify in the PR description.
The text that appears in the Release Notes is pulled directly from your PR title, or a single paragraph of text that you specify in the PR description.

To use a single paragraph of text, enter `Release note:` or a `## Release note` header in the PR description, followed by your text. For example, refer to this [PR](https://github.com/elastic/kibana/pull/65796) that uses the `## Release note` header.

When you create the Release Notes text, use the following best practices:
* Use present tense.
* Use present tense.
* Use sentence case.
* When you create a feature PR, start with `Adds`.
* When you create an enhancement PR, start with `Improves`.
* When you create an enhancement PR, start with `Improves`.
* When you create a bug fix PR, start with `Fixes`.
* When you create a deprecation PR, start with `Deprecates`.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/using-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NOTE: The {kib} Console supports only Elasticsearch APIs. You are unable to inte
[float]
[[api-authentication]]
=== Authentication
{kib} supports token-based authentication with the same username and password that you use to log into the {kib} Console.
{kib} supports token-based authentication with the same username and password that you use to log into the {kib} Console. In a given HTTP tool, and when available, you can select to use its 'Basic Authentication' option, which is where the username and password are stored in order to be passed as part of the call.

[float]
[[api-calls]]
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-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) &gt; [doc\_values](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md)

## SavedObjectsComplexFieldMapping.doc\_values property

<b>Signature:</b>

```typescript
doc_values?: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface SavedObjectsComplexFieldMapping

| Property | Type | Description |
| --- | --- | --- |
| [doc\_values](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md) | <code>boolean</code> | |
| [properties](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md) | <code>SavedObjectsMappingProperties</code> | |
| [type](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md) | <code>string</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-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) &gt; [doc\_values](./kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md)

## SavedObjectsCoreFieldMapping.doc\_values property

<b>Signature:</b>

```typescript
doc_values?: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface SavedObjectsCoreFieldMapping

| Property | Type | Description |
| --- | --- | --- |
| [doc\_values](./kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md) | <code>boolean</code> | |
| [enabled](./kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md) | <code>boolean</code> | |
| [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) | <code>{</code><br/><code> [subfield: string]: {</code><br/><code> type: string;</code><br/><code> ignore_above?: number;</code><br/><code> };</code><br/><code> }</code> | |
| [index](./kibana-plugin-core-server.savedobjectscorefieldmapping.index.md) | <code>boolean</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

## SavedObjectTypeRegistry.getAllTypes() method

Return all [types](./kibana-plugin-core-server.savedobjectstype.md) currently registered.
Return all [types](./kibana-plugin-core-server.savedobjectstype.md) currently registered, including the hidden ones.

To only get the visible types (which is the most common use case), use `getVisibleTypes` instead.

<b>Signature:</b>

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

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectTypeRegistry](./kibana-plugin-core-server.savedobjecttyperegistry.md) &gt; [getVisibleTypes](./kibana-plugin-core-server.savedobjecttyperegistry.getvisibletypes.md)

## SavedObjectTypeRegistry.getVisibleTypes() method

Returns all visible [types](./kibana-plugin-core-server.savedobjectstype.md)<!-- -->.

A visible type is a type that doesn't explicitly define `hidden=true` during registration.

<b>Signature:</b>

```typescript
getVisibleTypes(): SavedObjectsType[];
```
<b>Returns:</b>

`SavedObjectsType[]`

Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ export declare class SavedObjectTypeRegistry

| Method | Modifiers | Description |
| --- | --- | --- |
| [getAllTypes()](./kibana-plugin-core-server.savedobjecttyperegistry.getalltypes.md) | | Return all [types](./kibana-plugin-core-server.savedobjectstype.md) currently registered. |
| [getAllTypes()](./kibana-plugin-core-server.savedobjecttyperegistry.getalltypes.md) | | Return all [types](./kibana-plugin-core-server.savedobjectstype.md) currently registered, including the hidden ones.<!-- -->To only get the visible types (which is the most common use case), use <code>getVisibleTypes</code> instead. |
| [getImportableAndExportableTypes()](./kibana-plugin-core-server.savedobjecttyperegistry.getimportableandexportabletypes.md) | | Return all [types](./kibana-plugin-core-server.savedobjectstype.md) currently registered that are importable/exportable. |
| [getIndex(type)](./kibana-plugin-core-server.savedobjecttyperegistry.getindex.md) | | Returns the <code>indexPattern</code> property for given type, or <code>undefined</code> if the type is not registered. |
| [getType(type)](./kibana-plugin-core-server.savedobjecttyperegistry.gettype.md) | | Return the [type](./kibana-plugin-core-server.savedobjectstype.md) definition for given type name. |
| [getVisibleTypes()](./kibana-plugin-core-server.savedobjecttyperegistry.getvisibletypes.md) | | Returns all visible [types](./kibana-plugin-core-server.savedobjectstype.md)<!-- -->.<!-- -->A visible type is a type that doesn't explicitly define <code>hidden=true</code> during registration. |
| [isHidden(type)](./kibana-plugin-core-server.savedobjecttyperegistry.ishidden.md) | | Returns the <code>hidden</code> property for given type, or <code>false</code> if the type is not registered. |
| [isImportableAndExportable(type)](./kibana-plugin-core-server.savedobjecttyperegistry.isimportableandexportable.md) | | Returns the <code>management.importableAndExportable</code> property for given type, or <code>false</code> if the type is not registered or does not define a management section. |
| [isMultiNamespace(type)](./kibana-plugin-core-server.savedobjecttyperegistry.ismultinamespace.md) | | Returns whether the type is multi-namespace (shareable); resolves to <code>false</code> if the type is not registered |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Serialize this format to a simple POJO, with only the params that are not defaul

```typescript
toJSON(): {
id: unknown;
params: _.Dictionary<unknown> | undefined;
id: any;
params: any;
};
```
<b>Returns:</b>

`{
id: unknown;
params: _.Dictionary<unknown> | undefined;
id: any;
params: any;
}`

1 change: 1 addition & 0 deletions docs/plugins/known-plugins.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ This list of plugins is not guaranteed to work on your version of Kibana. Instea
* https://github.com/sbeyn/kibana-plugin-traffic-sg[Traffic] (sbeyn)
* https://github.com/PhaedrusTheGreek/transform_vis[Transform Visualization] (PhaedrusTheGreek)
* https://github.com/nyurik/kibana-vega-vis[Vega-based visualizations] (nyurik) - Support for user-defined graphs, external data sources, maps, images, and user-defined interactivity.
* https://github.com/Camichan/kbn_aframe[VR Graph Visualizations] (Camichan)

[float]
=== Other
Expand Down
19 changes: 19 additions & 0 deletions docs/settings/reporting-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,25 @@ When `xpack.reporting.capture.browser.type` is set to `chromium` (default) you c
large exports from causing performance and storage issues.
Defaults to `10485760` (10mB).

| `xpack.reporting.csv.scroll.size`
| Number of documents retrieved from {es} for each scroll iteration during a CSV
export.
Defaults to `500`.

| `xpack.reporting.csv.scroll.duration`
| Amount of time allowed before {kib} cleans the scroll context during a CSV export.
Defaults to `30s`.

| `xpack.reporting.csv.checkForFormulas`
| Enables a check that warns you when there's a potential formula involved in the output (=, -, +, and @ chars).
See OWASP: https://www.owasp.org/index.php/CSV_Injection
Defaults to `true`.

| `xpack.reporting.csv.enablePanelActionDownload`
| Enables CSV export from a saved search on a dashboard. This action is available in the dashboard
panel menu for the saved search.
Defaults to `true`.

|===

[float]
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@
"**/@types/angular": "^1.6.56",
"**/@types/hoist-non-react-statics": "^3.3.1",
"**/@types/chai": "^4.2.11",
"**/cypress/@types/lodash": "^4.14.155",
"**/typescript": "3.9.5",
"**/graphql-toolkit/lodash": "^4.17.13",
"**/graphql-toolkit/lodash": "^4.17.15",
"**/hoist-non-react-statics": "^3.3.2",
"**/isomorphic-git/**/base64-js": "^1.2.1",
"**/image-diff/gm/debug": "^2.6.9",
Expand Down Expand Up @@ -122,7 +123,7 @@
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
"@babel/register": "^7.10.1",
"@elastic/apm-rum": "^5.2.0",
"@elastic/charts": "19.5.2",
"@elastic/charts": "19.7.0",
"@elastic/datemath": "5.0.3",
"@elastic/ems-client": "7.9.3",
"@elastic/eui": "24.1.0",
Expand Down Expand Up @@ -213,8 +214,7 @@
"leaflet.heat": "0.2.0",
"less": "npm:@elastic/less@2.7.3-kibana",
"less-loader": "5.0.0",
"lodash": "npm:@elastic/lodash@3.10.1-kibana4",
"lodash.clonedeep": "^4.5.0",
"lodash": "^4.17.15",
"lru-cache": "4.1.5",
"markdown-it": "^10.0.0",
"mini-css-extract-plugin": "0.8.0",
Expand Down Expand Up @@ -355,8 +355,7 @@
"@types/json5": "^0.0.30",
"@types/license-checker": "15.0.0",
"@types/listr": "^0.14.0",
"@types/lodash": "^3.10.1",
"@types/lodash.clonedeep": "^4.5.4",
"@types/lodash": "^4.14.155",
"@types/lru-cache": "^5.1.0",
"@types/markdown-it": "^0.0.7",
"@types/minimatch": "^2.0.29",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-config-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"tsd": "^0.7.4"
},
"peerDependencies": {
"lodash": "^4.17.15",
"joi": "^13.5.2",
"moment": "^2.24.0",
"type-detect": "^4.0.8"
Expand Down
3 changes: 1 addition & 2 deletions packages/kbn-interpreter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"dependencies": {
"@babel/runtime": "^7.10.2",
"@kbn/i18n": "1.0.0",
"lodash": "npm:@elastic/lodash@3.10.1-kibana4",
"lodash.clone": "^4.5.0",
"lodash": "^4.17.15",
"uuid": "3.3.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-interpreter/src/common/lib/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import clone from 'lodash.clone';
import { clone } from 'lodash';

export class Registry {
constructor(prop = 'name') {
Expand Down
20 changes: 20 additions & 0 deletions packages/kbn-optimizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,26 @@ When a directory is listed in the "extraPublicDirs" it will always be included i

Any import in a bundle which resolves into another bundles "context" directory, ie `src/plugins/*`, must map explicitly to a "public dir" exported by that plugin. If the resolved import is not in the list of public dirs an error will be thrown and the optimizer will fail to build that bundle until the error is fixed.

## Themes

SASS imports in bundles are automatically converted to CSS for one or more themes. In development we build the `v7light` and `v7dark` themes by default to improve build performance. When producing distributable bundles the default shifts to `*` so that the distributable bundles will include all themes, preventing the bundles from needing to be rebuilt when users change the active theme in Kibana's advanced settings.

To customize the themes that are built for development you can specify the `KBN_OPTIMIZER_THEMES` environment variable to one or more theme tags, or use `*` to build styles for all themes. Unfortunately building more than one theme significantly impacts build performance, so try to be strategic about which themes you build.

Currently supported theme tags: `v7light`, `v7dark`, `v8light`, `v8dark`

Examples:
```sh
# start Kibana with only a single theme
KBN_OPTIMIZER_THEMES=v7light yarn start

# start Kibana with dark themes for version 7 and 8
KBN_OPTIMIZER_THEMES=v7dark,v8dark yarn start

# start Kibana with all the themes
KBN_OPTIMIZER_THEMES=* yarn start
```

## API

To run the optimizer from code, you can import the [`OptimizerConfig`][OptimizerConfig] class and [`runOptimizer`][Optimizer] function. Create an [`OptimizerConfig`][OptimizerConfig] instance by calling it's static `create()` method with some options, then pass it to the [`runOptimizer`][Optimizer] function. `runOptimizer()` returns an observable of update objects, which are summaries of the optimizer state plus an optional `event` property which describes the internal events occuring and may be of use. You can use the [`logOptimizerState()`][LogOptimizerState] helper to write the relevant bits of state to a tooling log or checkout it's implementation to see how the internal events like [`WorkerStdio`][ObserveWorker] and [`WorkerStarted`][ObserveWorker] are used.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$globalStyleConstant: 11;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$globalStyleConstant: 12;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$globalStyleConstant: 13;
1 change: 1 addition & 0 deletions packages/kbn-optimizer/src/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ export * from './array_helpers';
export * from './event_stream_helpers';
export * from './disallowed_syntax_plugin';
export * from './parse_path';
export * from './theme_tags';
Loading

0 comments on commit 14bc4b2

Please sign in to comment.