Commit graph

17279 commits

Author SHA1 Message Date
Phillip Burch 2093447203
[Metrics UI] Correct inaccurate offsetting for non-rate aggregations inside of metrics threshold alerts (#106947)
* Don't skip last bucket for most aggs

* Allow alerting on partial buckets for certain aggs

* Fix test, PR feedback, and some comments

* Remove all offset logic for date_range aggs

* Remove code comment

* Add delivery delay

* Fix the date range for query

* Add TODO
2021-07-28 17:29:46 -05:00
Michail Yasonik 28fcd5977d
Remove all instances of EuiKeyboardAccessible (#106910)
* remove all instances of EuiKeyboardAccessible
2021-07-28 17:19:46 -04:00
Kevin Qualters 3612a7a300
[Security Solution][RAC] Migrate add to case action to timelines plugin (#106205)
* First pass add to case action in timelines plugin

* Fix fake duplicate import lint rule and some type errors

* Fix some tests

* Remove use_insert_timeline and pass as prop

* Remove unneeded ports, fix types/tests

* Finish fixing types and tests for add to case action

* Remove duplicated security_solution code

* Pass appId as props

* Fix lint and a type error

* Use react-router-dom instead of window.location.search

* Fix broken test

* Remove unused imports

* Remove unused export and related code
2021-07-28 17:10:37 -04:00
Mikhail Shustov 78eb2bb8be
[Monitoring] remove imports from the legacy 'elasticsearch' package (#106955)
* do not import types from the legacy es package

* adjust tests
2021-07-28 21:43:45 +02:00
David Sánchez 5557599d3c
[Security solution][Endpoint] Set event filters form as error when there are no entries (#107003)
* Set form as error when there is no entries

* removes unused imports

* Add comparison
2021-07-28 21:35:02 +02:00
Paul Tavares 9fbb61276a
[Security Solution][Endpoint] Allow access to Endpoint Metadata for users that might only have readonly access (#107050)
* Remove `getScopedSavedObjectsClient()` from server `EndpointAppContextServices` (not used)
* new EndpointMetadataService service (handles GET of a single endpoint for now)
* ensure `getFleetAgent()` sets the current status for the agent
* Replace the Route handler for Get of single endpoint with new call to service
* Fleet: change agent service to also calculate and return the agent status via calls from the agent service
* Fleet agent generator changed to set a random status
* generic `createInternalReadonlySoClient()` with runtime validation for non-readonly methods

(cherry picked from commit b6e9d8d411)
2021-07-28 15:03:57 -04:00
Paul Tavares cd75befd90
[Security Solution][Endpoint] Fix Endpoint List <SearchBar> to ensure that page_index is reset when new KQL is entered (#106918)
* Fix Endpoint List `<SearchBar>` to ensure that `page_index` is reset to 0 on enter
2021-07-28 15:00:57 -04:00
Alejandro Fernández Gómez 040cf56d8e
[RAC][Metrics UI] Index reason field on inventory metric alerts (#106842)
Co-authored-by: mgiota <giota85@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-28 13:32:09 -04:00
ymao1 81a0267c7b
Gracefully handle decryption errors during ESO migrations (#105968)
* Updating unit tests

* Fixing types

* Updating readme and adding warning message

* Updating README

* PR fixes

* collapsing args to create migration fn

* Adding functional tests

* Adding comment to functional test

* Adding stripOrDecryptAttributesSync

* Using stripOrDecryptAttributesSync

* Fixing unit tests

* PR fixes

* PR fixes

* Moving validation of apikey existence in alerting task runner

* Cleanup

* Reverting changes to alerting task runner

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-28 13:04:20 -04:00
spalger 30a1020283 skip flaky suites (#107043) 2021-07-28 09:50:42 -07:00
Alison Goryachev a1513eb98a
[Upgrade Assistant] Refactor ML deprecation response (#106847) 2021-07-28 10:54:50 -04:00
Mike Côté 39403dc3df
Include rule type id in alerting executor error message (#106775)
* Include rule type id in generic executor error message

* Add spaceId to message

* Fix formatting
2021-07-28 10:44:44 -04:00
Thomas Watson c58148981c
Remove duplicate license comments (#106848) 2021-07-28 08:42:21 -06:00
Jonathan Budzenski 3d33710d5c Revert "[Security Solution][Endpoint] Allow access to Endpoint Metadata for users that might only have READONLY access (#106328)"
This reverts commit b6e9d8d411.
2021-07-28 09:26:29 -05:00
Jason Stoltzfus 904c370378
[App Search] Added a ReorderableTable component (#106306) 2021-07-28 09:16:43 -05:00
Pablo Machado 2351447ceb
Fix add-cases comments error message is displaying after buttons (#106831) 2021-07-28 15:50:20 +02:00
Oliver Gupte c68e0e8d11
[APM] Fix data streams docs link url (#105651) (#106954) 2021-07-28 15:21:01 +02:00
Christos Nasikas 2388ac5de7
[Actions] Swimlane: Fix connectorType schema (#106969)
* Fix connectorType schema

* Add integration test
2021-07-28 08:51:44 -04:00
Paul Tavares b6e9d8d411
[Security Solution][Endpoint] Allow access to Endpoint Metadata for users that might only have READONLY access (#106328)
* Remove `getScopedSavedObjectsClient()` from server `EndpointAppContextServices` (not used)
* new EndpointMetadataService service (handles GET of a single endpoint for now)
* ensure `getFleetAgent()` sets the current status for the agent
* Replace the Route handler for Get of single endpoint with new call to service
* Fleet: change agent service to also calculate and return the agent status via calls from the agent service
* Fleet agent generator changed to set a random status
* generic `createInternalReadonlySoClient()` with runtime validation for non-readonly methods
2021-07-28 08:42:00 -04:00
Anton Dosov deefe1ac83
[FieldFormats] fix register on start contract (#106828) 2021-07-28 14:05:17 +02:00
Mat Schaffer 264813f8d7
Fix typo in ReasonFound test (#102690)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-28 19:38:11 +09:00
David Sánchez dccdb621ce
[Security solution] [Endpoint] Adds API check for existing policies when saving/creating trusted apps (#106110)
* Adds API check for existing policies when saving/creating trusted apps

* Fixes wrong error message

* Fixes tests and replaces policy id by policy name in error message

* Updates error message text

* Address pr comments and remove old comments in code

* Addressed some pr comments and added type to the error response in order to know which kind of response it is

* removed unused imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-28 12:21:34 +02:00
Christos Nasikas 7987a4d2c4
[Cases] Fix connectors callout messages (#106525) 2021-07-28 06:13:45 -04:00
Pete Harverson f67737d9cc
[ML] Transforms: Add functional tests for UI permissions (#106693)
* [ML] Transforms: Add functional tests for UI permissions

* [ML] Fix for edit flyout action

* [ML] Stabilize tests that open the actions menu
2021-07-28 09:25:46 +01:00
Aleh Zasypkin 0bb761de32
Fix and re-enable basic login selector functional tests. (#106822) 2021-07-28 09:25:22 +02:00
Yara Tercero 44a9dadaff
[Timeline][RBAC] - Add RBAC logic to timeline alerts search strategy (#105333)
## Summary
 
Adds RBAC layer to timeline plugin search strategy for alerts.
2021-07-28 01:36:54 -04:00
Lukas Olson 196eb7b6a9
[data.search.autocomplete] Move autocomplete method to UI settings (#106331)
* [data.search.autocomplete] Move autocomplete method to UI settings

* Use select rather than boolean

* Add ftue tour

* Make a select rather than text box

* Only show when focused and first time page is loaded

* Add docs link

* Reverse order of sections

* Update docs/concepts/index.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/concepts/index.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Docs updates

* setting

* telemetry

* Add links to docs

* Fix translations

* Fix failing test

* Fix test

* Fix tests

* Revert changes to querybar service

* Fix discover query

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Liza K <liza.katz@elastic.co>
2021-07-27 20:57:12 -07:00
Ross Wolf b8522b7d70
[Detection Rules] Add 7.14 rules (#106933) 2021-07-27 19:58:29 -06:00
Dominique Clarke 0ad5f75bae
[Uptime] fix alerts flyout flaky tests (#106925)
* focus uptime tests

* update timeout time for alert confirm button

* await async requests

* check for alert name input before attempting to set value

* remove focused tests

* ensure that the alertNameInput exists after opening flyout
2021-07-27 21:36:17 -04:00
Ece Özalp 79edaf5dab
updates UX of threat intel tab (#106609) 2021-07-27 18:56:18 -04:00
Kevin Logan c8e8f9703f
add off switches (#106861)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-27 18:48:40 -04:00
Tyler Smalley f46b96a367 skip flaky suite (#106650) 2021-07-27 15:36:02 -07:00
Josh Dover 20c4716ced
Add ability for types to define an excludeOnUpgrade hook (#106534)
* Add ability for types to define an exclude from upgrade hook

* Update test to use 7.13 fixture

* Add 404 handling to oldest action task query

* Update api docs

* Update and add unit tests

* Rename deleteOnUpgrade to excludeOnUpgrade

* Disable reporting browser download for integration test

* Update exports and TSDocs

* Disable reporting plugin entirely

* Typo in config key name

* Update api docs

* Fix eslint

* Add timeouts for hooks

* Make adjustments to getOldestIdleActionTask

* Add type name to log messages for failed hooks

* Update api docs
2021-07-27 17:32:35 -04:00
Andrew Goldstein 4d92dafa9e
[Observability RAC] Alerts table post-EuiDataGrid style updates (#106349)
## [Observability RAC] Alerts table post-`EuiDataGrid` style updates

This PR updates styles in the Observability `Alerts` table, as a follow-up to the [TGrid migrating to use `EuiDataGrid` for rendering](https://github.com/elastic/kibana/pull/106199), and [this PR](https://github.com/elastic/kibana/pull/105446), which improved the alerts table columns.

- The `Reason` column uses up the remaining width, a follow-up task from https://github.com/elastic/kibana/pull/105446
  - This task was originally tracked by https://github.com/elastic/kibana/issues/105227
- Increased the font weight and vertically aligned the `Actions` header with the other columns
- ~Removed the `Status` column~ (EDIT: we won't remove this, per a discussion w/ UX)
- Increased the width of the `Triggered` column
- ~Renamed the `Duration` column to `Alert duration`~ (EDIT: we won't rename this, per a discussion w/ UX)
- Eliminated the gap between actions
- Added truncation to the `Reason` column

### Before

![before](https://user-images.githubusercontent.com/4459398/126430458-89440150-c10b-43b1-b0b4-2044ddfc22a8.png)

### After

<img width="1280" alt="after" src="https://user-images.githubusercontent.com/4459398/126716690-be310fdf-3760-4014-998b-3c89099c2564.png">

### Desk testing

- To desk test the `Observability > Alerts` page, add the following settings to `config/kibana.dev.yml`:

```
xpack.observability.unsafe.cases.enabled: true
xpack.observability.unsafe.alertingExperience.enabled: true
xpack.ruleRegistry.write.enabled: true
```

cc @mdefazio
2021-07-27 14:41:19 -06:00
Cauê Marcondes 2bbca69024
[APM] Return default error message when log and exception are not available (#106890) 2021-07-27 16:27:10 -04:00
Ece Özalp 864469d84b
skips test (#106889) 2021-07-27 16:21:29 -04:00
Dima Arnautov b17200a2e6
[ML] Model memory state test for Anomaly Detection jobs health rule type (#106763) 2021-07-27 14:39:28 -04:00
Byron Hulcher 925c9006ef
[App Search] Attempt to add protocols to crawler urls when they are submitted for validation (#106764)
* Add validate_url route to crawler routes

* Add getDomainWithProtocol to crawler add domain form utils

* AddDomainLogic.actions.validateDomain now attempts to fix protocols for urls

* Apply suggestions from code review for AddDomain utils

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2021-07-27 14:26:00 -04:00
Dario Gieselaar 0d5d453af2
[APM] Update ES archive for tests (#106837) 2021-07-27 14:16:03 -04:00
Greg Thompson 566c16ac1b
Upgrade EUI to v36.0.0 (#106334)
* eui to v36.0.0

* i18n tokens

* remove temp styled-components types

* euiemptybutton size updates

* betanotification size prop

* i18n snapshot

* functional timeout

* beta badge unit test
2021-07-27 13:12:00 -05:00
Constance 63bedaa285
[Enterprise Search] Set up automated a11y tests (#106765)
* Set up a11y test/config

* Add product card checks

* Add setup guide checks

* Add documentation
2021-07-27 10:27:27 -07:00
Yuliia Naumenko f589c2fc29
[Alerting] Rename alertTypeRegistry to ruleTypeRegistry according to the new terminology. (#106519)
* [Alerting] Renamed Alerting framework AlertsClient to RulesClient according to the new terminology.

* fixed path

* fixed type checks

* fixed type checks

* [Alerting] Rename alertTypeRegistry to ruleTypeRegistry.

* Apply suggestions from code review

Co-authored-by: ymao1 <ying.mao@elastic.co>

* fixed type checks

* fixed tests

* fixed merge issues

* fixed merge issues

* fixed tests

* fixed tests

* fixed functional tests

Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-27 10:03:00 -07:00
Zacqary Adam Xeper b5e553650d
[Fleet] Add package policy upgrade API (#103017)
* Add Integrations page callout for package upgades

* Fix props

* Add missing file

* Add integrations upgrade callout message

* Add link to updates available tab

* Fix merge

* Upgrade ppolicies UI WIP

* Initial upgrade dry run API

* Add upgrade method

* Move overridePackageInputs and use for upgrade method

* Add new variables to dry run diff

* Revert UI changes to uto upgrade wizard

* Add vars and streams to error keys

* Type fix

* Fix jest

* Fix types

* Fix typecheck

* Fix types

* Add integration test for dry run API

* Flesh out test cases

* Clean up error responses for dry runs

* Fix failing tests

* WIP: Add (failing for now) test case for package upgrade w/ error

* Add compiled_stream to test API payload

* Fix failing test case for automatic upgrade

* Fix compiled stream in package policy upgrade

* Remove fleet and agent setup from integration test

* Unload esarchiver fixtures in api integration test

Co-authored-by: Kyle Pollich <kpollich1@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-27 12:58:24 -04:00
Kyle Pollich b35d6b18a3
Fix breadcrumbs on agent policy sub-tabs (#106844) 2021-07-27 11:38:50 -04:00
Ignacio Rivas 374de9dbc5
[Ingest pipelines] Add copy_from to set processor (#104070)
* fix up validation conditions for fields

* add tests and fix prettier errors

* Small refactor and fix tests

* Fix copy surrounding error handling

* Clean up unnecessary boilerplate from tests

* Fix i18n error

* Keep optional select next to bound input

* Pass disabled prop as boolean

* fix test matchers

* No need to whitelist fields anymore

* Small CR changes

* Convert optional inputs to toggle state

* Fix testcase copy

* address CR suggestions

* address CR changes

* Fix i18n

* Fix labelAppend link alignment
2021-07-27 18:28:30 +03:00
Frank Hassanabad 5dd68dd7b3
[Security Solutions] Removes deprecated types in kbn-securitysolution-* for newer kbn-es-query types (#106801)
## Summary

Fixes https://github.com/elastic/kibana/issues/105731, by replacing these `any` types:

```json
type IFieldType = any;
type IIndexPattern = any;
type Filter = any;
```

With the types from `es-query` which are:
* IndexPatternFieldBase
* IndexPatternBase
* Filter

Note: I had to do a few creative casting to avoid having to use `FieldSpec` since that is not within the package `es-query` and is not planned to be within that package or another package for at least a while if ever.

### 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
2021-07-27 09:12:02 -06:00
Alexey Antonov fcaa4aaf40
[TSVB] [Table] js -> ts conversion (#105094)
* table js -> ts

* remove any's

* fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-27 18:07:43 +03:00
Nathan L Smith a6211f86f2
Allow editing of APM rules (#106598)
By pulling out most of the things that depend on the URL into where we open the flyout and passing them in as metadata props, we can make it so editing rules while in Stack Management.

You cannot edit a rule's service name, transaction type, or environment once it has been created (#106786 has been created to allow editing of these other values), but all other values can be edited.

In order for useFetcher to work outside of the APM plugin, it has been changed to use useKibana instead of useApmContext for toast notifications. The notifications API from useKibana is slightly different and allows passing a react element instead of a mount point as the body.

Fixes #76316.
2021-07-27 10:05:39 -05:00
Stratoula Kalafateli c656608d85
[Lens] Allows the users to change the axis orientation (#106369)
* [Lens] Allows the users to change the axis orientation

* Disable orientation if ticklabels are off

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-27 16:14:03 +03:00
Tiago Costa 8d3007279e
skip flaky suite (#106651) 2021-07-27 13:24:50 +01:00