Commit graph

825 commits

Author SHA1 Message Date
Emilio Alvarez Piñeiro
0b876fe350
Add Synthetics flaky test runner pipeline config (#126602)
* Add flaky test runner pipeline config

* Add default value to grep expression if not set

* Add kibana build id override

* Add concurreny option (limited)
2022-03-04 17:51:07 +01:00
Dominique Clarke
15756a7e22
[Uptime] UI Monitor Management - adjust delete modal content (#126271)
* adjust delete modal content

* Update x-pack/plugins/uptime/public/components/monitor_management/monitor_list/delete_monitor.test.tsx

* update tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-24 12:19:58 -05:00
Faisal Kanout
5142f204d8
[RAC][UPTIME] Add {{context.reason}} as an action variable to the rule templating language (#126124)
* [RAC][UPTIME] Add reason msg for status check

* [RAC][UPTIME] Extract action variables into another file

* Fix tests

* Fix tests

* Update i18n files

* Fix typo in the tests

* Fix tests

* Cover the autoGenerated case and update its tests

* Update duration anomaly tests
2022-02-24 16:05:36 +01:00
Xavier Mouligneau
408969601d
[RAM] Rename alerts to rules in triggers_actions_ui plugin (#125591)
* initial work to have rules in triggers actions ui

* fix functional testing

* fix unit test

* fix uptime type

* fix scss import due to name changed

* fix lint

* fix monitoring jest test

* fix import

* fix translations

* fix functional testing

* fix functional testing II

* fix functional testing III

* fix functional testing IV

* fix check type

* review I

* fix check types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-24 09:30:30 -05:00
Bree Hall
6bf8a9c709
Upgrade EUI to v48.1.1 (#125023)
* Upgraded the version of EUI to 47.0.0 and react-beautiful-dnd (an EUI dependancy) to 13.1.0

* Update i18n mappings with required changes

* Fix all data grid types/tests missing the new `colIndex` prop passed by renderCellValue and cellActions

* Fix cellActions closePopover type to indicate conditionality (only passed when popover is open)

* Fix more datagrid colIndex errors

- pass more missing `colIndex`s

- pass RowAction colIndex, because it's inheriting types from EUI

- omit colIndex from the leading controls column renderer, because it doesn't need them

* Improve StatefulCell typing

- pass colIndex (which fixes EUI type match issue)
- DRY out ariaColIndex logic
- rename ariaRowindex passed to StatefulCell to rowIndex

* Updated i18n_eui_mapping tests to add euiSelectable.searchResults to the tokensToSkip array

* Fix failing ML datagrid FTR test

- `visibleRowIndex` is not a prop passed back by `popoverContents` (see `EuiDataGridCellValueElementProps`), but `rowIndex` is

* Revert attempted ML type change

- in actuality this is an EUI typing issue, children is a ReactElement, not a ReactNode. However we'll shortly be deprecationg popoverContents, so this isn't worth fixing right now

* Update test files to include up to date snapshots of code samples

* Updated a test snapshots to match the latest version of code samples

* Upgraded the version of EUI from 47.0.0 to 48.0.0 in package.json and license_checker config files

* Update the required i18n translation mapping file with additions and changes from EUI version 48.0.0

* Updated three security screen accessibility tests to check for the aria-checked attribute instead of the aria-selected attribute as part of an accessibility update to aria made in EUI PR 5581

* Updated two unit cases to that are responsible for checking strict equality of strings. These unit tests were for the EuiSelectable and EuiFilterGroup components. Both of these components contain and utilize EuiScreenReaderOnly which provides text that is used for screen readers, but can still be viewed and queried in the DOM. These tests have been updated with the EuiScreenReaderOnly text in mind.

* Code clean up and added a missing internationalization token

* Ran yarn kbn bootstrap to update the yarn lock file

* Fix failing ML FTR test
- EuiSelectable now relies on aria-checked to indicate selected state, per W3 spec

* Fix failing functional tests that click the datagrid cell expand button

.euiDataGridRowCell__expandButtonIcon was deprecated in favor of a shared .euiDataGridRowCell__actionButtonIcon class, but the expand action is always the last one

* Upgrade to 48.1.1

* Switch to data-test-subj for datagrid cell expansion selectors

* Switch to new `data-test-selected` attribute over `aria-checked`

* Update snapshots/Jest tests to account for EuiSelectable use in EuiFilter

Co-authored-by: Constance Chen <constance.chen@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-23 17:01:40 -05:00
Abdul Wahab Zahid
20dc80fc36
[Uptime][Monitor Management] Show form validation errors only after user interaction (#126116)(uptime/issues/456)
* Expose `onBlur` and `onFieldBlur` on fleet components.

* Only pass down validators if either field is interacted with or form submit attempt has been made.

uptime/issues/456
2022-02-23 18:03:29 +01:00
Dominique Clarke
ae58a57df9
[Uptime] Adjust monitor frequency in UI Monitor Management table (#125841)
* adjust monitor frequency

* rename monitor interval to frequency

* adjust e2e tests

* adjust e2e tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-22 15:37:12 -05:00
Dominique Clarke
260240fc64
synthetics - add cluster name to telemetry headers (#125940) 2022-02-17 11:24:46 -05:00
Dominique Clarke
bcfed9fed3
[Uptime] implement monitor management telemetry (#124473)
* uptime - implement monitor management telemetry

* adjust log level

* adjust types

* add telemetry dependency

* remove extra log

* update locationsCount

* add current channel

* adjust types

* update location errors

* enhance uptime telemetry adapter for synthetics use case

* fix test

* update xpack_plugins.json

* fix tests

* fix tests

* update snapshots

* remove telemetry collectors implementation

* update tests and mappings

* Update x-pack/plugins/uptime/server/lib/adapters/telemetry/kibana_telemetry_adapter.ts

* Update x-pack/plugins/uptime/server/lib/telemetry/sender.ts

* move telemetry setup to service conditional

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-16 12:38:50 -05:00
Abdul Wahab Zahid
dde4d6e9da
[Uptime][Monitor Management] Use push flyout to show Test Run Results (#125017) (uptime/issues/445)
* Make run-once test results appear in a push flyout. Fixup tooltip. Fixup action buttons order.

* Wrapping Monitor Fields form rows when Test Run flyout is open.

* Only show step duration trend if it's an already saved monitor. Stop showing "Failed to run steps" until Test Run steps are done loading.

uptime/issues/445

Co-authored-by: shahzad31 <shahzad.muhammad@elastic.co>
2022-02-15 16:33:43 +01:00
Shahzad
7c2437f5a8
[Uptime monitor management] Make index template installation retry (#125537) 2022-02-15 10:06:19 +01:00
Dominique Clarke
9afca7332f
synthetics e2e - use custom location when defined (#125560) 2022-02-14 14:35:57 -05:00
Dominique Clarke
52e9c51d15
[Uptime] handle null duration on ping list (#125438)
* uptime - handle null duration

* adjust types

* Update x-pack/plugins/uptime/server/lib/synthetics_service/service_api_client.ts

* raise per page of synthetics monitors

* Remove tooltip
2022-02-14 12:10:47 -05:00
Pierre Gayvallet
6627bd8b3a
Elasticsearch client: no longer default to using meta: true (#124488)
* Use `Client` interface instead of `KibanaClient`

* get rid of getKibanaEsClient and convertToKibanaClient

* get rid of last KibanaClient usages

* update usages and types in @kbn/securitysolution-es-utils

* fix some violations

* add sugar method around client mock

* update SO repository calls

* adapt more core usages

* export mock types

* batch 1

* batch 2

* batch 3

* batch 4

* batch 5

* batch 6

* batch 7

* batch 8

* batch 9

* security - batch 1

* security - batch 2

* security - batch 3

* last batch of initial violations

* fix resolve_time_pattern

* update generated doc

* fix /internal/index-pattern-management/preview_scripted_field endpoint

* fix monitoring's getLegacyClusterShim

* fix /api/snapshot_restore/privileges route

* fix UptimeESClient

* fix transforms/_nodes endpoint

* lint

* unit test fix - batch 1

* unit test fix - batch 2

* unit test fix - batch 3

* integration test fix - batch 1

* lint

* adapt ML client

* unit test fix - batch 4

* fix uptime test helper

* fix /api/transform/transforms/{transformId}/_update route

* fix ES client FTR test

* fix uptime unit test

* fix type errors on last unit tests

* fix RollupSearchStrategy call

* fix /internal/security/fields/{query} route

* fix GET /api/index_lifecycle_management/policies route

* fix mlClient.getDataFrameAnalytics

* fix APMEventClient

* fix security solution getBootstrapIndexExists

* fix data_enhanced's getSearchStatus

* remove unused @ts-expect-error

* fix unit tests due to latest code changes

* fix more calls in security_solution routes

* fix more calls in ml routes

* fix POST /api/index_management/component_templates route

* fix unit tests due to latest changes

* fix rule_registry's ResourceInstaller.createOrUpdateIndexTemplate

* fix more fleet client calls

* fix UA's GET cloud_backup_status route

* fix createLifecycleExecutorApiTest

* fix hasFleetServers

* fix unit tests due to latest changes

* changes due to last merge

* fix ml modelProvider.getModelsPipelines

* fix security_solution LifecycleQuery.search

* fix new CoreUsageDataService usage

* fix security solution's StatsQuery.search

* improve ml FTR assertions

* fix security_solution's EventsQuery.search

* fix EsClient type as we're keeping transport

* NITs

* clean RepositoryEsClient type

* update generated doc

* review comments

* adapt mlClient.anomalySearch signature

* remove unnecessary .then((body) => body)

* nit

* add unit tests for the client mocking functions

* fix new upgrade assistant /remote_clusters endpoint
2022-02-12 09:19:44 +01:00
Dominique Clarke
f1fcbe7f54
[Uptime] Monitor Details - fallback to saved objects when monitor details are unavailable from last ping (#125333)
* uptime - synthetic service - fallback to saved objects when monitor details cannot be found

* fix monitor url

* fix tests
2022-02-11 12:31:15 -05:00
Shahzad
13d566cec3
[Uptime Monitor management] Update test configs (#125358) 2022-02-11 14:25:00 +01:00
Shahzad
74327c789d
[Uptime] Added confirm modal (#125221) 2022-02-11 11:37:32 +01:00
Emilio Alvarez Piñeiro
453e22e318
[Uptime] Fix flaky monitor details tests (#124700)
* Rewrite flaky tests to e2e pipeline, add data initialization helpers, add monitor details page object
2022-02-11 09:45:23 +01:00
Dominique Clarke
0766f1803c
[Uptime] Convert ui monitor management combobox to checkboxes (#124917)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-11 09:33:03 +01:00
Dominique Clarke
e63eeb65be
uptime - adjust synthetics service sync errors behavior (#125169) 2022-02-10 18:28:54 -05:00
Shahzad
d79ec73aeb
[Uptime Monitor management] Simplify configs (#124988) 2022-02-10 11:12:35 +01:00
Shahzad
e93a651c1d
[Uptime monitor management] Add full screen/copy button ability in browser inline script editing (#124500) 2022-02-10 09:54:10 +01:00
Brandon Kobel
7dfc395423
Adjusting uptime readonly feature (#125031)
* Adjusting uptime readonly feature

* Missed another occurrence, good call Xavier
2022-02-09 06:11:21 -08:00
Dominique Clarke
5538967ba4
[Uptime] add synthetics service sync errors (#124051)
* uptime - add synthetics sync errors

* update imports

* update content

* adjust content and flow

* update toasts

* Update x-pack/plugins/uptime/public/components/monitor_management/action_bar/action_bar_errors.test.tsx

* adjust tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-07 18:03:17 -05:00
Ying Mao
270adf4958
[Alerting] Rename alert instance to alert and changing signature of alert (instance) factory alert creation (#124390)
* Rename alert instance to alert and add create fn to alert factory

* Rename alert instance to alert and add create fn to alert factory

* Fixing types

* Fixing types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-07 14:38:24 -07:00
Shahzad
7c7d1cf527
[Monitor management] Hydrate Url values (#124264)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-07 14:49:36 +01:00
Tiago Costa
a5b4b822ce
chore(NA): splits types from code on @kbn/test (#124469)
* chore(NA): splits types from code on @kbn/test

* chore(NA): create new @kbn/test-jest-helpers

* chore(NA): move wrong files into @kbn/test

* chore(NA): remove @kbn/test/jest references

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-04 03:27:39 +00:00
Shahzad
7369e2f48d
[Uptime] Added test now mode for monitors (#123712)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-03 21:00:31 +01:00
Abdul Wahab Zahid
af9d3a1602
Use formatErrors from utils instead of the default io-ts PathReporter for a concise report of schema validation errors. (#124555) 2022-02-03 18:58:20 +01:00
Shahzad
d091e17d16
[Uptime] Fix uptime telemetry expensive query calls (#124281) 2022-02-03 18:13:20 +01:00
Tiago Costa
b7e366c483
chore(NA): bump version to 8.2.0 (#124409)
* chore(NA): bump version to 8.2.0

* test(NA): update thrown error message for v8.2.0

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-02 23:21:59 +00:00
Dominique Clarke
6b9e127654
[Uptime] [Synthetics Service] log errors when fetching service locations (#124239)
* log errors when fetching service locations

* update tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-02 07:42:30 -05:00
Abdul Wahab Zahid
2c9f8a956c
[Uptime][Monitor Management UI]Add sorting to Monitor Management monitors list table. (#124103)(#121117)
* Adds sorting to Monitor Management monitors list table. Default sorting is 'asc' on the 'name' column.
* Fix column wrapping on monitor list table (Monitor Management UI).

#121117
2022-02-02 12:49:03 +01:00
Shahzad
1af949c0b1
Revert "Uptime Monitor Management - Adjust monitor details page href for browser monitors" (#124082) 2022-02-01 17:48:19 +01:00
Shahzad
61133a545e
[Uptime Monitor management] Implement permissions for readonly users (#123934) 2022-02-01 17:07:06 +01:00
Shahzad
268c896315
[Uptime monitor management] Handle duplicate monitor name (#124005) 2022-02-01 14:43:56 +01:00
Dominique Clarke
99fc4eab1a
Uptime - Remove timeout for browser monitors (#122498)
* remove timeout for browser monitors

* adjust types

* update tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-31 16:37:21 -05:00
Shahzad
a810fe6bc2
[Uptime Monitor Management] Update error conditions for location fetch (#124111) 2022-01-31 16:35:45 +01:00
Shahzad
ba2d221557
[Uptime monitor management] Use saveds objects from all spaces in the task (#124115) 2022-01-31 16:14:42 +01:00
mgiota
5c912ecee8
[RAC][Uptime] remove moment and use shared o11y utility to format duration… (#123995)
* [RAC][Uptime] remove moment and use shared utility to format duration in alert reason message

* fix typescript errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-31 02:12:44 -07:00
Emilio Alvarez Piñeiro
d66a7bf255
[Uptime] UI Monitor Management - Add namespace field (#123248)
* Add namespace field to monitor management monitor form

* Fix field id, add namespace validation and uptime-level default namespace constant

* Namespace format validation and unit tests

* Update integration test fixtures with namespace

* Update validation to use util provided by fleet package

* Reference locations from config enum

* Fix namespace data for tests

* [Uptime] Move monitor namespace field to advanced options section

* Add advanced field rendering test

* Add icmp advanced fields tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-29 00:06:41 +01:00
Dominique Clarke
624a50abd7
[Uptime] [Synthetics Service] adds Kibana version to service call for synthetics (#123434)
* uptime - adds kibana version to service call for synthetics

* add kibana version to uptime server context
2022-01-28 15:56:50 -05:00
Shahzad
957b9dc3cd
[Uptime] Default alert connectors email settings (#123244)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-28 12:15:28 +01:00
mgiota
e45d594818
[RAC][Uptime] remove extra dot from the uptime alert connector message (#124000) 2022-01-28 03:50:24 -07:00
Shahzad
5b8af6c1ea
[Exploratory view] Allow ability add extra actions in lens embeddable (#123713) 2022-01-28 11:15:49 +01:00
Nick Partridge
71e9c609fc
Upgrade elastic charts v43.1.1 (#121593) 2022-01-27 12:15:33 +01:00
Dominique Clarke
f197095f0b
[Uptime] Add UI Monitor Management and Synthetics Service e2e tests (#123410)
* add synthetics pipeline script

* remove artifacts step

* Revert "remove artifacts step"

This reverts commit ba751bca84.

* update pre_command and environment variables

* update grep

* update precommand and login

* update timeout

* adjust journey reusability

* adjust monitor breadcrumb journey

* adjust grep

* add logs

* update login username and password

* Update x-pack/plugins/uptime/e2e/page_objects/login.tsx

* Update .buildkite/scripts/steps/functional/synthetics.sh

* Update x-pack/plugins/uptime/scripts/e2e.js

* adjust grep

* update tests

* adjust script

* adjust journey names

* adjust grep

* increase timeout

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-26 13:54:51 -05:00
mgiota
09aac9e42d
[RAC][Uptime] Status check reason messages (#123189)
* testing out

* update getStatusMessage

* format interval

* temp: keep only statusMessage for now

* update translation message

* availability check message (previous below threshold)

* add availability interval

* availability & status check message

* i18n check

* fix failing tests

* fix failing tests

* more failing tests

* finalize reason format and continue with fixing failing tests

* fix more failing tests

* fix monitor_status tests

* fix uptime functional tests

* fix more failing tests

* clean up unused stuff

* fix failing tests

* fix failing tests

* more failing tests (pfff)

* fix failing tests

* move all status check translations in the translations file

* a bit of refactoring

* temp

* rename monitor params to monitor status message params

* remove unused PingType

* refactoring: move getInterval to another file and create getMonitorDownStatusMessageParams

* separate alerts table reason message from alert message in the rule flyout

* bring back old alert message format that is used in rule flyout

* fix failing tests

* remove unused file

* refactor status message so that an extra dot does not appear on alert connector message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-25 14:53:28 -05:00
Dominique Clarke
403fdcbd4c
[Uptime] Update functional test directory to use a pinned version of package registry via docker (#117736)
* update functional test directory to use a pinned version of package registry via docker

* remove console log

* adjust config

* skip synthetics tests if no docker image

* remove extra configs

* move synthetics tests to a different directory

* update tests

* update tests

* remove duplicate tests

* update helpers

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-25 10:09:42 -05:00
Tiago Costa
356861d23b
chore(NA): splits types from code on @kbn/ui-shared-deps-src (#123313)
* chore(NA): splits types from code on @kbn/ui-shared-deps-src

* chore(NA): break flot-charts into another package

* chore(NA): skip failing tests

* chore(NA): remove skip and add correct value

* chore(NA): fix new ui-theme import

* chore(NA): adding fleet cloned test

* chore(NA): remove cloned test

* chore(NA): remove added typo
2022-01-20 22:04:19 +00:00