Skip to content

Commit

Permalink
Merge branch 'master' into Hybrid_Index_Pattern_Test
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Oct 16, 2019
2 parents 492d930 + 2335902 commit 40bda53
Show file tree
Hide file tree
Showing 2,381 changed files with 48,748 additions and 43,025 deletions.
2 changes: 1 addition & 1 deletion .backportrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"upstream": "elastic/kibana",
"branches": [{ "name": "7.x", "checked": true }, "7.4", "7.3", "7.2", "7.1", "7.0", "6.8", "6.7", "6.6", "6.5", "6.4", "6.3", "6.2", "6.1", "6.0", "5.6"],
"branches": [{ "name": "7.x", "checked": true }, "7.5", "7.4", "7.3", "7.2", "7.1", "7.0", "6.8", "6.7", "6.6", "6.5", "6.4", "6.3", "6.2", "6.1", "6.0", "5.6"],
"labels": ["backport"]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ bower_components
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/packages/kbn-interpreter/src/common/lib/grammar.js
/x-pack/legacy/plugins/canvas/canvas_plugin
/x-pack/legacy/plugins/canvas/shareable_runtime/build
/x-pack/legacy/plugins/canvas/storybook
/x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/legacy/plugins/infra/common/graphql/types.ts
Expand Down
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ module.exports = {
'src/core/server/**/*',
'!src/core/server/index.ts',
'!src/core/server/mocks.ts',
'!src/core/server/types.ts',
// for absolute imports until fixed in
// https://github.com/elastic/kibana/issues/36096
'!src/core/server/types',
'!src/core/server/*.test.mocks.ts',

'src/plugins/**/public/**/*',
Expand Down
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
/x-pack/test/functional/apps/code/ @teams/code
/x-pack/test/api_integration/apis/code/ @teams/code

# Infrastructure and Logs UI
/x-pack/legacy/plugins/infra/ @elastic/infra-logs-ui
# Logs & Metrics UI
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
/x-pack/legacy/plugins/integrations_manager/ @elastic/epm

# Machine Learning
/x-pack/legacy/plugins/ml/ @elastic/ml-ui
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"kbnESQuery": "packages/kbn-es-query",
"inspector": "src/plugins/inspector",
"kibana-react": "src/plugins/kibana_react",
"telemetry": "src/legacy/core_plugins/telemetry",
"esUi": "src/plugins/es_ui_shared",
"uiActions": "src/plugins/ui_actions"
},
Expand Down
17 changes: 17 additions & 0 deletions docs/api/dashboard-api.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[dashboard-api]]
== Import and export dashboard APIs

Import and export dashboards with the corresponding saved objects, such as visualizations, saved
searches, and index patterns.

WARNING: Do not write documents directly to the `.kibana` index. When you write directly
to the `.kibana` index, the data becomes corrupted and permanently breaks future {kib} versions.

The following import and export dashboard APIs are available:

* <<dashboard-import-api, Import dashboard API>> to import dashboards and corresponding saved objects

* <<dashboard-api-export, Export dashboard API>> to export dashboards and corresponding saved objects

include::dashboard/import-dashboard.asciidoc[]
include::dashboard/export-dashboard.asciidoc[]
14 changes: 0 additions & 14 deletions docs/api/dashboard-import.asciidoc

This file was deleted.

42 changes: 0 additions & 42 deletions docs/api/dashboard-import/export.asciidoc

This file was deleted.

97 changes: 0 additions & 97 deletions docs/api/dashboard-import/import.asciidoc

This file was deleted.

42 changes: 42 additions & 0 deletions docs/api/dashboard/export-dashboard.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[[dashboard-api-export]]
=== Export dashboard API
++++
<titleabbrev>Export dashboard</titleabbrev>
++++

experimental[] Export dashboards and corresponding saved objects.

[[dashboard-api-export-request]]
==== Request

`GET /api/kibana/dashboards/export`

[[dashboard-api-export-params]]
==== Query parameters

`dashboard`::
(Required, array|string) The IDs of the dashboards that you want to export.

[[dashboard-api-export-response-body]]
==== Response body

`objects`::
(array) A top level property that includes the saved objects. The order of the objects is not guaranteed. Use the exact response body as the request body for the corresponding <<dashboard-import-api, Import dashboard API>>.

[[dashboard-api-export-codes]]
==== Response code

`200`::
Indicates a successful call.

[float]
[[dashboard-api-export-example]]
==== Example

[source,js]
--------------------------------------------------
GET api/kibana/dashboards/export?dashboard=942dcef0-b2cd-11e8-ad8e-85441f0c2e5c <1>
--------------------------------------------------
// KIBANA

<1> The dashboard ID is `942dcef0-b2cd-11e8-ad8e-85441f0c2e5c`.
97 changes: 97 additions & 0 deletions docs/api/dashboard/import-dashboard.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
[[dashboard-import-api]]
=== Import dashboard API
++++
<titleabbrev>Import dashboard</titleabbrev>
++++

experimental[] Import dashboards and corresponding saved objects.

[[dashboard-api-import-request]]
==== Request

`POST /api/kibana/dashboards/import`

[[dashboard-api-import-params]]
==== Query parameters

`force`::
(Optional, boolean) Overwrite any existing objects on ID conflict.

`exclude`::
(Optional, array) Saved object types that you want to exclude from the import.

[[dashboard-api-import-request-body]]
==== Request body

Use the complete response body from the <<dashboard-api-export, Export dashboard API>> as the request body. Do not manually construct a payload to the endpoint.

[[dashboard-api-import-response-body]]
==== Response body

`objects`::
(array) A top level property that includes the saved objects.

[[dashboard-api-import-codes]]
==== Response code

`200`::
Indicates a successful call, even if there are errors importing individual saved objects. If there ar errors, the error information is returned in the response body on an object-by-object basis.

[[dashboard-api-import-example]]
==== Example

[source,js]
--------------------------------------------------
POST api/kibana/dashboards/import?exclude=index-pattern
{
"objects": [
{
"id": "80b956f0-b2cd-11e8-ad8e-85441f0c2e5c",
"type": "visualization",
"updated_at": "2018-09-07T18:40:33.247Z",
"version": 1,
"attributes": {
"title": "Count Example",
"visState": "{\"title\":\"Count Example\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}",
"uiStateJSON": "{}",
"description": "",
"version": 1,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"index\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}"
}
}
},
{
"id": "90943e30-9a47-11e8-b64d-95841ca0b247",
"type": "index-pattern",
"updated_at": "2018-09-07T18:39:47.683Z",
"version": 1,
"attributes": {
"title": "kibana_sample_data_logs",
"timeFieldName": "timestamp",
"fields": "<truncated for example>",
"fieldFormatMap": "{\"hour_of_day\":{}}"
}
},
{
"id": "942dcef0-b2cd-11e8-ad8e-85441f0c2e5c",
"type": "dashboard",
"updated_at": "2018-09-07T18:41:05.887Z",
"version": 1,
"attributes": {
"title": "Example Dashboard",
"hits": 0,
"description": "",
"panelsJSON": "[{\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"version\":\"7.0.0-alpha1\",\"panelIndex\":\"1\",\"type\":\"visualization\",\"id\":\"80b956f0-b2cd-11e8-ad8e-85441f0c2e5c\",\"embeddableConfig\":{}}]",
"optionsJSON": "{\"useMargins\":true,\"hidePanelTitles\":false}",
"version": 1,
"timeRestore": false,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}"
}
}
}
]
}
--------------------------------------------------
// KIBANA
Loading

0 comments on commit 40bda53

Please sign in to comment.