Commit graph

40254 commits

Author SHA1 Message Date
Justin Kambic c7e23bffc6
[Uptime] Migrate to TypeScript project references (#90510)
* Add reference to Uptime plugin to root tsconfig.refs.json.

* Add Uptime path to excluded list, and reference to references prop in `x-pack/tsconfig.json`.

* Add reference to Uptime project in `x-pack/test/tsconfig.json`.

* Add `tsconfig.json` project file to Uptime.

* Fix broken JSON structure in test fixture.

* Fix broken type exports. Introduce missing types.

* Implement PR feedback.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 21:51:42 -05:00
Chris Roberson 231610c720
[Monitoring] Migrate data source for legacy alerts to monitoring data directly (#87377)
* License expiration

* Fetch legacy alert data from the source

* Add back in the one test file

* Remove deprecated code

* Fix up tests

* Add test files

* Fix i18n

* Update tests

* PR feedback

* Fix types and tests

* Fix license headers

* Remove unused function

* Fix faulty license expiration logic
2021-02-08 21:50:07 -05:00
John Dorlus 87212e68f7
[Upgrade Assistant] Add A11y Tests (#90265)
* Added overview a11y test. Added data test subjects to the tabs in the app.

* Added data test subjects for all tabs and the detail panel on the indidual pages. Updated tests to wait for detail panel to be visible before taking snapshot.

* Updated snapshot for upgrade assistant jest tests.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 19:08:15 -05:00
Catherine Liu 3cf00d2bb4
[Time to Visualize] Adds functional tests for linking/unlinking panel from embeddable library (#89612) 2021-02-08 15:21:06 -08:00
Spencer 3ef3e9324f
[dev-utils/ship-ci-stats] fail when CI stats is down (#90678)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-08 17:46:57 -05:00
Tiago Costa 54863889d4
chore(NA): remove write permissions on Bazel remote cache for PRs (#90652)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 22:25:05 +00:00
Tiago Costa 15a4c285b8
chore(NA): move bazel workspace status from bash script into nodejs executable (#90560)
* chore(NA): move bazel workspace status into nodejs executable

* chore(NA): removed unused console.log on error

* chore(NA): ability to setup different name for origin remote on workspace status command

* chore(NA): do not fail if cant collect repo url

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 22:24:14 +00:00
Tyler Smalley b39ad86b5d
Use default ES distribution for functional tests (#88737)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 14:23:10 -08:00
Christos Nasikas 46feb76592
[Alerts] Jira: Disallow labels with spaces (#90548)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 23:42:07 +02:00
Kaarina Tungseth 7a2b7550c9
[DOCS] Fixes Dashboard formatting (#90485)
* [DOCS] Fixes Dashboard formatting

* Fixes the semi-structured search example

* Update docs/user/dashboard/dashboard.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
2021-02-08 15:10:23 -06:00
Brian Seeders 3fa76956ac
[CI] Automated backports via GitHub Actions - initial MVP (#90669) 2021-02-08 21:08:23 +00:00
Robert Austin 180f309fab
Update security solution codeowners (#89038)
* move the code coverage owner line for security solution next to the other lines about security solution

* replace @elastic/siem with @elastic/security-solution and remove the duplicate code coverage owner for security_solution

* remove elastic/endpoint-app-team and cleanup directories that no longer exist, and reorder lines

* added case_api_integration code owners

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 16:05:26 -05:00
Xavier Mouligneau cde3cbafe4
fix summary alert details (#90657) 2021-02-08 15:53:01 -05:00
Devon Thomson 31a3ec5934
[Time To Visualize] Make State Transfer App Specific (#89804)
* made state transfer app specific
2021-02-08 15:31:09 -05:00
Shahzad a1a2536b5b
[Uptime] Waterfall filters (#89185)
* WIP

* Use multi canvas solution

* type

* fix test

* adde unit tests

* reduce item to 150

* update margins

* use constant

* update z-index

* added key

* wip

* wip

* wip filters

* reorgnaise components

* fix issue

* update filter

* only highlight button

* water fall test

* styling

* fix styling

* test

* fix types

* update test

* update ari hidden

* added click telemetry for waterfall filters

* added input click telemetry

* update filter behaviour

* fixed typo

* fix type

* fix styling

* persist original resource number in waterfall sidebar when showing only highlighted resources

* update waterfall filter collapse checkbox content

* update use_bar_charts to work with filtered data

* update network request total label to include filtered requests

* adjust telemetry

* add accessible text

* add waterfall chart view telemetry

* updated mime type filter label translations

* adjust total network requests to use FormattedMessage

* adjust translations and tests

* use FormattedMessage in NetworkRequestsTotal

* ensure sidebar persists when 0 resources match filter

* use destructuring in waterfall sidebar item

* reset collapse requests checkbox when filters are removed

* update license headers

Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 15:26:57 -05:00
Nathan Reese 3722bea42f
[Maps] clamp MVT too many features polygon to tile boundary (#90444)
* [Maps] clamp MVT too many features polygon to tile boundary

* add mapbox_styles to index.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 12:53:54 -07:00
Phillip Burch 9684661da4
[Metrics UI] Add ability to filter anomaly detection datafeed (#89721)
* Add null check for empty process data

* Add Ability to filter datafeed for ml jobs

* Merge user-defined query with default query

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 13:28:18 -06:00
Spencer a0ce7b5aa8
[kbn/optimizer][ci-stats] ship metrics separate from build (#90482)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 10:47:55 -07:00
Sonja Krause-Harder c306a444f5
[EPM] Conditionally generate ES index pattern name based on dataset_is_prefix (#89870)
* Explicitly generate ES index pattern name.

* Adjust tests.

* Adjust and reenable tests.

* Set template priority based on dataset_is_prefix

* Refactor indexPatternName -> templateIndexPattern

* Add unit tests.

* Use more realistic index pattern in test.

* Fix unit test.

* Add unit test for installTemplate().

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 18:22:30 +01:00
John Schulz bda7b2816f
[Fleet] Cannot delete a managed agent policy (#90505)
## Summary
Managed policy cannot be deleted via API or UI

closes https://github.com/elastic/kibana/issues/90448

### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

#### Manual testing
<details><summary>UI screenshot</summary>

<img width="1522" alt="Screen Shot 2021-02-05 at 1 56 13 PM" src="https://user-images.githubusercontent.com/57655/107076955-2ce95800-67ba-11eb-8bd4-d2ba3182e516.png">

</details>

<details><summary>API commands</summary>

```
## Create a managed policy
curl --user elastic:changeme -X POST localhost:5601/api/fleet/agent_policies -H 'Content-Type: application/json' -d'{ "name": "User created MANAGED", "namespace": "default", "is_managed": true}' -H 'kbn-xsrf: true'
{"item":{"id":"17ebd160-67ee-11eb-adb2-f16c6e20580c","name":"User created MANAGED","namespace":"default","is_managed":true,"revision":1,"updated_at":"2021-02-05T20:09:46.614Z","updated_by":"elastic"}}

## Cannot delete it
curl --user elastic:changeme -X POST 'http://localhost:5601/api/fleet/agent_policies/delete'   -H 'kbn-xsrf: abc'  -H 'Content-Type: application/json'   --data-raw '{"agentPolicyId": "17ebd160-67ee-11eb-adb2-f16c6e20580c" }'    
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Cannot delete managed policy 17ebd160-67ee-11eb-adb2-f16c6e20580c"
}

## Set policy to unmanaged
curl --user elastic:changeme -X PUT localhost:5601/api/fleet/agent_policies/17ebd160-67ee-11eb-adb2-f16c6e20580c -H 'Content-Type: application/json' -d'{ "name": "User created MANAGED", "namespace": "default", "is_managed": false}' -H 'kbn-xsrf: true' 
{
  "item": {
    "id": "17ebd160-67ee-11eb-adb2-f16c6e20580c",
    "name": "User created MANAGED",
    "namespace": "default",
    "is_managed": false,
    "revision": 3,
    "updated_at": "2021-02-05T20:10:45.383Z",
    "updated_by": "elastic",
    "package_policies": []
  }
}

## Can delete
curl --user elastic:changeme -X POST 'http://localhost:5601/api/fleet/agent_policies/delete'   -H 'kbn-xsrf: abc'  -H 'Content-Type: application/json'   --data-raw '{"agentPolicyId": "17ebd160-67ee-11eb-adb2-f16c6e20580c" }'    
{
  "id": "17ebd160-67ee-11eb-adb2-f16c6e20580c",
  "name": "User created MANAGED"
}


```
</details>
2021-02-08 12:13:55 -05:00
Dima Arnautov ec672f5df2
[ML] Handle invalid job ids payload in the Anomaly swim lane (#90597)
* [ML] handle invalid job ids payload

* [ML] set type for error

* [ML] set entire error object
2021-02-08 17:48:14 +01:00
Christos Nasikas f6a8d6edc4
[Security Solution][Case] Fix unhandled promise when updating alert status (#90605) 2021-02-08 18:45:31 +02:00
ymao1 4b29e35246
[Alerting] Fixing bug with Index Threshold alert when selecting "Of" expression (#90174)
* Fixing bug

* Updating functional test

* Fixing functional test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 11:16:36 -05:00
ymao1 d804f4ff76
Remove extraneous period (#90214)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 11:14:11 -05:00
Lisa Cawley 14d41c1952
[DOCS] More cleanup in developer docs (#90506) 2021-02-08 07:47:36 -08:00
Anton Dosov bbda20619e
[Search Sessions] Disable "save session" due to timeout (#90294) 2021-02-08 16:20:56 +01:00
Tiago Costa dccea865e4
chore(NA): push important bazel config files under operations team code owners (#90610)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 15:17:35 +00:00
Nathan L Smith e4794af33c
TypeScript project references for infra plugin (#90118)
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
2021-02-08 08:59:45 -06:00
Aaron Caldwell 5176aa6bc7
Update geo alerting docs to just cover geo containment (#90480) 2021-02-08 07:51:45 -07:00
Alexey Antonov ea96eeccb4
[VEGA] src/plugins/vis_type_vega/public/lib/vega.js should be removed (#89861)
* [VEGA] src/plugins/vis_type_vega/public/lib/vega.js should be removed

* remove leaflet dependency

* fix CI

* cleanup vega-scenagraph

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 17:44:35 +03:00
Matthias Wilhelm 3d2373325c
[Discover] Inline state modifying function to react (#89543) 2021-02-08 15:34:19 +01:00
Victor Martinez d201ed756f
[APM-UI][E2E] use githubNotify step (#90514) 2021-02-08 13:40:41 +00:00
Søren Louv-Jansen be9f7c3dc9
[APM] Export ProcessorEvent type (#90540)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 14:37:32 +01:00
Joe Reuter 4a1946b7ae
[Lens] Retain column config (#90048) 2021-02-08 13:48:18 +01:00
Daniil d152723bb1
[Data Table] Add unit tests (#90173)
* Move formatting columns into response handler

* Use shared csv export

* Cleanup files

* Fix type

* Fix translation

* Filter out non-dimension values

* Add unit tests for tableVisResponseHandler

* Add unit tests for createFormattedTable

* Add unit tests for addPercentageColumn

* Add unit tests for usePagination

* Add unit tests for useUiState

* Add unit tests for table visualization

* Add unit tests for TableVisBasic

* Add unit tests for cell

* Update license

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 14:13:20 +02:00
Pierre Gayvallet 3b3327dbc3
Migrate most plugins to synchronous lifecycle (#89562)
* first pass

* migrate more plugins

* migrate yet more plugins

* more oss plugins

* fix test file

* change Plugin signature on the client-side too

* fix test types

* migrate OSS client-side plugins

* migrate OSS client-side test plugins

* migrate xpack client-side plugins

* revert fix attempt on fleet plugin

* fix presentation start signature

* fix yet another signature

* add warnings for server-side async plugins in dev mode

* remove unused import

* fix isPromise

* Add client-side deprecations

* update migration examples

* update generated doc

* fix xpack unit tests

* nit

* (will be reverted) explicitly await for license to be ready in the auth hook

* Revert "(will be reverted) explicitly await for license to be ready in the auth hook"

This reverts commit fdf73feb

* restore await on on promise contracts

* Revert "(will be reverted) explicitly await for license to be ready in the auth hook"

This reverts commit fdf73feb

* Revert "restore await on on promise contracts"

This reverts commit c5f2fe51

* add delay before starting tests in FTR

* update deprecation ts doc

* add explicit contract for monitoring setup

* migrate monitoring plugin to sync

* change plugin timeout to 10sec

* use delay instead of silence
2021-02-08 10:19:54 +01:00
spalger 2279c06d1e skip flaky suite (#90555) 2021-02-07 23:24:04 -07:00
Brian Seeders c6fc80c748 skip flaky suite (#64473) 2021-02-07 22:48:01 -05:00
Patrick Mueller e221992da3
[actions] improve email action doc (#90020)
resolves https://github.com/elastic/kibana/issues/88333

Fixed:

- add note that `secure: false` will use TLS, but after an initial connection
  with TCP; we have been getting questions from customers who believed that
  `secure: false` implied TLS was not used at all.

- added a link to the nodemailer "well-known services" module, to allow
  customers to see examples of other email service configurations

- updated the Outlook config example to use the current nodemailer values

- couple of other small tweaks
2021-02-07 19:11:45 -05:00
Nicolas Chaulet 91ffe7373a
[Fleet] Support Fleet server system indices (#89372) 2021-02-07 18:57:50 -05:00
Tiago Costa 44eff7184e
skip flaky suite (#90552) 2021-02-07 16:04:53 +00:00
Patryk Kopyciński 8769c8d3ba
Bump immer dependencies (#90267)
* Bump immer dependencies

* Update processed_search_response.ts

* Update processed_search_response.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-07 12:04:33 +01:00
Rudolf Meijering fd1d965039
Unrevert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)" (#89992)
* Revert "Revert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)""

This reverts commit f97958043f.

* Fix flaky saved objects management test #89953

* If a clone target exists, wait for yellow, not green, index status

* Fix test after master merge

* Fix types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-06 18:45:20 +01:00
Liza Katz 826a1ecbdb
[Search Sessions] Use sync config (#90138)
* Search Sessions: Unskip Flaky Functional Test

* Save all search sessions and then manage them based on their persisted state

* Get default search session expiration from config

* randomize sleep time

* fix test

* fix test

* Make sure we poll, and dont persist, searches not in the context of a session

* Added keepalive unit tests

* fix ts

* code review @lukasolson

* ts

* More tests, rename onScreenTimeout to completedTimeout

* lint

* lint

* Delete async seaches

* Support saved object pagination
Fix get search status tests

* better PersistedSearchSessionSavedObjectAttributes ts

* test titles

* Remove runAt from monitoring task
Increase testing trackingInterval (caused bug)

* support workload histograms that take into account overdue tasks

* Update touched when changing session status to complete \ error

* removed test

* Updated management test data

* Rename configs

* delete tap first
add comments

* Use sync config in data-enhanced plugin

* fix merge

* fix merge

* ts

* code review

Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
2021-02-06 11:52:04 +02:00
Tiago Costa 6408a668e4
chore(NA): add safe guard to remove bazelisk from yarn global at bootstrap (#90538) 2021-02-06 03:27:21 +00:00
Tyler Smalley be725cabc2
[test] Await retry.waitFor (#90456)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-02-05 17:10:49 -08:00
Tiago Costa a9fce985a5
chore(NA): integrate build buddy with our bazel setup and remote cache for ci (#90116)
* chore(NA): simple changes on bazelrc

* chore(NA): integrate bazel tools with BuildBuddy and remote cache service

* chore(NA) fix bazelrc line config

* chore(NA): move non auth settings out of bazelrc.auth

* chore(NA): output home dir

* chore(NA): load .bazelrc-ci.auth from /Users/tiagocosta dir

* chore(NA): remove bazelrc auth file and append directly into home bazelrc

* chore(NA): comment announce option

* chore(NA): integrate build buddy metadata

* chore(NA): update src/dev/ci_setup/.bazelrc-ci

Co-authored-by: Tyler Smalley <tylersmalley@me.com>

* chore(NA): move build metadata integation to common confdig

* chore(NA): fix problem on bazel file location

* chore(NA): correct sh file permissions

* chore(NA): only get host on CI

* chore(NA): add cores into host info on CI

* chore(NA): sync with last settings to setup bazelisk tools on ci

* chore(NA): sync last changes on ci setup env

* chore(NA): sync settings on ci setup with the other PR

* chore(NA): remove yarn export

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
2021-02-05 23:45:30 +00:00
Brian Seeders efcd2c38ef Skip failing suite (#90526) 2021-02-05 17:23:26 -05:00
Jen Huang f4dc6d0235
[Fleet] Fix incorrect conversion of string to numeric values in agent YAML (#90371)
* Convert user values back to string after yaml template compilation if they were strings originally

* Add better test cases and adjust patch

* Fix when field is undefined

* Handle array of strings too
2021-02-05 14:14:31 -08:00
liza-mae befe41067e
[Docs] Update reporting troubleshooting for arm rhel/centos (#90385)
* Update reporting document

* Move to own section

* Remove extra line
2021-02-05 15:06:15 -07:00