Skip to content

Commit

Permalink
Merge branch 'master' into dual_mode_tsvb_2
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Mar 29, 2021
2 parents 3416a94 + 5732526 commit 4d5d75b
Show file tree
Hide file tree
Showing 491 changed files with 19,415 additions and 8,028 deletions.
118 changes: 71 additions & 47 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,72 @@ const SAFER_LODASH_SET_DEFINITELYTYPED_HEADER = `
*/
`;

/** Packages which should not be included within production code. */
const DEV_PACKAGES = [
'kbn-babel-code-parser',
'kbn-dev-utils',
'kbn-docs-utils',
'kbn-es*',
'kbn-eslint*',
'kbn-optimizer',
'kbn-plugin-generator',
'kbn-plugin-helpers',
'kbn-pm',
'kbn-storybook',
'kbn-telemetry-tools',
'kbn-test',
];

/** Directories (at any depth) which include dev-only code. */
const DEV_DIRECTORIES = [
'.storybook',
'__tests__',
'__test__',
'__jest__',
'__fixtures__',
'__mocks__',
'__stories__',
'e2e',
'fixtures',
'ftr_e2e',
'integration_tests',
'manual_tests',
'mock',
'storybook',
'scripts',
'test',
'test-d',
'test_utils',
'test_utilities',
'test_helpers',
'tests_client_integration',
];

/** File patterns for dev-only code. */
const DEV_FILE_PATTERNS = [
'*.mock.{js,ts,tsx}',
'*.test.{js,ts,tsx}',
'*.test.helpers.{js,ts,tsx}',
'*.stories.{js,ts,tsx}',
'*.story.{js,ts,tsx}',
'*.stub.{js,ts,tsx}',
'mock.{js,ts,tsx}',
'_stubs.{js,ts,tsx}',
'{testHelpers,test_helper,test_utils}.{js,ts,tsx}',
'{postcss,webpack}.config.js',
];

/** Glob patterns which describe dev-only code. */
const DEV_PATTERNS = [
...DEV_PACKAGES.map((pkg) => `packages/${pkg}/**/*`),
...DEV_DIRECTORIES.map((dir) => `{packages,src,x-pack}/**/${dir}/**/*`),
...DEV_FILE_PATTERNS.map((file) => `{packages,src,x-pack}/**/${file}`),
'packages/kbn-interpreter/tasks/**/*',
'src/dev/**/*',
'x-pack/{dev-tools,tasks,scripts,test,build_chromium}/**/*',
'x-pack/plugins/*/server/scripts/**/*',
];

module.exports = {
root: true,

Expand Down Expand Up @@ -491,43 +557,17 @@ module.exports = {
},

/**
* Files that ARE NOT allowed to use devDependencies
*/
{
files: ['x-pack/**/*.js', 'packages/kbn-interpreter/**/*.js'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: false,
peerDependencies: true,
packageDir: '.',
},
],
},
},

/**
* Files that ARE allowed to use devDependencies
* Single package.json rules, it tells eslint to ignore the child package.json files
* and look for dependencies declarations in the single and root level package.json
*/
{
files: [
'packages/kbn-es/src/**/*.js',
'packages/kbn-interpreter/tasks/**/*.js',
'packages/kbn-interpreter/src/plugin/**/*.js',
'x-pack/{dev-tools,tasks,scripts,test,build_chromium}/**/*.js',
'x-pack/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__,public}/**/*.js',
'x-pack/**/*.test.js',
'x-pack/test_utils/**/*',
'x-pack/gulpfile.js',
'x-pack/plugins/apm/public/utils/testHelpers.js',
'x-pack/plugins/canvas/shareable_runtime/postcss.config.js',
],
files: ['{src,x-pack,packages}/**/*.{js,mjs,ts,tsx}'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
/* Files that ARE allowed to use devDependencies */
devDependencies: [...DEV_PATTERNS],
peerDependencies: true,
packageDir: '.',
},
Expand Down Expand Up @@ -1420,21 +1460,5 @@ module.exports = {
],
},
},

