Skip to content

Commit

Permalink
Merge branch 'master' into reporting/browser-install-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Apr 30, 2021
2 parents 395785a + 5203859 commit ef22598
Show file tree
Hide file tree
Showing 223 changed files with 9,302 additions and 1,222 deletions.
112 changes: 112 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,118 @@ module.exports = {
'prefer-destructuring': 'error',
},
},
/**
* Metrics entities overrides
*/
{
// front end and common typescript and javascript files only
files: [
'x-pack/plugins/metrics_entities/public/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/metrics_entities/common/**/*.{js,mjs,ts,tsx}',
],
rules: {
'import/no-nodejs-modules': 'error',
'no-restricted-imports': [
'error',
{
// prevents UI code from importing server side code and then webpack including it when doing builds
patterns: ['**/server/*'],
},
],
},
},
{
// typescript and javascript for front and back end
files: ['x-pack/plugins/metrics_entities/**/*.{js,mjs,ts,tsx}'],
plugins: ['eslint-plugin-node'],
env: {
jest: true,
},
rules: {
'accessor-pairs': 'error',
'array-callback-return': 'error',
'no-array-constructor': 'error',
complexity: 'error',
'consistent-return': 'error',
'func-style': ['error', 'expression'],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
},
],
'sort-imports': [
'error',
{
ignoreDeclarationSort: true,
},
],
'node/no-deprecated-api': 'error',
'no-bitwise': 'error',
'no-continue': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-duplicate-imports': 'error',
'no-empty-character-class': 'error',
'no-empty-pattern': 'error',
'no-ex-assign': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-label': 'error',
'no-func-assign': 'error',
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
'no-invalid-regexp': 'error',
'no-inner-declarations': 'error',
'no-lone-blocks': 'error',
'no-multi-assign': 'error',
'no-misleading-character-class': 'error',
'no-new-symbol': 'error',
'no-obj-calls': 'error',
'no-param-reassign': ['error', { props: true }],
'no-process-exit': 'error',
'no-prototype-builtins': 'error',
'no-return-await': 'error',
'no-self-compare': 'error',
'no-shadow-restricted-names': 'error',
'no-sparse-arrays': 'error',
'no-this-before-super': 'error',
// rely on typescript
'no-undef': 'off',
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-useless-call': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'no-useless-computed-key': 'error',
'no-useless-escape': 'error',
'no-useless-rename': 'error',
'no-useless-return': 'error',
'no-void': 'error',
'one-var-declaration-per-line': 'error',
'prefer-object-spread': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
'require-atomic-updates': 'error',
'symbol-description': 'error',
'vars-on-top': 'error',
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/unified-signatures': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'no-template-curly-in-string': 'error',
'sort-keys': 'error',
'prefer-destructuring': 'error',
},
},
/**
* Alerting Services overrides
*/
Expand Down
151 changes: 151 additions & 0 deletions api_docs/metrics_entities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
{
"id": "metricsEntities",
"client": {
"classes": [],
"functions": [],
"interfaces": [],
"enums": [],
"misc": [],
"objects": []
},
"server": {
"classes": [],
"functions": [],
"interfaces": [],
"enums": [],
"misc": [],
"objects": [],
"setup": {
"id": "def-server.MetricsEntitiesPluginSetup",
"type": "Interface",
"label": "MetricsEntitiesPluginSetup",
"description": [],
"tags": [],
"children": [
{
"tags": [],
"id": "def-server.MetricsEntitiesPluginSetup.getMetricsEntitiesClient",
"type": "Function",
"label": "getMetricsEntitiesClient",
"description": [],
"source": {
"path": "x-pack/plugins/metrics_entities/server/types.ts",
"lineNumber": 15
},
"signature": [
"GetMetricsEntitiesClientType"
]
}
],
"source": {
"path": "x-pack/plugins/metrics_entities/server/types.ts",
"lineNumber": 14
},
"lifecycle": "setup",
"initialIsOpen": true
},
"start": {
"id": "def-server.MetricsEntitiesPluginStart",
"type": "Type",
"label": "MetricsEntitiesPluginStart",
"tags": [],
"description": [],
"source": {
"path": "x-pack/plugins/metrics_entities/server/types.ts",
"lineNumber": 18
},
"signature": [
"void"
],
"lifecycle": "start",
"initialIsOpen": true
}
},
"common": {
"classes": [],
"functions": [],
"interfaces": [],
"enums": [],
"misc": [
{
"tags": [],
"id": "def-common.ELASTIC_NAME",
"type": "string",
"label": "ELASTIC_NAME",
"description": [
"\nGlobal prefix for all the transform jobs"
],
"source": {
"path": "x-pack/plugins/metrics_entities/common/constants.ts",
"lineNumber": 21
},
"signature": [
"\"estc\""
],
"initialIsOpen": false
},
{
"tags": [],
"id": "def-common.METRICS_ENTITIES_TRANSFORMS",
"type": "string",
"label": "METRICS_ENTITIES_TRANSFORMS",
"description": [
"\nTransforms route"
],
"source": {
"path": "x-pack/plugins/metrics_entities/common/constants.ts",
"lineNumber": 16
},
"initialIsOpen": false
},
{
"tags": [],
"id": "def-common.METRICS_ENTITIES_URL",
"type": "string",
"label": "METRICS_ENTITIES_URL",
"description": [
"\nBase route"
],
"source": {
"path": "x-pack/plugins/metrics_entities/common/constants.ts",
"lineNumber": 11
},
"signature": [
"\"/api/metrics_entities\""
],
"initialIsOpen": false
},
{
"tags": [],
"id": "def-common.PLUGIN_ID",
"type": "string",
"label": "PLUGIN_ID",
"description": [],
"source": {
"path": "x-pack/plugins/metrics_entities/common/index.ts",
"lineNumber": 8
},
"signature": [
"\"metricsEntities\""
],
"initialIsOpen": false
},
{
"tags": [],
"id": "def-common.PLUGIN_NAME",
"type": "string",
"label": "PLUGIN_NAME",
"description": [],
"source": {
"path": "x-pack/plugins/metrics_entities/common/index.ts",
"lineNumber": 9
},
"signature": [
"\"metrics_entities\""
],
"initialIsOpen": false
}
],
"objects": []
}
}
26 changes: 26 additions & 0 deletions api_docs/metrics_entities.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
id: kibMetricsEntitiesPluginApi
slug: /kibana-dev-docs/metricsEntitiesPluginApi
title: metricsEntities
image: https://source.unsplash.com/400x175/?github
summary: API docs for the metricsEntities plugin
date: 2020-11-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsEntities']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---

