Commit graph

38094 commits

Author SHA1 Message Date
Marco Liberati
c8b8a0ae9c
[Lens] Avoid unnecessary data fetching on dimension flyout open (#82957)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-16 14:35:12 +01:00
Christos Nasikas
01b1710eb7
[Security Solution][Case] Change case connector minimum required license to basic (#83401) 2020-11-16 15:34:40 +02:00
kaisecheng
9d40dab794
fix logstash central pipeline management test (#83281)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-16 14:00:18 +01:00
Anton Dosov
f60abf368a
[Search] Send to background UI (#81793)
Also adds xpack.data_enhanced.search.sendToBackground.enabled config option
2020-11-16 13:11:23 +01:00
Pierre Gayvallet
d1abc866d4
Migrate /translations route to core (#83280)
* move i18n route to core

* add FTR test for endpoint
2020-11-16 12:15:35 +01:00
Dario Gieselaar
66def097ad
[APM] Ensure APM jest script can run (#83398) 2020-11-16 11:54:57 +01:00
Shahzad
daa7cc92f4
[Uptime] Monitor status alert use url as instance (#81736)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-16 11:54:19 +01:00
Robert Oskamp
406a568d0c
[ML] Add basic license test run details to ML+Transform READMEs (#83259)
This PR updates the READMEs of the ml and transform plugins to include instructions how to run basic license tests.
2020-11-16 10:25:42 +01:00
Alexey Antonov
253495b6d7
TSVB doesn't communicate it's index-patterns to dashboard (#82964)
* TSVB doesn't communicate it's index-patterns to dashboard

Closes: #81476

* useCustomSearchSource -> getUsedIndexPattern

* fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-16 10:45:36 +03:00
Yuliia Naumenko
228387cb6e
[Alerting UI] Added ability to assign alert actions to resolved action group in UI (#83139)
* Added ability to assign alert actions to resolved action group in UI

* Added unit test

* Fixed due to comments
2020-11-15 09:49:17 -08:00
Tyler Smalley
bd084396f9 Skips Vega test
https://github.com/elastic/kibana/issues/83385

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-14 13:48:20 -08:00
spalger
ac70807459 skip flaky suite (#79967) 2020-11-14 13:53:39 -07:00
John Schulz
380fa5b3f6
[bundle optimization] Update to semver 7.x to get tree-shaking (#83020)
## What's changed in this PR
### Update to latest available `semver`: `7.3.2`
 * `semver` 5.x pulls in the entire library in one large file (~38k uncompressed / ~9k gz), when we might only use 1-2K.
 * `semver` 7.0+ supports tree-shaking: https://github.com/npm/node-semver/blob/master/CHANGELOG.md#700

### Update paths to only import individual function(s) used instead of the entire library
  * Getting the smaller bundle requires a different import style [as shown in the docs](https://github.com/npm/node-semver#usage)
  * Only changed code in `public` & `common` folders; not `server`. We could also update `server` as well for consistency, but I skipped because the new import style is more verbose and the filesize didn't seem as important on the server

### Results
The build stats show a 10K+ improvement for initial page bundles https://github.com/elastic/kibana/pull/83020#issuecomment-724724432

| id | [before](c6afc47f32) | [after](213bb52a8c) | diff |
| --- | --- | --- | --- |
| `ingestManager` | 386.2KB | 373.9KB | -12.3KB |
| `telemetry` | 63.5KB | 50.1KB | -13.5KB |
| `upgradeAssistant` | 74.5KB | 60.5KB | -14.0KB |
| total |  |  | -39.7KB |

### The import paths look odd. Are they required?
I agree and, no, they're not strictly required. If you'd like me to revert to the prior style just drop a comment and I'll undo them.

The caveat is that the current style (in `master` & this PR) pulls in the entire `semver` library. In 7.x that added ~15K to the initial size. Some more details in the comments: https://github.com/elastic/kibana/pull/83020#issuecomment-724859130

### Possible issues
Moving 2 major versions. We're currently on 5.7 and the latest available is 7.3. 
  * changelog says 5.x (our current) to 6.0 should be safe: https://github.com/npm/node-semver/blob/master/CHANGELOG.md#60
  * There 6.x & 7.x changes all appear to be new features or bugfixes around the `includePrerelease` flag added in 5.6, but I'm not sure if those "fixes" will break existing code
    * https://github.com/npm/node-semver/blob/master/CHANGELOG.md#613
    * https://github.com/npm/node-semver/blob/master/CHANGELOG.md#722

### Stats / screenshots
generated with `node scripts/build_kibana_platform_plugins.js --profile --focus=ingestManager`
<details><summary><b>Ingest Manager in `master`</b>: imports entire `semver` lib, totals 40k+, only 1 large file (orange arc below)</summary>

<img width="972" alt="Screen Shot 2020-11-09 at 6 50 23 PM" src="https://user-images.githubusercontent.com/57655/98666188-a50ac380-231a-11eb-9b8a-6ca784752714.png">
</details>

<details><summary><b>Ingest Manager in PR after upgrade to 7</b>: still imports entire lib. file size *increased* to ~60k, but now individual files are imported (orange arcs below)</summary>
<img width="825" alt="Screen Shot 2020-11-09 at 5 46 30 PM" src="https://user-images.githubusercontent.com/57655/98666355-e602d800-231a-11eb-803f-bc04beb4eaf1.png">
<img width="963" alt="Screen Shot 2020-11-09 at 5 47 06 PM" src="https://user-images.githubusercontent.com/57655/98666357-e69b6e80-231a-11eb-92d3-c66904f92c30.png">
</details>

<details><summary><b>Ingest Manager in PR after changing `import`s:</b> total imported size down to ~20k. Can see individual imported files</summary>
<img width="926" alt="Screen Shot 2020-11-10 at 6 10 23 AM" src="https://user-images.githubusercontent.com/57655/98667058-e64fa300-231b-11eb-9690-5e36ed6475e0.png">
<img width="895" alt="Screen Shot 2020-11-10 at 6 10 53 AM" src="https://user-images.githubusercontent.com/57655/98667059-e780d000-231b-11eb-8abf-98d8bdbcf061.png">
</details>

### Checklist

- [ ] [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
2020-11-14 07:32:02 -05:00
Yuliia Naumenko
4ad3cefec9
Added ability to fire actions when an alert instance is resolved (#82799)
* Added ability to fire actions when an alert instance is resolved

* Fixed due to comments

* Fixed merge issue

* Fixed tests and added skip for muted resolve

* added test for muted alert

* Fixed due to comments

* Fixed registry error message

* Fixed jest test
2020-11-13 17:35:04 -08:00
Pete Harverson
dde2d112d0
[ML] Adds functional tests for the index data visualizer card contents (#83174)
* [ML] Adds functional tests for the index data visualizer card contents

* [ML] Fix translations

* [ML] Fix type errors in permissions tests

* [ML] Address comments from review
2020-11-13 09:39:33 +00:00
Marshall Main
4dd25fad59
[Security Solution][Detections] Adds framework for replacing API schemas (#82462)
* Adds framework for replacing API schemas

* Update integration tests with new schema

* Fix response type on createRule helper

* Add unit tests for new rule schema, add defaults for some array fields, clean up API schema definitions

* Naming updates and linting fixes

* Replace create_rules_bulk_schema and refactor route

* Convert update_rules_route to new schema

* Fix missing name error

* Fix more tests

* Fix import

* Update patch route with internal schema validation

* Reorganize new schema as drop-in replacement for create_rules_schema

* Replace updateRulesSchema with new version

* Cleanup - remove references to specific files within request folder

* Fix imports

* Fix tests

* Allow a few more fields to be undefined in internal schema

* Add static types back to test payloads, add more tests, add NonEmptyArray type builder

* Pull defaults into reusable function
2020-11-12 21:22:13 -05:00
Constance
35faf8c6ca
[Enterprise Search] Share Loading component (#83246)
* Add basic Loading component

- for pages with shifting layouts or where skeletal loading doesn't make sense

* Move Loading to shared components

* Update WS to use new shared Loading component

* Fix for non-Layout WS Overview page

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
2020-11-12 17:02:47 -08:00
Tyler Smalley
aba2068291
Consolidates Jest configuration files and scripts (#82671)
Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to  previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project.

OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest`

Blocker to #72569

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-12 16:19:56 -08:00
Nathan L Smith
452d4c8a8f
APM header changes (#82870)
- Make APM and UX headers size medium instead of large
- Remove margin around APM main container
- Make APM tabs condensed
- Switch environment filter and date picker positions
- Move search bar (kuery + date picker) below the tabs
- Wrap pages in `EuiPage` components
- Set a minimum width on the enironment selector so it doesn't collapse when loading
- Don't show search bar on service map

Fixes #81954.
2020-11-12 16:26:37 -06:00
Frank Hassanabad
18cea00f2f
[Security Solutions] Adds a default for indicator match custom query of *:* (#81727)
## Summary

Allows for Indicator matches to have a default of `*:*` for the query field when it is selected.

Before, indicator query is blank when first selecting the rule:
<img width="1037" alt="Screen Shot 2020-11-05 at 5 44 50 PM" src="https://user-images.githubusercontent.com/1151048/98312312-afc9ff00-1f8e-11eb-822b-ad95104ca54e.png">

After, indicator query is by default `*:*` unless the user has previously edited the query field:
<img width="1038" alt="Screen Shot 2020-11-05 at 5 45 38 PM" src="https://user-images.githubusercontent.com/1151048/98312363-cb350a00-1f8e-11eb-9137-8da2f770ec7e.png">

Adds a stable reference for threat matching to determine when the query field has been modified or not. This is keep the current behavior and the rules operate like this:

* If you select an indicator match rule and nothing has been previously edited it will select `*:*` for the query
* If you have modified your custom query and select indicator match rule, then `*:*` will be replaced with that custom query and `*:*` will not be used.
* If you select EQL rule and then _back_ to this rule type the `*:*` will be re-inserted and `edit: true` will flip back to false, due to the magic that is keys within React and how the EQL rule type relies on that.
 
### Checklist

Delete any items that are not applicable to this PR.

- [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2020-11-12 14:57:57 -07:00
Dan Panzarella
d52415c060
[Security Solution] Note 10k object paging limit on Endpoint list (#82889) 2020-11-12 16:33:05 -05:00
Spencer
74e07d2390
[packerCache] fix gulp usage, don't archive node_modules (#83327)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-11-12 14:03:44 -07:00
Thomas Watson
4c49d5d1be
Upgrade Node.js to version 12 (#61587) 2020-11-12 22:00:57 +01:00
ymao1
3412843958
[Actions] Removing placeholders and updating validation messages on connector forms (#82734)
* Removing placeholders. Updating validation messages

* Splitting out url and protocol validation

* Adding url validation for slack webhook urls

* Fixing test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-12 15:07:12 -05:00
Nicolas Chaulet
fed9a4fddc
[Fleet] Rename ingest_manager_api_integration tests fleet_api_integration (#83011) 2020-11-12 13:50:59 -05:00
gchaps
0e565bfd52
[DOCS] Updates Discover docs (#82773)
* [DOCS] Updates Discover docs

* Update docs/user/discover.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/discover.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/discover.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/discover.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/discover.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/discover.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/discover.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/discover.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/discover.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* [DOCS] Incorporates review comments

* [DOCS] More changes based on edits

* [DOCS] Edits per lastest review

* [DOCS] Added redirects

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2020-11-12 09:43:45 -08:00
Melissa Alvarez
6519b83e48
[ML] Data frame analytics: Adds map view (#81666)
* add analytics map endpoint and server model

* add map action to job and models list

* wip:fetch models for jobs. Use url generator

* get models when extending node. deduplicate elements

* add job type icons. disable map action if job not finished.

* move shared const to common dir

* persist map tab. handle indexPattern from visualizer

* use url generator in models list

* temporarily disable delete action in flyout

* update legend style. make map horizontal

* update dfa model to use spaces changes

* format creation time

* update from indexPattern to index.remove refresh button

* handle index patterns with wildcard
2020-11-12 12:40:08 -05:00
Gidi Meir Morris
3151e7e5e4
enables actions scoped within the stack to register at Basic license (#82931)
Enables actions scoped within the stack to register at Basic license
2020-11-12 17:31:44 +00:00
Dima Arnautov
6e9177caac
[ML] Update apidoc config with the Trained models endpoints (#83274)
* [ML] fix apidoc annotations

* [ML] add trained models

* [ML] use full path to the apidoc-markdown package
2020-11-12 17:51:42 +01:00
Paul Tavares
1babb5f6bf
[Fleet] IngestManager Plugin interface for registering UI extensions (#82783)
* Expose `registerExtension()` interface on `Plugin#start`
* Refactor use of `CustomConfigurePackagePolicy` to the new registerExtension approach
* Refactor to always show registered ui extension (even if Integration has configuration options)
2020-11-12 11:44:15 -05:00
Gidi Meir Morris
ab72206da3
[Alerting] Moves the Index & Geo Threshold UIs into the Stack Alerts Public Plugin (#82951)
This PR includes the following refactors:
1. Moves the Index Pattern Api from _Stack Alerts_ to the _Server_ plugin of _Trigger Actions UI_. This fixes a potential bug where a user could disable the _Stack Alerts_ plugin and inadvertently break the UI of the _ES Index _ action type.
2. Extracts the UI components for _Index Threshold_ and _Geo Threshold_ from the _Trigger Actions UI_ plugin and moves them into _Stack Alerts_.
2020-11-12 16:39:40 +00:00
John Schulz
208e86e66a
[Ingest Manager] Lift up registry/{stream,extract} functions (#83239)
## Summary

  * Move stream utility functions from `server/services/epm/registry/streams.ts` to `server/services/epm/streams.ts`
    * They're only used in registry at the moment but aren't specific to registry 
  * Move archive extraction functions from `server/services/epm/registry/extract.ts` to `server/services/epm/archive.ts`
    * The Registry isn't the only service/code which needs to extract packages. Continue consolidating archive-related code under archive vs registry
2020-11-12 11:05:17 -05:00
Tim Sullivan
4932dc55a6
[Reporting] Move "common" types and constants to allow cross-plugin integration (#83198) 2020-11-12 08:58:05 -07:00
Joe Reuter
f1f26729be
[Lens] Add suffix formatter (#82852) 2020-11-12 16:49:47 +01:00
Constance
bd99b19bd8
[App Search] Version documentation links (#83245)
* Fix CURRENT_MAJOR_VERSION for use in Elastic docs links

- Was previously just sending (e.g.) "7". instead of "7.9"

* Add App Search DOCS_PREFIX constant

- follow WS's example

* Update all App Search doc links to use prefixed URLs

- except for Enterprise Search setup guide, which should be updated to use a shared URL at some point in any case
2020-11-12 07:42:41 -08:00
Anton Dosov
eaa65535ed
Use saved object references for dashboard drilldowns (#82602) 2020-11-12 15:54:55 +01:00
Bohdan Tsymbala
58ad7ecd5a
Btsymbala/registered av (#81910)
* Moved out type for OperatingSystem and moved OS translations one level higher.

* Changed the translation to be consistent between trusted apps and policy.

* Unified translations of OS types between trusted apps and policy.

* Removed unused types.

* Added registered AV form section.

* Changed the property structure to match the format expected by endpoint.

* Fixed the visual alignment of titles in the form and added responsiveness.

* Updated snapshots.

* Moved out type for OperatingSystem and moved OS translations one level higher.

* Added config form heading component.

* Cleaned up translations.

* Fixed type error with initialization.

* Fixed error in trusted app creation form test.

* Removed the guard for now in favour of better initialization.

* Fixed the store test.

* Fixing functional test data.

* Added functional test config option to account for a custom header within security app.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-12 15:53:53 +01:00
Dario Gieselaar
afbf1a983a
[APM] Errors table for service overview (#83065) 2020-11-12 15:49:22 +01:00
Maja Grubic
55519665d6
[Advanced Settings] Introducing telemetry (#82860)
* [Advaned Settings] Introducing telemetry

* Publishing doc changes

* Move metric tracking to onSave method

* Adding deprecated warning

* Updating docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-12 14:38:07 +00:00
Patrick Mueller
c3e57943ad
[alerts] add executionStatus to event log doc for action execute (#82401)
resolves https://github.com/elastic/kibana/issues/79785

Until now, the execution status was available in the the event
log document for the execute action.  In this PR we add it.

The event log is extended to add the following fields:

- `kibana.alerting.status` - from executionStatus.status
- `event.reason`           - from executionStatus.error.reason

The date from the executionStatus and start date in the event
log will be set to the same value.

Previously, errors encountered while trying to execute an
alert executor, eg decrypting the alert, would not end up
with an event doc generated.  Now they will.

In addition, there were a few places where events that could
have had the action group in them did not, and one where the
instance id was undefined - those were fixed up.
2020-11-12 09:32:22 -05:00
Scotty Bollinger
35656b9921
Add additional sources routes (#83227)
These were missed in #83125
2020-11-12 08:28:35 -06:00
Dima Arnautov
169dcef2bf
[ML] Persisted URL state for the "Anomaly detection jobs" page (#83149)
* [ML] table config in the URL state

* [ML] fix job list on the management page

* [ML] store query filter in the URL

* [ML] fix context for the management page

* [ML] update module_list_card.tsx in Logs UI

* [ML] fix unit tests

* [ML] fix unit tests

* [ML] fix unit tests

* [ML] move utils functions

* [ML] url generator to support both job and group ids
2020-11-12 15:16:23 +01:00
Alejandro Fernández Gómez
0e7bcf6164
[Logs UI] Add pagination to the log stream shared component (#81193)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-12 15:11:43 +01:00
Yulia Čech
3a849ff104
[Index Management] Add an index template link to data stream details (#82592)
* Add index template link to data stream details

* Fixed ILM policy link and added a check for index template name after navigation

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-12 15:05:08 +01:00
Thomas Neirynck
4d346cdfc0
Add maps_oss folder to code_owners (#83204) 2020-11-12 09:04:08 -05:00
Anton Dosov
b8576ed2dd
fix truncation issue (#83000) 2020-11-12 13:13:35 +01:00
John Schulz
4721b3211a
[Ingest Manger] Move asset getters out of registry (#83214)
## Summary
Packages/Archives aren't limited to the registry any longer.  Continue moving file- & cache-related functions from services/registry to services/archive.

Move `getAsset` and `pathParts` to archive/index. The behavior is the same for now, but it's more accurate to separate these from registry namespace.

Registry has `fetch*` and other functions for dealing with the online service.
2020-11-12 05:47:43 -05:00
Thomas Watson
5a91818baa
Remove unused asciidoc file (#83228) 2020-11-12 10:11:48 +01:00
Marta Bondyra
268bd09543
[Lens] Remove background from lens embeddable (#83061) 2020-11-12 09:09:28 +01:00
Matthias Wilhelm
b44a0e5b02
[Discover] Unskip flaky tests based on discover fixture index pattern (#82991) 2020-11-12 05:45:17 +01:00