/**
* Single package.json rules, it tells eslint to ignore the child package.json files
* and look for dependencies declarations in the single and root level package.json
*/
{
files: ['**/*.{js,mjs,ts,tsx}'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
packageDir: '.',
},
],
},
},
],
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
/x-pack/plugins/embeddable_enhanced/ @elastic/kibana-app-services
/x-pack/plugins/ui_actions_enhanced/ @elastic/kibana-app-services
/x-pack/plugins/runtime_fields @elastic/kibana-app-services
/x-pack/test/search_sessions_integration/ @elastic/kibana-app-services
#CC# /src/plugins/bfetch/ @elastic/kibana-app-services
#CC# /src/plugins/index_pattern_management/ @elastic/kibana-app-services
#CC# /src/plugins/inspector/ @elastic/kibana-app-services
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blank_issues_enabled: false
blank_issues_enabled: true
contact_links:
- name: Question
url: https://discuss.elastic.co/c/kibana
Expand Down
14 changes: 7 additions & 7 deletions docs/api/actions-and-connectors.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ Manage Actions and Connectors.

The following connector APIs are available:

* <<actions-and-connectors-api-get, Get connector API>> to retrieve a single connector by ID
* <<get-connector-api, Get connector API>> to retrieve a single connector by ID

* <<actions-and-connectors-api-get-all, Get all connectors API>> to retrieve all connectors
* <<get-all-connectors-api, Get all connectors API>> to retrieve all connectors

* <<actions-and-connectors-api-list, List all connector types API>> to retrieve a list of all connector types
* <<list-connector-types-api, List all connector types API>> to retrieve a list of all connector types

* <<actions-and-connectors-api-create, Create connector API>> to create connectors
* <<create-connector-api, Create connector API>> to create connectors

* <<actions-and-connectors-api-update, Update connector API>> to update the attributes for an existing connector
* <<update-connector-api, Update connector API>> to update the attributes for an existing connector

* <<actions-and-connectors-api-execute, Execute connector API>> to execute a connector by ID
* <<execute-connector-api, Execute connector API>> to execute a connector by ID

* <<actions-and-connectors-api-delete, Delete connector API>> to delete a connector by ID
* <<delete-connector-api, Delete connector API>> to delete a connector by ID

For deprecated APIs, refer to <<actions-and-connectors-legacy-apis>>.

Expand Down
16 changes: 8 additions & 8 deletions docs/api/actions-and-connectors/create.asciidoc
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[[actions-and-connectors-api-create]]
[[create-connector-api]]
=== Create connector API
++++
<titleabbrev>Create connector API</titleabbrev>
<titleabbrev>Create connector</titleabbrev>
++++

Creates a connector.

[[actions-and-connectors-api-create-request]]
[[create-connector-api-request]]
==== Request

`POST <kibana host>:<port>/api/actions/connector`

`POST <kibana host>:<port>/s/<space_id>/api/actions/connector`

[[actions-and-connectors-api-create-path-params]]
[[create-connector-api-path-params]]
==== Path parameters

`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.

[[actions-and-connectors-api-create-request-body]]
[[create-connector-api-request-body]]
==== Request body

`name`::
Expand All @@ -36,15 +36,15 @@ Creates a connector.
(Required, object) The secrets configuration for the connector. Secrets configuration properties vary
depending on the connector type. For information about the secrets configuration properties, refer to <<action-types,Action and connector types>>.
+
WARNING: Remember these values. You must provide them each time you call the <<actions-and-connectors-api-update, update>> API.
WARNING: Remember these values. You must provide them each time you call the <<update-connector-api, update>> API.

[[actions-and-connectors-api-create-request-codes]]
[[create-connector-api-request-codes]]
==== Response code

`200`::
Indicates a successful call.

[[actions-and-connectors-api-create-example]]
[[create-connector-api-example]]
==== Example

[source,sh]
Expand Down
10 changes: 5 additions & 5 deletions docs/api/actions-and-connectors/delete.asciidoc
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[[actions-and-connectors-api-delete]]
[[delete-connector-api]]
=== Delete connector API
++++
<titleabbrev>Delete connector API</titleabbrev>
<titleabbrev>Delete connector</titleabbrev>
++++

Deletes an connector by ID.

WARNING: When you delete a connector, _it cannot be recovered_.

[[actions-and-connectors-api-delete-request]]
[[delete-connector-api-request]]
==== Request

`DELETE <kibana host>:<port>/api/actions/connector/<id>`

`DELETE <kibana host>:<port>/s/<space_id>/api/actions/connector/<id>`

[[actions-and-connectors-api-delete-path-params]]
[[delete-connector-api-path-params]]
==== Path parameters

`id`::
Expand All @@ -24,7 +24,7 @@ WARNING: When you delete a connector, _it cannot be recovered_.
`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.

