Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/elastic/kibana into extend-…
Browse files Browse the repository at this point in the history
…elastic-query-rule

# Conflicts:
#	x-pack/plugins/alerting/server/plugin.test.ts
#	x-pack/plugins/alerting/server/plugin.ts
#	x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts
#	x-pack/plugins/alerting/server/task_runner/task_runner_factory.test.ts
#	x-pack/plugins/alerting/server/task_runner/task_runner_factory.ts
  • Loading branch information
dimaanj committed Mar 26, 2022
2 parents 622703c + f522995 commit 564417b
Show file tree
Hide file tree
Showing 704 changed files with 19,337 additions and 5,272 deletions.
66 changes: 52 additions & 14 deletions .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,135 +19,169 @@ steps:
label: 'Default CI Group'
parallelism: 27
agents:
queue: n2-4
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 250
key: default-cigroup
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Docker CI Group'
agents:
queue: n2-4
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
key: default-cigroup-docker
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/oss_cigroup.sh
label: 'OSS CI Group'
parallelism: 11
agents:
queue: ci-group-4d
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
key: oss-cigroup
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/oss_accessibility.sh
label: 'OSS Accessibility Tests'
agents:
queue: ci-group-4d
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/xpack_accessibility.sh
label: 'Default Accessibility Tests'
agents:
queue: n2-4
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/oss_firefox.sh
label: 'OSS Firefox Tests'
agents:
queue: ci-group-4d
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/xpack_firefox.sh
label: 'Default Firefox Tests'
agents:
queue: n2-4
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/oss_misc.sh
label: 'OSS Misc Functional Tests'
agents:
queue: n2-4
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/xpack_saved_object_field_metrics.sh
label: 'Saved Object Field Metrics'
agents:
queue: n2-4
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/test/jest.sh
label: 'Jest Tests'
parallelism: 8
agents:
queue: n2-4
queue: n2-4-spot
timeout_in_minutes: 90
key: jest
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/test/jest_integration.sh
label: 'Jest Integration Tests'
parallelism: 3
agents:
queue: n2-4
queue: n2-4-spot
timeout_in_minutes: 120
key: jest-integration
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/test/api_integration.sh
label: 'API Integration Tests'
agents:
queue: n2-2
queue: n2-2-spot
timeout_in_minutes: 120
key: api-integration
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
queue: n2-2
queue: n2-2-spot
key: linting
timeout_in_minutes: 90
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
Expand All @@ -166,9 +200,13 @@ steps:
- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh
label: 'Build Storybooks'
agents:
queue: c2-4
queue: n2-4-spot
key: storybooks
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3

- wait: ~
continue_on_failure: true
Expand Down
10 changes: 6 additions & 4 deletions docs/api/cases.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ these APIs:

* {security-guide}/cases-api-add-comment.html[Add comment]
* <<cases-api-create>>
* {security-guide}/cases-api-delete-case.html[Delete case]
* {security-guide}/cases-api-delete-all-comments.html[Delete all comments]
* {security-guide}/cases-api-delete-comment.html[Delete comment]
* <<cases-api-delete-cases>>
* <<cases-api-delete-comments>>
* {security-guide}/cases-api-find-alert.html[Find all alerts attached to a case]
* <<cases-api-find-cases>>
* {security-guide}/cases-api-find-cases-by-alert.html[Find cases by alert]
Expand All @@ -29,8 +28,11 @@ these APIs:

//CREATE
include::cases/cases-api-create.asciidoc[leveloffset=+1]
//DELETE
include::cases/cases-api-delete-cases.asciidoc[leveloffset=+1]
include::cases/cases-api-delete-comments.asciidoc[leveloffset=+1]
//FIND
include::cases/cases-api-find-cases.asciidoc[leveloffset=+1]
include::cases/cases-api-find-connectors.asciidoc[leveloffset=+1]
//UPDATE
include::cases/cases-api-update.asciidoc[leveloffset=+1]
include::cases/cases-api-update.asciidoc[leveloffset=+1]
52 changes: 52 additions & 0 deletions docs/api/cases/cases-api-delete-cases.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[[cases-api-delete-cases]]
== Delete cases API
++++
<titleabbrev>Delete cases</titleabbrev>
++++

Deletes one or more cases.

=== Request

`DELETE <kibana host>:<port>/api/cases?ids=["<case ID1>","<case ID2>"]`

