Skip to content

Commit

Permalink
Merge branch 'master' into de_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Jul 15, 2020
2 parents ca674af + 3c8a66e commit 974cd88
Show file tree
Hide file tree
Showing 1,499 changed files with 38,362 additions and 19,104 deletions.
File renamed without changes.
64 changes: 64 additions & 0 deletions .ci/Jenkinsfile_baseline_trigger
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/groovy

def MAXIMUM_COMMITS_TO_CHECK = 10
def MAXIMUM_COMMITS_TO_BUILD = 5

if (!params.branches_yaml) {
error "'branches_yaml' parameter must be specified"
}

def additionalBranches = []

def branches = readYaml(text: params.branches_yaml) + additionalBranches

library 'kibana-pipeline-library'
kibanaLibrary.load()

withGithubCredentials {
branches.each { branch ->
stage(branch) {
def commits = getCommits(branch, MAXIMUM_COMMITS_TO_CHECK, MAXIMUM_COMMITS_TO_BUILD)

commits.take(MAXIMUM_COMMITS_TO_BUILD).each { commit ->
catchErrors {
githubCommitStatus.create(commit, 'pending', 'Baseline started.', 'kibana-ci-baseline')

build(
propagate: false,
wait: false,
job: 'elastic+kibana+baseline-capture',
parameters: [
string(name: 'branch_specifier', value: branch),
string(name: 'commit', value: commit),
]
)
}
}
}
}
}

