Skip to content

Commit

Permalink
Merge branch 'master' into pr/97311
Browse files Browse the repository at this point in the history
* master: (27 commits)
  Disable contextMenu when event is not event.kind=event (elastic#100027)
  Updates the monorepo-packages list (elastic#100096)
  Removes circular deps for lists in tooling and bumps down byte limit for lists (elastic#100082)
  [Security Solutions] Breaks down the io-ts packages to decrease plugin size (elastic#100058)
  fix-typo: Use of `than` instead of `then` (elastic#100030)
  [Fleet] Fix error when searching for keys whose names have spaces (elastic#100056)
  [Workplace Search] Fix bug when transitioning to personal dashboard (elastic#100061)
  [index pattern field editor] Update runtime field painless docs url (elastic#100014)
  [QA] Switch tests to use importExport - visualize (elastic#98063)
  [Canvas] Remove unused legacy autocomplete component (elastic#99215)
  Re-enable formerly flaky shareable test (elastic#98826)
  [Uptime] [Synthetics Integration] ensure that proxy url is not overwritten (elastic#99944)
  [Security Solutions][Lists] Trims down list plugin size by breaking out the exception builder into chunks by using react lazy loading (elastic#99989)
  [Uptime] Increase debounce and add immediate submit to `useQueryBar` (elastic#99675)
  chore(NA): moving @kbn/docs-utils into bazel (elastic#100051)
  [Enterprise Search] Fix SchemaFieldTypeSelect axe issues (elastic#100035)
  Remove outdated comment about schema validation not working (it does work now). (elastic#100055)
  Rename alert status OK to Recovered and fix some UX issues around disabling a rule while being in an error state (elastic#98135)
  [Fleet] Do not use async method in plugin setup|start (elastic#100033)
  Skip flaky functional test suite
  ...
  • Loading branch information
gmmorris committed May 14, 2021
2 parents 5abd26b + 108252b commit 44babf8
Show file tree
Hide file tree
Showing 531 changed files with 4,781 additions and 2,859 deletions.
7 changes: 5 additions & 2 deletions docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,22 @@ yarn kbn watch-bazel
- @kbn/config-schema
- @kbn/crypto
- @kbn/dev-utils
- @kbn/docs-utils
- @kbn/es
- @kbn/eslint-import-resolver-kibana
- @kbn/eslint-plugin-eslint
- @kbn/expect
- @kbn/legacy-logging
- @kbn/logging
- @kbn/securitysolution-constants
- @kbn/securitysolution-utils
- @kbn/securitysolution-es-utils
- kbn/securitysolution-io-ts-alerting-types
- kbn/securitysolution-io-ts-list-types
- kbn/securitysolution-io-ts-types
- @kbn/securitysolution-io-ts-utils
- @kbn/securitysolution-utils
- @kbn/std
- @kbn/telemetry-utils
- @kbn/tinymath
- @kbn/utility-types
- @kbn/utils

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,5 @@ export interface DocLinksStart
| --- | --- | --- |
| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | <code>string</code> | |
| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | <code>string</code> | |

| [links](./kibana-plugin-core-public.doclinksstart.links.md) | <code>{</code><br/><code> readonly canvas: {</code><br/><code> readonly guide: string;</code><br/><code> };</code><br/><code> readonly dashboard: {</code><br/><code> readonly guide: string;</code><br/><code> readonly drilldowns: string;</code><br/><code> readonly drilldownsTriggerPicker: string;</code><br/><code> readonly urlDrilldownTemplateSyntax: string;</code><br/><code> readonly urlDrilldownVariables: string;</code><br/><code> };</code><br/><code> readonly discover: Record&lt;string, string&gt;;</code><br/><code> readonly filebeat: {</code><br/><code> readonly base: string;</code><br/><code> readonly installation: string;</code><br/><code> readonly configuration: string;</code><br/><code> readonly elasticsearchOutput: string;</code><br/><code> readonly elasticsearchModule: string;</code><br/><code> readonly startup: string;</code><br/><code> readonly exportedFields: string;</code><br/><code> };</code><br/><code> readonly auditbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly metricbeat: {</code><br/><code> readonly base: string;</code><br/><code> readonly configure: string;</code><br/><code> readonly httpEndpoint: string;</code><br/><code> readonly install: string;</code><br/><code> readonly start: string;</code><br/><code> };</code><br/><code> readonly enterpriseSearch: {</code><br/><code> readonly base: string;</code><br/><code> readonly appSearchBase: string;</code><br/><code> readonly workplaceSearchBase: string;</code><br/><code> };</code><br/><code> readonly heartbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly logstash: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly functionbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly winlogbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly aggs: {</code><br/><code> readonly composite: string;</code><br/><code> readonly composite_missing_bucket: string;</code><br/><code> readonly date_histogram: string;</code><br/><code> readonly date_range: string;</code><br/><code> readonly date_format_pattern: string;</code><br/><code> readonly filter: string;</code><br/><code> readonly filters: string;</code><br/><code> readonly geohash_grid: string;</code><br/><code> readonly histogram: string;</code><br/><code> readonly ip_range: string;</code><br/><code> readonly range: string;</code><br/><code> readonly significant_terms: string;</code><br/><code> readonly terms: string;</code><br/><code> readonly avg: string;</code><br/><code> readonly avg_bucket: string;</code><br/><code> readonly max_bucket: string;</code><br/><code> readonly min_bucket: string;</code><br/><code> readonly sum_bucket: string;</code><br/><code> readonly cardinality: string;</code><br/><code> readonly count: string;</code><br/><code> readonly cumulative_sum: string;</code><br/><code> readonly derivative: string;</code><br/><code> readonly geo_bounds: string;</code><br/><code> readonly geo_centroid: string;</code><br/><code> readonly max: string;</code><br/><code> readonly median: string;</code><br/><code> readonly min: string;</code><br/><code> readonly moving_avg: string;</code><br/><code> readonly percentile_ranks: string;</code><br/><code> readonly serial_diff: string;</code><br/><code> readonly std_dev: string;</code><br/><code> readonly sum: string;</code><br/><code> readonly top_hits: string;</code><br/><code> };</code><br/><code> readonly runtimeFields: {</code><br/><code> readonly overview: string;</code><br/><code> readonly mapping: string;</code><br/><code> };</code><br/><code> readonly scriptedFields: {</code><br/><code> readonly scriptFields: string;</code><br/><code> readonly scriptAggs: string;</code><br/><code> readonly painless: string;</code><br/><code> readonly painlessApi: string;</code><br/><code> readonly painlessLangSpec: string;</code><br/><code> readonly painlessSyntax: string;</code><br/><code> readonly painlessWalkthrough: string;</code><br/><code> readonly luceneExpressions: string;</code><br/><code> };</code><br/><code> readonly search: {</code><br/><code> readonly sessions: string;</code><br/><code> };</code><br/><code> readonly indexPatterns: {</code><br/><code> readonly introduction: string;</code><br/><code> readonly fieldFormattersNumber: string;</code><br/><code> readonly fieldFormattersString: string;</code><br/><code> };</code><br/><code> readonly addData: string;</code><br/><code> readonly kibana: string;</code><br/><code> readonly upgradeAssistant: string;</code><br/><code> readonly elasticsearch: Record&lt;string, string&gt;;</code><br/><code> readonly siem: {</code><br/><code> readonly guide: string;</code><br/><code> readonly gettingStarted: string;</code><br/><code> };</code><br/><code> readonly query: {</code><br/><code> readonly eql: string;</code><br/><code> readonly kueryQuerySyntax: string;</code><br/><code> readonly luceneQuerySyntax: string;</code><br/><code> readonly percolate: string;</code><br/><code> readonly queryDsl: string;</code><br/><code> };</code><br/><code> readonly date: {</code><br/><code> readonly dateMath: string;</code><br/><code> readonly dateMathIndexNames: string;</code><br/><code> };</code><br/><code> readonly management: Record&lt;string, string&gt;;</code><br/><code> readonly ml: Record&lt;string, string&gt;;</code><br/><code> readonly transforms: Record&lt;string, string&gt;;</code><br/><code> readonly visualize: Record&lt;string, string&gt;;</code><br/><code> readonly apis: Readonly&lt;{</code><br/><code> bulkIndexAlias: string;</code><br/><code> byteSizeUnits: string;</code><br/><code> createAutoFollowPattern: string;</code><br/><code> createFollower: string;</code><br/><code> createIndex: string;</code><br/><code> createSnapshotLifecyclePolicy: string;</code><br/><code> createRoleMapping: string;</code><br/><code> createRoleMappingTemplates: string;</code><br/><code> createRollupJobsRequest: string;</code><br/><code> createApiKey: string;</code><br/><code> createPipeline: string;</code><br/><code> createTransformRequest: string;</code><br/><code> cronExpressions: string;</code><br/><code> executeWatchActionModes: string;</code><br/><code> indexExists: string;</code><br/><code> openIndex: string;</code><br/><code> putComponentTemplate: string;</code><br/><code> painlessExecute: string;</code><br/><code> painlessExecuteAPIContexts: string;</code><br/><code> putComponentTemplateMetadata: string;</code><br/><code> putSnapshotLifecyclePolicy: string;</code><br/><code> putIndexTemplateV1: string;</code><br/><code> putWatch: string;</code><br/><code> simulatePipeline: string;</code><br/><code> timeUnits: string;</code><br/><code> updateTransform: string;</code><br/><code> }&gt;;</code><br/><code> readonly observability: Record&lt;string, string&gt;;</code><br/><code> readonly alerting: Record&lt;string, string&gt;;</code><br/><code> readonly maps: Record&lt;string, string&gt;;</code><br/><code> readonly monitoring: Record&lt;string, string&gt;;</code><br/><code> readonly security: Readonly&lt;{</code><br/><code> apiKeyServiceSettings: string;</code><br/><code> clusterPrivileges: string;</code><br/><code> elasticsearchSettings: string;</code><br/><code> elasticsearchEnableSecurity: string;</code><br/><code> indicesPrivileges: string;</code><br/><code> kibanaTLS: string;</code><br/><code> kibanaPrivileges: string;</code><br/><code> mappingRoles: string;</code><br/><code> mappingRolesFieldRules: string;</code><br/><code> runAsPrivilege: string;</code><br/><code> }&gt;;</code><br/><code> readonly watcher: Record&lt;string, string&gt;;</code><br/><code> readonly ccs: Record&lt;string, string&gt;;</code><br/><code> readonly plugins: Record&lt;string, string&gt;;</code><br/><code> readonly snapshotRestore: Record&lt;string, string&gt;;</code><br/><code> readonly ingest: Record&lt;string, string&gt;;</code><br/><code> }</code> | |


Binary file modified docs/user/alerting/images/rule-details-alerts-inactive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,12 @@
"@kbn/logging": "link:bazel-bin/packages/kbn-logging/npm_module",
"@kbn/monaco": "link:packages/kbn-monaco",
"@kbn/securitysolution-constants": "link:bazel-bin/packages/kbn-securitysolution-constants/npm_module",
"@kbn/securitysolution-utils": "link:bazel-bin/packages/kbn-securitysolution-utils/npm_module",
"@kbn/securitysolution-es-utils": "link:bazel-bin/packages/kbn-securitysolution-es-utils/npm_module",
"@kbn/securitysolution-io-ts-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-types/npm_module",
"@kbn/securitysolution-io-ts-alerting-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-alerting-types/npm_module",
"@kbn/securitysolution-io-ts-list-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-list-types/npm_module",
"@kbn/securitysolution-io-ts-utils": "link:bazel-bin/packages/kbn-securitysolution-io-ts-utils/npm_module",
"@kbn/securitysolution-utils": "link:bazel-bin/packages/kbn-securitysolution-utils/npm_module",
"@kbn/server-http-tools": "link:packages/kbn-server-http-tools",
"@kbn/server-route-repository": "link:packages/kbn-server-route-repository",
"@kbn/std": "link:bazel-bin/packages/kbn-std/npm_module",
Expand Down Expand Up @@ -265,6 +268,7 @@
"json-stringify-safe": "5.0.1",
"jsonwebtoken": "^8.5.1",
"jsts": "^1.6.2",
"@kbn/rule-data-utils": "link:packages/kbn-rule-data-utils",
"kea": "^2.3.0",
"leaflet": "1.5.1",
"leaflet-draw": "0.4.14",
Expand Down Expand Up @@ -447,7 +451,7 @@
"@kbn/babel-preset": "link:bazel-bin/packages/kbn-babel-preset/npm_module",
"@kbn/cli-dev-mode": "link:packages/kbn-cli-dev-mode",
"@kbn/dev-utils": "link:bazel-bin/packages/kbn-dev-utils/npm_module",
"@kbn/docs-utils": "link:packages/kbn-docs-utils",
"@kbn/docs-utils": "link:bazel-bin/packages/kbn-docs-utils/npm_module",
"@kbn/es": "link:bazel-bin/packages/kbn-es/npm_module",
"@kbn/es-archiver": "link:packages/kbn-es-archiver",
"@kbn/eslint-import-resolver-kibana": "link:bazel-bin/packages/kbn-eslint-import-resolver-kibana/npm_module",
Expand Down
4 changes: 4 additions & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ filegroup(
"//packages/kbn-config-schema:build",
"//packages/kbn-crypto:build",
"//packages/kbn-dev-utils:build",
"//packages/kbn-docs-utils:build",
"//packages/kbn-es:build",
"//packages/kbn-eslint-import-resolver-kibana:build",
"//packages/kbn-eslint-plugin-eslint:build",
Expand All @@ -24,6 +25,9 @@ filegroup(
"//packages/kbn-logging:build",
"//packages/kbn-plugin-generator:build",
"//packages/kbn-securitysolution-constants:build",
"//packages/kbn-securitysolution-io-ts-types:build",
"//packages/kbn-securitysolution-io-ts-alerting-types:build",
"//packages/kbn-securitysolution-io-ts-list-types:build",
"//packages/kbn-securitysolution-io-ts-utils:build",
"//packages/kbn-securitysolution-utils:build",
"//packages/kbn-securitysolution-es-utils:build",
Expand Down
88 changes: 88 additions & 0 deletions packages/kbn-docs-utils/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
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-docs-utils"
PKG_REQUIRE_NAME = "@kbn/docs-utils"

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

SRCS = SOURCE_FILES

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

NPM_MODULE_EXTRA_FILES = [
"package.json",
]

SRC_DEPS = [
"//packages/kbn-config",
"//packages/kbn-dev-utils",
"//packages/kbn-utils",
"@npm//dedent",
"@npm//ts-morph",
]

TYPES_DEPS = [
"@npm//@types/dedent",
"@npm//@types/jest",
"@npm//@types/node",
]

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 = [":tsc"] + DEPS,
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-docs-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,5 @@
"types": "target/index.d.ts",
"kibana": {
"devOnly": true
},
"scripts": {
"kbn:bootstrap": "../../node_modules/.bin/tsc",
"kbn:watch": "../../node_modules/.bin/tsc --watch"
}
}
3 changes: 2 additions & 1 deletion packages/kbn-docs-utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"incremental": false,
"incremental": true,
"outDir": "./target",
"target": "ES2019",
"declaration": true,
"declarationMap": true,
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-docs-utils/src",
"types": [
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-legacy-logging/src/rotate/log_rotator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class LogRotator {
if (this.usePolling && !this.shouldUsePolling) {
this.log(
['warning', 'logging:rotate'],
'Looks like your current environment support a faster algorithm then polling. You can try to disable `usePolling`'
'Looks like your current environment support a faster algorithm than polling. You can try to disable `usePolling`'
);
}

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 @@ -46,7 +46,7 @@ pageLoadAssetSize:
lens: 96624
licenseManagement: 41817
licensing: 29004
lists: 280504
lists: 200000
logstash: 53548
management: 46112
maps: 80000
Expand All @@ -61,7 +61,6 @@ pageLoadAssetSize:
remoteClusters: 51327
reporting: 183418
rollup: 97204
ruleRegistry: 100000
savedObjects: 108518
savedObjectsManagement: 101836
savedObjectsTagging: 59482
Expand Down
13 changes: 13 additions & 0 deletions packages/kbn-rule-data-utils/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-rule-data-utils'],
};
13 changes: 13 additions & 0 deletions packages/kbn-rule-data-utils/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "@kbn/rule-data-utils",
"main": "./target/index.js",
"types": "./target/index.d.ts",
"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"
}
}
9 changes: 9 additions & 0 deletions packages/kbn-rule-data-utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export * from './technical_field_names';
77 changes: 77 additions & 0 deletions packages/kbn-rule-data-utils/src/technical_field_names.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { ValuesType } from 'utility-types';

const ALERT_NAMESPACE = 'kibana.rac.alert';

const TIMESTAMP = '@timestamp' as const;
const EVENT_KIND = 'event.kind' as const;
const EVENT_ACTION = 'event.action' as const;
const RULE_UUID = 'rule.uuid' as const;
const RULE_ID = 'rule.id' as const;
const RULE_NAME = 'rule.name' as const;
const RULE_CATEGORY = 'rule.category' as const;
const TAGS = 'tags' as const;
const PRODUCER = `${ALERT_NAMESPACE}.producer` as const;
const ALERT_ID = `${ALERT_NAMESPACE}.id` as const;
const ALERT_UUID = `${ALERT_NAMESPACE}.uuid` as const;
const ALERT_START = `${ALERT_NAMESPACE}.start` as const;
const ALERT_END = `${ALERT_NAMESPACE}.end` as const;
const ALERT_DURATION = `${ALERT_NAMESPACE}.duration.us` as const;
const ALERT_SEVERITY_LEVEL = `${ALERT_NAMESPACE}.severity.level` as const;
const ALERT_SEVERITY_VALUE = `${ALERT_NAMESPACE}.severity.value` as const;
const ALERT_STATUS = `${ALERT_NAMESPACE}.status` as const;
const ALERT_EVALUATION_THRESHOLD = `${ALERT_NAMESPACE}.evaluation.threshold` as const;
const ALERT_EVALUATION_VALUE = `${ALERT_NAMESPACE}.evaluation.value` as const;

const fields = {
TIMESTAMP,
EVENT_KIND,
EVENT_ACTION,
RULE_UUID,
RULE_ID,
RULE_NAME,
RULE_CATEGORY,
TAGS,
PRODUCER,
ALERT_ID,
ALERT_UUID,
ALERT_START,
ALERT_END,
ALERT_DURATION,
ALERT_SEVERITY_LEVEL,
ALERT_SEVERITY_VALUE,
ALERT_STATUS,
ALERT_EVALUATION_THRESHOLD,
ALERT_EVALUATION_VALUE,
};

export {
TIMESTAMP,
EVENT_KIND,
EVENT_ACTION,
RULE_UUID,
RULE_ID,
RULE_NAME,
RULE_CATEGORY,
TAGS,
PRODUCER,
ALERT_ID,
ALERT_UUID,
ALERT_START,
ALERT_END,
ALERT_DURATION,
ALERT_SEVERITY_LEVEL,
ALERT_SEVERITY_VALUE,
ALERT_STATUS,
ALERT_EVALUATION_THRESHOLD,
ALERT_EVALUATION_VALUE,
};

export type TechnicalRuleDataFieldName = ValuesType<typeof fields>;
Loading

0 comments on commit 44babf8

Please sign in to comment.