Skip to content

Commit

Permalink
Merge remote-tracking branch upstream/master
Browse files Browse the repository at this point in the history
  • Loading branch information
YulNaumenko committed May 26, 2021
2 parents fa6d89b + b6d5952 commit 8021eed
Show file tree
Hide file tree
Showing 664 changed files with 12,051 additions and 8,146 deletions.
16 changes: 13 additions & 3 deletions .github/ISSUE_TEMPLATE/v8_breaking_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ assignees: ''
****************************************
Please add a team label to denote the team that the
breaking change is applicable to.
breaking change is applicable to. If the work requires
changes to Upgrade Assistant itself, please tag Team:Elasticsearch UI.
-->

Expand All @@ -23,14 +24,20 @@ breaking change is applicable to.

8.0

**Is this a Kibana or Elasticsearch breaking change?**

<!-- Kibana breaking changes can be registered via the Kibana deprecations service. Elasticsearch breaking changes may require custom logic in Upgrade Assistant and assistance from the Elasticsearch UI team. See more details below. -->

**Describe the change. How will it manifest to users?**

**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. -->

**Can the change be registered with the [Kibana deprecation service](https://github.com/elastic/kibana/blob/master/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md)?**
**Are there any edge cases?**

**[For Kibana deprecations] Can the change be registered with the [Kibana deprecation service](https://github.com/elastic/kibana/blob/master/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md)?**

<!-- The deprecation service is consumed by the Upgrade Assistant to surface Kibana deprecations.
It provides a way for Kibana deprecations to be resolved automatically via an API
Expand All @@ -39,8 +46,11 @@ breaking change is applicable to.
<!-- Each plugin owner is responsible for registering their deprecations via the service.
Please link to the issue/PR that will add this functionality. -->

**Are there any edge cases?**
**[For Elasticsearch deprecations] Can the Upgrade Assistant make the migration easier for users? Please explain the proposed solution in as much detail as possible.**

<!-- Upgrade Assistant consumes the ES deprecation info API to surface deprecations to users. In some cases, Upgrade Assistant can provide a way to resolve a particular deprecation returned from the API. Examples include: reindexing an old index, removing deprecated index settings, upgrading or deleting an old Machine Learning model snapshot. -->

<!-- Please provide a detailed explanation on how you foresee the proposed "fix" to work, e.g., "The deprecation will be surfaced via XXX message in the deprecation info API. Upgrade Assistant can call XXX API to resolve this deprecation". See https://github.com/elastic/kibana/issues/91879 as a real-world example. -->
## Test Data

<!-- Provide test data. We can’t build a solution without data to test it against. -->
Expand Down
2 changes: 0 additions & 2 deletions .i18nrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"paths": {
"common.ui": "src/legacy/ui",
"console": "src/plugins/console",
"core": "src/core",
"discover": "src/plugins/discover",
Expand Down Expand Up @@ -61,6 +60,5 @@
"apmOss": "src/plugins/apm_oss",
"usageCollection": "src/plugins/usage_collection"
},
"exclude": ["src/legacy/ui/ui_render/ui_render_mixin.js"],
"translations": []
}
Binary file added dev_docs/assets/kibana_template_solution_nav.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 35 additions & 2 deletions dev_docs/tutorials/kibana_page_template.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ tags: ['kibana', 'dev', 'ui', 'tutorials']

`KibanaPageTemplate` is a thin wrapper around [EuiPageTemplate](https://elastic.github.io/eui/#/layout/page) that makes setting up common types of Kibana pages quicker and easier while also adhering to any Kibana-specific requirements and patterns.

Refer to EUI's documentation on [EuiPageTemplate](https://elastic.github.io/eui/#/layout/page) for constructing page layouts.
Refer to EUI's documentation on [**EuiPageTemplate**](https://elastic.github.io/eui/#/layout/page) for constructing page layouts.

## `isEmptyState`

Use the `isEmptyState` prop for when there is no page content to show. For example, before the user has created something, when no search results are found, before data is populated, or when permissions aren't met.

The default empty state uses any `pageHeader` info provided to populate an [`EuiEmptyPrompt`](https://elastic.github.io/eui/#/display/empty-prompt) and uses the `centeredBody` template type.
The default empty state uses any `pageHeader` info provided to populate an [**EuiEmptyPrompt**](https://elastic.github.io/eui/#/display/empty-prompt) and uses the `centeredBody` template type.

```tsx
<KibanaPageTemplate
Expand Down Expand Up @@ -84,3 +84,36 @@ When passing both a `pageHeader` configuration and `isEmptyState`, the component
```

![Screenshot of demo custom empty state code with a page header. Shows the Kibana navigation bars, a level 1 heading "Dashboards", and a centered empty state with the a level 2 heading "No data", body text "You have no data. Would you like some of ours?", and a button that says "Get sample data".](../assets/kibana_header_and_empty_state.png)

## `solutionNav`

To add left side navigation for your solution, we recommend passing [**EuiSideNav**](https://elastic.github.io/eui/#/navigation/side-nav) props to the `solutionNav` prop. The template component will then handle the mobile views and add the solution nav embellishments. On top of the EUI props, you'll need to pass your solution `name` and an optional `icon`.

If you need to custom side bar content, you will need to pass you own navigation component to `pageSideBar`. We still recommend using [**EuiSideNav**](https://elastic.github.io/eui/#/navigation/side-nav).

When using `EuiSideNav`, root level items should not be linked but provide section labelling only.

```tsx
<KibanaPageTemplate
solutionNav={{
name: 'Management',
icon: 'managementApp',
items: [
{
name: 'Root item',
items: [
{ name: 'Navigation item', href: '#' },
{ name: 'Navigation item', href: '#' },
]
}
]
}}
>
{...}
</KibanaPageTemplate>
```


![Screenshot of Stack Management empty state with a provided solution navigation shown on the left, outlined in pink.](../assets/kibana_template_solution_nav.png)

![Screenshots of Stack Management page in mobile view. Menu closed on the left, menu open on the right.](../assets/kibana_template_solution_nav_mobile.png)
27 changes: 27 additions & 0 deletions docs/api/index-patterns.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[[index-patterns-api]]
== Index patterns APIs

experimental[] Manage {kib} 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.

WARNING: Use the index patterns API for managing {kib} index patterns instead of lower-level <<saved-objects-api, saved objects API>>.

The following index patterns APIs are available:

* Index patterns
** <<index-patterns-api-get, Get index pattern API>> to retrieve a single {kib} index pattern
** <<index-patterns-api-create, Create index pattern API>> to create {kib} index pattern
** <<index-patterns-api-update, Update index pattern API>> to partially updated {kib} index pattern
** <<index-patterns-api-delete, Delete index pattern API>> to delete {kib} index pattern
* Fields
** <<index-patterns-fields-api-update, Update index pattern field>> to change field metadata, such as `count`, `customLabel` and `format`.



include::index-patterns/get.asciidoc[]
include::index-patterns/create.asciidoc[]
include::index-patterns/update.asciidoc[]
include::index-patterns/delete.asciidoc[]
include::index-patterns/update-fields.asciidoc[]
102 changes: 102 additions & 0 deletions docs/api/index-patterns/create.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
[[index-patterns-api-create]]
=== Create index pattern API
++++
<titleabbrev>Create index pattern</titleabbrev>
++++

experimental[] Create {kib} index patterns.

[[index-patterns-api-create-request]]
==== Request

`POST <kibana host>:<port>/api/index_patterns/index_pattern`

`POST <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern`

[[index-patterns-api-create-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.

[[index-patterns-api-create-body-params]]
==== Request body

`override`:: (Optional, boolean) Overrides an existing index pattern if an
index pattern with the provided title already exists. The default is `false`.

`refresh_fields`:: (Optional, boolean) Reloads index pattern fields after
the index pattern is stored. The default is `false`.

`index_pattern`:: (Required, object) The index pattern object. All fields are optional.

[[index-patterns-api-create-request-codes]]
==== Response code

`200`::
Indicates a successful call.

[[index-patterns-api-create-example]]
==== Examples

Create an index pattern with a custom title:

[source,sh]
--------------------------------------------------
$ curl -X POST api/index_patterns/index_pattern
{
"index_pattern": {
"title": "hello"
}
}
--------------------------------------------------
// KIBANA

Customize the creation behavior:

[source,sh]
--------------------------------------------------
$ curl -X POST api/index_patterns/index_pattern
{
"override": false,
"refresh_fields": true,
"index_pattern": {
"title": "hello"
}
}
--------------------------------------------------
// KIBANA

At creation, all index pattern fields are optional:

[source,sh]
--------------------------------------------------
$ curl -X POST api/index_patterns/index_pattern
{
"index_pattern": {
"id": "...",
"version": "...",
"title": "...",
"type": "...",
"timeFieldName": "...",
"sourceFilters": [],
"fields": {},
"typeMeta": {},
"fieldFormats": {},
"fieldAttrs": {},
"allowNoIndex": "..."
}
}
--------------------------------------------------
// KIBANA


The API returns the index pattern object:

[source,sh]
--------------------------------------------------
{
"index_pattern": {...}
}
--------------------------------------------------

41 changes: 41 additions & 0 deletions docs/api/index-patterns/delete.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[[index-patterns-api-delete]]
=== Delete index pattern API
++++
<titleabbrev>Delete index pattern</titleabbrev>
++++

experimental[] Delete {kib} index patterns.

WARNING: Once you delete an index pattern, _it cannot be recovered_.

[[index-patterns-api-delete-request]]
==== Request

`DELETE <kibana host>:<port>/api/index_patterns/index_pattern/<id>`

`DELETE <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<id>`

[[index-patterns-api-delete-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.

`id`::
(Required, string) The ID of the index pattern you want to delete.

[[index-patterns-api-delete-response-codes]]
==== Response code

`200`::
Indicates that index pattern is deleted. Returns an empty response body.

==== Example

Delete an index pattern object with the `my-pattern` ID:

[source,sh]
--------------------------------------------------
$ curl -X DELETE api/index_patterns/index_pattern/my-pattern
--------------------------------------------------
// KIBANA
64 changes: 64 additions & 0 deletions docs/api/index-patterns/get.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[[index-patterns-api-get]]
=== Get index pattern API
++++
<titleabbrev>Get index pattern</titleabbrev>
++++

experimental[] Retrieve a single {kib} index pattern by ID.

[[index-patterns-api-get-request]]
==== Request

`GET <kibana host>:<port>/api/index_patterns/index_pattern/<id>`

`GET <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<id>`

[[index-patterns-api-get-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.

`id`::
(Required, string) The ID of the index pattern you want to retrieve.

[[index-patterns-api-get-codes]]
==== Response code

`200`::
Indicates a successful call.

`404`::
The specified index pattern and ID doesn't exist.

[[index-patterns-api-get-example]]
==== Example

Retrieve the index pattern object with the `my-pattern` ID:

[source,sh]
--------------------------------------------------
$ curl -X GET api/index_patterns/index_pattern/my-pattern
--------------------------------------------------
// KIBANA

The API returns an index pattern object:

[source,sh]
--------------------------------------------------
{
"index_pattern": {
"id": "my-pattern",
"version": "...",
"title": "...",
"type": "...",
"timeFieldName": "...",
"sourceFilters": [],
"fields": {},
"typeMeta": {},
"fieldFormats": {},
"fieldAttrs": {},
"allowNoIndex: "..."
}
}
--------------------------------------------------
Loading

0 comments on commit 8021eed

Please sign in to comment.