* adding custom links to actions menu
* user should have at least gold license to be able to manage custom links
* replacing variable for the correspondent value
* refactoring license prompt to a shared place
* fixing query to return filters that were saved separated by comma
* refactoring license prompt to a shared place
* fixing query to return filters that were saved separated by comma
* adding unit test, splitting value by comma and removing empty ones
* adding custom links to actions menu
* UI fixes
* moving stuff to common
* changing flyout texts
* refactoring getSelectOption
* refactoring getSelectOption
* refactoring filter options name
* adding preview panel
* adding preview panel
* fixing test
* adding unit test for replace template variables
* fixing typo
* polishing preview panel
* fixing pr comments
* fixing pr comments
* adding links
* fixing unit test
* removing servicemap license prompt
* Update the Authentication histogram to use categorization fields
* linting
* Use categorization fields for the Authentications table
* Use event.outcome for authentications KPIs
* Adjust mock to fix unit test
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Adds a settings page to the Uptime UI. The settings page values are per-space. The only current setting is heartbeatIndices.
To test this against alternate indices try changing setup.ilm.rollover_alias in heartbeat.yml to something like alt-prefix. See the ilm docs for more details.
This should be tested with read-only and write only roles. To test this in kibana try creating two users with two different roles in kibana. One roll should have read access to the Uptime space in kibana. The other should have all access. Both should have read permissions for the heartbeat-* index pattern.
This patch also splits API perms from just heartbeat to uptime-read and uptime-write.
This patch also refactors some of the header component functionality, using hooks for breadcrumbs, and making the top links optional.
Fixeselastic/uptime#43
* Allow ML Rules to be patched
* Test passing of params from our patch routes to our helpers
Since patchRules accepts a partial there's no way to verify this in
typescript, we need regression tests instead.
* Update lists when importing with overwrite
This was simply missed earlier.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Adds rotation transform which does the top->bottom to left->right
transformation + an extra 5 degrees which results in taxi edges
separating when rendered.
* PR feedback to reduce edge width on hover, and assure that connected
edges are highlighted when node is selected/focused
* update disabled kuery bar placeholder text for service map
resolves https://github.com/elastic/kibana/issues/60744
This is a fairly complex test, with alerts that run actions that write to
an index which we then do queries over. The tests didn't account for some
slop in all that async activity, but now should be about as flake-free as they
can be.
resolves https://github.com/elastic/kibana/issues/59889
The index threshold APIs - used by both the index threshold UI and the
alert executor - were returning errors (500's from http endpoints) when
getting errors from ES.
These have been changed so that the error is logged as a warning, and the
relevant API returns an "empty" result.
Another 500 response was found while experimenting with this. Apparently
the date_range agg requires a date format to be passed in if the date format
in ES is not an ISO date. The repro on this was to select the `.security`
alias (or it's index) within the index threshold alert UI, and then select
one of it's date fields.
* Use ingest API to get endpoint datasources
* Add `application` service to `KibanaContextProvider`
* Adjust Policy list to show data available from API
* Added ingest service + refactored middleware
* handle api failures/errors
* Removed policy list fake_data generator
* Fix typing
* Rename method + added explicit return type
* move dispatch outside of try block
* Removed unnecessary action
* Added FIXME comments with link to issue
* Skip some functional tests
* added tests for ingest service
* Policy list tests - turn it all off
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* update to eui 21.0.1
* most changes needed for search bar ts changes
* Passing types
* snapshots
* jest tests
* Removed IQuery placeholder types
* Updated functional test to only look at table headers with content
* Moved 'filters' definition around in api docs
* Update types
* update snapshot
* typo
* Move DATA_FRAME_TASK_STATE enum to its own file to fix x-pack functional test config imports
* merge public api 'changes'
Co-authored-by: patrykkopycinski <patryk.kopycinski@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Remove the getCytoscapeElements function.
On the server:
* Replace `source` with `sourceData`, `destination` with `targetData`, `source.id` with `source`, and `destination.id` with `target`.
* Return a single array as an `elements` property instead of `nodes` and `connections`
* Map all of the items data to be inside of a `data` object
* Replace SERVICE_AGENT_NAME with AGENT_NAME
* Add some missing constants
On the client:
* Remove getCytoscapeElements
* Move all presentation-specific data transformation to use the original attributes in the place where they're needed
* Remove `href` since it wasn't being used
* Move BetaBadge to its own file
* Move cytoscapeDivStyle to cytoscapeOptions
* Fix storybook to work with new data formats
* First pass
* First pass
* Add new routes
* Getting closer
* Remove legacy server code, and other fixes
* Register the plugin with xpack
* Pass a legacy client to telemetry
* Suport callWithInternalUser
* Remove this
* More NP work
* Fix some tests
* Fix broken test
* Move over new telemetry changes, and fix other issues
* Fix TODO item
* Reuse the same schema as elasticsearch module
* Use a singular config definition here
* Disable this for now
* Use the right method
* Use custom config again
* Tweak the config to make this optional
* Remove these
* Remove these unnecessary files
* Fix jest test
* Fix some linting issues
* Fix type issue
* Fix localization issues
* Use the elasticsearch config
* Remove todos
* Fix this check
* Move kibana alerting over
* PR feedback
* Use new metrics core service
* Change config for xpack_api_polling_frequency_millis
* Make sure this is disabled for now
* Disable both
* Update this to the new function
* Tighten up legacy api needs
* Check for existence
* Fix jest tests
* Cleaning up the plugin definition
* Create custom type in our plugin
* Revert this change
* Fix CI issues
* Add these tests back
* Just use a different collector type
* Handle errors better
* Use custom type
* PR feedback
* Fix type issues
* PR feedback
Enables the FT that tests the View inApp functionality.
It addresses an issue that causes a race condition on CI where the ViewInApp button was thought to be enabled when it was, in fact, still disabled.
This meant that the click on the button didn't trigger the handler which, in turn, made the test fail.
* Only set timezone when user setting is a valid timezone
Currently we set the global browser timezone based on the user's
advanced settings. This setting includes a list of timezones and a
non-standard 'Browser' option which can be translated as set the
timezone to my current. In order to avoid warnings and possible future
errors we only set timezone if it exists in moments list of installed
timezones
Closes#38515
* feedback
* only set timezone if defined
* Update src/core/public/integrations/moment/moment_service.ts
Co-Authored-By: Mikhail Shustov <restrry@gmail.com>
* Update src/core/public/integrations/moment/moment_service.ts
Co-Authored-By: Mikhail Shustov <restrry@gmail.com>
* Update src/core/public/integrations/moment/moment_service.test.ts
Co-Authored-By: Mikhail Shustov <restrry@gmail.com>
* Update src/core/public/integrations/moment/moment_service.test.ts
Co-Authored-By: Mikhail Shustov <restrry@gmail.com>
* update test name
Co-authored-by: Mikhail Shustov <restrry@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Define minimum license required for each action type (#58668)
* Add minimum required license
* Require at least gold license as a minimum license required on third party action types
* Use strings for license references
* Ensure license type is valid
* Fix some tests
* Add servicenow to gold
* Add tests
* Set license requirements on other built in action types
* Use jest.Mocked<ActionType> instead
* Change servicenow to platinum
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Make actions config mock and license state mock use factory pattern and jest mocks (#59370)
* Add license checks to action HTTP APIs (#59153)
* Initial work
* Handle errors in update action API
* Add unit tests for APIs
* Make action executor throw when action type isn't enabled
* Add test suite for basic license
* Fix ESLint errors
* Fix failing tests
* Attempt 1 to fix CI
* ESLint fixes
* Create sendResponse function on ActionTypeDisabledError
* Make disabled action types by config return 403
* Remove switch case
* Fix ESLint
* Add license checks within alerting / actions framework (#59699)
* Initial work
* Handle errors in update action API
* Add unit tests for APIs
* Verify action type before scheduling action task
* Make actions plugin.execute throw error if action type is disabled
* Bug fixes
* Make action executor throw when action type isn't enabled
* Add test suite for basic license
* Fix ESLint errors
* Stop action task from re-running when license check fails
* Fix failing tests
* Attempt 1 to fix CI
* ESLint fixes
* Create sendResponse function on ActionTypeDisabledError
* Make disabled action types by config return 403
* Remove switch case
* Fix ESLint
* Fix confusing assertion
* Add comment explaining double mock
* Log warning when alert action isn't scheduled
* Disable action types in UI when license doesn't support it (#59819)
* Initial work
* Handle errors in update action API
* Add unit tests for APIs
* Verify action type before scheduling action task
* Make actions plugin.execute throw error if action type is disabled
* Bug fixes
* Make action executor throw when action type isn't enabled
* Add test suite for basic license
* Fix ESLint errors
* Stop action task from re-running when license check fails
* Fix failing tests
* Attempt 1 to fix CI
* ESLint fixes
* Return enabledInConfig and enabledInLicense from actions get types API
* Disable cards that have invalid license in create connector flyout
* Create sendResponse function on ActionTypeDisabledError
* Make disabled action types by config return 403
* Remove switch case
* Fix ESLint
* Disable when creating alert action
* Return minimumLicenseRequired in /types API
* Disable row in connectors when action type is disabled
* Fix failing jest test
* Some refactoring
* Card in edit alert flyout
* Sort action types by name
* Add tooltips to create connector action type selector
* Add tooltips to alert flyout action type selector
* Add get more actions link in alert flyout
* Add callout when creating a connector
* Typos
* remove float right and use flexgroup
* replace pixels with eui variables
* turn on sass lint for triggers_actions_ui dir
* trying to add padding around cards
* Add callout in edit alert screen when some actions are disabled
* improve card selection for Add Connector flyout
* Fix cards for create connector
* Add tests
* ESLint issue
* Cleanup
* Cleanup pt2
* Fix type check errors
* moving to 3-columns cards for connector selection
* Change re-enable to enable terminology
* Revert "Change re-enable to enable terminology"
This reverts commit b497dfd6b6.
* Add re-enable comment
* Remove unecessary fragment
* Add type to actionTypeNodes
* Fix EuiLink to not have opacity of 0.7 when not hovered
* design cleanup in progress
* updating classNames
* using EuiIconTip
* Remove label on icon tip
* Fix failing jest test
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
* Add index to .index action type test
* PR feedback
* Add isErrorThatHandlesItsOwnResponse
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>