Skip to content

Commit

Permalink
Merge branch 'master' into kertal-pr-2020-11-04-improve-field-error-m…
Browse files Browse the repository at this point in the history
…essage
  • Loading branch information
kibanamachine authored Nov 4, 2020
2 parents 7c1e7ce + 53ea090 commit a985951
Show file tree
Hide file tree
Showing 1,416 changed files with 84,194 additions and 56,754 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/x-pack/build
node_modules
target
snapshots.js

!/.eslintrc.js

Expand All @@ -22,7 +23,6 @@ target
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
/src/plugins/vis_type_timelion/public/_generated_/**
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/x-pack/plugins/apm/e2e/**/snapshots.js
/x-pack/plugins/apm/e2e/tmp/*
/x-pack/plugins/canvas/canvas_plugin
/x-pack/plugins/canvas/shareable_runtime/build
Expand Down
41 changes: 19 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ module.exports = {
{
devDependencies: false,
peerDependencies: true,
packageDir: '.',
},
],
},
Expand Down Expand Up @@ -478,6 +479,7 @@ module.exports = {
{
devDependencies: true,
peerDependencies: true,
packageDir: '.',
},
],
},
Expand Down Expand Up @@ -732,22 +734,6 @@ module.exports = {
},
},

/**
* ML overrides
*/
{
files: ['x-pack/plugins/ml/**/*.js'],
rules: {
'no-shadow': 'error',
'import/no-extraneous-dependencies': [
'error',
{
packageDir: './x-pack',
},
],
},
},

/**
* Security Solution overrides
*/
Expand Down Expand Up @@ -1149,16 +1135,11 @@ module.exports = {
{
devDependencies: true,
peerDependencies: true,
packageDir: '.',
},
],
},
},
{
files: ['x-pack/plugins/canvas/storybook/**'],
rules: {
'import/no-extraneous-dependencies': 0,
},
},
{
files: ['x-pack/plugins/canvas/canvas_plugin_src/**/*.js'],
globals: { canvas: true, $: true },
Expand Down Expand Up @@ -1237,5 +1218,21 @@ 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: '.',
},
],
},
},
],
};
31 changes: 17 additions & 14 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
/src/plugins/expressions/ @elastic/kibana-app-arch
/src/plugins/inspector/ @elastic/kibana-app-arch
/src/plugins/kibana_react/ @elastic/kibana-app-arch
/src/plugins/kibana_react/public/code_editor @elastic/kibana-canvas
/src/plugins/kibana_react/public/code_editor @elastic/kibana-presentation
/src/plugins/kibana_utils/ @elastic/kibana-app-arch
/src/plugins/navigation/ @elastic/kibana-app-arch
/src/plugins/share/ @elastic/kibana-app-arch
Expand Down Expand Up @@ -104,19 +104,19 @@
/x-pack/legacy/plugins/beats_management/ @elastic/beats
#CC# /x-pack/plugins/beats_management/ @elastic/beats

# Canvas
/src/plugins/dashboard/ @elastic/kibana-canvas
/src/plugins/input_control_vis/ @elastic/kibana-canvas
/src/plugins/vis_type_markdown/ @elastic/kibana-canvas
/x-pack/plugins/canvas/ @elastic/kibana-canvas
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-canvas
/x-pack/test/functional/apps/canvas/ @elastic/kibana-canvas
#CC# /src/legacy/core_plugins/kibana/public/dashboard/ @elastic/kibana-canvas
#CC# /src/legacy/core_plugins/input_control_vis @elastic/kibana-canvas
#CC# /src/plugins/kibana_react/public/code_editor/ @elastic/kibana-canvas
#CC# /x-pack/legacy/plugins/canvas/ @elastic/kibana-canvas
#CC# /x-pack/plugins/dashboard_mode @elastic/kibana-canvas
#CC# /x-pack/legacy/plugins/dashboard_mode/ @elastic/kibana-canvas
# Presentation
/src/plugins/dashboard/ @elastic/kibana-presentation
/src/plugins/input_control_vis/ @elastic/kibana-presentation
/src/plugins/vis_type_markdown/ @elastic/kibana-presentation
/x-pack/plugins/canvas/ @elastic/kibana-presentation
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-presentation
/x-pack/test/functional/apps/canvas/ @elastic/kibana-presentation
#CC# /src/legacy/core_plugins/kibana/public/dashboard/ @elastic/kibana-presentation
#CC# /src/legacy/core_plugins/input_control_vis @elastic/kibana-presentation
#CC# /src/plugins/kibana_react/public/code_editor/ @elastic/kibana-presentation
#CC# /x-pack/legacy/plugins/canvas/ @elastic/kibana-presentation
#CC# /x-pack/plugins/dashboard_mode @elastic/kibana-presentation
#CC# /x-pack/legacy/plugins/dashboard_mode/ @elastic/kibana-presentation

