Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into kbn-xxx-joi-migra…
Browse files Browse the repository at this point in the history
…tion-of-pain
  • Loading branch information
pgayvallet committed May 18, 2021
2 parents 3aa3b71 + 574b455 commit d3617ed
Show file tree
Hide file tree
Showing 1,831 changed files with 79,304 additions and 18,935 deletions.
6 changes: 1 addition & 5 deletions .ci/Jenkinsfile_flaky
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ def agentProcess(Map params = [:]) {
]) {
task {
if (config.needBuild) {
if (!config.isXpack) {
kibanaPipeline.buildOss()
} else {
kibanaPipeline.buildXpack()
}
kibanaPipeline.buildKibana()
}

for(def i = 0; i < config.agentExecutions; i++) {
Expand Down
2 changes: 1 addition & 1 deletion .ci/Jenkinsfile_security_cypress
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kibanaPipeline(timeoutMinutes: 180) {
def job = 'xpack-securityCypress'

workers.ci(name: job, size: 'l', ramDisk: true) {
kibanaPipeline.bash('test/scripts/jenkins_xpack_build_kibana.sh', 'Build Default Distributable')
kibanaPipeline.bash('test/scripts/jenkins_build_kibana.sh', 'Build Distributable')
kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_chrome.sh')()
// Temporarily disabled to figure out test flake
// kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_firefox.sh')()
Expand Down
6 changes: 1 addition & 5 deletions .ci/es-snapshots/Jenkinsfile_verify_es
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@ kibanaPipeline(timeoutMinutes: 210) {
])

task {
kibanaPipeline.buildOss(6)
kibanaPipeline.buildKibana(16)
tasks.ossCiGroups()
}

task {
kibanaPipeline.buildXpack(10, true)
tasks.xpackCiGroups()
tasks.xpackCiGroupDocker()
}
Expand Down
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@
/packages/kbn-legacy-logging/ @elastic/kibana-core
/packages/kbn-crypto/ @elastic/kibana-core
/packages/kbn-http-tools/ @elastic/kibana-core
/src/plugins/status_page/ @elastic/kibana-core
/src/plugins/saved_objects_management/ @elastic/kibana-core
/src/dev/run_check_published_api_changes.ts @elastic/kibana-core
/src/plugins/home/public @elastic/kibana-core
Expand All @@ -215,7 +214,6 @@
#CC# /src/plugins/legacy_export/ @elastic/kibana-core
#CC# /src/plugins/xpack_legacy/ @elastic/kibana-core
#CC# /src/plugins/saved_objects/ @elastic/kibana-core
#CC# /src/plugins/status_page/ @elastic/kibana-core
#CC# /x-pack/plugins/cloud/ @elastic/kibana-core
#CC# /x-pack/plugins/features/ @elastic/kibana-core
#CC# /x-pack/plugins/global_search/ @elastic/kibana-core
Expand Down
4 changes: 2 additions & 2 deletions STYLEGUIDE.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: kibStyleGuide
slug: /kibana-dev-docs/styleguide
title: StyleGuide
title: Style Guide
summary: JavaScript/TypeScript styleguide.
date: 2021-05-06
tags: ['kibana', 'onboarding', 'dev', 'styleguide', 'typescript', 'javascript']
Expand Down Expand Up @@ -680,7 +680,7 @@ Using `react-component` means adding a bunch of components into angular, while `
### Action function names and prop function names
Name action functions in the form of a strong verb and passed properties in the form of on<Subject><Change>. E.g:
Name action functions in the form of a strong verb and passed properties in the form of `on<Subject><Change>`. E.g:
```jsx
<sort-button onClick={action.sort}/>
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch Node.js rules
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "65067dcad93a61deb593be7d3d9a32a4577d09665536d8da536d731da5cd15e2",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.4.2/rules_nodejs-3.4.2.tar.gz"],
sha256 = "10f534e1c80f795cffe1f2822becd4897754d18564612510c59b3c73544ae7c6",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.5.0/rules_nodejs-3.5.0.tar.gz"],
)

# Now that we have the rules let's import from them to complete the work
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")

# Assure we have at least a given rules_nodejs version
check_rules_nodejs_version(minimum_version_string = "3.4.2")
check_rules_nodejs_version(minimum_version_string = "3.5.0")

# Setup the Node.js toolchain for the architectures we want to support
#
Expand Down
2 changes: 1 addition & 1 deletion api_docs/spaces.json
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@
"section": "def-server.SavedObjectsRepository",
"text": "SavedObjectsRepository"
},
", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"resolve\" | \"update\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">"
", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">"
],
"source": {
"path": "x-pack/plugins/spaces/server/spaces_client/spaces_client_service.ts",
Expand Down
21 changes: 11 additions & 10 deletions api_docs/spaces_oss.json
Original file line number Diff line number Diff line change
Expand Up @@ -577,15 +577,11 @@
"deprecated": false,
"children": [
{
"parentPluginId": "spacesOss",
"id": "def-public.SpacesApi.activeSpace$",
"type": "Object",
"tags": [],
"label": "activeSpace$",
"description": [
"\nObservable representing the currently active space.\nThe details of the space can change without a full page reload (such as display name, color, etc.)"
],
"id": "def-public.SpacesApi.getActiveSpace$",
"type": "Function",
"label": "getActiveSpace$",
"signature": [
"() => ",
"Observable",
"<",
{
Expand All @@ -597,11 +593,16 @@
},
">"
],
"description": [
"\nObservable representing the currently active space.\nThe details of the space can change without a full page reload (such as display name, color, etc.)"
],
"children": [],
"tags": [],
"returnComment": [],
"source": {
"path": "src/plugins/spaces_oss/public/api.ts",
"lineNumber": 22
},
"deprecated": false
}
},
{
"parentPluginId": "spacesOss",
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/building_blocks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Check out the Map Embeddable if you wish to embed a map in your application.

All Kibana pages should use KibanaPageTemplate to setup their pages. It's 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.

Check out <DocLink id="kibDevDocsKBTTutorial" text="the KibanaPageTemplate tutorial" /> for more implementation guidance.
Check out <DocLink id="kibDevDocsKPTTutorial" text="the KibanaPageTemplate tutorial" /> for more implementation guidance.

**Github labels**: `EUI`

Expand Down
20 changes: 10 additions & 10 deletions dev_docs/tutorials/kibana_page_template.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
id: kibDevDocsKBLTutorial
slug: /kibana-dev-docs/tutorials/kibana-page-layout
title: KibanaPageLayout component
id: kibDevDocsKPTTutorial
slug: /kibana-dev-docs/tutorials/kibana-page-template
title: KibanaPageTemplate component
summary: Learn how to create pages in Kibana
date: 2021-03-20
tags: ['kibana', 'dev', 'ui', 'tutorials']
---

`KibanaPageLayout` 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.
`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.

Expand All @@ -18,7 +18,7 @@ Use the `isEmptyState` prop for when there is no page content to show. For examp
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
<KibanaPageLayout
<KibanaPageTemplate
isEmptyState={true}
pageHeader={{
iconType: 'dashboardApp',
Expand All @@ -42,10 +42,10 @@ The default empty state uses any `pageHeader` info provided to populate an [`Eui

### Custom empty state

You can also provide a custom empty prompt to replace the pre-built one. You'll want to remove any `pageHeader` props and pass an [`EuiEmptyPrompt`](https://elastic.github.io/eui/#/display/empty-prompt) directly as the child of KibanaPageLayout.
You can also provide a custom empty prompt to replace the pre-built one. You'll want to remove any `pageHeader` props and pass an [`EuiEmptyPrompt`](https://elastic.github.io/eui/#/display/empty-prompt) directly as the child of KibanaPageTemplate.

```tsx
<KibanaPageLayout isEmptyState={true}>
<KibanaPageTemplate isEmptyState={true}>
<EuiEmptyPrompt
title={<h1>No data</h1>}
body="You have no data. Would you like some of ours?"
Expand All @@ -55,7 +55,7 @@ You can also provide a custom empty prompt to replace the pre-built one. You'll
</EuiButton>,
]}
/>
</KibanaPageLayout>
</KibanaPageTemplate>
```

![Screenshot of demo custom empty state code. Shows the Kibana navigation bars and a centered empty state with the a level 1 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_custom_empty_state.png)
Expand All @@ -65,7 +65,7 @@ You can also provide a custom empty prompt to replace the pre-built one. You'll
When passing both a `pageHeader` configuration and `isEmptyState`, the component will render the proper template (`centeredContent`). Be sure to reduce the heading level within your child empty prompt to `<h2>`.

```tsx
<KibanaPageLayout
<KibanaPageTemplate
isEmptyState={true}
pageHeader={{
pageTitle: 'Dashboards',
Expand All @@ -80,7 +80,7 @@ When passing both a `pageHeader` configuration and `isEmptyState`, the component
</EuiButton>,
]}
/>
</KibanaPageLayout>
</KibanaPageTemplate>
```

![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)
79 changes: 12 additions & 67 deletions docs/concepts/index-patterns.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ or all indices that contain your data. It can also point to a

You’ll learn how to:

* Create an index pattern
* Explore and configure the data fields
* Create index patterns
* Set the default index pattern
* Delete an index pattern
* Delete index patterns

[float]
[[index-patterns-read-only-access]]
Expand Down Expand Up @@ -133,77 +132,23 @@ To exclude a cluster, use `cluster_*:logstash-*,cluster_one:-*`.
Once an index pattern is configured using the {ccs} syntax, all searches and
aggregations using that index pattern in {kib} take advantage of {ccs}.


[float]
[[reload-fields]]
=== Explore and configure the data fields

To explore and configure the data fields in your index pattern, open the main menu, then click
*Stack Management > Index Patterns*. Each field has a {ref}/mapping.html[mapping],
which indicates the type of data the field contains in {es},
such as strings or boolean values. The field mapping also determines
how you can use the field, such as whether it can be searched or aggregated.

When a new field is added to the index, the index pattern field list is updated
the next time the index pattern is loaded, for example, when you load the page or
move between {kib} apps.

[role="screenshot"]
image:management/index-patterns/images/new-index-pattern.png["Create index pattern"]

[float]
=== Format the display of common field types

Whenever possible, {kib} uses the same field type for display as
{es}. However, some field types that {es} supports are not available
in {kib}. Using field formatters, you can manually change the field type in {kib} to display your data the way you prefer
to see it, regardless of how it is stored in {es}.

For example, if you store
date values in {es}, you can use a {kib} field formatter to change the display to mm/dd/yyyy format.
{kib} has field formatters for
<<field-formatters-string, strings>>,
<<field-formatters-date, dates>>,
<<field-formatters-geopoint, geopoints>>,
and <<field-formatters-numeric, numbers>>.

To customize the displayed field name provided by {es}, you can
use *Custom Label* .

A popularity counter keeps track of the fields you use most often.
The top five most popular fields and their values are displayed in <<discover,*Discover*>>.

To edit the field display, click the edit icon
(image:management/index-patterns/images/edit_icon.png[]) in the index pattern detail view.

[role="screenshot"]
image:management/index-patterns/images/edit-field-format.png["Edit field format"]

[float]
[[default-index-pattern]]
=== Set the default index pattern
[[delete-index-pattern]]
=== Delete index patterns

The first index pattern you create is automatically designated as the default pattern,
but you can set any index pattern as the default. The default index pattern is automatically selected when you first open <<discover,*Discover*>> or create a visualization from scratch.
When you delete an index pattern, you are unable to recover the associated field formatters, scripted fields, source filters,
and field popularity data. Deleting an index pattern does not remove any indices or data documents from {es}.

. In *Index patterns*, click the index pattern name.
. Click the star icon (image:management/index-patterns/images/star.png[Star icon]).
WARNING: Deleting an index pattern breaks all visualizations, saved searches, and other saved objects that reference the index pattern.

[float]
[[delete-index-pattern]]
=== Delete an index pattern
. Open the main menu, then click *Stack Management > Index Patterns*.

This action removes the pattern from the list of saved objects in {kib}.
You will not be able to recover field formatters, scripted fields, source filters,
and field popularity data associated with the index pattern. Deleting an
index pattern does not remove any indices or data documents from {es}.
. Click the index pattern you want to delete.

WARNING: Deleting an index pattern breaks all visualizations, saved searches, and other saved objects that reference the pattern.

. In *Index patterns*, click the index pattern name.
. Click the delete icon (image:management/index-patterns/images/delete.png[Delete icon]).
. Delete (image:management/index-patterns/images/delete.png[Delete icon]) the index pattern.

[float]
[[reload-fields]]
=== What’s next

* Learn about <<scripted-fields,scripted fields>> and how to create data on the fly.
Learn how to <<managing-index-patterns,manage the data fields>> in your index patterns.
5 changes: 2 additions & 3 deletions docs/concepts/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ that accesses the {kib} API.

{kib} uses the index pattern to show you a list of fields, such as
`event.duration`. You can customize the display name and format for each field.
For example, you can tell Kibana to display `event.duration` in seconds.
For example, you can tell {kib} to display `event.duration` in seconds.
{kib} has <<managing-fields,field formatters>> for strings,
dates, geopoints,
and numbers.
dates, geopoints, and numbers.

[float]
[[kibana-concepts-searching-your-data]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default function (/* { providerAPI } */) {
-----------

**Services**:::
Services are named singleton values produced by a Service Provider. Tests and other services can retrieve service instances by asking for them by name. All functionality except the mocha API is exposed via services.\
Services are named singleton values produced by a Service Provider. Tests and other services can retrieve service instances by asking for them by name. All functionality except the mocha API is exposed via services.

**Page objects**:::
Page objects are a special type of service that encapsulate behaviors common to a particular page or plugin. When you write your own plugin, you’ll likely want to add a page object (or several) that describes the common interactions your tests need to execute.
Expand Down
11 changes: 9 additions & 2 deletions docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,24 @@ yarn kbn watch-bazel
- @kbn/config-schema
- @kbn/crypto
- @kbn/dev-utils
- @kbn/docs-utils
- @kbn/es
- @kbn/eslint-import-resolver-kibana
- @kbn/eslint-plugin-eslint
- @kbn/expect
- @kbn/i18n
- @kbn/legacy-logging
- @kbn/logging
- @kbn/securitysolution-constants
- @kbn/securitysolution-utils
- @kbn/securitysolution-es-utils
- kbn/securitysolution-io-ts-alerting-types
- kbn/securitysolution-io-ts-list-types
- kbn/securitysolution-io-ts-types
- @kbn/securitysolution-io-ts-utils
- @kbn/securitysolution-utils
- @kbn/server-http-tools
- @kbn/std
- @kbn/telemetry-utils
- @kbn/tinymath
- @kbn/utility-types
- @kbn/utils

Loading

0 comments on commit d3617ed

Please sign in to comment.