`DELETE <kibana host>:<port>/s/<space_id>/api/cases?ids=["<case ID1>","<case ID2>"]`

=== Prerequisite

You must have `all` privileges for the *Cases* feature in the *Management*,
*{observability}*, or *Security* section of the
<<kibana-feature-privileges,{kib} feature privileges>>, depending on the
`owner` of the cases you're deleting.

=== Path parameters

`<space_id>`::
(Optional, string) An identifier for the space. If it is not specified, the
default space is used.

=== Query parameters

`ids`::
(Required, string) The cases that you want to remove. To retrieve case IDs, use
<<cases-api-find-cases>>.
+
NOTE: All non-ASCII characters must be URL encoded.

==== Response code

`204`::
Indicates a successful call.

=== Example

Delete cases with these IDs:

* `2e3a54f0-6754-11ea-a1c2-e3a8bc9f7aca`
* `40b9a450-66a0-11ea-be1b-2bd3fef48984`

[source,console]
--------------------------------------------------
DELETE api/cases?ids=%5B%222e3a54f0-6754-11ea-a1c2-e3a8bc9f7aca%22%2C%2240b9a450-66a0-11ea-be1b-2bd3fef48984%22%5D
--------------------------------------------------
// KIBANA
63 changes: 63 additions & 0 deletions docs/api/cases/cases-api-delete-comments.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[[cases-api-delete-comments]]
== Delete comments from case API
++++
<titleabbrev>Delete comments</titleabbrev>
++++

Deletes one or all comments from a case.

=== Request

`DELETE <kibana host>:<port>/api/cases/<case_id>/comments`

`DELETE <kibana host>:<port>/api/cases/<case_id>/comments/<comment_id>`

`DELETE <kibana host>:<port>/s/<space_id>/api/cases/<case_id>/comments`

`DELETE <kibana host>:<port>/s/<space_id>/api/cases/<case_id>/comments/<comment_id>`

=== Prerequisite

You must have `all` privileges for the *Cases* feature in the *Management*,
*{observability}*, or *Security* section of the
<<kibana-feature-privileges,{kib} feature privileges>>, depending on the
`owner` of the cases you're updating.

=== Path parameters

`<case_id>`::
(Required, string) The identifier for the case. To retrieve case IDs, use
<<cases-api-find-cases>>.

`<comment_id>`::
(Optional, string) The identifier for the comment.
//To retrieve comment IDs, use <<cases-api-get-all-case-comments>>.
If it is not specified, all comments are deleted.

<space_id>::
(Optional, string) An identifier for the space. If it is not specified, the
default space is used.

=== Response code

`204`::
Indicates a successful call.

=== Example

Delete all comments from case ID `9c235210-6834-11ea-a78c-6ffb38a34414`:

[source,console]
--------------------------------------------------
DELETE api/cases/a18b38a0-71b0-11ea-a0b2-c51ea50a58e2/comments
--------------------------------------------------
// KIBANA

Delete comment ID `71ec1870-725b-11ea-a0b2-c51ea50a58e2` from case ID
`a18b38a0-71b0-11ea-a0b2-c51ea50a58e2`:

[source,sh]
--------------------------------------------------
DELETE api/cases/a18b38a0-71b0-11ea-a0b2-c51ea50a58e2/comments/71ec1870-725b-11ea-a0b2-c51ea50a58e2
--------------------------------------------------
// KIBANA
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ security and spaces filtering.
|{kib-repo}blob/{branch}/x-pack/plugins/event_log/README.md[eventLog]
|The event log plugin provides a persistent history of alerting and action
actitivies.
activities.
|{kib-repo}blob/{branch}/x-pack/plugins/features/README.md[features]
Expand Down
9 changes: 9 additions & 0 deletions docs/user/security/audit-logging.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ Refer to the corresponding {es} logs for potential write errors.
| `unknown` | User is updating an alert.
| `failure` | User is not authorized to update an alert.

.2+| `rule_snooze`
| `unknown` | User is snoozing a rule.
| `failure` | User is not authorized to snooze a rule.

.2+| `rule_unsnooze`
| `unknown` | User is unsnoozing a rule.
| `failure` | User is not authorized to unsnooze a rule.


3+a|
====== Type: deletion

Expand Down
Loading

0 comments on commit 564417b

Please sign in to comment.