[[actions-and-connectors-api-delete-response-codes]]
[[delete-connector-api-response-codes]]
==== Response code

`200`::
Expand Down
14 changes: 7 additions & 7 deletions docs/api/actions-and-connectors/execute.asciidoc
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[[actions-and-connectors-api-execute]]
[[execute-connector-api]]
=== Execute connector API
++++
<titleabbrev>Execute connector API</titleabbrev>
<titleabbrev>Execute connector</titleabbrev>
++++

Executes a connector by ID.

[[actions-and-connectors-api-execute-request]]
[[execute-connector-api-request]]
==== Request

`POST <kibana host>:<port>/api/actions/connector/<id>/_execute`

`POST <kibana host>:<port>/s/<space_id>/api/actions/connector/<id>/_execute`

[[actions-and-connectors-api-execute-params]]
[[execute-connector-api-params]]
==== Path parameters

`id`::
Expand All @@ -22,20 +22,20 @@ Executes a connector by ID.
`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.

[[actions-and-connectors-api-execute-request-body]]
[[execute-connector-api-request-body]]
==== Request body

`params`::
(Required, object) The parameters of the connector. Parameter properties vary depending on
the connector type. For information about the parameter properties, refer to <<action-types,Action and connector types>>.

[[actions-and-connectors-api-execute-codes]]
[[execute-connector-api-codes]]
==== Response code

`200`::
Indicates a successful call.

[[actions-and-connectors-api-execute-example]]
[[execute-connector-api-example]]
==== Example

[source,sh]
Expand Down
12 changes: 6 additions & 6 deletions docs/api/actions-and-connectors/get.asciidoc
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[[actions-and-connectors-api-get]]
[[get-connector-api]]
=== Get connector API
++++
<titleabbrev>Get connector API</titleabbrev>
<titleabbrev>Get connector</titleabbrev>
++++

Retrieves a connector by ID.

[[actions-and-connectors-api-get-request]]
[[get-connector-api-request]]
==== Request

`GET <kibana host>:<port>/api/actions/connector/<id>`

`GET <kibana host>:<port>/s/<space_id>/api/actions/connector/<id>`

[[actions-and-connectors-api-get-params]]
[[get-connector-api-params]]
==== Path parameters

`id`::
Expand All @@ -22,13 +22,13 @@ Retrieves a connector by ID.
`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.

[[actions-and-connectors-api-get-codes]]
[[get-connector-api-codes]]
==== Response code

`200`::
Indicates a successful call.

[[actions-and-connectors-api-get-example]]
[[get-connector-api-example]]
==== Example

[source,sh]
Expand Down
14 changes: 7 additions & 7 deletions docs/api/actions-and-connectors/get_all.asciidoc
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
[[actions-and-connectors-api-get-all]]
=== Get all actions API
[[get-all-connectors-api]]
=== Get all connectors API
++++
<titleabbrev>Get all actions API</titleabbrev>
<titleabbrev>Get all connectors</titleabbrev>
++++

Retrieves all connectors.

[[actions-and-connectors-api-get-all-request]]
[[get-all-connectors-api-request]]
==== Request

`GET <kibana host>:<port>/api/actions/connectors`

`GET <kibana host>:<port>/s/<space_id>/api/actions/connectors`

[[actions-and-connectors-api-get-all-path-params]]
[[get-all-connectors-api-path-params]]
==== Path parameters

`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.

[[actions-and-connectors-api-get-all-codes]]
[[get-all-connectors-api-codes]]
==== Response code

`200`::
Indicates a successful call.

[[actions-and-connectors-api-get-all-example]]
[[get-all-connectors-api-example]]
==== Example

[source,sh]
Expand Down
Loading

0 comments on commit 4d5d75b

Please sign in to comment.