Commit graph

45190 commits

Author SHA1 Message Date
Lukas Olson 12115d680c
[data.search] Add owner/description properties to kibana.json (#107954)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 12:42:10 -07:00
Spencer f236286b62
[kbn/es-archiver] fix flaky test (#108143)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-11 11:51:48 -07:00
Kerry Gallagher 900052f32c
[APM] Add a logs tab for services (#107664)
* Add a logs tab for APM services

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
2021-08-11 19:51:32 +01:00
ymao1 d07f0e6d14
[Alerting] Alerting authorization should always exempt alerts consumer (#108220)
* Reverting changes to genericize exempt consumer id

* Adding unit test for find auth filter when user has no privileges
2021-08-11 14:49:38 -04:00
Vadim Yakhin c0baf834cc
[Enterprise Search] Fix search not working on some table columns on Users and Roles page (#108228)
* Fix role mappings table search not working on some columns

Not searchable columns had non-string data: arrays, objects.
The default implementation of search doesn't perform a search on non-string data.

The solution used here is to have a custom search callback that converts the entire
role mapping object to string and then checks if user query exists in this string.

It was copied and adjusted from example in EUI docs:
https://elastic.github.io/eui/#/tabular-content/in-memory-tables#in-memory-table-with-search-callback

* Fix copy

* Fix the same issue for Users table

The search was not performed on Engines/Groups column.

Also adjust the variable names in role_mappings_table to closely match
variable names in users_table
2021-08-11 14:27:10 -04:00
Candace Park e1843f9252
[Security Solution][Endpoint][Admin] Endpoint List UI update (#106568) 2021-08-11 13:16:54 -04:00
James Gowdy 6710a0643d
[ML] Job import/export calendar and filter warnings (#107416)
* [ML] Job import/export calendar and filter warnings

* fixing translation id

* adding export callout

* fixing translation id

* translation ids

* bug in global calendar check

* code clean up based on review

* updating text

* updatiung text

* updating apidoc

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 18:13:48 +01:00
Byron Hulcher 0d55d30c97
[App Search] Migrate Crawl Schedule form (#108066) 2021-08-11 12:45:25 -04:00
Oliver Gupte ae73cf8416
[APM] Displays callout when transaction events are used instead of aggregrated metrics (#108080)
* [APM] Displays callout when transaction events are used instead of aggregrated metrics (#107477)

* Apply suggestions from code review

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>

* PR feedback, and isolates the logic for getting the fallback strategy

* PR feedback

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
2021-08-11 12:11:29 -04:00
Ryland Herrick 947657118c
[Security Solution, Timelines] Replace more legacy elasticsearch types (#108087)
* Replace more legacy elasticsearch types

* Handle possibly undefined response fields

These are both number | undefined, so we default to 0 if we need a
value. Fixes the type errors resulting from the previous type changes.
2021-08-11 11:02:09 -05:00
Alejandro Fernández Haro def97bd734
[Status UI] Use the new output format of API GET /api/status (#107937) 2021-08-11 16:56:23 +01:00
Frank Hassanabad 6d2c1da2ba
[Security Solutions][Detection Engine] Adds exception lists to the saved object references when created or modified (part 1) (#107064)
## Summary

This is part 1 to addressing the issue seen here: https://github.com/elastic/kibana/issues/101975

This part 1 wires up our rules to be able to `inject` and `extract` parameters from the saved object references. Follow up part 2 (not included here) will do the saved object migrations of existing rules to have the saved object references.

The way the code is written it shouldn't interfere or blow up anything even though the existing rules have not been migrated since we do fallbacks and only log errors when we detect that the saved object references have not been migrated or have been deleted.

Therefore this PR should be migration friendly in that you will only see an occasional error as it serializes and deserializes a non migrated rule without object references but still work both ways. Non-migrated rules or rules with deleted saved object references will self correct during the serialization phase when you edit a rule and save out the modification. This should be migration bug friendly as well in case something does not work out with migrations, we can still have users edit an existing rule to correct the bug.

For manual testing, see the `README.md` in the folder. You should be able to create and modify existing rules and then see in their saved objects that they have `references` pointing to the top level exception list containers with this PR.

* Adds the new folder in `detection_engine/signals/saved_object_references` with all the code needed
* Adds a top level `README.md` about the functionality and tips for new programmers to add their own references 
* Adds a generic pattern for adding more saved object references within our rule set
* Adds ~40 unit tests
* Adds additional migration safe logic to de-couple this from required saved object migrations and hopefully helps mitigates any existing bugs within the stack or previous migration bugs a bit for us.

### 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-08-11 09:45:36 -06:00
Tiago Costa dfaf54082a
chore(NA): moving @kbn/rule-data-utils to babel transpiler (#107573)
* chore(NA): moving @kbn/rule-data-utils to babel transpiler

* chore(NA): update imports

* chore(NA): targetted imports for apm

* chore(NA): fix imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 15:59:21 +01:00
David Sánchez 7a1448aa08
[Security Solution][Endpoint] Add new fleet PackagePolicy DELETE API extension point (#107507)
* Refactor - moved extension types to its own type file

* initial add of new extension point type

* Removes unused imports

* fix import order

* try to fix ts errors

* Add ts types for delete callback and register it. Also add packagePolicy to the delete response

* Use logger instead of console log

* Removes array check

* Try fix some types and added TODO's

* Fix ts errors and remove @ts-ignore 's

* Remove useless ts-ignore

* Remove useless todo

* Remove enforced assertion by checking externalCallbackType

Co-authored-by: Paul Tavares <paul.tavares@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 16:50:04 +02:00
Melissa Alvarez 2071b58494
[ML] Data Frame Analytics wizard: ensure cloning retains hyperparameters and results field is correct (#107811)
* ensure all hyperparameters are retained on clone

* ensure resultsField is set to default when switch enabled

* Add FeatureProcessor type

* ensure state persists for advanced fields when switching to form
2021-08-11 10:41:46 -04:00
Kyle Pollich 35f55ce262
[Fleet] Update Package Policy UI to Support Upgrading Package Policies (#107171)
* Remove description column, replace w/ tooltip

* Add upgrade tooltip to version column in package policy table

* Add update policy action

* Add inline upgrade package policy button

* Clean up types + add upgrade CTA's to integrations policy table

* Fix i18n

* Fix button widths

* Upgrade package policy when saving integration w/ upgrade param

* Update edit policy page description for upgrades

* Support setting vars on new package version before saving to upgrade

* Add flyout for JSON of previous policy version

* Compile package policy before displaying in flyout

* Support different success redirects following package policy upgrades

* Fix i18n

* Fix more type errors

* Fix even more type errors 🙃

* Fix type errors

* Don't throw errors for missing vars, include them in missingVars response object

* Update tests for new missingVars field

* Fix failing tests

* Address PR feedback

* Fix missing i18n value

* Fix types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 10:32:41 -04:00
Søren Louv-Jansen 6054d7e352
[APM] Rename "Error rate" to "Failed transaction rate" (#107895) 2021-08-11 10:19:32 -04:00
Cauê Marcondes 96ddfe6f7e
[APM] Latency threshold incorrect value (#107963)
* fixing threshold

* removing console

* adding unit test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 09:20:59 -04:00
Jen Huang 77d7d1730b
[Fleet] Add owner to kibana.json (#108136) 2021-08-11 07:59:07 -04:00
Alexey Antonov 82bec98cd7
[Lens] Register all expression functions to the server (#107836)
Part of:  #97134

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 13:59:49 +03:00
Jean-Louis Leysens 46e0f0ba3e
[Reporting] Added docs about the new ILM kibana-reporting policy (#108018)
* first iteration of ilm policy copy - in a callout

* apply James' suggested change

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-08-11 12:43:13 +02:00
Yara Tercero cec5d3f27a
[RAC] - Update field names (#107857)
### Summary
### Fields used moving forward
`kibana.alert.rule.consumer` will refer to the context in which a rule instance is created. Rules created in:
- stack --> `alerts`
- security solution --> `siem`
- apm --> `apm`

`kibana.alert.rule.producer` will refer to the plugin that registered a rule type. Rules registered in:
- stack --> `alerts`
- security solution --> `siem`
- apm --> `apm`

So an `apm.error_rate` rule created in stack will have:
- consumer: `alerts` and producer: `apm`
 An `apm.error_rate` rule created in apm will have:
- consumer: `apm` and producer: `apm`

`kibana.alert.rule.rule_type_id` will refer to a rule's rule type id. Examples:
- `apm.error_rate`
- `siem.signals`
- `siem.threshold`

Also renamed the following because `rule.*` fields are meant to be ecs fields pulled from the source/event document, not refer to our rule fields.
`rule.name` --> `kibana.alert.rule.name` will refer to the rule's name.

`rule.category` --> `kibana.alert.rule.category` will refer to the rule's category.

`rule.id` --> `kibana.alert.rule.uuid` will refer to the rule's uuid.
2021-08-11 06:25:46 -04:00
Anton Dosov e86d909ae6
include and fix hello world example test (#108072) 2021-08-11 11:14:58 +02:00
Walter Rafelsberger 86c17daec2
[ML] APM Latency Correlations: Field/value candidates prioritization (#107370)
- Makes sure fields defined in `FIELDS_TO_ADD_AS_CANDIDATE` and prefixed with one of `FIELD_PREFIX_TO_ADD_AS_CANDIDATE` get queried first when retrieving the `correlation` and `ks-test` value.
- Correctly consider the `includeFrozen` parameter.
- The bulk of the PR is a refactor:
  - Moves `query_*` files to `queries` directory
  - Introduces `asyncSearchServiceStateProvider` to manage the state of the async search service in isolation so that we no longer mutate individual vars or plain objects.
  - Introduces `asyncSearchServiceLogProvider` and extends the log to not only store messages but original error messages retrieved from ES too.
  - Refactors some more functions in separate files and adds unit tests.
  - Removes some deprecated code no longer needed.
2021-08-11 10:46:35 +02:00
Tim Sullivan a444d8a4ab
[Reporting] Add lenience to a test on the order of asserted logs (#108135) 2021-08-11 10:15:38 +02:00
Alexey Antonov ee10819ef0
[Lens] fix do not submit invalid query in filtered metric (#107542)
* [Lens] Do not submit invalid query in filtered metric

Closes: #95611

* fix CI

* fix PR comments

* fix PR comments

* fix PR comment

* move closePopover to useCallback

* add filter validation to utils/isColumnInvalid

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 10:56:44 +03:00
spalger 441fb796e2 skip flaky test (#108043) 2021-08-10 23:49:47 -07:00
spalger 65a5cb1476 fix newly introduced type error (#107593) 2021-08-10 22:37:06 -07:00
Tim Sullivan e4e22ab928
[Reporting] server side code clean up (#106940)
* clean up the enqueue job function

* clean up the screenshots observable

* clean up authorized user pre routing

* clean up get_user

* fix download job response handlers

* clean up jobs query factory repetition

* clean up setup deps made available from plugin.ts

* update test for screenshots observable

* Revert "clean up setup deps made available from plugin.ts"

This reverts commit 91de680ebf.

* revert renames

* minor rename

* fix test after rename

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 22:34:42 -07:00
Spencer c0395c9ef6
[build_ts_refs] improve caches, allow building a subset of projects (#107981)
* [build_ts_refs] improve caches, allow building a subset of projects

* cleanup project def script and update refs in type check script

* rename browser_bazel config to avoid kebab-case

* remove execInProjects() helper

* list references for tsconfig.types.json for api-extractor workload

* disable composite features of tsconfig.types.json for api-extractor

* set declaration: true to avoid weird debug error

* fix jest tests

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-10 22:12:45 -07:00
Cauê Marcondes 6ed4b4f70c
[APM] Add new ftr_e2e to kibana CI and remove current e2e tests. (#107593) 2021-08-10 23:40:20 -04:00
Sandra G bfad9e354f
add manage rules link to alerts dropdown (#107950)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 21:03:14 -04:00
Quynh Nguyen 4df34e1188
[ML] Enable Index data visualizer document count chart to update time range query (#106438)
* Add brush listener

* Fix back button not working

* [ML] Remove api names in apidoc.json

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 20:33:55 -04:00
Frank Hassanabad 978c44e381
[Security Solutions][Detection Engine] Fixes "undefined" crash for author field by adding a migration for it (#107230)
## Summary

Fixes https://github.com/elastic/kibana/issues/106233

During an earlier upgrade/fix to our system to add defaults to our types, we overlooked the "author" field which wasn't part of the original rules. Users upgrading might get errors such as:

```
params invalid: Invalid value "undefined" supplied to "author"
```

This fixes that issue by adding a migration for the `author` field for `7.14.1`.

See https://github.com/elastic/kibana/issues/106233 for test instructions or manually remove your author field before upgrading your release and then upgrade and this should be fixed on upgrade.


### 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-08-10 20:19:12 -04:00
Yuliia Naumenko 538a6d9288
[Actions UI] Fixed Jira Api token label. (#107776)
* [Actions UI] Fixed Jira Api token label.

* fixed tests

* fixed username

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 17:11:11 -07:00
Yuliia Naumenko e89d069f09
[Alerting UI] Fixed display permissions for edit/delete buttons when user has read only access. (#107996)
* [Alerting UI] Fixed display permissions for Edit/delete buttons when user has read only access

* fixed due to comments
2021-08-10 17:10:49 -07:00
Nathan Reese 4ffa5cce46
[Maps] fix code owners (#108106) 2021-08-10 16:36:04 -06:00
Nick Peihl 118ef56c2e
Update EMS landing page url (#108102) 2021-08-10 15:23:59 -07:00
Constance 40766dcc08
Do not render page header for loading domains (#108078) 2021-08-10 18:01:39 -04:00
renovate[bot] c35215fb0b
Update dependency @elastic/charts to v33.2.2 (#107939) 2021-08-10 16:43:57 -05:00
Søren Louv-Jansen 1c9edebf99
[APM] Display throughput as tps (instead of tpm) when bucket size < 60 seconds (#107850)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 23:31:41 +02:00
Nicolas Chaulet 422f64c498
[Fleet] Fix all category count (#108089) 2021-08-10 17:09:08 -04:00
Michael Olorunnisola 2bf9ae8b29
[Security Solution][Bug] - Disable alert table RBAC until fields sorted (#108034)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 17:05:19 -04:00
Ryan Keairns ca2a591526
Add monaco default style options (#107930)
* Add monaco default style options

* Update snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 16:02:58 -05:00
ymao1 565e07104c
[Alerting UI] Not showing edit button in rule management UI if rule is not editable in UI (#107801)
* Should not show edit button on rule management page if rule not editable in stack

* Disabling edit button in collapsed actions

* Adding tests for collapsed item actions component

* Cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 16:18:10 -04:00
Sandra G baa903d539
move rules creation out of closing popover (#107957)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 16:12:53 -04:00
Dario Gieselaar b4a736c28f
[APM] Add telemetry to links into backend views (#107872) 2021-08-10 16:07:36 -04:00
Joe Portner c21272cc5b
Sharing saved objects developer guide (#107099) 2021-08-10 16:02:45 -04:00
Sandra G bc25c0fca9
[Stack Monitoring] Rename alerts to rules (#107654)
* rename constants and alert types to rules

* update test language

* update BaseRule properties to rule

* change rawAlert to sanitizedRule

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 16:02:14 -04:00
Devon Thomson faf6482e01
[Input Controls] Options List Embeddable, Factory & Frame (#106877)
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
Co-authored-by: andreadelrio <delrio.andre@gmail.com>
2021-08-10 15:48:07 -04:00