import metricsEntitiesObj from './metrics_entities.json';

## Server

### Setup
<DocDefinitionList data={[metricsEntitiesObj.server.setup]}/>

### Start
<DocDefinitionList data={[metricsEntitiesObj.server.start]}/>

## Common

### Consts, variables and types
<DocDefinitionList data={metricsEntitiesObj.common.misc}/>

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,7 +70,9 @@ yarn kbn watch-bazel
- @kbn/babel-preset
- @kbn/config-schema
- @kbn/dev-utils
- @kbn/eslint-import-resolver-kibana
- @kbn/expect
- @kbn/legacy-logging
- @kbn/logging
- @kbn/std
- @kbn/tinymath
Expand Down
6 changes: 6 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,12 @@ using the CURL scripts in the scripts folder.
|Visualize geo data from Elasticsearch or 3rd party geo-services.
|{kib-repo}blob/{branch}/x-pack/plugins/metrics_entities/README.md[metricsEntities]
|This is the metrics and entities plugin where you add can add transforms for your project
and group those transforms into modules. You can also re-use existing transforms in your
modules as well.
|{kib-repo}blob/{branch}/x-pack/plugins/ml/readme.md[ml]
|This plugin provides access to the machine learning features provided by
Elastic.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"@kbn/i18n": "link:packages/kbn-i18n",
"@kbn/interpreter": "link:packages/kbn-interpreter",
"@kbn/io-ts-utils": "link:packages/kbn-io-ts-utils",
"@kbn/legacy-logging": "link:packages/kbn-legacy-logging",
"@kbn/legacy-logging": "link:bazel-bin/packages/kbn-legacy-logging/npm_module",
"@kbn/logging": "link:bazel-bin/packages/kbn-logging/npm_module",
"@kbn/monaco": "link:packages/kbn-monaco",
"@kbn/server-http-tools": "link:packages/kbn-server-http-tools",
Expand Down Expand Up @@ -444,7 +444,7 @@
"@kbn/docs-utils": "link:packages/kbn-docs-utils",
"@kbn/es": "link:packages/kbn-es",
"@kbn/es-archiver": "link:packages/kbn-es-archiver",
"@kbn/eslint-import-resolver-kibana": "link:packages/kbn-eslint-import-resolver-kibana",
"@kbn/eslint-import-resolver-kibana": "link:bazel-bin/packages/kbn-eslint-import-resolver-kibana/npm_module",
"@kbn/eslint-plugin-eslint": "link:packages/kbn-eslint-plugin-eslint",
"@kbn/expect": "link:bazel-bin/packages/kbn-expect/npm_module",
"@kbn/optimizer": "link:packages/kbn-optimizer",
Expand Down
2 changes: 2 additions & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ filegroup(
"//packages/kbn-babel-preset:build",
"//packages/kbn-config-schema:build",
"//packages/kbn-dev-utils:build",
"//packages/kbn-eslint-import-resolver-kibana:build",
"//packages/kbn-expect:build",
"//packages/kbn-legacy-logging:build",
"//packages/kbn-logging:build",
"//packages/kbn-std:build",
"//packages/kbn-tinymath:build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ it('produces the right watch and ignore list', () => {
<absolute path>/x-pack/plugins/lists/server/scripts,
<absolute path>/x-pack/plugins/security_solution/scripts,
<absolute path>/x-pack/plugins/security_solution/server/lib/detection_engine/scripts,
<absolute path>/x-pack/plugins/metrics_entities/server/scripts,
]
`);
});
1 change: 1 addition & 0 deletions packages/kbn-cli-dev-mode/src/get_server_watch_paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export function getServerWatchPaths({ pluginPaths, pluginScanDirs }: Options) {
fromRoot('x-pack/plugins/lists/server/scripts'),
fromRoot('x-pack/plugins/security_solution/scripts'),
fromRoot('x-pack/plugins/security_solution/server/lib/detection_engine/scripts'),
fromRoot('x-pack/plugins/metrics_entities/server/scripts'),
];

return {
Expand Down
Loading

0 comments on commit ef22598

Please sign in to comment.