# Core UI
# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon
Expand Down Expand Up @@ -196,12 +196,15 @@

# Platform
/src/core/ @elastic/kibana-platform
/src/plugins/saved_objects_tagging_oss @elastic/kibana-platform
/config/kibana.yml @elastic/kibana-platform
/x-pack/plugins/features/ @elastic/kibana-platform
/x-pack/plugins/licensing/ @elastic/kibana-platform
/x-pack/plugins/global_search/ @elastic/kibana-platform
/x-pack/plugins/cloud/ @elastic/kibana-platform
/x-pack/plugins/saved_objects_tagging/ @elastic/kibana-platform
/x-pack/test/saved_objects_field_count/ @elastic/kibana-platform
/x-pack/test/saved_object_tagging/ @elastic/kibana-platform
/packages/kbn-config-schema/ @elastic/kibana-platform
/packages/kbn-std/ @elastic/kibana-platform
/src/legacy/server/config/ @elastic/kibana-platform
Expand Down
15 changes: 9 additions & 6 deletions .github/ISSUE_TEMPLATE/v8_breaking_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ assignees: ''
****************************************
Please add a "NeededFor:${TeamName}" label to denote the team that is
requesting the breaking change is surfaced in the Upgrade Assistant.
requesting the breaking change to be surfaced in the Upgrade Assistant.
-->

Expand All @@ -27,21 +27,24 @@ requesting the breaking change is surfaced in the Upgrade Assistant.

**How many users will be affected?**

<!-- e.g., Based on telemetry data, roughly 75% of our users will need to make changes to x -->
<!-- e.g., A majority of users will need to make changes to x. -->
<!-- e.g. Based on telemetry data, roughly 75% of our users will need to make changes to x. -->
<!-- e.g. A majority of users will need to make changes to x. -->

**What can users do to address the change manually?**

<!-- If applicable, describe the manual workaround -->
<!-- If applicable, describe the manual migration steps and/or link to available docs. -->

**How could we make migration easier with the Upgrade Assistant?**

<!-- This can be as basic as notifying the user about the deprecation and linking to some
migration docs, or as advanced as a dedicated UI for fixing the problem. -->

**Are there any edge cases?**

## Test Data

Provide test data. We can’t build a solution without data to test it against.
<!-- Provide test data. We can’t build a solution without data to test it against. -->

## Cross links

Cross-link to relevant [Elasticsearch breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html).
<!-- Provide context. Cross-link to relevant [Elasticsearch breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html), PRs that introduced the breaking change, or other related issues. -->
2 changes: 1 addition & 1 deletion .github/workflows/pr-project-assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:

# { "label": "Team:AppArch", "projectNumber": 37, "columnName": "Review in progress" },
# { "label": "Feature:Lens", "projectNumber": 32, "columnName": "In progress" },
# { "label": "Team:Canvas", "projectNumber": 38, "columnName": "Review in progress" }
# { "label": "Feature:Canvas", "projectNumber": 38, "columnName": "Review in progress" }
2 changes: 1 addition & 1 deletion .github/workflows/project-assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: elastic/github-actions/project-assigner@v2.0.0
id: project_assigner
with:
issue-mappings: '[{"label": "Team:AppArch", "projectNumber": 37, "columnName": "To triage"}, {"label": "Feature:Lens", "projectNumber": 32, "columnName": "Long-term goals"}, {"label": "Team:Canvas", "projectNumber": 38, "columnName": "Inbox"}]'
issue-mappings: '[{"label": "Team:AppArch", "projectNumber": 37, "columnName": "To triage"}, {"label": "Feature:Lens", "projectNumber": 32, "columnName": "Long-term goals"}, {"label": "Feature:Canvas", "projectNumber": 38, "columnName": "Inbox"}, {"label": "Feature:Dashboard", "projectNumber": 68, "columnName": "Inbox"}, {"label": "Feature:Drilldowns", "projectNumber": 68, "columnName": "Inbox"}]'
ghToken: ${{ secrets.PROJECT_ASSIGNER_TOKEN }}


12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@ target
.idea
*.iml
*.log

