Skip to content

Commit

Permalink
Merge branch 'master' into alerting/remove-legacy-es-client-in-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jun 24, 2021
2 parents b721a52 + fa71c6d commit 6fc3042
Show file tree
Hide file tree
Showing 194 changed files with 4,663 additions and 4,310 deletions.
2 changes: 2 additions & 0 deletions docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ yarn kbn watch-bazel
- @kbn/apm-utils
- @kbn/babel-code-parser
- @kbn/babel-preset
- @kbn/cli-dev-mode
- @kbn/config
- @kbn/config-schema
- @kbn/crypto
Expand All @@ -87,6 +88,7 @@ yarn kbn watch-bazel
- @kbn/mapbox-gl
- @kbn/monaco
- @kbn/optimizer
- @kbn/plugin-helpers
- @kbn/rule-data-utils
- @kbn/securitysolution-es-utils
- @kbn/securitysolution-hook-utils
Expand Down
3 changes: 3 additions & 0 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ of buckets to try to represent.
[[visualization-visualize-chartslibrary]]`visualization:visualize:legacyChartsLibrary`::
Enables the legacy charts library for aggregation-based area, line, and bar charts in *Visualize*.

[[visualization-visualize-pieChartslibrary]]`visualization:visualize:legacyPieChartsLibrary`::
Enables the legacy charts library for aggregation-based pie charts in *Visualize*.