def getCommits(String branch, maximumCommitsToCheck, maximumCommitsToBuild) {
print "Getting latest commits for ${branch}..."
def commits = githubApi.get("repos/elastic/kibana/commits?sha=${branch}").take(maximumCommitsToCheck).collect { it.sha }
def commitsToBuild = []

for (commit in commits) {
print "Getting statuses for ${commit}"
def status = githubApi.get("repos/elastic/kibana/statuses/${commit}").find { it.context == 'kibana-ci-baseline' }
print "Commit '${commit}' already built? ${status ? 'Yes' : 'No'}"

if (!status) {
commitsToBuild << commit
} else {
// Stop at the first commit we find that's already been triggered
break
}

if (commitsToBuild.size() >= maximumCommitsToBuild) {
break
}
}

return commitsToBuild.reverse() // We want the builds to trigger oldest-to-newest
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ target
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
/src/plugins/vis_type_timelion/public/_generated_/**
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
/src/plugins/timelion/public/webpackShims/jquery.flot.*
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/x-pack/plugins/apm/e2e/**/snapshots.js
/x-pack/plugins/apm/e2e/tmp/*
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"src/plugins/telemetry_management_section"
],
"tileMap": "src/plugins/tile_map",
"timelion": ["src/legacy/core_plugins/timelion", "src/plugins/vis_type_timelion"],
"timelion": ["src/plugins/timelion", "src/plugins/vis_type_timelion"],
"uiActions": "src/plugins/ui_actions",
"visDefaultEditor": "src/plugins/vis_default_editor",
"visTypeMarkdown": "src/plugins/vis_type_markdown",
Expand Down
2 changes: 1 addition & 1 deletion .sass-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
files:
include:
- 'src/legacy/core_plugins/metrics/**/*.s+(a|c)ss'
- 'src/legacy/core_plugins/timelion/**/*.s+(a|c)ss'
- 'src/plugins/timelion/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_vislib/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_xy/**/*.s+(a|c)ss'
- 'x-pack/plugins/canvas/**/*.s+(a|c)ss'
Expand Down
1 change: 0 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ kibanaPipeline(timeoutMinutes: 155, checkPrChanges: true, setCommitStatus: true)
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
'xpack-accessibility': kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh'),
'xpack-savedObjectsFieldMetrics': kibanaPipeline.functionalTestProcess('xpack-savedObjectsFieldMetrics', './test/scripts/jenkins_xpack_saved_objects_field_metrics.sh'),
// 'xpack-pageLoadMetrics': kibanaPipeline.functionalTestProcess('xpack-pageLoadMetrics', './test/scripts/jenkins_xpack_page_load_metrics.sh'),
'xpack-securitySolutionCypress': { processNumber ->
whenChanged(['x-pack/plugins/security_solution/', 'x-pack/test/security_solution_cypress/']) {
kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypress', './test/scripts/jenkins_security_solution_cypress.sh')(processNumber)
Expand Down
2 changes: 1 addition & 1 deletion docs/api/dashboard/export-dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ experimental[] Export dashboards and corresponding saved objects.

[source,sh]
--------------------------------------------------
$ curl -X GET "localhost:5601/api/kibana/dashboards/export?dashboard=942dcef0-b2cd-11e8-ad8e-85441f0c2e5c" <1>
$ curl -X GET api/kibana/dashboards/export?dashboard=942dcef0-b2cd-11e8-ad8e-85441f0c2e5c <1>
--------------------------------------------------
// KIBANA

Expand Down
2 changes: 1 addition & 1 deletion docs/api/dashboard/import-dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Use the complete response body from the <<dashboard-api-export, Export dashboard

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/kibana/dashboards/import?exclude=index-pattern"
$ curl -X POST api/kibana/dashboards/import?exclude=index-pattern
{
"objects": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ experimental[] Create a centrally-managed Logstash pipeline, or update an existi
[[logstash-configuration-management-api-create-request-body]]
==== Request body

`id`::
(Required, string) The pipeline ID.

`description`::
(Optional, string) The pipeline description.

Expand All @@ -41,7 +44,7 @@ experimental[] Create a centrally-managed Logstash pipeline, or update an existi

[source,sh]
--------------------------------------------------
$ curl -X PUT "localhost:5601/api/logstash/pipeline/hello-world"
$ curl -X PUT api/logstash/pipeline/hello-world
{
"pipeline": "input { stdin {} } output { stdout {} }",
"settings": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ experimental[] Delete a centrally-managed Logstash pipeline.

[source,sh]
--------------------------------------------------
$ curl -X DELETE "localhost:5601/api/logstash/pipeline/hello-world"
$ curl -X DELETE api/logstash/pipeline/hello-world
--------------------------------------------------
// KIBANA
10 changes: 5 additions & 5 deletions docs/api/role-management/put.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Grant access to various features in all spaces:

[source,sh]
--------------------------------------------------
$ curl -X PUT "localhost:5601/api/security/role/my_kibana_role"
$ curl -X PUT api/security/role/my_kibana_role
{
"metadata" : {
"version" : 1
Expand Down Expand Up @@ -132,7 +132,7 @@ Grant dashboard-only access to only the Marketing space:

[source,sh]
--------------------------------------------------
$ curl -X PUT "localhost:5601/api/security/role/my_kibana_role"
$ curl -X PUT api/security/role/my_kibana_role
{
"metadata" : {
"version" : 1
Expand Down Expand Up @@ -160,7 +160,7 @@ Grant full access to all features in the Default space:

[source,sh]
--------------------------------------------------
$ curl -X PUT "localhost:5601/api/security/role/my_kibana_role"
$ curl -X PUT api/security/role/my_kibana_role
{
"metadata" : {
"version" : 1
Expand All @@ -187,7 +187,7 @@ Grant different access to different spaces:

[source,sh]
--------------------------------------------------
$ curl -X PUT "localhost:5601/api/security/role/my_kibana_role"
$ curl -X PUT api/security/role/my_kibana_role
{
"metadata" : {
"version" : 1
Expand Down Expand Up @@ -223,7 +223,7 @@ Grant access to {kib} and {es}:

[source,sh]
--------------------------------------------------
$ curl -X PUT "localhost:5601/api/security/role/my_kibana_role"
$ curl -X PUT api/security/role/my_kibana_role
{
"metadata" : {
"version" : 1
Expand Down
2 changes: 1 addition & 1 deletion docs/api/saved-objects/bulk_create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Create an index pattern with the `my-pattern` ID, and a dashboard with the `my-d

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_bulk_create"
$ curl -X POST api/saved_objects/_bulk_create
[
{
"type": "index-pattern",
Expand Down
4 changes: 2 additions & 2 deletions docs/api/saved-objects/bulk_get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ experimental[] Retrieve multiple {kib} saved objects by ID.
(Required, string) ID of the retrieved object. The ID includes the {kib} unique identifier or a custom identifier.

`fields`::
(Optional, array) The fields returned in the object response.
(Optional, array) The fields to return in the `attributes` key of the object response.

[[saved-objects-api-bulk-get-response-body]]
==== Response body
Expand All @@ -52,7 +52,7 @@ Retrieve an index pattern with the `my-pattern` ID, and a dashboard with the `my

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_bulk_get"
$ curl -X POST api/saved_objects/_bulk_get
[
{
"type": "index-pattern",
Expand Down
2 changes: 1 addition & 1 deletion docs/api/saved-objects/create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ any data that you send to the API is properly formed.

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/index-pattern/my-pattern" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
$ curl -X POST api/saved_objects/index-pattern/my-pattern -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
"attributes": {
"title": "my-pattern-*"
Expand Down
2 changes: 1 addition & 1 deletion docs/api/saved-objects/delete.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ Delete an index pattern object with the `my-pattern` ID:

[source,sh]
--------------------------------------------------
$ curl -X DELETE "localhost:5601/api/saved_objects/index-pattern/my-pattern"
$ curl -X DELETE api/saved_objects/index-pattern/my-pattern
--------------------------------------------------
// KIBANA
8 changes: 4 additions & 4 deletions docs/api/saved-objects/export.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Export all index pattern saved objects:

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_export" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
$ curl -X POST api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
"type": "index-pattern"
}'
Expand All @@ -79,7 +79,7 @@ Export all index pattern saved objects and exclude the export summary from the s

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_export" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
$ curl -X POST api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
"type": "index-pattern",
"excludeExportDetails": true
Expand All @@ -91,7 +91,7 @@ Export a specific saved object:

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_export" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
$ curl -X POST api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
"objects": [
{
Expand All @@ -107,7 +107,7 @@ Export a specific saved object and it's related objects :

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_export" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
$ curl -X POST api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
"objects": [
{
Expand Down
6 changes: 3 additions & 3 deletions docs/api/saved-objects/find.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ experimental[] Retrieve a paginated set of {kib} saved objects by various condit
(Optional, array|string) The fields to perform the `simple_query_string` parsed query against.

`fields`::
(Optional, array|string) The fields to return in the response.
(Optional, array|string) The fields to return in the `attributes` key of the response.

`sort_field`::
(Optional, string) The field that sorts the response.
Expand Down Expand Up @@ -69,7 +69,7 @@ Find index patterns with titles that start with `my`:

[source,sh]
--------------------------------------------------
$ curl -X GET "localhost:5601/api/saved_objects/_find?type=index-pattern&search_fields=title&search=my*"
$ curl -X GET api/saved_objects/_find?type=index-pattern&search_fields=title&search=my*
--------------------------------------------------
// KIBANA

Expand Down Expand Up @@ -97,6 +97,6 @@ query parameter for each value:

[source,sh]
--------------------------------------------------
$ curl -X GET "localhost:5601/api/saved_objects/_find?fields=id&fields=title"
$ curl -X GET api/saved_objects/_find?fields=id&fields=title
--------------------------------------------------
// KIBANA
4 changes: 2 additions & 2 deletions docs/api/saved-objects/get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Retrieve the index pattern object with the `my-pattern` ID:

[source,sh]
--------------------------------------------------
$ curl -X GET "localhost:5601/api/saved_objects/index-pattern/my-pattern"
$ curl -X GET api/saved_objects/index-pattern/my-pattern
--------------------------------------------------
// KIBANA

Expand All @@ -61,7 +61,7 @@ Retrieve a dashboard object in the `testspace` by ID:

[source,sh]
--------------------------------------------------
$ curl -X GET "localhost:5601/s/testspace/api/saved_objects/dashboard/7adfa750-4c81-11e8-b3d7-01146121b73d"
$ curl -X GET s/testspace/api/saved_objects/dashboard/7adfa750-4c81-11e8-b3d7-01146121b73d
--------------------------------------------------
// KIBANA

Expand Down
6 changes: 3 additions & 3 deletions docs/api/saved-objects/import.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Import an index pattern and dashboard:

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form [email protected]
$ curl -X POST api/saved_objects/_import -H "kbn-xsrf: true" --form [email protected]
--------------------------------------------------
// KIBANA

Expand All @@ -83,7 +83,7 @@ Import an index pattern and dashboard that includes a conflict on the index patt

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form [email protected]
$ curl -X POST api/saved_objects/_import -H "kbn-xsrf: true" --form [email protected]
--------------------------------------------------
// KIBANA

Expand Down Expand Up @@ -119,7 +119,7 @@ Import a visualization and dashboard with an index pattern for the visualization

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form [email protected]
$ curl -X POST api/saved_objects/_import -H "kbn-xsrf: true" --form [email protected]
--------------------------------------------------
// KIBANA

Expand Down
6 changes: 3 additions & 3 deletions docs/api/saved-objects/resolve_import_errors.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Retry a dashboard import:

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_resolve_import_errors" -H "kbn-xsrf: true" --form [email protected] --form retries='[{"type":"dashboard","id":"my-dashboard"}]'
$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form [email protected] --form retries='[{"type":"dashboard","id":"my-dashboard"}]'
--------------------------------------------------
// KIBANA

Expand All @@ -88,7 +88,7 @@ Resolve errors for a dashboard and overwrite the existing saved object:

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_resolve_import_errors" -H "kbn-xsrf: true" --form [email protected] --form retries='[{"type":"dashboard","id":"my-dashboard","overwrite":true}]'
$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form [email protected] --form retries='[{"type":"dashboard","id":"my-dashboard","overwrite":true}]'
--------------------------------------------------
// KIBANA

Expand All @@ -114,7 +114,7 @@ Resolve errors for a visualization by replacing the index pattern with another:

[source,sh]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_resolve_import_errors" -H "kbn-xsrf: true" --form [email protected] --form retries='[{"type":"visualization","id":"my-vis","replaceReferences":[{"type":"index-pattern","from":"missing","to":"existing"}]}]'
$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form [email protected] --form retries='[{"type":"visualization","id":"my-vis","replaceReferences":[{"type":"index-pattern","from":"missing","to":"existing"}]}]'
--------------------------------------------------
// KIBANA

Expand Down
2 changes: 1 addition & 1 deletion docs/api/saved-objects/update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Update an existing index pattern object,`my-pattern`, with a different title:

[source,sh]
--------------------------------------------------
$ curl -X PUT "localhost:5601/api/saved_objects/index-pattern/my-pattern"
$ curl -X PUT api/saved_objects/index-pattern/my-pattern
{
"attributes": {
"title": "some-other-pattern-*"
Expand Down
4 changes: 2 additions & 2 deletions docs/api/spaces-management/copy_saved_objects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Copy a dashboard with the `my-dashboard` ID, including all references from the `

[source,sh]
----
$ curl -X POST "localhost:5601/api/spaces/_copy_saved_objects"
$ curl -X POST api/spaces/_copy_saved_objects
{
"objects": [{
"type": "dashboard",
Expand Down Expand Up @@ -137,7 +137,7 @@ Copy a visualization with the `my-viz` ID from the `marketing` space to the `def

[source,sh]
----
$ curl -X POST "localhost:5601/s/marketing/api/spaces/_copy_saved_objects"
$ curl -X POST s/marketing/api/spaces/_copy_saved_objects
{
"objects": [{
"type": "visualization",
Expand Down
Loading

0 comments on commit 974cd88

Please sign in to comment.