Skip to content

Commit

Permalink
Merge branch 'master' into remote_clusters_a11y
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Apr 14, 2021
2 parents cfc4991 + 23e18b9 commit a3790b2
Show file tree
Hide file tree
Showing 191 changed files with 4,472 additions and 1,384 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ insert_final_newline = true
[package.json]
insert_final_newline = false

[*.{md,asciidoc}]
[*.{md,mdx,asciidoc}]
trim_trailing_whitespace = false
insert_final_newline = false
1 change: 1 addition & 0 deletions docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ yarn kbn watch-bazel
=== List of Already Migrated Packages to Bazel

- @elastic/datemath
- @kbn/apm-utils


Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ readonly links: {
readonly top_hits: string;
};
readonly runtimeFields: {
readonly overview: string;
readonly mapping: string;
};
readonly scriptedFields: {
Expand All @@ -114,9 +115,10 @@ readonly links: {
};
readonly query: {
readonly eql: string;
readonly kueryQuerySyntax: string;
readonly luceneQuerySyntax: string;
readonly percolate: string;
readonly queryDsl: string;
readonly kueryQuerySyntax: string;
};
readonly date: {
readonly dateMath: string;
Expand All @@ -127,6 +129,7 @@ readonly links: {
readonly transforms: Record<string, string>;
readonly visualize: Record<string, string>;
readonly apis: Readonly<{
bulkIndexAlias: string;
createIndex: string;
createSnapshotLifecyclePolicy: string;
createRoleMapping: string;
Expand All @@ -143,6 +146,7 @@ readonly links: {
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putIndexTemplateV1: string;
putWatch: string;
simulatePipeline: string;
updateTransform: string;
Expand Down

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/user/monitoring/kibana-alerts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ by running checks on a schedule time of 1 minute with a re-notify interval of 6
[[kibana-alerts-large-shard-size]]
== Large shard size

This alert is triggered if a large (primary) shard size is found on any of the
specified index patterns. The trigger condition is met if an index's shard size is
This alert is triggered if a large average shard size (across associated primaries) is found on any of the
specified index patterns. The trigger condition is met if an index's average shard size is
55gb or higher in the last 5 minutes. The alert is grouped across all indices that match
the default pattern of `*` by running checks on a schedule time of 1 minute with a re-notify
interval of 12 hours.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"@kbn/ace": "link:packages/kbn-ace",
"@kbn/analytics": "link:packages/kbn-analytics",
"@kbn/apm-config-loader": "link:packages/kbn-apm-config-loader",
"@kbn/apm-utils": "link:packages/kbn-apm-utils",
"@kbn/apm-utils": "link:bazel-bin/packages/kbn-apm-utils/npm_module",
"@kbn/config": "link:packages/kbn-config",
"@kbn/config-schema": "link:packages/kbn-config-schema",
"@kbn/crypto": "link:packages/kbn-crypto",
Expand Down
3 changes: 2 additions & 1 deletion packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
filegroup(
name = "build",
srcs = [
"//packages/elastic-datemath:build"
"//packages/elastic-datemath:build",
"//packages/kbn-apm-utils:build"
],
)
6 changes: 3 additions & 3 deletions packages/elastic-datemath/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
PKG_BASE_NAME = "elastic-datemath"
PKG_REQUIRE_NAME = "@elastic/datemath"

SOURCE_FILES = [
SOURCE_FILES = glob([
"src/index.ts",
]
])

SRCS = SOURCE_FILES

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

NPM_MODULE_EXTRA_FILES = [
Expand Down
1 change: 1 addition & 0 deletions packages/elastic-datemath/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"incremental": true,
"outDir": "target",
"rootDir": "src",
"sourceMap": true,
Expand Down
76 changes: 76 additions & 0 deletions packages/kbn-apm-utils/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
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-apm-utils"
PKG_REQUIRE_NAME = "@kbn/apm-utils"

SOURCE_FILES = glob([
"src/index.ts",
])

SRCS = SOURCE_FILES

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

NPM_MODULE_EXTRA_FILES = [
"package.json",
]

SRC_DEPS = [
"@npm//elastic-apm-node",
]

TYPES_DEPS = [
"@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 = [],
deps = [":tsc"] + DEPS,
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)

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

filegroup(
name = "build",
srcs = [
":npm_module",
],
visibility = ["//visibility:public"],
)
7 changes: 1 addition & 6 deletions packages/kbn-apm-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@
"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"
}
"private": true
}
6 changes: 3 additions & 3 deletions packages/kbn-apm-utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"incremental": false,
"outDir": "./target",
"stripInternal": false,
"declaration": true,
"declarationMap": true,
"incremental": true,
"outDir": "target",
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-apm-utils/src",
"types": [
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pageLoadAssetSize:
watcher: 43598
runtimeFields: 41752
stackAlerts: 29684
presentationUtil: 28545
presentationUtil: 49767
spacesOss: 18817
indexPatternFieldEditor: 90489
osquery: 107090
Expand Down
16 changes: 13 additions & 3 deletions packages/kbn-test/src/jest/utils/testbed/testbed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* Side Public License, v 1.
*/

import { ComponentType, ReactWrapper } from 'enzyme';
import { Component as ReactComponent } from 'react';
import { ComponentType, HTMLAttributes, ReactWrapper } from 'enzyme';

import { findTestSubject } from '../find_test_subject';
import { reactRouterMock } from '../router_helpers';
Expand Down Expand Up @@ -250,8 +251,17 @@ export const registerTestBed = <T extends string = string>(
component.update();
};

const getErrorsMessages: TestBed<T>['form']['getErrorsMessages'] = () => {
const errorMessagesWrappers = component.find('.euiFormErrorText');
const getErrorsMessages: TestBed<T>['form']['getErrorsMessages'] = (
wrapper?: T | ReactWrapper
) => {
let errorMessagesWrappers: ReactWrapper<HTMLAttributes, any, ReactComponent>;
if (typeof wrapper === 'string') {
errorMessagesWrappers = find(wrapper).find('.euiFormErrorText');
} else {
errorMessagesWrappers = wrapper
? wrapper.find('.euiFormErrorText')
: component.find('.euiFormErrorText');
}
return errorMessagesWrappers.map((err) => err.text());
};

Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-test/src/jest/utils/testbed/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export interface TestBed<T = string> {
/**
* Get a list of the form error messages that are visible in the DOM.
*/
getErrorsMessages: () => string[];
getErrorsMessages: (wrapper?: T | ReactWrapper) => string[];
};
table: {
getMetaData: (tableTestSubject: T) => EuiTableMetaData;
Expand Down
56 changes: 53 additions & 3 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export class DocLinksService {
top_hits: `${ELASTICSEARCH_DOCS}search-aggregations-metrics-top-hits-aggregation.html`,
},
runtimeFields: {
overview: `${ELASTICSEARCH_DOCS}runtime.html`,
mapping: `${ELASTICSEARCH_DOCS}runtime-mapping-fields.html`,
},
scriptedFields: {
Expand All @@ -130,8 +131,49 @@ export class DocLinksService {
addData: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/connect-to-elasticsearch.html`,
kibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index.html`,
elasticsearch: {
docsBase: `${ELASTICSEARCH_DOCS}`,
asyncSearch: `${ELASTICSEARCH_DOCS}async-search-intro.html`,
dataStreams: `${ELASTICSEARCH_DOCS}data-streams.html`,
indexModules: `${ELASTICSEARCH_DOCS}index-modules.html`,
indexSettings: `${ELASTICSEARCH_DOCS}index-modules.html#index-modules-settings`,
indexTemplates: `${ELASTICSEARCH_DOCS}indices-templates.html`,
mapping: `${ELASTICSEARCH_DOCS}mapping.html`,
mappingAnalyzer: `${ELASTICSEARCH_DOCS}analyzer.html`,
mappingCoerce: `${ELASTICSEARCH_DOCS}coerce.html`,
mappingCopyTo: `${ELASTICSEARCH_DOCS}copy-to.html`,
mappingDocValues: `${ELASTICSEARCH_DOCS}doc-values.html`,
mappingDynamic: `${ELASTICSEARCH_DOCS}dynamic.html`,
mappingDynamicFields: `${ELASTICSEARCH_DOCS}dynamic-field-mapping.html`,
mappingDynamicTemplates: `${ELASTICSEARCH_DOCS}dynamic-templates.html`,
mappingEagerGlobalOrdinals: `${ELASTICSEARCH_DOCS}eager-global-ordinals.html`,
mappingEnabled: `${ELASTICSEARCH_DOCS}enabled.html`,
mappingFieldData: `${ELASTICSEARCH_DOCS}text.html#fielddata-mapping-param`,
mappingFieldDataEnable: `${ELASTICSEARCH_DOCS}text.html#before-enabling-fielddata`,
mappingFieldDataFilter: `${ELASTICSEARCH_DOCS}text.html#field-data-filtering`,
mappingFieldDataTypes: `${ELASTICSEARCH_DOCS}mapping-types.html`,
mappingFormat: `${ELASTICSEARCH_DOCS}mapping-date-format.html`,
mappingIgnoreAbove: `${ELASTICSEARCH_DOCS}ignore-above.html`,
mappingIgnoreMalformed: `${ELASTICSEARCH_DOCS}ignore-malformed.html`,
mappingIndex: `${ELASTICSEARCH_DOCS}mapping-index.html`,
mappingIndexOptions: `${ELASTICSEARCH_DOCS}index-options.html`,
mappingIndexPhrases: `${ELASTICSEARCH_DOCS}index-phrases.html`,
mappingIndexPrefixes: `${ELASTICSEARCH_DOCS}index-prefixes.html`,
mappingJoinFieldsPerformance: `${ELASTICSEARCH_DOCS}parent-join.html#_parent_join_and_performance`,
mappingMeta: `${ELASTICSEARCH_DOCS}mapping-field-meta.html`,
mappingMetaFields: `${ELASTICSEARCH_DOCS}mapping-meta-field.html`,
mappingNormalizer: `${ELASTICSEARCH_DOCS}normalizer.html`,
mappingNorms: `${ELASTICSEARCH_DOCS}norms.html`,
mappingNullValue: `${ELASTICSEARCH_DOCS}null-value.html`,
mappingParameters: `${ELASTICSEARCH_DOCS}mapping-params.html`,
mappingPositionIncrementGap: `${ELASTICSEARCH_DOCS}position-increment-gap.html`,
mappingRankFeatureFields: `${ELASTICSEARCH_DOCS}rank-feature.html`,
mappingRouting: `${ELASTICSEARCH_DOCS}mapping-routing-field.html`,
mappingSimilarity: `${ELASTICSEARCH_DOCS}similarity.html`,
mappingSourceFields: `${ELASTICSEARCH_DOCS}mapping-source-field.html`,
mappingSourceFieldsDisable: `${ELASTICSEARCH_DOCS}mapping-source-field.html#disable-source-field`,
mappingStore: `${ELASTICSEARCH_DOCS}mapping-store.html`,
mappingTermVector: `${ELASTICSEARCH_DOCS}term-vector.html`,
mappingTypesRemoval: `${ELASTICSEARCH_DOCS}removal-of-types.html`,
nodeRoles: `${ELASTICSEARCH_DOCS}modules-node.html#node-roles`,
remoteClusters: `${ELASTICSEARCH_DOCS}modules-remote-clusters.html`,
remoteClustersProxy: `${ELASTICSEARCH_DOCS}modules-remote-clusters.html#proxy-mode`,
Expand All @@ -146,17 +188,19 @@ export class DocLinksService {
},
query: {
eql: `${ELASTICSEARCH_DOCS}eql.html`,
kueryQuerySyntax: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kuery-query.html`,
luceneQuerySyntax: `${ELASTICSEARCH_DOCS}query-dsl-query-string-query.html#query-string-syntax`,
percolate: `${ELASTICSEARCH_DOCS}query-dsl-percolate-query.html`,
queryDsl: `${ELASTICSEARCH_DOCS}query-dsl.html`,
kueryQuerySyntax: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kuery-query.html`,
},
date: {
dateMath: `${ELASTICSEARCH_DOCS}common-options.html#date-math`,
dateMathIndexNames: `${ELASTICSEARCH_DOCS}date-math-index-names.html`,
},
management: {
kibanaSearchSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-search-settings`,
dashboardSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-dashboard-settings`,
indexManagement: `${ELASTICSEARCH_DOCS}index-mgmt.html`,
kibanaSearchSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-search-settings`,
visualizationSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-visualization-settings`,
},
ml: {
Expand Down Expand Up @@ -258,6 +302,7 @@ export class DocLinksService {
skippingDisconnectedClusters: `${ELASTICSEARCH_DOCS}modules-cross-cluster-search.html#skip-unavailable-clusters`,
},
apis: {
bulkIndexAlias: `${ELASTICSEARCH_DOCS}indices-aliases.html`,
createIndex: `${ELASTICSEARCH_DOCS}indices-create-index.html`,
createSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
createRoleMapping: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html`,
Expand All @@ -274,6 +319,7 @@ export class DocLinksService {
painlessExecuteAPIContexts: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-execute-api.html#_contexts`,
putComponentTemplateMetadata: `${ELASTICSEARCH_DOCS}indices-component-template.html#component-templates-metadata`,
putEnrichPolicy: `${ELASTICSEARCH_DOCS}put-enrich-policy-api.html`,
putIndexTemplateV1: `${ELASTICSEARCH_DOCS}indices-templates-v1.html`,
putSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
putWatch: `${ELASTICSEARCH_DOCS}watcher-api-put-watch.html`,
simulatePipeline: `${ELASTICSEARCH_DOCS}simulate-pipeline-api.html`,
Expand Down Expand Up @@ -429,6 +475,7 @@ export interface DocLinksStart {
readonly top_hits: string;
};
readonly runtimeFields: {
readonly overview: string;
readonly mapping: string;
};
readonly scriptedFields: {
Expand All @@ -455,9 +502,10 @@ export interface DocLinksStart {
};
readonly query: {
readonly eql: string;
readonly kueryQuerySyntax: string;
readonly luceneQuerySyntax: string;
readonly percolate: string;
readonly queryDsl: string;
readonly kueryQuerySyntax: string;
};
readonly date: {
readonly dateMath: string;
Expand All @@ -468,6 +516,7 @@ export interface DocLinksStart {
readonly transforms: Record<string, string>;
readonly visualize: Record<string, string>;
readonly apis: Readonly<{
bulkIndexAlias: string;
createIndex: string;
createSnapshotLifecyclePolicy: string;
createRoleMapping: string;
Expand All @@ -484,6 +533,7 @@ export interface DocLinksStart {
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putIndexTemplateV1: string;
putWatch: string;
simulatePipeline: string;
updateTransform: string;
Expand Down
Loading

0 comments on commit a3790b2

Please sign in to comment.