# Ignore certain functional test runner artifacts
/test/*/failure_debug
/test/*/screenshots/diff
/test/*/screenshots/failure
/test/*/screenshots/session
/test/*/screenshots/visual_regression_gallery.html

# Ignore the same artifacts in x-pack
/x-pack/test/*/failure_debug
/x-pack/test/*/screenshots/diff
/x-pack/test/*/screenshots/failure
/x-pack/test/*/screenshots/session
/x-pack/test/*/screenshots/visual_regression_gallery.html

/html_docs
.eslintcache
/plugins/
Expand Down Expand Up @@ -56,6 +66,8 @@ npm-debug.log*
# apm plugin
/x-pack/plugins/apm/tsconfig.json
apm.tsconfig.json
## @cypress/snapshot from apm plugin
snapshots.js

# release notes script output
report.csv
Expand Down
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

3 changes: 3 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ This module was heavily inspired by the externals plugin that ships with webpack
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra

---
This product has relied on ASTExplorer that is licensed under MIT.

---
This product includes code that is based on Ace editor, which was available
under a "BSD" license.
Expand Down
86 changes: 85 additions & 1 deletion docs/api/spaces-management/get_all.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,38 @@ experimental[] Retrieve all {kib} spaces.

`GET <kibana host>:<port>/api/spaces/space`

[[spaces-api-get-all-query-params]]
==== Query parameters

`purpose`::
(Optional, string) Valid options include `any`, `copySavedObjectsIntoSpace`, and `shareSavedObjectsIntoSpace`. This determines what
authorization checks are applied to the API call. If `purpose` is not provided in the URL, the `any` purpose is used.

`include_authorized_purposes`::
(Optional, boolean) When enabled, the API will return any spaces that the user is authorized to access in any capacity, and each space
will contain the purpose(s) for which the user is authorized. This can be useful to determine which spaces a user can read but not take a
specific action in. If the Security plugin is not enabled, this will have no effect, as no authorization checks would take place.
+
NOTE: This option cannot be used in conjunction with `purpose`.

[[spaces-api-get-all-response-codes]]
==== Response code

`200`::
Indicates a successful call.

[[spaces-api-get-all-example]]
==== Example
==== Examples

[[spaces-api-get-all-example-1]]
===== Default options

Retrieve all spaces without specifying any options:

[source,sh]
--------------------------------------------------
$ curl -X GET api/spaces/space
--------------------------------------------------

The API returns the following:

Expand Down Expand Up @@ -51,3 +75,63 @@ The API returns the following:
}
]
--------------------------------------------------

[[spaces-api-get-all-example-2]]
===== Custom options

The user has read-only access to the Sales space. Retrieve all spaces and specify options:

[source,sh]
--------------------------------------------------
$ curl -X GET api/spaces/space?purpose=shareSavedObjectsIntoSpace&include_authorized_purposes=true
--------------------------------------------------

The API returns the following:

[source,sh]
--------------------------------------------------
[
{
"id": "default",
"name": "Default",
"description" : "This is the Default Space",
"disabledFeatures": [],
"imageUrl": "",
"_reserved": true,
"authorizedPurposes": {
"any": true,
"copySavedObjectsIntoSpace": true,
"findSavedObjects": true,
"shareSavedObjectsIntoSpace": true,
}
},
{
"id": "marketing",
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"disabledFeatures": ["apm"],
"initials": "MK",
"imageUrl": "data:image/png;base64,iVBORw0KGgoAAAANSU",
"authorizedPurposes": {
"any": true,
"copySavedObjectsIntoSpace": true,
"findSavedObjects": true,
"shareSavedObjectsIntoSpace": true,
}
},
{
"id": "sales",
"name": "Sales",
"initials": "MK",
"disabledFeatures": ["discover", "timelion"],
"imageUrl": "",
"authorizedPurposes": {
"any": true,
"copySavedObjectsIntoSpace": false,
"findSavedObjects": true,
"shareSavedObjectsIntoSpace": false,
}
}
]
--------------------------------------------------
2 changes: 1 addition & 1 deletion docs/developer/best-practices/typescript.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Run `node scripts/find_plugins_without_ts_refs.js --id your_plugin_id` to get a

[discrete]
==== Implementation
- Make sure all the plugins listed as dependencies in `kibana.json` file have migrated to TS project references.
- Make sure all the plugins listed as dependencies in *requiredPlugins*, *optionalPlugins* & *requiredBundles* properties of `kibana.json` manifest file have migrated to TS project references.
- Add `tsconfig.json` in the root folder of your plugin.
[source,json]
----
Expand Down
Loading

0 comments on commit a985951

Please sign in to comment.