[[visualization-colormapping]]`visualization:colorMapping`::
**This setting is deprecated and will not be supported as of 8.0.**
Maps values to specific colors in charts using the *Compatibility* palette.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@
"@elastic/maki": "6.3.0",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
"@elastic/react-search-ui": "^1.5.1",
"@elastic/react-search-ui": "^1.6.0",
"@elastic/request-crypto": "1.1.4",
"@elastic/safer-lodash-set": "link:bazel-bin/packages/elastic-safer-lodash-set",
"@elastic/search-ui-app-search-connector": "^1.5.0",
"@elastic/search-ui-app-search-connector": "^1.6.0",
"@elastic/ui-ace": "0.2.3",
"@hapi/accept": "^5.0.2",
"@hapi/boom": "^9.1.1",
Expand Down Expand Up @@ -457,7 +457,7 @@
"@jest/reporters": "^26.6.2",
"@kbn/babel-code-parser": "link:bazel-bin/packages/kbn-babel-code-parser",
"@kbn/babel-preset": "link:bazel-bin/packages/kbn-babel-preset",
"@kbn/cli-dev-mode": "link:packages/kbn-cli-dev-mode",
"@kbn/cli-dev-mode": "link:bazel-bin/packages/kbn-cli-dev-mode",
"@kbn/dev-utils": "link:bazel-bin/packages/kbn-dev-utils",
"@kbn/docs-utils": "link:bazel-bin/packages/kbn-docs-utils",
"@kbn/es": "link:bazel-bin/packages/kbn-es",
Expand All @@ -467,7 +467,7 @@
"@kbn/expect": "link:bazel-bin/packages/kbn-expect",
"@kbn/optimizer": "link:bazel-bin/packages/kbn-optimizer",
"@kbn/plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator",
"@kbn/plugin-helpers": "link:packages/kbn-plugin-helpers",
"@kbn/plugin-helpers": "link:bazel-bin/packages/kbn-plugin-helpers",
"@kbn/pm": "link:packages/kbn-pm",
"@kbn/storybook": "link:bazel-bin/packages/kbn-storybook",
"@kbn/telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools",
Expand Down
2 changes: 2 additions & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ filegroup(
"//packages/kbn-apm-utils:build",
"//packages/kbn-babel-code-parser:build",
"//packages/kbn-babel-preset:build",
"//packages/kbn-cli-dev-mode:build",
"//packages/kbn-common-utils:build",
"//packages/kbn-config:build",
"//packages/kbn-config-schema:build",
Expand All @@ -31,6 +32,7 @@ filegroup(
"//packages/kbn-monaco:build",
"//packages/kbn-optimizer:build",
"//packages/kbn-plugin-generator:build",
"//packages/kbn-plugin-helpers:build",
"//packages/kbn-rule-data-utils:build",
"//packages/kbn-securitysolution-list-constants:build",
"//packages/kbn-securitysolution-io-ts-types:build",
Expand Down
103 changes: 103 additions & 0 deletions packages/kbn-cli-dev-mode/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")

PKG_BASE_NAME = "kbn-cli-dev-mode"
PKG_REQUIRE_NAME = "@kbn/cli-dev-mode"

SOURCE_FILES = glob(
[
"src/**/*.ts",
],
exclude = ["**/*.test.*"],
)

SRCS = SOURCE_FILES

filegroup(
name = "srcs",
srcs = SRCS,
)

NPM_MODULE_EXTRA_FILES = [
"package.json",
"README.md"
]

SRC_DEPS = [
"//packages/kbn-config",
"//packages/kbn-config-schema",
"//packages/kbn-dev-utils",
"//packages/kbn-logging",
"//packages/kbn-optimizer",
"//packages/kbn-server-http-tools",
"//packages/kbn-std",
"//packages/kbn-utils",
"@npm//@hapi/h2o2",
"@npm//@hapi/hapi",
"@npm//argsplit",
"@npm//chokidar",
"@npm//elastic-apm-node",
"@npm//execa",
"@npm//getopts",
"@npm//lodash",
"@npm//moment",
"@npm//rxjs",
"@npm//supertest",
]

TYPES_DEPS = [
"@npm//@types/hapi__h2o2",
"@npm//@types/hapi__hapi",
"@npm//@types/getopts",
"@npm//@types/jest",
"@npm//@types/lodash",
"@npm//@types/node",
"@npm//@types/supertest",
]

DEPS = SRC_DEPS + TYPES_DEPS

ts_config(
name = "tsconfig",
src = "tsconfig.json",
deps = [
"//:tsconfig.base.json",
],
)

ts_project(
name = "tsc",
args = ['--pretty'],
srcs = SRCS,
deps = DEPS,
declaration = True,
declaration_map = True,
incremental = True,
out_dir = "target",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig",
)

js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = DEPS + [":tsc"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)

pkg_npm(
name = "npm_module",
deps = [
":%s" % PKG_BASE_NAME,
]
)

filegroup(
name = "build",
srcs = [
":npm_module",
],
visibility = ["//visibility:public"],
)
5 changes: 0 additions & 5 deletions packages/kbn-cli-dev-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true,
"scripts": {
"build": "../../node_modules/.bin/tsc",
"kbn:bootstrap": "yarn build",
"kbn:watch": "yarn build --watch"
},
"kibana": {
"devOnly": true
}
Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-cli-dev-mode/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"incremental": false,
"incremental": true,
"outDir": "./target",
"declaration": true,
"declarationMap": true,
"rootDir": "./src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-cli-dev-mode/src",
"types": [
Expand Down
8 changes: 4 additions & 4 deletions packages/kbn-interpreter/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@npm//pegjs:index.bzl", "pegjs")
load("@npm//peggy:index.bzl", "peggy")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")

PKG_BASE_NAME = "kbn-interpreter"
Expand Down Expand Up @@ -37,18 +37,18 @@ TYPES_DEPS = [

DEPS = SRC_DEPS + TYPES_DEPS

pegjs(
peggy(
name = "grammar",
data = [
":grammar/grammar.pegjs"
":grammar/grammar.peggy"
],
output_dir = True,
args = [
"--allowed-start-rules",
"expression,argument",
"-o",
"$(@D)/index.js",
"./%s/grammar/grammar.pegjs" % package_name()
"./%s/grammar/grammar.peggy" % package_name()
],
)

Expand Down
97 changes: 97 additions & 0 deletions packages/kbn-plugin-helpers/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@

load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")

PKG_BASE_NAME = "kbn-plugin-helpers"
PKG_REQUIRE_NAME = "@kbn/plugin-helpers"

SOURCE_FILES = glob(
[
"src/**/*.ts",
],
exclude = [
"**/*.test.*",
],
)

SRCS = SOURCE_FILES

filegroup(
name = "srcs",
srcs = SRCS,
)

NPM_MODULE_EXTRA_FILES = [
"package.json",
"README.md"
]

SRC_DEPS = [
"//packages/kbn-dev-utils",
"//packages/kbn-optimizer",
"//packages/kbn-utils",
"@npm//del",
"@npm//execa",
"@npm//extract-zip",
"@npm//globby",
"@npm//gulp-zip",
"@npm//inquirer",
"@npm//load-json-file",
"@npm//vinyl-fs",
]

TYPES_DEPS = [
"@npm//@types/extract-zip",
"@npm//@types/gulp-zip",
"@npm//@types/inquirer",
"@npm//@types/jest",
"@npm//@types/node",
"@npm//@types/vinyl-fs",
]

DEPS = SRC_DEPS + TYPES_DEPS

ts_config(
name = "tsconfig",
src = "tsconfig.json",
deps = [
"//:tsconfig.base.json",
],
)

ts_project(
name = "tsc",
args = ['--pretty'],
srcs = SRCS,
deps = DEPS,
declaration = True,
declaration_map = True,
incremental = True,
out_dir = "target",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig",
)

js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = DEPS + [":tsc"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)

pkg_npm(
name = "npm_module",
deps = [
":%s" % PKG_BASE_NAME,
]
)

filegroup(
name = "build",
srcs = [
":npm_module",
],
visibility = ["//visibility:public"],
)
4 changes: 0 additions & 4 deletions packages/kbn-plugin-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,5 @@
"types": "target/index.d.ts",
"bin": {
"plugin-helpers": "bin/plugin-helpers.js"
},
"scripts": {
"kbn:bootstrap": "rm -rf target && ../../node_modules/.bin/tsc",
"kbn:watch": "../../node_modules/.bin/tsc --watch"
}
}
2 changes: 1 addition & 1 deletion packages/kbn-plugin-helpers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"incremental": false,
"incremental": true,
"outDir": "target",
"target": "ES2018",
"declaration": true,
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/data/common/field_formats/converters/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import { FieldFormat } from '../field_format';
import { TextContextTypeConvert, FIELD_FORMAT_IDS } from '../types';
import { shortenDottedString } from '../../utils';

export const emptyLabel = i18n.translate('data.fieldFormats.string.emptyLabel', {
defaultMessage: '(empty)',
});

const TRANSFORM_OPTIONS = [
{
kind: false,
Expand Down Expand Up @@ -103,6 +107,9 @@ export class StringFormat extends FieldFormat {
}

textConvert: TextContextTypeConvert = (val) => {
if (val === '') {
return emptyLabel;
}
switch (this.param('transform')) {
case 'lower':
return String(val).toLowerCase();
Expand Down
12 changes: 11 additions & 1 deletion src/plugins/data/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,20 @@ export const searchSessionsConfigSchema = schema.object({
*/
pageSize: schema.number({ defaultValue: 100 }),
/**
* trackingInterval controls how often we track search session objects progress
* trackingInterval controls how often we track persisted search session objects progress
*/
trackingInterval: schema.duration({ defaultValue: '10s' }),

/**
* cleanupInterval controls how often we track non-persisted search session objects for cleanup
*/
cleanupInterval: schema.duration({ defaultValue: '60s' }),

/**
* expireInterval controls how often we track persisted search session objects for expiration
*/
expireInterval: schema.duration({ defaultValue: '60m' }),

/**
* monitoringTaskTimeout controls for how long task manager waits for search session monitoring task to complete before considering it timed out,
* If tasks timeouts it receives cancel signal and next task starts in "trackingInterval" time
Expand Down
Loading

0 comments on commit 6fc3042

Please sign in to comment.