Commit graph

548 commits

Author SHA1 Message Date
Mike Côté
0eadfde857
Introduce basic alerting and actions plugin (#37042) (#39416)
* Create actions plugin (#35679)

* Basic alerting plugin with actions

* Remove relative imports

* Code cleanup

* Split service into 3 parts, change connector structure

* Ability to disable plugin, ability to get actions

* Add slack connector

* Add email connector

* Ability to validate params and connector options

* Remove connectorOptionsSecrets for now

* Fix plugin config validation

* Add tests for slack connector

* Default connectors register on plugin init, console renamed to log, slack to message_slack

* Add remaining API endpoints for action CRUD

* Add list connectors API

* Change actions CRUD APIs to be closer with saved objects structure

* WIP

* Fix broken tests

* Add encrypted attribute support

* Add params and connectorOptions for email

* WIP

* Remove action's ability to have custom ids

* Remove ts-ignore

* Fix broken test

* Remove default connectors from this branch

* Fix API integration tests to use fixture connector

* Rename connector terminology to action type

* Rename actionTypeOptions to actionTypeConfig

* Code cleanup

* Fix broken tests

* Rename alerting plugin to actions

* Some code cleanup and add API unit tests

* Change signature of action type service execute function

* Add some plugin api integration tests

* Fix type check failure

* Code cleanup

* Create an actions client instead of an action service

* Apply Bill's PR feedback

* Fix broken test

* Find function to have destructured params

* Add tests to ensure encrypted attributes are not returned

* Fix broken test

* Add tests for validation

* Ensure actions can be updated without re-passing the config

* Remove dead code

* Test cleanup

* Fix eslint issue

* Apply Peter's PR feedback

* Code cleanup and fix broken tests

* Apply Brandon's PR feedback

* Add namespace support

* Fix broken test

* Pass services to action executors (#37194)

* Pass services to action executors

* Fix tests

* Apply PR feedback

* Apply PR feedback pt2

* Cleanup actions plugin (#37250)

* Cleanup actions, move code from alerting plugin PR

* Rename service terminology to registry

* Use static encryption key for encrypted attributes plugin inside of tests

* Empty data after create test is done running

* Fix type checks

* Fix inconsistent naming

* add server log action for alerting (#37530)

adds the first "builtin" alertType for performing a `server.log()`

* Create alerting plugin (#37043)

* WIP

* Rename fire function and remove @ts-ignore in all places

* Change naming in alerting service

* Remove alert instance class for now, support interval configuration

* Cleanup TS

* Split alerting between registry and client

* Use saved object alongside task manager instance

* Add remaining alerting APIs

* Change create structure

* Rename some variables, change actionGroups structure

* Use handlebars for templating strings at fire time

* Fix params given to alert type execute function

* Use alert instance class

* Alert instances support meta attributes

* Move alert instances deserialization

* Change interval to be ms

* Rename actions es archive

* Fix tests to use encrypted esArchive for action record

* Add create alert test to demo end to end flow

* Fix type check issue

* Alerts to use references to action objects

* Only update task manager tasks after saved objects are fully updated

* Use scope in task manager

* Fix type check

* Use task manager to execute actions

* Convert ids into references and back

* Apply PR feedback

* Fix broken test

* Fix some bugs

* Fix test errors

* Alert interval to be previous runAt + interval instead of now + interval

* Add range support

* Remove extra line

* Cleanup

* Add alert_instance.test.ts

* Add alert_type_registry.test.ts

* Move tests around

* Create generic task manager mock

* Add note about saved objects client mock

* Create alert_type_registry.mock.ts

* Add alerts_client.test.ts

* Add create_alert_instance_factory.test.ts

* Add create_fire_handler.test.ts

* WIP

* Fix get_create_task_runner_function.test.ts and make test pass

* Make get_create_task_runner_function.test.ts 100% coverage

* Add unit tests for routes

* Move files around

* Created transform_action_params.ts

* Add get_next_run_at.ts

* Add comment explaining why we copy nextRunAt

* Re-use state within alert instance

* Finalize code coverage in unit tests

* Create base api integration tests

* Add a test that ensures end to end functionality of an alert

* Fix ui capabilities test

* Fix broken plugin api integration test

* Fix jest tests with new saved objects client

* Fix broken integration tests

* Change api integration test fixture to make more sense, add functions for future tests

* Move alerts integration testing into own file, prep to add more tests

* Add tests to ensure failed task instances get retried

* Add get_create_task_runner_function.test.ts for actions, create encrypted saved objects mock

* Add action validation tests

* Ensure action type validation occurs on update

* Test 400 on unregistered alert types

* Ensure alertTypeId can't be updated

* Add validation test for alert create / update

* Fix broken checks / tests

* Skip failing test for now

* Cleanup jest tests

* Ensure action objects can be updated while keeping encrypted attributes readable

* Remove partial update sopport, remove ability to change actionTypeId, require config

* Ensure actionTypeConfig is validated on create and update

* Add alertTypeParams validation support

* Fix failing tests

* Ensure alert cleanup errors don't replace the original error

* Pass callCluster as a service to alerts and actions

* Only pass log to alerts client

* Pass savedObjectsClient as a service to alerting and actions

* Fix failing tests

* Remove range support, provide when current and previous task got scheduled

* Ensure Joi validation happens before every execute

* Remove skipped tests, to be done in future PR

* Apply self feedback pt1

* Apply self feedback pt2

* Fix broken tests

* Apply PR feedback

* PR feedback pt1

* Apply security team PR feedback

* PR feedback pt1

* PR feedback pt2

* PR feedback pt3

* Fix broken tests

* Fix callCluster to have signature

* Revert f11a6aeb06

* PR feedback pt4

* Remove __jest__ folders

* PR feedback pt5

* Fix Joi from leaking secrets

* Fire instance actions in parallel instead of series

* Fix failing jest tests

* Accept core api changes

* Fix saved objects client mock

* PR feedback pt1

* Fix eslint issues

* Throw error when alert instance already fired (#39251)

* Throw error when alert instance already fired

* shouldFire doesn't need its own boolean value

* Actions & alerting getting started user guides (#39093)

* Initial user guides

* Cleanup

* Typos, example changes

* Switch to tables, use ordered list for usage

* Start docs around alert instances and templating

* Documentation changes

* Some adjustments

* Apply PR feedback

* Apply suggestions from code review

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* PR feedback pt2

* Provide better examples for alert types

* Apply PR feedback

* Update README locations
2019-06-21 14:48:12 -04:00
Court Ewing
a973cbc7a9 Fix path references into and out of x-pack/legacy 2019-06-20 13:35:00 -04:00
Nathan Reese
70b0d7f825
[Maps] add functional test for tooltip filter actions (#38988) (#39106) 2019-06-17 15:40:33 -06:00
Dmitry Lemeshko
bc1234a9be
[firefox] Run functional tests in dedicated CI groups (#38416) (#39089)
* 2 jobs for Firefox tests

* review fixes

* make sh files executable

* add check reporter
2019-06-17 21:30:29 +03:00
Nathan Reese
6f0e6394c1
[Maps] symbolize points with maki icons (#37822) (#38975)
* [Maps] sybmolize points with maki icons

* add from for selecting symbol

* add from for selecting symbol

* get icons working for static colors

* static icon sizing

* refacto symbol_utils

* timing issue

* use SDF icons

* dynamic iconSize

* set icon-anchor

* display symbol icon in map legend

* add unit tests for VectorIcon

* set icon fill based on dark mode

* remove unused file

* fix jest tests

* set icon-opacity

* use size style to configure icon-image small or large

* fix queryRadius error by just hiding other point layer instead of removing

* remove console statement on error

* use maki icon size constants

* add retry around opening set view popover for flaky test
2019-06-14 07:09:41 -06:00
Brandon Kobel
3362066469
Spaces - Hiding management link (#38472) (#38903)
* Changing the Spaces management section to behave like the other FC
controlled sections

* Adding those glorious tests and fixing a bug

* Fixing some test descriptions

* Making the mergeCapabilities operation emulate the old behavior

* Fixing privileges test with the addition of the new action

* Updating jest snapshot

* Adding tests, preventing additional clobbering

* Changing requireUICapability to use management.kibana.spaces
2019-06-13 10:35:26 -07:00
Spencer
c929474e36
[7.x] [ftr][x-pack/functional] default to UTC timezone (#38698) (#38790) 2019-06-12 10:19:41 -07:00
Ahmad Bamieh
b1a4668413
[7.x] [Telemetry] move from xpack main (#35403) (#38768)
* [Telemetry] move from xpack main (#35403)

* enabling xpack in new plugins

* move telemetry into separate new platform plugin

* remap constants

* resolved hacks issue

* remove extra dir

* js -> ts

* run linter

* fix tests

* reset kibana.yml

* reset kibana.yml

* ts types

* add telemetry translations to i18n

* use deprecated configs

* checkout config.yml

* fix test

* move telemetry from xpack_main in api_integration

* add telemetry apis

* hide banner

* remove routes/get_stats in favor of collectors/get_stats

* code review fixes

* add banner fix #38769

* run i18n_check
2019-06-12 19:58:03 +03:00
spalger
748e96df8f disable flaky tests
(cherry picked from commit a99ab83e1d)
2019-06-12 07:26:29 -07:00
WangQianliang
c26611792b
feature(code/frontend): confirm delete and reindex a repository (#38520) (#38738) 2019-06-12 10:29:14 +08:00
spalger
398f274a6b disable flaky tests
(cherry picked from commit f1a4552e9e)
2019-06-11 17:47:02 -07:00
Nathan Reese
a1fe1690e0
[Maps] add support for Top Hits to Documents source (#38052) (#38717)
* top hits

* fetch top hits

* trigger load if top hits configuration changes

* text clean-up

* add functional tests for top hits

* add functional test verify configuration updates re-fetch data

* show entity source tooltip message for top hits

* include entities cound in results trimmed message

* pass fields needed for data driven styling and joins

* fix i18n problem

* more i18n changes

* reverse hits list so most recent events are drawn on top

* review feedback

* set meta to null when no sourceDataRequest
2019-06-11 18:37:14 -06:00
Matthew Kime
24282a57be
No unused vars cleanup set two (#37051) (#37124)
* no unused vars cleanup
2019-06-08 22:25:33 -05:00
spalger
5d6b66283a disable flaky test
(cherry picked from commit 68757a847c)
2019-06-07 06:58:11 -07:00
WangQianliang
881645e5e4
[Code] Fix code explore repository functional test (#36157) (#38258)
* Revert "Revert "[Code] set loading false if do not need fetch tree (#36083)""

This reverts commit 6a013cb82e.

* fix flaky `explore_repository` test
2019-06-07 08:46:15 +08:00
Mengwei Ding
43946cb12b
[Code] search functional test to cover file typeahead query case insensitive (#38012) (#38186) 2019-06-06 15:43:27 -07:00
Nick Peihl
49fe1ea04a
Fix sample data functional test (#38184) (#38194) 2019-06-05 18:21:58 -07:00
igoristic
2270dec5fc
Optimized content to be more vertical for resizing consistancy (#37120) (#38058)
* Optimized content to be more vertical for resizing consistancy

* Fixed snapshots

* Feedback changes

* Update _summary_status.scss

* Fixed column order for testing
2019-06-05 00:24:10 -04:00
Justin Kambic
47d3b4b658
Add functional test to cover heartbeat location data. (#37891) (#37989) 2019-06-04 11:41:52 -04:00
Larry Gregory
d07034e269
Security - display message when logging out of kibana (#37234) (#37969)
* display message when logging out of kibana

* update provider tests

* fix token logout test

* remove newline
2019-06-04 08:05:30 -04:00
Josh Dover
5c4e18778f
[7.x] Add addError function to toastNotifications (#32187) (#37739) 2019-06-03 17:06:47 -05:00
Chandler Prall
8e37d72558
Upgrade EUI to 11.0.1; support dynamic import() calls in UI code + eui (#36316) (#37900)
* Upgrade EUI to 11.0.1; support dynamic import() calls in UI code + eui

* update snaps

* Clicking on the svg itself once loaded

* updated snaps

* update icon in snapshots

* Fix snapshot
2019-06-03 17:13:06 -04:00
Spencer
7aea62aa61
[7.x] FTR: add support for Firefox browser (#32509) (#37750)
* skip and adjust functional tests for Firefox

* downgrade geckodriver to 0.22.0

* [ftr] add firefox specific config file

* remove hard coded firefox adjustments

* remove firefox specific screenshot directory

* run functional tests in firefox in x-pack

* pass the logger to readConfigFile()

* rename local var

* skip xpack firefox config

* run xpack firefox functional tests in separate command

* update report name for XPack firefox results

* adjust viz shared item test

* skip shared item test

* [test/feature_controls] increase timeout to 20 sec & use forceLogout

* FF timeout on TSVB, refresh page on failure for url navigation

* [feature_controls/visualize_security] increase timeout to 20 sec

* skip dev_tools_spaces tests on FF

* run all groups 3 times

* skip more func tests

* skip more tests

* skip all feature controls tests for Firefox

* revert back changes in feature controls tests

* rename xpack report for chrome

* skip tile map for FF, wait for render before saving

* Revert "run all groups 3 times"

This reverts commit 12b4f69627.

* revert refresh on login

* apply feedback
2019-05-31 17:18:31 -07:00
spalger
379162b0a1 disable flaky test (#35932)
(cherry picked from commit a9994a7c24)
2019-05-31 07:13:59 -07:00
WangQianliang
94f5de9542
fix(code/frontend): repo not exists error page (#36093) (#37462)
fix(code/frontend): repo not exists error page
2019-05-30 16:41:33 +08:00
Joel Griffith
a41791958f
[Feature/Reporting] Export Saved Search CSV as Dashboard Panel Action (#34571) (#37401) 2019-05-29 15:20:13 -07:00
Lee Drengenberg
cf0dd0bf54
[7.x] Split ciGroup3 and ciGroup5 (#36928) (#37122)
* Split ciGroup3 and ciGroup5 (#36928)

* split large x-pack ciGroup5 into 3 groups

* split large x-pack ciGroup3 into 2 groups

* Add groups to the jenkins xpack ci group file

* Re-level some more work

* move es_search_source test to new describe block

* move es_search_source to first in ciGroup7

* move to x-pack-ciGroup6
2019-05-24 17:35:22 -05:00
WangQianliang
43b37d96af
disable explore_repository and history functional tests (#36865) (#37046)
fix code functional test click file tree item
2019-05-24 13:34:35 +08:00
WangQianliang
2cf7a0f15e
fix(code/frontend): should show file tree if file not exists (#36106) (#36965) 2019-05-24 11:14:24 +08:00
Mengwei Ding
fd797f3665
[7.x] Improve the functional test of code (#35869) (#36922)
* Improve the functional test of code (#35869)

* [Code] enable integration test

* [Code] Improve functional test

* disable flaky test #36495 (#36497)

* [Code] skip explore-repository functional test for code (#36926)

* skip failing tests
2019-05-23 12:47:30 -07:00
igoristic
12697d8a3b
Fix sorting of Monitoring nodes on CPU, Throttle, Heap columns (#36125) (#37011)
* Complete rebase

* Testing

* Retest

* Made the get method more compatible
2019-05-23 15:08:32 -04:00
Nathan Reese
5338f6c358
[maps] bump saved object reference migration version to 7.2.0 (#36772) (#36792) 2019-05-23 10:09:13 -06:00
Thomas Neirynck
1015f48cf5 [Maps] Use mapbox feature-state for dynamic properties and upgrade mapbox-gl to 0.54 (#36466) (#36860) 2019-05-22 18:23:19 -06:00
Nick Peihl
558b624ba1
[Maps] Support multiple basemap styles (#36074) (#36857) 2019-05-21 21:07:43 -07:00
Felix Stürmer
1bfda63afb
[7.x] [Logs UI] Add column headers (#36467) (#36731)
Backports the following commits to 7.x:
 - [Logs UI] Add column headers  (#36467)
2019-05-21 05:43:20 -04:00
Chris Roberson
2ac88caf21
[Monitoring/Telemetry] Force collectors to indicate when they are ready (#36153) (#36706)
* Initial code to force collectors to indicate when they are ready

* Add and fix tests

* Remove debug

* Add ready check in api call

* Fix prettier complaints

* Return 503 if not all collectors are ready

* PR feedback

* Add retry logic for  usage collection in the reporting tests

* Fix incorrect boomify usage

* Fix more issues with the tests

* Just add debug I guess

* More debug

* Try and handle this exception

* Try and make the tests more defensive and remove console logs

* Retry logic here too

* Debug for the reporting tests failure

* I don't like this, but lets see if it works

* Move the retry logic into the collector set directly

* Add support for this new collector

* Localize this

* This shouldn't be static on the class, but rather static for the entire runtime
2019-05-20 16:39:46 -04:00
spalger
51da9bf0a7 skip failing tests
(cherry picked from commit 2320ed9216)
2019-05-10 14:08:45 -07:00
Sonja Krause-Harder
fc6dddfa6a
[Infra UI] Rename 'Snapshot' to 'Inventory'. (#36107) (#36347)
* Rename 'Snapshot' to 'Inventory'.

* Use new route in functional tests.

* Internationalize tab titles.

* Add old route for bookmark compatibility.
2019-05-09 14:50:53 +02:00
Sonja Krause-Harder
cb8bbacfe6
Wait for context menu to appear in functional tests (#36163) (#36345) 2019-05-09 14:18:49 +02:00
Nathan Reese
136030de94
[Maps] fix flaky checking for layer removed in functional tests (#36123) (#36242)
* [Maps] fix flaky checking for layer removed in functional tests

* run x-pack-ciGroup3 40 times to test for flakiness

* use retry.waitFor instead of retry.try

* Revert "run x-pack-ciGroup3 40 times to test for flakiness"

This reverts commit 9136b7717c.
2019-05-07 18:05:06 -06:00
Nathan Reese
515d6836aa
[Maps] show edit link when map embeddabed in dashboard (#36188) (#36238)
* [Maps] show edit link when map embeddabed in dashboard

* move functional tests to dashboard_security test suite
2019-05-07 16:16:03 -06:00
Nathan Reese
9801e5631e
[Maps] show dynamic style ranges in legend (#35417) (#36229)
* show grab and edit buttons when hovering over layer name

* display layer details when layer name is clicked

* add range to dynamic style property state

* render dynamic ranges in TOC details

* render symbol size and border width header in legend

* simplify VectorStyle.getIcon

* removed unused component

* open TOC details on map load

* save open TOC details state in embeddable config

* show gradients for dynmaic fill color icon

* round corners of dynamic icon if points only

* add tooltip to legend label

* add edit panel action to action panel

* add functional test for details in legend

* fix broken gis_page function doesLayerExist

* add unit tests for VectorStyle.getDescriptorWithDynamicRanges

* open actions menu on layer title click, add arrow up/down for togging layer details

* Design cleanup of layers panel (#31)

* fix functional test

* update jest snapshots

* refactor StylePropertyLegendRow to use same function to render lineWidth and iconSize legends

* fix functional test

* fix another functional test

* make escapeLayerName function instead of instance method

* move _isLayerDetailsOpen into prop from redux connector

* remove index.js file

* do not show legend details toggle when layer has not legend details

* rename FillableVector to FillableRectangle

* use mixin pattern instead of encapulated function call
2019-05-07 16:11:37 -06:00
Larry Gregory
871ce5527b
[7.x] Feature Controls - Add saved objects management feature (#35982) (#36212)
* adds saved objects management feature

* document TODO

* testing UI Capbilities

* update SOM functional tests

* fixing privilege action mapping from merge

* remove describe.only

* add new feature to expected feature list

* prettier

* adds simple unit tests for OSS feature registration

* fix tests following merge
2019-05-07 14:20:16 -04:00
Spencer
9e0687a4e0
Revert "[7.x] Improve the functional test of code (#35869)" (#36169)
This reverts commit 2e0b46e20c.
2019-05-07 06:24:57 -07:00
Mengwei Ding
2e0b46e20c
Improve the functional test of code (#35869) (#36104)
* [Code] enable integration test

* [Code] Improve functional test
2019-05-07 16:49:28 +08:00
WangQianliang
bcb2ad0141
fix(code/frontend): should not collapse folder after click a breadcrumb (#35458) (#35711) 2019-05-07 14:17:04 +08:00
Mike Côté
5a5e0f170a
Allow any type of saved object to import / export (#34896) (#36147)
* Modify the relationships API and UI

* Remove type validation on export

* Update relationship test snapshots

* Change relationships table titles

* Change relationships UI to share one table

* Add server side logic to inject meta data into saved objects from plugins

* Manually enable each type of saved object to support

* Use injected vars to determine what types are import / exportable

* Fix some broken tests

* Remove unused translations

* Fix relationships mocha tests

* Remove tests that ensured types are restricted, functionality removed

* Move kfetch logic into separate file

* Add inAppUrl to missing types

* Add tooltip to management table titles that aren't links

* Make relationships screen support filtering by type

* Fix failing tests

* Add refresh support for inAppUrls

* Add error notifications when export API call fails

* Add relationship direction

* Fix broken tests

* Remove graph workspace from import / export

* Use parent / child terminology for relationships

* Use direct relationship terminology

* Flip view / edit logic in saved object management app

* Make config saved object redirect to advanced settings

* Fix broken tests

* Remove unused translations

* Code cleanup

* Add tests

* Add fallback overwrite confirmation object title

* Enforce supported types on import, export and resolve import errors

* Fix broken tests

* Fix broken tests pt2

* Fix broken tests pt3

* Test cleanup

* Use server.decorate to access savedobjectschemas

* Fix some broken tests

* Fix broken tests, add new title to relationships screen

* Fix some broken tests

* Handle dynamic versions

* Fix inAppUrl structure in tests

* Re-use generic canGoInApp

* Fix broken tests

* Apply maps PR feedback

* Apply PR feedback pt1

* Apply PR feedback pt2

* Add savedObjectsManagement to uiExports

* Fix broken tests

* Fix encodeURIComponent implementation

* Merge 403 and unsupported type errors into single error

* Apply suggestion

* Remove import / exportable by default, opt-in instead

* Fix type config to show up properly in the table

* Change config type title and fix tests

* Remove isImportableAndExportable where set to false (new default)

* Remove comments referencing to authorization

* Add unit tests for spaces

* Add unit tests for security plugin

* Change can* signature to be the same as their equivalent function, apply PR feedback

* Cleanup git diff

* Revert "Change can* signature to be the same as their equivalent function, apply PR feedback"

This reverts commit b657ac8fc1.

* Revert "Add unit tests for security plugin"

This reverts commit 6287a8cecf.

* Revert "Add unit tests for spaces"

This reverts commit 2674a9d78f.

* Revert "Remove comments referencing to authorization"

This reverts commit 9618c2cc3a.

* Revert "Merge 403 and unsupported type errors into single error"

This reverts commit 99aea10c0f.

* Add CUSTOM_ELEMENT_TYPE for import / export

* Fix broken tests

* Fix broken tests pt2

* Prevent crashing app when inAppUrl is undefined
2019-05-06 20:43:01 -04:00
Felix Stürmer
f0ecf26b28
[7.x] [Logs UI] Add customizable columns to source configuration (#34916) (#36067)
Backports the following commits to 7.x:
 - [Logs UI] Add customizable columns to source configuration  (#34916)
2019-05-06 10:39:26 +02:00
Dmitry Lemeshko
12aa67edb2
adjust tests to pass on Firefox (#35597) (#36069)
* adjust tests to pass on Firefox

* update feature controls tests to pass on Firefox

* use xpath to search for index pattern
2019-05-04 09:31:26 +02:00
Frank Hassanabad
87ca1a2ddc
Squash of feature-secops branch (#36044)
Backport of #35394
2019-05-03 12:45:15 -06:00