Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest updates from spaces-phase-1 #5

Merged
merged 72 commits into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
1464741
TypeScript Reporting Layouts (#22454)
bgaddis56 Sep 4, 2018
005be47
[ML] Fixing links to results for obs with no results (#22650)
jgowdyelastic Sep 4, 2018
85bee36
[ML] Adding milliseconds to watch start and end times (#22659)
jgowdyelastic Sep 4, 2018
6c89613
[ML] Removing calendars from job when cloning (#22667)
jgowdyelastic Sep 4, 2018
bcb7938
Extract index pattern validation rules into ui/public (#22606)
cjcenizal Sep 4, 2018
d874c21
added assertion for the email field.
rashmivkulkarni Sep 4, 2018
e89abb3
[config] logging.useUTC -> logging.timezone (#21561)
jbudz Sep 4, 2018
a64738d
[docs] fix missing float
jbudz Sep 4, 2018
5baa6d5
[ftr/asyncInstance] fix error thrown for undefined provider instances…
Sep 4, 2018
cd83db7
Fix #22510, dashboard-only mode doesn't display saved searches (#22685)
chrisdavies Sep 5, 2018
5f4a1c5
Move timezone settings into autoload file (#22623)
timroes Sep 5, 2018
9c01863
Fix react vis type documentation (#22573)
timroes Sep 5, 2018
4cf727a
Add logging to messages validation (#22296)
LeanidShutau Sep 5, 2018
d8f907b
Fix broken visualize CSS (#22707)
timroes Sep 5, 2018
ccf455e
Fix #22581 by introducing an artificial delay (#22601)
chrisdavies Sep 5, 2018
b791869
align staging urls with new endpoints (#22691)
thomasneirynck Sep 5, 2018
23ed213
[ML] Fixing issue with incorrect timezones in jobs list (#22714)
jgowdyelastic Sep 5, 2018
865a51d
Add instructions for running reporting functional tests to x-pack REA…
nreese Sep 5, 2018
f647d6c
[ML] Makefield type icon component keyboard accessible (#22708)
peteharverson Sep 5, 2018
f7fbed3
[APM] Update Node.js onboarding instructions (#22562)
watson Sep 5, 2018
2938d94
Mgmt saved object test (#22564)
rashmivkulkarni Sep 5, 2018
b26e2b4
Pass scoped context to tutorial providers when building tutorials (#2…
nreese Sep 5, 2018
97fccac
Fix IE scrollbar issue on TSVB gauges in dashboard (#22740)
cchaos Sep 5, 2018
eeee0d8
x-pack tests should use servers from other config files already loade…
Sep 6, 2018
8d8513c
Translations for tutorial common (#22071)
Sep 6, 2018
e6ebcf2
translate tutorials(apm) (#22217)
pavel06081991 Sep 6, 2018
a226521
[Spaces] - Experimental Public spaces api (#22501)
legrego Sep 6, 2018
896a89c
Merge branch 'master' into spaces-phase-1
legrego Sep 6, 2018
5f02f3e
[APM] Fix broken links (#22592)
sorenlouv Sep 6, 2018
125cc36
supply space id to tutorial context (#22760)
legrego Sep 6, 2018
5f96c90
Deprecate xpack:defaultAdminEmail for monitoring alerts (#22195)
legrego Sep 6, 2018
3d6de7c
Implement `LegacyService`. Use `core` to start legacy Kibana. (#22190)
azasypkin Sep 6, 2018
81096fd
attempt to isolate test failure
legrego Sep 6, 2018
ec71883
[Spaces] - copy edits (#22457)
legrego Sep 6, 2018
4d83cfd
[Tools] Fix line breaks in default JSON serializer (#22653)
LeanidShutau Sep 6, 2018
557bbcd
don't render space selector on login screen
legrego Sep 6, 2018
b6c5f11
run all tests again
legrego Sep 6, 2018
ce6bd30
run all oss tests again
legrego Sep 6, 2018
03553de
[ci] Run ES snapshot when possible (#22663)
jbudz Sep 6, 2018
df74a82
update role api tests
legrego Sep 6, 2018
bdd1d53
Get rid of `__tests__` folders in the core. (#22662)
azasypkin Sep 7, 2018
76408be
[ML] Anomaly Explorer Charts jest tests. (#22759)
walterra Sep 7, 2018
35226b5
[I18n] Update i18n config (#22799)
LeanidShutau Sep 7, 2018
d021f71
Only log deprecation warning if xpack:defaultAdminEmail is actually s…
legrego Sep 7, 2018
06ee993
[Spaces] - Handle space renaming and deleting (#22586)
legrego Sep 7, 2018
12d15f6
[ML] Disabling single metric viewer links for non-applicable jobs (#2…
jgowdyelastic Sep 7, 2018
20963e3
Investigate flaky override colors dashboard test (#22726)
stacey-gammon Sep 7, 2018
b5c8cbe
Force date format in context query (#22684)
Bargs Sep 7, 2018
ef4b694
Chore: Reorg the x-pack gulp tasks (#22785)
w33ble Sep 7, 2018
12699d1
Generalize dashboard panel actions to not be dashboard specific (#22775)
stacey-gammon Sep 7, 2018
4447523
Add explicit format parameter to docvalue_fields requests (#22771)
Bargs Sep 7, 2018
0ed2623
Introduce date histogram time base configuration to EditorConfig (#22…
jen-huang Sep 7, 2018
54ab5a7
docs: dashboard import/export API (#22835)
epixa Sep 7, 2018
c9b1d7a
Typings for chromium driver (#22688)
stacey-gammon Sep 7, 2018
7e94ecc
Upgrade to Jest 23.5.0 (#22791)
Sep 8, 2018
52060b8
Migrate base path APIs and UiSettings client to new platform (#22694)
Sep 8, 2018
412c430
api/export: calculate content length (#22154) (#22847)
epixa Sep 8, 2018
6efab01
[APM] Fix ML links (#22820)
sorenlouv Sep 8, 2018
012c601
[APM] Minor cleanup (#22827)
sorenlouv Sep 8, 2018
45e4791
Fix _source formatting (#22800)
markov00 Sep 10, 2018
0a870b2
Manage telemetry opt-in via a dedicated document (#22268)
legrego Sep 10, 2018
bf6dd35
Merge branch 'master' into spaces-phase-1
legrego Sep 10, 2018
2d0b1ed
update snapshot
legrego Sep 10, 2018
6da2f05
Merge branch 'spaces-phase-1' into spaces/securing
legrego Sep 10, 2018
8e52fc0
update public api to use SpacesClient
legrego Sep 7, 2018
81b785b
fix
legrego Sep 7, 2018
b3b04f3
test and api fixes
legrego Sep 7, 2018
fb40ad9
fix tests
legrego Sep 10, 2018
493b3df
fix failing test
legrego Sep 10, 2018
778f69f
fix getSortingParameters when an array of length 1 is specified
legrego Sep 10, 2018
1a76bfe
make basePath space aware again
legrego Sep 10, 2018
eb3fde7
Merge branch 'spaces-phase-1' into spaces/securing
legrego Sep 10, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 8 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const { resolve } = require('path');
const { readdirSync } = require('fs');
const dedent = require('dedent');

const restrictedModules = { paths: ['gulp-util'] };

module.exports = {
extends: ['@elastic/eslint-config-kibana', '@elastic/eslint-config-kibana/jest'],

Expand All @@ -17,6 +19,11 @@ module.exports = {
},
},

rules: {
'no-restricted-imports': [2, restrictedModules],
'no-restricted-modules': [2, restrictedModules],
},

overrides: [
/**
* Prettier
Expand Down Expand Up @@ -116,7 +123,7 @@ module.exports = {
'packages/kbn-ui-framework/generator-kui/**/*',
'packages/kbn-ui-framework/Gruntfile.js',
'packages/kbn-es/src/**/*',
'x-pack/{dev-tools,gulp_helpers,scripts,test,build_chromium}/**/*',
'x-pack/{dev-tools,tasks,scripts,test,build_chromium}/**/*',
'x-pack/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__}/**/*',
'x-pack/**/*.test.js',
'x-pack/gulpfile.js',
Expand Down
6 changes: 3 additions & 3 deletions .i18nrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"paths": {
"kbn": "src/core_plugins/kibana",
"common.server": "src/server",
"common.ui": "src/ui",
"xpack.idxMgmt": "xpack/plugins/index_management"
"kbn": "src/core_plugins/kibana",
"statusPage": "src/core_plugins/status_page",
"xpack.idxMgmt": "x-pack/plugins/index_management"
},
"exclude": [
"src/ui/ui_render/bootstrap/app_bootstrap.js",
Expand Down
2 changes: 2 additions & 0 deletions docs/api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ entirely.

* <<role-management-api>>
* <<saved-objects-api>>
* <<dashboard-import-api>>
* <<logstash-configuration-management-api>>
* <<url-shortening-api>>
--

include::api/role-management.asciidoc[]
include::api/saved-objects.asciidoc[]
include::api/dashboard-import.asciidoc[]
include::api/logstash-configuration-management.asciidoc[]
include::api/url-shortening.asciidoc[]

17 changes: 17 additions & 0 deletions docs/api/dashboard-import.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[dashboard-import-api]]
== Dashboard Import API

The dashboard import/export APIs allow people to import dashboards along with
all of their corresponding saved objects such as visualizations, saved
searches, and index patterns.

Traditionally, developers would perform this level of integration by writing
documents directly to the `.kibana` index. *Do not do this!* Writing directly
to the `.kibana` index is not safe and it _will_ result in corrupted data that
permanently breaks Kibana in a future version.

* <<dashboard-import-api-import>>
* <<dashboard-import-api-export>>

include::dashboard-import/import.asciidoc[]
include::dashboard-import/export.asciidoc[]
38 changes: 38 additions & 0 deletions docs/api/dashboard-import/export.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[[dashboard-import-api-export]]
=== Export Dashboard

experimental[This functionality is *experimental* and may be changed or removed completely in a future release.]

The dashboard export API allows people to export dashboards along with all of
their corresponding saved objects such as visualizations, saved searches, and
index patterns.

==== Request

`GET /api/kibana/dashboards/export`

==== Query Parameters

`dashboard` (optional)::
(array|string) The id(s) of the dashboard(s) to export

==== Response body

The response body will have a top level `objects` property that contains an
array of saved objects. The order of these objects is not guaranteed. You
should use this exact response body as the request body for the corresponding
<<dashboard-import-api-import, Import Dashboard API>>.

==== Examples

The following example exports all saved objects associated with and including
the dashboard with id `942dcef0-b2cd-11e8-ad8e-85441f0c2e5c`.

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

A successful call returns a response code of `200` along with the exported
objects as the response body.
96 changes: 96 additions & 0 deletions docs/api/dashboard-import/import.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
[[dashboard-import-api-import]]
=== Import Dashboard

experimental[This functionality is *experimental* and may be changed or removed completely in a future release.]

The dashboard import API allows people to import dashboards along with all of
their corresponding saved objects such as visualizations, saved searches, and
index patterns.

==== Request

`POST /api/kibana/dashboards/import`

==== Query Parameters

`force` (optional)::
(boolean) Overwrite any existing objects on id conflict
`exclude` (optional)::
(array) Saved object types that should not be imported

==== Request Body

The request body is JSON, but you should not manually construct a payload to
this endpoint. Instead, use the complete response body from the
<<dashboard-import-api-export, Export Dashboard API>> as the request body to
this import API.

==== Response body

The response body will have a top level `objects` property that contains an
array of the saved objects that were created.

==== Examples

The following example imports saved objects associated with and including the
dashboard with id `942dcef0-b2cd-11e8-ad8e-85441f0c2e5c`.

[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": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}",
"version": 1,
"timeRestore": false,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}"
}
}
}
]
}
--------------------------------------------------
// KIBANA

A response code of `200` will be returned even if there are errors importing
individual saved objects. In that case, error information will be returned in
the response body on an object-by-object basis.
25 changes: 25 additions & 0 deletions docs/api/spaces-management/delete.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[[spaces-api-delete]]
=== Delete space

experimental[This API is *experimental* and may be changed or removed completely in a future release. The underlying Spaces concepts are stable, but the APIs for managing Spaces are currently experimental.]

[WARNING]
==================================================
Deleting a space will automatically delete all saved objects that belong to that space. This operation cannot be undone!
==================================================

==== Request

To delete a space, submit a DELETE request to the `/api/spaces/space/<space_id>`
endpoint:

[source,js]
--------------------------------------------------
DELETE /api/spaces/space/marketing
--------------------------------------------------
// KIBANA

==== Response

If the space is successfully deleted, the response code is `204`; otherwise, the response
code is 404.
77 changes: 77 additions & 0 deletions docs/api/spaces-management/get.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[[spaces-api-get]]
=== Get Space

experimental[This API is *experimental* and may be changed or removed completely in a future release. The underlying Spaces concepts are stable, but the APIs for managing Spaces are currently experimental.]

Retrieves all {kib} spaces, or a specific space.

==== Get all {kib} spaces

===== Request

To retrieve all spaces, issue a GET request to the
/api/spaces/space endpoint.

[source,js]
--------------------------------------------------
GET /api/spaces/space
--------------------------------------------------
// KIBANA

===== Response

A successful call returns a response code of `200` and a response body containing a JSON
representation of the spaces.

[source,js]
--------------------------------------------------
[
{
"id": "default",
"name": "Default",
"description" : "This is the Default Space",
"_reserved": true
},
{
"id": "marketing",
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"initials": "MK"
},
{
"id": "sales",
"name": "Sales",
"initials": "MK"
},
]
--------------------------------------------------

==== Get a specific space

===== Request

To retrieve a specific space, issue a GET request to
the `/api/spaces/space/<space_id>` endpoint:

[source,js]
--------------------------------------------------
GET /api/spaces/space/marketing
--------------------------------------------------
// KIBANA

===== Response

A successful call returns a response code of `200` and a response body containing a JSON
representation of the space.

[source,js]
--------------------------------------------------
{
"id": "marketing",
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"initials": "MK"
}
--------------------------------------------------
50 changes: 50 additions & 0 deletions docs/api/spaces-management/post.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[[spaces-api-post]]
=== Create Space

experimental[This API is *experimental* and may be changed or removed completely in a future release. The underlying Spaces concepts are stable, but the APIs for managing Spaces are currently experimental.]

Creates a new {kib} space. To update an existing space, use the PUT command.

==== Request

To create a space, issue a POST request to the
`/api/spaces/space` endpoint.

[source,js]
--------------------------------------------------
PUT /api/spaces/space
--------------------------------------------------

==== Request Body

The following parameters can be specified in the body of a POST request to create a space:

`id`:: (string) Required identifier for the space. This identifier becomes part of Kibana's URL when inside the space. This cannot be changed by the update operation.

`name`:: (string) Required display name for the space.

`description`:: (string) Optional description for the space.

`initials`:: (string) Optionally specify the initials shown in the Space Avatar for this space. By default, the initials will be automatically generated from the space name.
If specified, initials should be either 1 or 2 characters.

`color`:: (string) Optioanlly specify the hex color code used in the Space Avatar for this space. By default, the color will be automatically generated from the space name.

===== Example

[source,js]
--------------------------------------------------
POST /api/spaces/space
{
"id": "marketing",
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"initials": "MK"
}
--------------------------------------------------
// KIBANA

==== Response

A successful call returns a response code of `200` with the created Space.
Loading