Commit graph

1939 commits

Author SHA1 Message Date
Tiago Costa 49cc25886c
chore(NA): moving @kbn/securitysolution-io-ts-list-types to babel transpile (#109750)
* chore(NA): moving @kbn/securitysolution-io-ts-list-types to babel transpiler

* chore(NA): add a browser target

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-26 18:10:46 +01:00
Alejandro Fernández Haro bb8ee0ce05
Enable Product check from @elastic/elasticsearch-js (#107663)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-26 15:36:46 +01:00
Felix Stürmer 137c182761
[RAC] Populate common rule fields in alert helpers (#108679)
Co-authored-by: mgiota <panagiota.mitsopoulou@elastic.co>
2021-08-26 09:19:51 -04:00
Tiago Costa 36eaf7fd58
chore(NA): enables @babel/plugin-transform-runtime to decrease output size (#109843)
* chore(NA): enables @babel/plugin-transform-runtime to decrease output size

* chore(NA): update @kbn/pm bundle

* chore(NA): missing config on corejs for runtime

* fix(NA): flaky unit test

* chore(NA): update limits file

* chore(NA): remove corejs

* chore(NA): old config files

* chore(NA): update limmits file

* chore(NA): updated yarn lock file

* chore(NA): update limits

* chore(NA): restore original test file

* chore(NA): skip flaky test

* chore(NA): skip another failing test
2021-08-25 22:24:38 +01:00
Mikhail Shustov 2430673d44
convert ftr runners into TS (#110057) 2021-08-25 14:59:30 -05:00
Tiago Costa 85a79ac3ad
chore(NA): moving @kbn/securitysolution-io-ts-alerting-types to babel transpiler (#109745)
* chore(NA): moving @kbn/securitysolution-io-ts-alerting-types to babel transpiler

* chore(NA): correct deps on runtime
2021-08-25 18:02:14 +01:00
Georgii Gorbachev 8ce1d10791
[RAC] Fix index names used by RBAC, delete hardcoded map of Kibana features to index names (#109567)
**Ticket:** https://github.com/elastic/kibana/issues/102089

🚨 **This PR is critical for Observability 7.15** 🚨

## Summary

This PR introduces changes that fix the usage of alerts-as-data index naming in RBAC. It builds on top of https://github.com/elastic/kibana/pull/109346 and replaces https://github.com/elastic/kibana/pull/108872.

TODO:

- [x] Address https://github.com/elastic/kibana/pull/109346#pullrequestreview-735158370
- [x] Make changes to `AlertsClient.getAuthorizedAlertsIndices()` so it starts using `RuleDataService` to get index names by feature ids.
- [x] Delete the hardcoded `mapConsumerToIndexName` where we had incorrect index names.
- [x] Close https://github.com/elastic/kibana/pull/108872

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [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-25 16:29:16 +02:00
Stacey Gammon e097adbb6a
API Doc Fixes (#109685)
* Fixes

- Fix bad formatting of deprecated apis by plugin
- Collect deprecated apis recursively
- Include unreferenced apis in Deprecated apis by API page.

* Fix unreferenced dep list

* check in updated docs

* Fix the issue with saved objects management plugin docs not being included

* adding the new docs after fixing some docs missing

* update api docs
2021-08-24 13:42:23 -04:00
Nathan Reese 84be1c500e
[maps] remove xpack.maps.showMapVisualizationTypes (#105979)
* [maps] remove xpack.maps.showMapVisualizationTypes

* remove settings from xpack_plugins

* eslint

* new telemetry_check parser features

* remove xpack.maps.showMapVisualizationTypes from functional test config

* remove unused const destruct

* update expect for functional test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Ahmad Bamieh <ahmadbamieh@gmail.com>
2021-08-24 10:46:40 -06:00
Dmitry Shevchenko 1f73c0fcfa
Cleanup after ExecLog integration (#107695) 2021-08-24 11:37:29 -04:00
Stacey Gammon 52ee65b8d5
Make owner attribute required on kibana.json (#108231)
* make owner attribute required

* Add owner properties in more places

* add test for owner attribute

* add error check too in the test

* Fix tests

* fix tests and update docs

* wip

* More test fixes

* Fix All The Errorz

* Adding more owner attributes

* Update x-pack/test/saved_object_api_integration/common/fixtures/saved_object_test_plugin/kibana.json

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* Update x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/kibana.json

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* commeeeooonnnn

* Update docs

* soooo many kibanajsons

* adjust plugin generator to add an owner

* Add owner to the plugin generator scripts

* update snapshot

* Fix snapshot

* review updates

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-24 10:02:32 -04:00
Liza Katz 268a279930
[Data][Es Query] Use ES types in Filters (#108378)
* es-query types

* jest and lint

* cc

* options

* type

* types for kuery FUNCTIONS

* doc

* types for filters

* sec fixes

* filtersss

* typey type

* typey type

* comparator options

* test typescript

* test

* fixes

* test types

* test

* cr

* cleanup a bit more

* Jest fix + types

* Remove geo bounding box and geo polygon filters

* delete geo filters

* geo

* geo

* Fix tests \_0_/

* doc

* types and fixes

* jests

* ts

* Remove geo bounding box and geo polygon filters

* delete geo filters

* delete geo filters

* geo

* remove geo docs

* ts

* plg ts

* types

* cast

* Update types.ts

* Update create_threat_signal.ts

* Update packages/kbn-es-query/src/es_query/migrate_filter.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Code review

* revert change

* docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
2021-08-24 11:28:22 +02:00
Tiago Costa 9a3e8ef054
chore(NA): moving @kbn/securitysolution-t-grid to babel transpiler (#109442)
* chore(NA): moving @kbn/securitysolution-t-grid to babel transpiler

* chore(NA): fix package.json

* chore(NA): finetunning package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-23 15:54:15 +01:00
Tiago Costa 3128c99d54
chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler (#109426)
* chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-es-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

* chore(NA): correct deps

* chore(NA): finetunning package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
2021-08-23 15:51:31 +01:00
Tiago Costa 9a7ebb7b2c
chore(NA): moving @kbn/securitysolution-hook-utils to babel transpiler (#109432)
* chore(NA): moving @kbn/securitysolution-hook-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-hook-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

* chore(NA): correct deps

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
2021-08-23 15:26:42 +01:00
Dario Gieselaar 6e3af2b524
[APM] Support multiple route paths in useApmParams (#109370)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-23 15:38:06 +02:00
Joe Portner 65e04b1380
Remove spacesOss plugin (#109258) 2021-08-23 15:10:09 +02:00
Yaroslav Kuznietsov 237fcac254
[Canvas] Expression tagcloud (#108036)
* Added `expression_tagcloud` plugin.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-23 06:52:19 -04:00
Tiago Costa e340ce61cc
chore(NA): moving @kbn/securitysolution-autocomplete to babel transpiler (#109423)
* chore(NA): moving @kbn/securitysolution-autocomplete to babel transpiler

* chore(NA): finetune package

* chore(NA): update deps

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-21 00:08:22 -04:00
Tiago Costa c4d1e7da4a
chore(NA): moving @kbn/alerts to babel transpiler (#109320)
* chore(NA): moving @kbn/alerts to babel transpiler

* chore(NA): finetune package

* chore(NA): miss dep

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 18:55:18 -04:00
Tiago Costa f4e18d47c0
chore(NA): moving @kbn/securitysolution-utils to babel transpiler (#109439)
* chore(NA): moving @kbn/securitysolution-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
2021-08-20 22:04:39 +01:00
Devon Thomson 95463f47f3
[Dashboard] Remove Legacy Dashboard Only Mode (#108103)
Remove all dashboard only mode code and tests. Align dashboard permissions to use showWriteControls only
2021-08-20 15:39:10 -04:00
Tiago Costa ec2d041638
chore(NA): moving @kbn/ui-shared-deps to babel transpiler (#109323)
* chore(NA): moving @kbn/ui-shared-deps to babel transpiler

* fix(NA): missing correct paths on package.json files

* chore(NA): update jest integration snapshots

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 17:12:08 +01:00
Tiago Costa 9fb152a92f
chore(NA): moving @kbn/logging to babel transpiler (#108702)
* chore(NA): moving @kbn/logging to babel transpiler

* chore(NA): fix imports for @kbn/logging

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 11:54:46 +01:00
Tiago Costa 9c24e8f70f
chore(NA): moving @kbn/interpreter to babel transpiler (#108512)
* chore(NA): moving @kbn/interpreter to babel transpiler

* chore(NA): fix imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 11:50:40 +01:00
Tiago Costa cfd5dad174
chore(NA): moving @kbn/optimizer to babel transpiler (#109231)
* chore(NA): adds 7.16 into  backportrc

* chore(NA): moving @kbn/optimizer to babel transpiler
2021-08-19 19:40:50 +01:00
Tiago Costa a7fe773bb8
chore(NA): moving @kbn/plugin-helpers to babel transpiler (#109085)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-19 19:13:33 +01:00
Spencer 7e2bd4fd54
[ftr] rework ciGroup validation to remove JOBS.yml and avoid duplication (#109149)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-19 11:40:23 -05:00
Mikhail Shustov 76eafd8803
exclude tsx test and mock files from test coverage (#109203) 2021-08-19 09:26:24 -05:00
Tiago Costa df112dd880
chore(NA): moving @kbn/plugin-generator to babel transpiler (#109083)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-19 12:27:42 +01:00
mgiota 8c8dca6ad2
[RAC] [Observability] Use simpler alert severity level mapping (#109068)
* [RAC][Observability] remove severity fields from mapping keep only ALERT_SEVERITY

* temporarily remove severity value occurences

* remove ALERT_SEVERITY_VALUE occurences, this value is not being read and shown in the Observability alerts table

* remove duplicate ALERT_SEVERITY identifier

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 16:29:24 -04:00
Tiago Costa 51c15945f2
chore(NA): moving @kbn/mapbox-gl to babel transpiler (#109082)
* chore(NA): moving @kbn/mapbox-gl to babel transpiler

* chore(NA): structure exports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 15:51:52 -04:00
Nathan Reese dd9dd52718
[maps] remove tile_map, region_map, and maps_legacy plugins (#105326)
* [maps] remove tile_map plugin

* initial bounds

* update embeddable query context

* start editor

* remove tile_map from tsconfig and i18n cleanup

* implement view in maps button

* tslint

* remove empty lines

* remove tileMap from limits.yml

* remove region_map and maps_legacy plugins

* region_map vis with Map embeddable

* make MapComponent

* lint

* clean up

* shorten text

* lint

* remove region_map from interpreter functional tests

* update docs

* add migration for removing ui_settings

* remove tile_map and region_map functional tests

* tslint

* call handlers.done when layers are loaded

* fix visualize create menu test

* eslint

* add owner comment to ui_settings/saved_objects/migrations.ts

* remove deleted plugins from codeowners

* review feedback

* use correct value for TILE_MAP_RENDER

* down select mapModules for getLayerDescriptors callback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 12:51:31 -06:00
Yara Tercero 9fa41d1aef
[Security Solution] - Updating UI to work with new kibana privileges abstraction on alerts (#108961)
## Summary

Holy moly. 

What is happening in this PR? 🤷🏽‍♀️ Let's break it down:
- Added a package `@kbn/alerts` - another one?! ...yes
  - This is meant to add shared hooks and components around alerts as data
  - `useGetUserAlertsPermissions` - accepts the Kibana capabilities object and returns whether the user has `read` and `crud` alerts privileges
  - `AlertsFeatureNoPermissions` - component displayed when user does not have alerts privileges
- UI changes for user with NO alerts privileges
  - `Alerts` tab hidden in security solution side navigation
  - `Alerts` tab hidden in rule details page  
- UI changes for user with alerts READ ONLY privileges
  - alerts checkboxes hidden in alerts table
  - alerts bulk actions hidden in alerts table
2021-08-18 14:48:31 -04:00
Liza Katz 6a1a1afd3a
[Data cleanup] Remove geo filters (#109097)
* Remove geo bounding box and geo polygon filters

* delete geo filters

* delete geo filters

* geo

* remove geo docs
2021-08-18 17:08:42 +02:00
Marshall Main 05d1e326a4
[RAC][Security Solution] Remove ALERT_RULE_ID in favor of ALERT_RULE_UUID (#108922)
* Remove ALERT_RULE_ID in favor of ALERT_RULE_UUID

* Update snapshot

* KEVINNN

* fix test

* Add back home.disableWelcomeScreen=true

* Only disable welcome screen in security solution cypress tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 10:37:14 -04:00
Tiago Costa 5d404fff6b
chore(NA): moving @kbn/legacy-logging to babel transpiler (#108703) 2021-08-17 22:24:48 +01:00
Dominique Clarke 15494cd25f
uptime - index default severity of warning for tls and monitor status alerts (#108731)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-17 12:10:00 -04:00
Mikhail Shustov 94f35087b0
fix another conflict in test file (#108905) 2021-08-17 15:29:02 +02:00
Mikhail Shustov 609bd90785
mute incorrect types in es-query (#108898)
* mute incorrect types in es-query

* fix another conflict
2021-08-17 15:21:14 +02:00
Liza Katz 9d1a8a87f8
[Data][Es Query] Use ES types in Kuery functions (#108367)
* es-query types

* jest and lint

* cc

* options

* type

* types for kuery FUNCTIONS

* doc

* sec fixes

* typey type

* test typescript

* test

* fixes

* test

* cr

* cleanup a bit more

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-17 11:49:16 +02:00
Tyler Smalley 689d974729
Removes supertest-as-promised dependency (#100486)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-08-16 18:01:34 -07:00
Kerry Gallagher 85e07662d8
[RAC] Disable RAC multi-tenancy (#108506)
* Disable RAC multi-tenancy
2021-08-16 20:01:27 +01:00
Dominique Clarke 024eeed3c3
[Uptime] adjust RAC RBAC and index settings (#108200)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 14:01:01 -04:00
Tiago Costa 29b1fc3030
chore(NA): moving @kbn/docs-utils to babel transpiler (#108190)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 10:20:33 -04:00
Ryland Herrick a9844db461
[Security Solution][CTI] Update legacy CTI signals to latest ECS threat fields (#107988)
* WIP: Adding integration test

* Replace threat.indicator mappings with threat.enrichments mappings

The nested threat.indicator mappings were experimental, and replaced by
threat.enrichmentsin ECS 1.10. While these fields are also experimental,
they fix the conflict between CTI data's normal threat.indicator
mappings.

* Add threat.enrichments mappings to our signals template mappings

event.* is no longer nested within here; it was determined that event
fields were not relevant to enrichment. All relevant ECS fieldsets
(file, pe, etc) are now nested under threat.enrichments.

* Update snapshot with newest threat.enrichments mappings

This test is a snapshot of the actual mappings applied by our templates. Looks good to me!

* Update ECS types to match latest

We now have two threat fields we care about for CTI, for legacy and
official ECS.

* Add a basic test for behavior of legacy enriched signals.

They're still queryable by threat.indicator, meaning that any existing
dashboards will still work.

* WIP: First pass at a data migration for CTI signals

* Defines reindex script to move things around
* Adds integration tests to make sure the migration and new mappings
  work
* Need to test a few more things and verify corner cases
* Need to extract some helpers from tests

* Bump our template version to ensure devs roll over

Marshall bumped to 55, giving us 10 versions for 7.14.x updates.
However, devs would not otherwise roll over and get my mapping updates
without destroying their signals index and rebuilding (which is also not
the same thing, exactly), so this trades having one higher signals
version for a more streamlined dev workflow.

* More robust guard against data migration

We only attempt to migrate legacy enrichments if the document:

* is a signal from an indicator match rule
* has a `threat.indicator` field
* does not have a `threat.enrichments` field

* Minor reorder of operations to make logic clearer

* Add more assertions around our signals data migration

Tests a few more pieces of the resulting document, giving more
confidence that it's the correct transformation (and mappings).

This also modifies/anonymizes the data that was originally generated on
a work machine.

* Remove outdated note

This was for when these tests were driven via the UI; the API is more
responsive and now synchronization is currently needed here, beyond the
200 responses.

* Fix typo in comment

These fields are in ECS 1.11.

* Update snapshot test

We bumped the version previously, causing this test to become outdated.

* Update ECS typings in timelines plugin

These were copied from the security_solution plugin. I updated those,
but neglected to update these.

Until there's a better mechanism for deduplication here, I'm going to
kick the can and update both for now.

* Update enrichments logic to read/write from threat.enrichments

* indicator match rule logic
  * we now simply copy from the specified indicator path, and place that
    in `threat.enrichments.indicator`
* event enrichment API logic
  * We were previously returning fields from `indicator.*`, we now
    include the `indicator.*` suffix in order to be more consistent with
    the sibling `matched.*` fields
* row renderer logic
  * removal of dataset
  * updates relevant to API changes above

* Fix logical error in generating links from indicator fields

We want to link the reference field, not a `first_seen` field.

* Always include the indicator prefix in first-party indicator fields

Prior to this change we would display e.g. `threatintel.indicator.foo`
for investigation enrichment fields. Now that the structure has changed
slightly and we return both `indicator.*` and `matched.*` fields for
existing enrichents, we want to display investigation enrichment
similarly.

* Update indicator match rule integration tests

Now that we've updated our enrichment logic, we need to update our
enrichment tests.

* Remove unused translation

* Update example row renderer data for enriched alerts

* Update parallel CTI constants to get our CTI row renderer working

We were not requesting the necessary fields for our row renderer, since
these constants (specifically CTI_ROW_RENDERER_FIELDS) now exist in both
security_solution and the timelines plugin. I had updated the former,
but only the latter is actually used.

* Update CTI enrichment UI tests

* Update prepackaged threat timeline template with new threat fields

Also bumps the timelineTemplateVersion.

* Update Indicator Match rule tests

These needed three things:

* Update to timeline template (see previous commit)
* Changing expectations from `threat.indicator` to `threat.enrichments`
* Update row renderer expectation to exclude dataset

* Update mock data with newest CTI enrichment fields

* Fix assertion on our threat details

These fields are prefixed with `indicator` now because:

1. This data pertains to the indicator, not the match per se
2. The actual field is prefixed with indicator (or, it at least
   specifies an indicator in the case of a custom threat index (via
   threat_indicator_path))

* Update test data and tests for our field parsing helpers

* Update more event-parsing tests

Ths one involved updating a mock in another package.

* Modify our helper function to support old filebeat indicators

When we query indicators for enrichment matches, the current expectation
is that we'll be querying 7.14 filebeat modules, which have an indicator
path of 'threatintel.indicator'. The only place that matters on the UI
is on the threat intel panel, where these indicators come back with such
a prefix.

This change has one behavior: it brings back the `provider` field on the
Alert summary tab for queried enrichments from filebeat modules.

* Update variable and method names to be more consistent with internal terminology

Indicators come from a CTI index. Enrichments are the application of
indicator data to other documents, and contain both indicator fields and
matched context.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-14 01:57:23 -04:00
Sergi Massaneda a7661a553c
[TGrid] Alerts status update use RAC api (#108092)
Co-authored-by: Devin Hurley <devin.hurley@elastic.co>
2021-08-13 22:11:53 -04:00
Tiago Costa 79f1e18686
chore(NA): moving @kbn/io-ts-utils to babel transpiler (#108517)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-13 18:39:35 +01:00
Tiago Costa 560bd0b57b
chore(NA): moving @kbn/es-archiver to babel transpiler (#108370)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-13 18:38:56 +01:00
Dario Gieselaar a474a63a7f
[APM] Make environment & kuery required (#108338) 2021-08-13 09:50:14 -04:00
Caroline Horn ba14713623
[KibanaPageTemplate] Adding a noDataConfig for templated add data screens (#108293) 2021-08-12 20:01:54 -04:00
Liza Katz e91baea5dc
[Data][Es Query] Use ES types instead of DslQuery (#108290)
* es-query types

* jest and lint

* cc

* options

* type

* type
2021-08-12 21:23:33 +02:00
David Sánchez de9d784035
Adds new operatorsList prop in exceptions builder to allow pass a list of operators. Add this prop in event filters form (#108015)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-12 12:59:33 +02:00
Lukas Olson a2347b2d77
Add scoring support to KQL (#103727)
* Add ability to generate KQL filters in the "must" clause
Also defaults search source to generate filters in the must clause if _score is one of the sort fields

* Update docs

* Review feedback

* Fix tests

* update tests

* Fix merge error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 21:45:01 -07:00
Tiago Costa 7860c2aac3
chore(NA): moving @kbn/crypto to babel transpiler (#108189)
* chore(NA): moving @kbn/crypto to babel transpiler

* chore(NA): update configs
2021-08-12 03:09:50 +01: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
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
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
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
spalger 441fb796e2 skip flaky test (#108043) 2021-08-10 23:49:47 -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
Tiago Costa ff9611b136
chore(NA): moving @kbn/storybook to babel transpiler (#107547)
* chore(NA): moving @kbn/storybook to babel transpiler

* chore(NA): fix import from kbn/storybook

* chore(NA): fix public interface

* chore(NA): fix kbn-storybook preset

* chore(NA): update types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 20:26:46 +01:00
Dominique Clarke 1649661ffd
[Observability][Exploratory View] revert exploratory view multi-series (#107647)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 11:52:49 -04:00
Liza Katz 204efae5bf
[Data cleanup] unify serializable state (#107745)
* Use Serializable from package

* Rename to align with core

* fix

* more replacements

* docssss

* fix

* Move it to @kbn/utility-types and remove core export

* buildy build

* tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 13:03:48 +02:00
Dario Gieselaar 78e2bd2788
[APM] Make rangeFrom/rangeTo required (#107717) 2021-08-10 05:56:15 -04:00
Devin W. Hurley ab43afab88
[RAC] [RBAC] Adds bulk update route to rule registry and bulk update function to alerts client (#106297)
Adds a bulk update route (POST /internal/rac/alerts/bulk_update) to the rule registry and bulkUpdate function to the alerts as data client.
2021-08-09 15:39:48 -04:00
Spencer 30f2289883
[perf-testing] send detailed APM data from report generation (#107592)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-09 13:36:02 -04:00
Tiago Costa da8edcbb37
chore(NA): moving @kbn/analytics to babel transpiler (#107781)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-09 17:08:53 +01:00
Tiago Costa 58054c3325
chore(NA): moving @kbn/cli-dev-mode to babel transpiler (#107779)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-09 16:20:34 +01:00
Tiago Costa 2558194f80
chore(NA): moving @kbn/config to babel transpiler (#107763)
* chore(NA): moving @kbn/config to babel transpiler

* chore(NA): fix types

* chore(NA): include missing deps

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-09 16:20:01 +01:00
Matthew Kime d44df74598
[index patterns] index pattern create modal (#101853)
index pattern creation flyout
2021-08-05 22:58:57 -05:00
Xavier Mouligneau 923eca0adf
[RAC] integrating rbac search strategy with alert table (#107242)
### Summary

We are integrating alert search strategy with RBAC on top of alert tables for security solution and o11y.
2021-08-05 21:10:27 -04:00
Marshall Main 28084f858d
[Security Solution] Siem signals -> alerts as data field and index aliases (#106049)
* Add aliases mapping signal fields to alerts as data fields

* Add aliases mapping alerts as data fields to signal fields

* Replace siem signals templates per space and add AAD index aliases to siem signals indices

* Remove first version of new mapping json file

* Convert existing legacy siem-signals templates to new ES templates

* Catch 404 if siem signals templates were already updated

* Enhance error message when index exists but is not write index for alias

* Check if alias write index exists before creating new write index

* More robust write target creation logic

* Add RBAC required fields for AAD to siem signals indices

* Fix index name in index mapping update

* Throw errors if bulk retry fails or existing indices are not writeable

* Add new template to routes even without experimental rule registry flag enabled

* Check template version before updating template

* First pass at modifying routes to handle inserting field aliases

* Always insert field aliases when create_index_route is called

* Update snapshot test

* Remove template update logic from plugin setup

* Use aliases_version field to detect if aliases need update

* Fix bugs

* oops update snapshot

* Use internal user for PUT alias to fix perms issue

* Update comment

* Disable new resource creation if ruleRegistryEnabled

* Only attempt to add aliases if siem-signals index already exists

* Fix types, add aliases to aad indices, use package field names

* Undo adding aliases to AAD indices

* Remove unused import

* Update test and snapshot oops

* Filter out kibana.* fields from generated signals

* Update cypress test to account for new fields in table

* Properly handle space ids with dashes in them

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-05 18:11:17 -04:00
Alejandro Fernández Haro 74107a1fbd
Disable Product check in @elastic/elasticsearch-js (#107642)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-05 15:55:41 -04:00
Chandler Prall c2e834353e
Upgrade EUI to v36.1.0 (#107231)
* Upgrade eui to v36.1.0

* Jest snapshots

* More jest snapshots; one test assertion update

* Bump core page load limit

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-05 13:00:32 -06:00
Anton Dosov af3a976e17
[FieldFormats] Break from data plugin (#107173) 2021-08-05 16:25:22 +02:00
Madison Caldwell d34cd91fc5
[Security Solution][RAC] Flatten alert fields (#107581)
* incremental changes

* No more type errors

* Type guards

* Begin adding tests

* Flatten

* Reduce scope of branch

* Remove extraneous argument to filter_duplicate_signals
2021-08-05 08:09:31 +02:00
Tiago Costa d187259836
chore(NA): moving @kbn/server-route-repository to babel transpiler (#107571)
* chore(NA): moving @kbn/server-route-repository to babel transpiler

* chore(NA): update types
2021-08-05 08:05:34 +02:00
Tiago Costa cfdd92cd29
chore(NA): moving @kbn/telemetry-tools to babel transpiler (#107540) 2021-08-04 22:31:18 +01:00
Yaroslav Kuznietsov dbab7d9f70
[Canvas] Expression progress (#104457)
* Added `expression_progress` plugin.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-04 11:33:01 +03:00
Tiago Costa 7a3436fda3
chore(NA): moving @kbn/server-http-tools to babel transpiler (#107572) 2021-08-03 16:11:54 -05:00
Tiago Costa 7d5f3a2c63
chore(NA): moving @kbn/babel-code-parser to babel transpiler (#107574)
* chore(NA): moving @kbn/babel-code-parser to babel transpiler

* chore(NA): fix package.json main field
2021-08-03 17:06:28 -04:00
Tiago Costa 4351d7c954
chore(NA): moving @kbn/es to babel transpiler (#107577) 2021-08-03 17:02:56 -04:00
Sergi Massaneda b5e8db2443
[RAC] [TGrid] Bulk actions to EuiDataGrid toolbar (#107141)
* tGrid EuiDataGrid toolbar replace utilityBar

* tgrid new prop in observability

* types and translations fixes

* bulkActions props and encapsulation

* update limits

* code cleaning

* load lazy and remove export from public

* add memoization to bulk_actions

* icon change and test fixed

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-03 14:02:44 -04:00
Madison Caldwell 8f9086b4c2
[RAC][Security Solution] Add base Security Rule Type (#105096)
* injects bulkCreate and wrapHits to individual rule executors

* WIP create_security_rule_type_factory based on Marshall's work in #d3076ca54526ea0e61a9a99e1c1bce854806977e

* removes ruleStatusService from old rule executors, fixes executor unit tests

* fixes rebase

* Rename reference_rules to rule_types

* Fix type errors

* Fix type errors in base security rule factory

* Additional improvements to types and interfaces

* More type alignment

* Fix remaining type errors in query rule

* Add validation / inject lists plugin

* Formatting

* Improvements to typing

* Static typing on executors

* cleanup

* Hook up params for query/threshold rules... includes exceptionsList and daterange tuple

* Scaffolding for wrapHits and bulkCreate

* Add error handling / status reporting

* Fixup alert type state

* Begin threshold

* Begin work on threshold state

* Organize rule types

* Export base security rule types

* Fixup lifecycle static typing

* WrapHits / bulk changes

* Field mappings (partial)

* whoops

* Remove redundant params

* More flexibile implementation of bulkCreateFactory

* Add mappings

* Finish query rule

* Revert "Remove redundant params"

This reverts commit 87aff9c810.

* Revert "whoops"

This reverts commit a7771bd392.

* Fixup return types

* Use alertWithPersistence

* Fix import

* End-to-end rule mostly working

* Fix bulkCreate

* Bug fixes

* Bug fixes and mapping changes

* Fix indexing

* cleanup

* Fix type errors

* Test fixes

* Fix query tests

* cleanup / rename kibana.rac to kibana

* Remove eql/threshold (for now)

* Move technical fields to package

* Add indexAlias and buildRuleMessageFactory

* imports

* type errors

* Change 'kibana.rac.*' to 'kibana.*'

* Fix lifecycle tests

* Single alert instance

* fix import

* Fix type error

* Fix more type errors

* Fix query rule type test

* revert to previous ts-expect-error

* type errors again

* types / linting

* General readability improvements

* Add invariant function from Dmitrii's branch

* Use invariant and constants

* Improvements to field mappings

* More test failure fixes

* Add refresh param for bulk create

* Update more field refs

* Actually use refresh param

* cleanup

* test fixes

* changes to rule creation script

* Fix created signals count

* Use ruleId

* Updates to bulk indexing

* Mapping updates

* Cannot use 'strict' for dynamic setting

Co-authored-by: Marshall Main <marshall.main@elastic.co>
Co-authored-by: Ece Ozalp <ozale272@newschool.edu>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-03 12:48:07 -04:00
Stacey Gammon 899a6f3f11
Fix the API docs bug, where optional functions on interfaces were losing their children. (#107236)
* Fix the bug and update tests

* update api docs

* Fix tests
2021-08-03 11:58:03 -04:00
Spencer 3d8a2cfcf1
[cli-dev-mode] get values from completed state subjects (#107428)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-03 08:37:10 -07:00
Aleh Zasypkin ed28155165
Implement interactiveSetup plugin server side functionality: setup layout (#105222) 2021-08-03 15:52:11 +02:00
Dmitry Shevchenko fddd9d7992
Implement RuleExecutionLog (#103463) 2021-08-03 15:25:26 +02:00
Tiago Costa 11c32c3de1
chore(NA): moving @kbn/i18n to babel transpiler (#107447) 2021-08-03 12:55:04 +01:00
Tiago Costa a923d9e091
chore(NA): moving @kbn/monaco to babel transpiler (#107461) 2021-08-03 02:40:19 +01:00
Tiago Costa 24c85b51ca
chore(NA): moving @kbn/test to babel transpiler (#107455) 2021-08-02 22:35:43 +01:00
Tiago Costa 78a54fb985
chore(NA): moving @kbn/typed-react-router-config to babel transpiler (#107437) 2021-08-02 22:35:13 +01:00
Jonathan Budzenski 91bb2c5b57
[kbn/pm] Remove legacy build code (#107217) 2021-08-02 13:53:27 -05:00
Stacey Gammon 81fd64c838
Remove line numbers from the json files (#107158)
* Stop tracking line numbers

* Updated api docs

* Fix type error and update tests

* wrap label in encodeURIComponent for the links

* Update docs after encodeUriComponent change
2021-08-02 12:57:22 -04:00
Anton Dosov 0c69b10d84
[data][bfetch] Avoid using Buffer in client code (#107278) 2021-08-02 15:31:20 +02:00
Liza Katz c048f71626
[Data] Cleanup filter docs (#107169)
* Move more utils to package and cleanup API

* docs and imports

* better imports

* change comment

* Better docs

* typos

* typo

* fixes

* casting

* Code review

* Update meta_filter.ts

* fix

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-02 12:14:19 +02:00
Tiago Costa b9acd3ce74
chore(NA): moving @kbn/dev-utils to babel transpiler (#107245)
* chore(NA): moving @kbn/dev-utils to babel transpiler

* chore(NA): fix types field on tsconfig files for packages missing it

* chore(NA): update package.jsons

* chore(NA): update kbn/pm dist

* chore(NA): update types field on package jsons

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-30 16:03:42 -04:00
Tiago Costa 561b89889f
chore(NA): moving @kbn/utility-types to babel transpiler (#107159)
* chore(NA): moving @kbn/utility-types to babel transpiler

* chore(NA): fix type imports

* chore(NA): fix type imports

* chore(NA): fix type imports

* chore(NA): fix rootdir of tsd tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-30 18:43:50 +01:00
Tiago Costa e0ea3233d9
chore(NA): moving @kbn/es-query to babel transpiler (#107281)
* chore(NA): moving @kbn/es-query to babel transpiler

* chore(NA): update limits
2021-07-30 18:38:02 +01:00
Spencer 926db441b9
[dev-utils/run] support --info flag when default log level changed (#107244)
* [dev-utils/run] support --info flag when default log level changed

* update kbn/pm dist and remove excess --debug flag

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-30 10:22:18 -07:00
Anton Dosov 3c3087855f
[data] Extract @kbn/field-types to a package (#106973) 2021-07-30 06:34:17 -04:00
Tiago Costa fae9f266c4
chore(NA): moving @kbn/apm-config-loader to babel transpiler (#107146)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-29 14:24:12 -04:00
Tiago Costa 7c949c0e98
chore(NA): moving @kbn/std to babel transpiler (#107177) 2021-07-29 18:26:08 +01:00
Tiago Costa 4eec61a5f9
chore(NA): moving @kbn/common-utils to babel transpiler (#107148)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-29 17:04:08 +01:00
Anton Dosov 41f25a79b9
lower “indexPatternFieldEditor” bundle limit (#107006) 2021-07-29 11:10:57 +02:00
Tiago Costa 1137c2c5f4
chore(NA): moving @kbn/utils to babel transpiler (#107010)
* chore(NA): moving @kbn/utils to babel transpiler

* chore(NA): changed import paths for that module on kbn-apm-config-loader

* fix(NA): import on test file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-29 01:16:53 +01:00
Tiago Costa 0aeb6de546
chore(NA): moving @kbn/apm-utils to babel transpiler (#106989)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-28 19:12:22 -04:00
Jonathan Budzenski 134b2fd9e1
[kbn-pm] Default build and watch commands to use bazel (#105674)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-28 16:39:54 -04:00
Tiago Costa 57bdd8b310
chore(NA): moving @kbn/config-schema to babel transpiler (#106929)
* chore(NA): moving @kbn/config-schema to babel transpiler

* chore(NA): added runtime deps

* chore(NA): update api extractions

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-28 16:30:47 -04:00
Tiago Costa c4cb1f1bba
chore(NA): moving @kbn/ace to babel transpiler (#106922)
* chore(NA): first custom rules for jsts_transpiler

* chore(NA): update jsts_transpiler macro

* chore(NA): moving @elastic/datemath to babel transpiler

* chore(NA): change gitignore rules for bazel

* chore(NA): moving @kbn/ace to babel transpiler

* chore(NA): remove deps from js_library

* chore(NA): added runtime deps

* chore(NA): do not transpile packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-28 18:12:42 +01:00
Stacey Gammon 283223101d
Improve deprecated API list, and update api docs (#106942)
* Code to adjust deprecated api list

* updated docs

* fix and update tests
2021-07-28 12:44:17 -04:00
Thomas Watson c58148981c
Remove duplicate license comments (#106848) 2021-07-28 08:42:21 -06:00
Liza Katz eeb88b0833
[Data][Filters] Move more filter utils to package and cleanup API (#106566)
* Move more utils to package and cleanup API

* docs and imports

* better imports

* change comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-28 13:29:32 +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
Tiago Costa 1b8d8d183e
chore(NA): moving @elastic/datemath to babel transpiler (#106860)
* chore(NA): first custom rules for jsts_transpiler

* chore(NA): update jsts_transpiler macro

* chore(NA): moving @elastic/datemath to babel transpiler

* chore(NA): change gitignore rules for bazel
2021-07-27 16:44:36 -04: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
Yaroslav Kuznietsov 34ca277212
[Canvas] Expression metric (#104390)
* Added `expression_metric` plugin.

* Update src/plugins/expression_metric/README.md

Co-authored-by: Corey Robertson <crob611@gmail.com>
2021-07-27 09:05:24 +03:00
Ahmad Bamieh 35afacff72
[Telemetry] application usage views: allow tracking on any component and fix unmounting issues (#106507)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-26 15:03:49 -04:00
Yaroslav Kuznietsov 3027999435
[Canvas] Expression image (#104318)
* Added `expression_image` plugin.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-26 11:48:45 +03:00
Yaroslav Kuznietsov 3e4b64b779
[Canvas] Expression repeat image (#104255)
* Repeat Image plugin added.
2021-07-23 11:29:06 +03:00
Frank Hassanabad 0a5c96b117
[Security Solutions] Fixes exception lists to be able to filter on os type (#106494)
## Summary

Fixes https://github.com/elastic/kibana/issues/102613, and targets `7.14.0` as a blocker/critical

Previously we never fully finished the plumbing for using the `os_types` (operating system type) in the exception lists to be able to filter out values based on this type. With the endpoint exceptions now having specific selections for os_type we have to filter it with exceptions and basically make it work.

Some caveats is that the endpoints utilize `host.os.name.casless` for filtering against os_type, while agents such as auditbeat, winlogbeat, etc... use `host.os.type`. Really `host.os.type` is the correct ECS field to use, but to retain compatibility with the current version of endpoint agents I support both in one query to where if either of these two matches, then that will trigger the exceptions.

* Adds e2e tests
* Enhances the e2e tooling to do endpoint exception testing with `os_types`.
* Adds the logic to handle os_type
* Updates the unit tests

### 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
2021-07-22 12:54:40 -06:00
Frank Hassanabad cd667d06bc
[Security Solutions][Detection Engine] Creates an autocomplete package and moves duplicate code between lists and security_solution there (#105382)
## Summary

Creates an autocomplete package from `lists` and removes duplicate code between `lists` and `security_solutions`
* Consolidates different PR's where we were changing different parts of autocomplete in different ways.
* Existing Cypress tests should cover any mistakes hopefully

Manual Testing:
* Ensure this bug does not crop up again https://github.com/elastic/kibana/pull/87004
* Make sure that the exception list autocomplete looks alright

### 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-22 12:44:54 -06:00
Felix Stürmer 1a7469f756
[Logs UI] Index reason in log threshold executor (#106291) 2021-07-22 15:06:36 +02:00
Shahzad 48e6195dc1
[Exploratory View] Multi Series View (#103855)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
2021-07-22 10:14:43 +02:00
Tiago Costa 465b36ca9c
chore(NA): improves @kbn/ui-shared-deps build performance (#105971)
* chore(NA): move packages assets optimization into the distributable build

* chore(NA): include terser task on distributable build

* chore(NA): migrate everything into the build tasks

* chore(NA): update webpack config to include react profiler

* chore(NA): optional fsevents

* chore(NA): redo optional fsevents

* chore(NA): remove noparse for fsevents

* chore(NA): include missing task declaration

* chore(NA): include sourcemaps

* chore(NA): include metrics bundle file generation during distributable build

* chore(NA): correctly setup paths

* chore(NA): change sourcemap types

* chore(NA): remove useless sourcemaps

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-21 21:00:49 +01:00
Liza Katz a6af9d5050
[Es query] Move to package (#103530)
May the forces of bootstrapping helps us 🙏🏻 😉
2021-07-21 17:10:55 +02:00
Yaroslav Kuznietsov 473b6aad0f
[Canvas] Expression shape (#103219)
* expression_reveal_image skeleton.

* expression_functions added.

* expression_renderers added.

* Backup of daily work.

* Fixed errors.

* Added legacy support. Added button for legacy.

* Added storybook.

* Removed revealImage from canvas.

* Types fixed.

* Fixed test suite error.

* Fixed eslint error.

* Moved UI and elements, related to expressionRevealImage from canvas.

* Fixed unused translations errors.

* Moved type of element to types.

* Fixed types and added service for representing elements, ui and supported renderers to canvas.

* Added expression registration to canvas.

* Fixed

* Fixed mutiple call of the function.

* Removed support of a legacy lib for revealImage chart.

* Removed legacy presentation_utils plugin import.

* Removed useless translations and tried to fix error.

* One more fix.

* Small imports fix.

* Fixed translations.

* Made fixes based on nits.

* Removed useless params.

* fix.

* Fixed errors, related to jest and __mocks__.

* Removed useless type definition.

* Replaced RendererHandlers with IInterpreterRendererHandlers.

* fixed supported_shareable.

* Moved elements back to canvas.

* Moved views to canvas, removed expression service and imported renderer to canvas.

* Fixed translations.

* Moved libs to presentation utils.

* Fixed types and removed function_wrapper.ts

* Fixed types of test helpers.

* Fixed imports.

* One more fix.

* Fixed public API.

* Moved css to component.

* Fixed spaces at element.

* Removed unused plugin.

* Basic setup of error plugin.

* Removed not used `function` files at `error` expression.

* Moved related components from canvas.

* Changed imports of components.

* Removed useless translations and fixed .i18nrc.json

* More fixes of i18nrc.

* Fixed async functions.

Written current code, based on https://github.com/storybookjs/storybook/issues/7745

* Fixed one test with Expression input.

After changing the way of rendering in stories, all elements are mounting and componentDidMount is involved. The previous snapshot was without
mounted `monaco` editor.

* generated plugin and copied code from expression_reveal_image

* fixed double import after merge.

* Changed all names from reveal_image to shape.

* moved shape to plugin and added all necessary configs

* Fixed translations, fixed all imports and debug of svg.

* `function` moved to `server`.

* One shape is rewritten to `React` and rendering is written with passing necessary props.

* changed default width and heigth.

* Added `ShapeHOC`.

* Shapes changed.

* small refactor.

* Removed useless import.

* one more refactor.

* Refactor + fix errors + updated limits.

* Changed ShapePreview from pure js to react and removed `dangerouslySetInnerHTML`

* Fixed types of viewbox.

* Changed types source for Shape components.

* small refactor.

* Fixed imports.

* Removed `shape` from `canvas`

* Updated docs.

* Basic setup of error plugin.

* Removed not used `function` files at `error` expression.

* Changed imports of components.

* Fixed errors, related to shape and autosuggestions.

* Fixed i18n for shape.

* Moved function from public to common and registered at server.

* Fixed types error.

* Fixed snapshots and shape mocks.

* Moved some libs from `presentations_util` to `expression_shape`

* Shape refactored.

* Shape picker fixed.

* Moved `Popover` back to `canvas`

* Removed `Popover` export from presentation_utils components.

* Moved error_component and debug_component from presentation_util to expression_error.

* Removed `.i18nrc.json`.

* Removed `.i18nrc.json`.

* Removed useless scss.

* Fixed color of `error`.

* added fixes of rebase.

* More fixes of rebase error .

* Removed useless .i18nrc.json file.

* More fixes.

* More fixes of rebase.

* One more fix.

* More fixes.

* Fixed limits and translations.

* Added.

* Fixed i18nrc.

* Fixed error..

* Moved shapes to async chunks.

* One more fix.

* Some fixes.

* Trying to fix the typecheck error.

* Added temp of drawer.

* Moved shapes to the async chunk in a less complex way.

* Made `ShapeDrawer` reusable among different `expressions`.

* Changed type of `shapes` from `any` and `Shape` to `string`.

* Made changes, based on nits.

* Removed not necessary changes.

* Moved all reusable libs to `expression_shapes`.

* Reduced the size of the bundle.

* Hope, fixed type check errors.

* Removed getDefaultShapeData.

* Removed `getViewBox` from bundle.
2021-07-21 17:46:19 +03:00
Frank Hassanabad dd8a4a72e2
[Security Solutions] Removes the elastic legacy client from lists and security_solution plugins (#106130)
## Summary

Addressees https://github.com/elastic/kibana/issues/83910 by removing the elastic legacy client from:
* `lists` plugin
* `security_solution` plugin
* `kbn-securitysolution-es-utils` package

Removes found dead code in `security_solution` plugin:
* `server/lib/configuration/inmemory_configuration_adapter.ts`
* `server/lib/detection_engine/privileges/read_privileges.ts`
* `server/lib/configuration/index.ts`
* `server/lib/configuration/adapter_types.ts`
* `server/lib/compose/kibana.ts`
* `server/lib/ecs_fields/extend_map.test.ts`
* `server/lib/ecs_fields/extend_map.ts`
* `server/lib/index_fields/elasticsearch_adapter.ts`
* `server/lib/index_fields/index.ts`
* `server/lib/index_fields/mock.ts`
* `server/lib/index_fields/types.ts`
* `server/lib/source_status/elasticsearch_adapter.ts`
* `server/lib/source_status/index.ts`
* `server/lib/source_status/query.dsl.ts`
* `server/lib/source_status/types.ts`
* `server/lib/sources/configuration.test.ts`
* `server/lib/sources/configuration.ts`
* `server/lib/sources/index.ts`
* `server/lib/sources/types.ts`

Removes dead code in `lists` plugin:
* `server/schemas/common/get_call_cluster.mock.ts`
* `server/lib/ecs_fields/index.ts`
* `server/lib/framework/kibana_framework_adapter.ts`

Removes dead types from `security_solution` plugin:
* `server/lib/framework/types.ts`
* `server/lib/types.ts`

Removes dead functions from `security_solution` plugin:
* `server/utils/build_query/calculate_timeseries_interval.ts`
* `server/utils/runtime_types.ts`

### What to check as a reviewer
* Ensure that there is no left over words of `legacy` such as `legacy.something`
* Ensure there are no more `callAsCurrentUser` since that is all dead and gone
* Ensure anywhere you see `esClient.someThing` it returns the `.body` at the end or destructors it as in `{ body } = esClient.someThing`


### Risk Matrix

| Risk                      | Probability | Severity | Mitigation/Notes        |
|---------------------------|-------------|----------|-------------------------|
| Telemetry might stop working or have invalid values. | Med | High | We will have to manually test telemetry. Pinged people from telemetry for a code review |
| An REST route returns invalid values. | Med | High | e2e tests caught some of these already. The rest of the code was re-checked by hand |
| Deleted function/code might actually be still in use somewhere. | Low | High | e2e and unit tests should catch any of this. |



### 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
2021-07-20 20:15:40 -04:00
Spencer ec160d5c47
[kbn/dev-utils] pull in extract() helper (#106277)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-20 13:13:48 -07:00
Sergi Massaneda a8fc9b462c
[RAC] [TGrid] Field browser implemented in EuiDataGrid toolbar (#105207)
* tGid header using EuiDataGrid

* useFetchIndex migrated and column_headers refactor

* removed useless mock

* add badges translations

* i18n translations keys fixed

* code format

* filter default columns not present in field browser

* reset button to initial columns

* cleaning

* dependencies moved

* fix functional test with missing data service

* remove unused code (unrelated)

* fieldBrowser integration with security solutions timeline

* lint and translations cleaned

* timeline toolbar removed for merge & some test fixes

* type fix

* type fixes

* timeline static default colums

* limit size temporary increase

* limit size temporary increase

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-20 17:52:52 +02:00
Spencer 5b12cbcdb8
[kbn/optimizer] store references to bazel target for all package files (#106171)
* [kbn/optimizer] store references to bazel target for all package files

* update jest snapshots

* remove unnecessary fixtures

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-20 08:29:05 -07:00
Aleh Zasypkin 237256a4ba
Introduce preboot lifecycle stage (#103636) 2021-07-20 06:52:23 +02:00
Devin W. Hurley dadeb78b44
[RAC] [RBAC] add space ids array to each alert document (#105173)
* kind of working solution... need to fix types.. would be great if all of this could go in the authorization class but I don't think we have access to the spaceids when we generate the kibana security action strings?

* update mapping type as array:true for space_ids field, fixes types, updates jest tests, adds integration tests

* undo changes in alerting authz class

* update snapshot for apm api integration test for rules writing alerts

* fix apm integration tests

* omit version and sequence from expected outcome

* re-add space id after this code was moved in master

* add another default space id to test

* fixes bug to remove duplicate spaceids

* add space ids filter to elasticsearch query, updates detection role

* update snapshot

* update type docs for alerts client

* remove dead code

* fix type error

* renames space ids field on alert documents from kibana.rac.alert.space_ids to kibana.space_ids

* fixes kb-rule-data-utils package

* update snapshots

* remove references to kibana.rac.alert.space_ids and replace with kibana.space_ids in rule registry integration tests and apm integration tests

* fix apm functional test snapshots

* undo index name changes I made in apm integration test configs

* update typedocs references to upstream, not local repo
2021-07-16 16:05:46 -04:00
Michael Olorunnisola 9c5d5c1137
[Security Solution][RAC] Implement hover actions (#105500) 2021-07-16 12:53:41 -07:00
Dario Gieselaar 9fcfeba464
[UX] make route match optional in EnvironmentFilter (#105780)
Closes #105757.
2021-07-16 10:52:40 -04:00
Alison Goryachev d3ccb982c7
Improve painless validation handling in monaco (#105799) 2021-07-16 08:36:59 -04:00
Dario Gieselaar 821aeb1ff4
[APM] Typed client-side routing (#104274)
* [APM] @kbn/typed-router-config

* [APM] typed route config

* Breadcrumbs, wildcards

* Migrate settings, home

* Migrate part of service detail page

* Migrate remaining routes, tests

* Set maxWorkers for precommit script to 4

* Add jest types to tsconfigs

* Make sure transaction distribution data is fetched

* Fix typescript errors

* Remove usage of react-router's useParams

* Add route() utility function

* Don't use ApmServiceContext for alert flyouts

* Don't add onClick handler for breadcrumb

* Clarify ts-ignore

* Remove unused things

* Update documentation

* Use useServiceName() in ServiceMap component
2021-07-15 11:30:59 +02:00
Yaroslav Kuznietsov e999b33e54
[Canvas] Expression error (#103048)
* Basic setup of error plugin.

* Removed not used `function` files at `error` expression.

* Moved related components from canvas.

* Changed imports of components.

* Fixed renderer and storybook.

* Fixed types errors.

* Added limits.

* Removed useless translations and fixed .i18nrc.json

* added `done` handler call.

* Added more fixes fo i18nc.

* Added docs.

* More fixes of i18nrc.

* Fixed async functions.

Written current code, based on https://github.com/storybookjs/storybook/issues/7745

* Fixed one test with Expression input.

After changing the way of rendering in stories, all elements are mounting and componentDidMount is involved. The previous snapshot was without
mounted `monaco` editor.

* Fixed storybook error.

* More fixes.

* removed unused translations.

* Removed handlers and changed the way of handling `resize` and calling `done`.

* Fixed i18n error.

* Fixed storybook.

* Replaced Popover with EuiPopover.

* Moved `Popover` back to `canvas`

* Removed `Popover` export from presentation_utils components.

* Moved error_component and debug_component from presentation_util to expression_error.

* Fixed translations and imports.

* Moved `debug renderer` to `expression_error` plugin.

* Fixed error.

* Fixed lazy exports.

* Fixed imports

* Fixed storybook snapshot.

* Removed `.i18nrc.json`.

* Fixed color of `error`.

* Exported concrete elements from popover.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-15 12:19:55 +03:00
Tiago Costa 977039cb76
chore(NA): introduce preset for jest-integration tests on @kbn/test (#105144)
* chore(NA): introduce preset for jest-integration tests on @kbn/test

* chore(NA): fix lockfile

* chore(NA): fix ci

* fix tests (#14)

Co-authored-by: Mikhail Shustov <restrry@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-14 20:53:12 +01:00
Jonathan Budzenski 08ae9714c7
[packages/rule-data-utils] Remove legacy build and watchs cripts (#105630)
This package was migrated to bazel, but the legacy style script commands
still exist in `package.json`.  This removes these scripts to avoid
incorrectly building the package.
2021-07-14 14:20:53 -04:00
Frank Hassanabad bdf1069e56
[Security Solutions][Detection Engine] Removes dead duplicated code and marks other duplicated code (#105374)
## Summary

* Removes dead duplicated code from `security_solution` and  `lists`
* Adds notes and TODO's where we still have duplicated logic
* Adds notes where I saw that the original deviated from the copy from modifications in one file but not the other.
* DOES NOT fix the bugs existing in one copy but not the other. That should be done when the copied chunks are collapsed into a package. Instead see this issue where I marked those areas: https://github.com/elastic/kibana/issues/105378

See these two files where things have deviated from our duplications as an example:
[security_solution/public/common/components/autocomplete/field.tsx](https://github.com/elastic/kibana/blob/master/x-pack/plugins/security_solution/public/common/components/autocomplete/field.tsx
)
[lists/public/exceptions/components/autocomplete/field.tsx](https://github.com/elastic/kibana/blob/master/x-pack/plugins/lists/public/exceptions/components/autocomplete/field.tsx)

Ref PR where fixes are applied to one of the files but not the other (could be other PR's in addition to this one):
https://github.com/elastic/kibana/pull/87004

### 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
2021-07-13 16:23:58 -06:00
Yulia Čech 538dfba513
[Console] Autocomplete definitions (manual backport) (#105086)
* [Console] Removed x-pack console extensions folder and moved json files to src/plugins/console

* [Console] Generated console definitions with ES repo on master branch

* Added some overrides and doc links fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-13 10:31:50 +02:00
Spencer e88910a1c6
[kbn/optimizer] rewrite bazel-out paths to source paths (#105154)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-12 15:11:49 -07:00
Spencer f3228a38f4
[kbn/client/ui-settings] support using uiSettings in a specific space (#105116)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-09 16:26:26 -04:00
Greg Thompson fa03028688
Enable CSS-in-JS styling with emotion (#98157)
* emotion deps

* kbn-babel

* kbn-test

* examples

* babel-plugin-styled-components config

* css prop type fixes

* type context

* declaration location

* some emotion types resolved

* clean up

* emotion v10 accomodations

* types

* kbn-crypto

* kbn-telemetry-tools

* bazel

* eslint rule; shared file regex array

* update paths

* Update packages/kbn-eslint-plugin-eslint/rules/module_migration.js

Co-authored-by: Spencer <email@spalger.com>

* remove placeholder styles

* doc api changes

* snapshot updates

* storybook comments

* use constant

* bump new deps

* condense versions

Co-authored-by: Spencer <email@spalger.com>
2021-07-09 13:42:50 -05:00
Jonathan Budzenski fcb0de47f1
[paths] Add default lookup for kibana.yml at /etc/kibana (#103934)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-08 20:55:18 -04:00
Devin W. Hurley c77c7fbedb
[RAC] [RBAC] MVP RBAC for alerts as data (#100705)
An MVP of the RBAC work required for the "alerts as data" effort. An example of the existing implementation for alerts would be that of the security solution. The security solution stores its alerts generated from rules in a single data index - .siem-signals. In order to gain or restrict access to alerts, users do so by following the Elasticsearch privilege architecture. A user would need to go into the Kibana role access UI and give explicit read/write/manage permissions for the index itself.

Kibana as a whole is moving away from this model and instead having all user interactions run through the Kibana privilege model. When solutions use saved objects, this authentication layer is abstracted away for them. Because we have chosen to use data indices for alerts, we cannot rely on this abstracted out layer that saved objects provide - we need to provide our own RBAC! Instead of giving users explicit permission to an alerts index, users are instead given access to features. They don't need to know anything about indices, that work we do under the covers now.

Co-authored-by: Yara Tercero <yctercero@users.noreply.github.com>
Co-authored-by: Yara Tercero <yara.tercero@elastic.co>
2021-07-08 15:24:17 -04:00
Tim Roes b5e22c9327
Lower Kibana app bundle limits (#104688) 2021-07-08 10:39:54 +02:00
Jonathan Budzenski 0b7eb3f85f
[plugin-helpers] Fix dependency resolution (#104556)
This builds on the changes introduced in #104512, fixing dependency
resolution for the plugin-helpers CLI.  Instead of building a plugin in
isolation, this performs plugin discovery and filters the optimizer
lisst down to the requested plugin.

Testing
1) `cd examples/bfetch_explorer`
1) `node ../../scripts/plugin_helpers build --kibana-version=8.0.0-SNAPSHOT`
2021-07-07 12:40:58 -05:00
Spencer 99b9a2bc5e
[apm-config-loader] refactor config loading (#104197)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-06 18:00:20 -04:00
Spencer 1d993b6f26
[kbn/optimizer] maintain bundle ref support when using --filter (#104512)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-06 13:45:55 -07:00
Domenico Andreoli 5b49380787
CCS Cypress integration (#103941)
* Add CCS Cypress test runner

* Split flow for CCS Cypress tests

* Make esArchiver load data onto the remote cluster

* Add CCS specific rules with customizable remote name

* Allow overriding @kbn/dev-utils's CA_CERT_PATH

* Add CCS related docs

Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>
2021-07-06 09:20:54 -07:00
Aleh Zasypkin 2d48f7fb11
Add userSetup plugin skeleton. (#101610) 2021-07-06 14:41:24 +02:00
Christiane (Tina) Heiligers 9e60da5b46
[Localization] Adds guidelines about markdown and long paragraphs (#104171) 2021-07-01 15:28:48 -04:00
Yaroslav Kuznietsov b352976b3b
[Canvas] Expression reveal image. (#101987)
* expression_reveal_image skeleton.

* expression_functions added.

* expression_renderers added.

* Backup of daily work.

* Fixed errors.

* Added legacy support. Added button for legacy.

* Added storybook.

* Removed revealImage from canvas.

* setState while rendering error fixed.

* tsconfig.json added.

* jest.config.js added.

* Demo doc added.

* Types fixed.

* added limits.

* Removed not used imports.

* i18n namespaces fixed.

* Fixed test suite error.

* Some errors fixed.

* Fixed eslint error.

* Removed more unused translations.

* Moved UI and elements, related to expressionRevealImage from canvas.

* Fixed unused translations errors.

* Moved type of element to types.

* Fixed types and added service for representing elements, ui and supported renderers to canvas.

* Added expression registration to canvas.

* Fixed

* Fixed mutiple call of the function.

* Removed support of a legacy lib for revealImage chart.

* Removed legacy presentation_utils plugin import.

* Doc error fixed.

* Removed useless translations and tried to fix error.

* One more fix.

* Small imports fix.

* Fixed translations.

* Made fixes based on nits.

* Removed useless params.

* fix.

* Fixed errors, related to jest and __mocks__.

* Removed useless type definition.

* Replaced RendererHandlers with IInterpreterRendererHandlers.

* fixed supported_shareable.

* Moved elements back to canvas.

* Moved views to canvas, removed expression service and imported renderer to canvas.

* Fixed translations.

* Types fix.

* Moved libs to presentation utils.

* Fixed one mistake.

* removed dataurl lib.

* Fixed jest files.

* elasticLogo removed.

* Removed elastic_outline.

* removed httpurl.

* Removed missing_asset.

* removed url.

* replaced mostly all tests.

* Fixed types.

* Fixed types and removed function_wrapper.ts

* Fixed types of test helpers.

* Changed limits of presentationUtil plugin.

* Fixed imports.

* One more fix.

* Fixed huge size of bundle.

* Reduced allow limit for presentationUtil

* Updated limits for presentationUtil.

* Fixed public API.

* fixed type errors.

* Moved css to component.

* Fixed spaces at element.

* Changed order of requiredPlugins.

* Updated limits.

* Removed unused plugin.

* Added rule for allowing import from __stories__ directory.

* removed useless comment.

* Changed readme.md

* Fixed docs error.

* A possible of smoke test.

* onResize changed to useResizeObserver.

* Remove useless events and `useEffect` block.

* Changed from passing handlers to separate functions.

* `function` moved to `server`.

* Fixed eslint error.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-01 13:30:00 +03:00
Tiago Costa 5f35d23416
chore(NA): moving @kbn/es-archiver into bazel (#103770) 2021-06-29 23:33:02 -04:00
Clint Andrew Hall b7ad0c9004
[storybook] Ignore TS-related HMR warnings (#103605)
* [storybook] Ignore TS-related HMR warnings

* Fix casing

* Remove warnings filter

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 22:34:50 -04:00
Jonathan Budzenski bed5b6d8f2
[packages] Migrate @kbn/test to Bazel (#103122)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 21:16:00 -04:00
Tiago Costa 682d969190
chore(NA): remove unused transient dep declaration from @kbn/ui-shared-deps build file (#103666) 2021-06-29 21:22:45 +01:00
Tiago Costa 75fa47cdcf
chore(NA): moving @kbn/test-subj-selector into bazel (#103562)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 14:59:38 +01:00
Spencer 407b96e021
[eslint/module-migration] add support for re-export defs and test rule (#102840)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 14:28:10 -07:00
Dario Gieselaar b51af01adc
[APM] Support records in strict_keys_rt (#103391)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 20:03:30 +02:00
Spencer 99d3f8b768
[kbn/optimizer] fix optimizerCache creation (#103190)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 13:10:36 -04:00
Luke Elmers d2690d8ac8
[migrations v2] Integration test for multi-node cluster. (#100957) 2021-06-28 12:49:38 -04:00
Tiago Costa 22d5c90855
chore(NA): moving @kbn/spec-to-console into bazel (#103470)
* chore(NA): moving @kbn/spec-to-console into bazel

* chore(NA): fix licenses
2021-06-28 15:58:41 +01:00
Spencer 23c8d18198
[ui-shared-deps] reuse react-beautiful-dnd from eui (#102834)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-24 13:59:49 -04:00
Anton Dosov be1c5bbd72
Don't import react-intl directly to reduce bundle sizes (#102497) 2021-06-24 16:52:55 +02:00
Peter Pisljar 9a1f5a4a7a
switching to peggy (#103169) 2021-06-24 12:23:41 +02:00
Tiago Costa 17adfacb1b
chore(NA): moving @kbn/cli-dev-mode into bazel (#103067)
* chore(NA): moving @kbn/cli-dev-mode into bazel

* chore(NA): merge and solve conflicts with master
2021-06-23 23:50:49 -04:00
Tiago Costa 59423927cb
chore(NA): moving @kbn/plugin-helpers into bazel (#103181)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-23 23:49:04 -04:00
Wylie Conlon 4d514c6db6
[Lens] Escape field names in formula (#102588)
* [Lens] Escape field names in formula

* Fix handling of partially typed fields with invalid chars

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-23 14:20:50 -04:00
Josh Dover 524401973f
Add timeouts and setup enforcement for custom plugins statuses (#77965) 2021-06-23 13:58:10 -04:00
David Sánchez eb9726987c
[Security Solution][Endpoint] Hide endpoint event filters list in detections tab (#102644)
* Add event filters filter on exception list to hide it in UI

* Fixes unit test and added more tests for showEventFilters

* fixes test adding showEventFilters test cases

* Pass params as js object instead of individual variables

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-23 16:04:23 +02:00
Tiago Costa e1ec8b05b6
chore(NA): moving @kbn/optimizer into bazel (#102965)
* chore(NA): moving @kbn/optimizer into bazel

* chore(NA): fix source import from kbn optimizer

* chore(NA): update snapshots
2021-06-23 11:11:13 +01:00
Xavier Mouligneau 4fa3dc46cb
[RAC] T-Grid is moving to a new home (#100265)
* wip

* First pass at standalone and embedded redux stores and usage

* wip

* First pass at standalone and embedded redux stores and usage

* wip

* clean up

* wip

* refact(NA): remove extra pkg_npm target and add specific target folders on @kbn/i18n

* cleanup

* - fixes type errors in tests

* WIP remove use_manage_timeline

* wip add query + selector

* finishing integrating timeline manage context from redux

* integrating t-grid in security solution

* fix RowRender type

* WIP begin to move components from package to plugin

* integration of t-grid inside of security solution

* wip to make redux work

* little trick to make  it render

* - fixes a few type errors

* better integration betwen tgrid and security solutions

* bringing back tsconfig on timeline

* wip integration t-grid in observability

* fix types

* fix type in security solutions

* add type to import + trie dto get the bundle size as small as possible

* fix type in integration test

* fix type in integration test

* - fix tests

* clean up to use technical fields

* - fixes unit tests

* - mocks the `useDateFormat` function of the `useKibana` service to fix unit tests

* fix t-grid settings vs create timeline + fix inspect button

* fix last suites test

* Update unit tests, snapshots and lint

* Fix bad merge

* fix plugin export

* Fix some failing tests

* fix unit tets in timelines plugins

* fix latest test

* fix i18n

* free obs from t-grid

* Fix timeline functional plugin types

* fix store provider

* Update failing defaultHeader test

* Fix i18n usage in security solution

* Fix remaining i18n errors in timelines plugin

* Dedupe common shared types

* move drag and drop utils in package to avoid duplication

* More shared type cleanup

* add feature flag

* review I

* fix merge  with master

* fix i18n translation

* More type deduping

* Use @kbn/common-utils, fix remaining types

* fix types

* fix tests

* missing type

* fix cypress tests

Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Andrew Goldstein <andrew.goldstein@elastic.co>
2021-06-22 18:56:33 -04:00
Tiago Costa 3da2ac8927
chore(NA): moving @kbn/ui-framework into bazel (#102908) 2021-06-22 13:11:24 -04:00
Jean-Louis Leysens 6cc3b84d6f
[Fleet] Add assets tab (#102517)
* very wip

* added new assets screen
* added routes to new assets view on the package details view

* Finished styling the assets page layout, need to work on adding
links

* rather use EuiHorizontalRule

* only show the assets tab if installed

* Added hacky version of linking to assets.

* added comment about deprecation of current linking functionality

* added an initial version of the success toast with a link to the agent flyout

* First iteration of end-to-end UX working. Need to add a lot of tests!

* fixed navigation bug and added a comment

* added a lot more padding to bottom of form

* restructured code for clarity, updated deprecation comments and moved relevant code closer together

* added a longer form comment about the origin policyId

* added logic for handling load error

* refactor assets accordions out of assets page component

* slightly larger text in badge

* added some basic jest test for view data step in enrollment flyout

* adjusted sizing of numbers in badges again, EuiText does not know about size="l"

* updated size limits for fleet

* updated styling and layout of assets accordion based on original
designs

* remove unused EuiTitle

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-22 17:10:37 +02:00
Jonathan Budzenski 11e68fda87
[packages] Move @kbn/interpreter to Bazel (#101089)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-22 09:59:20 -05:00
Dominique Clarke 34490a355e
[Uptime] [Synthetics Integration] transition to monaco code editor (#102642)
* update synthetics integration code editor

* add basic support for xml and javascript

* fix types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-22 10:14:56 -04:00
Spencer 3084de6782
[kbn/test/es] remove unnecessary es user management logic (#102584)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-21 18:36:43 -04:00
Davis Plumlee c52f5edfcc
[Security Solution][Exceptions] Fixes empty exceptions filter bug (#102583) 2021-06-21 18:34:11 -04:00
Tiago Costa 5ac9a38102
chore(NA): remove webpack build changes for kbn/ui-shared-deps (#102780) 2021-06-21 20:31:37 +01:00
Tiago Costa 7c429f725e
chore(NA): moving @kbn/storybook into bazel (#102731)
* chore(NA): moving @kbn/storybook into bazel

* chore(NA): add some typing changes

* chore(NA): rename typings file

* chore(NA): fix typescript configs to build storybooks

* chore(NA): fix eslint and typechecking
2021-06-21 20:17:54 +01:00
Tiago Costa f448f1f1bf
chore(NA): enable buildbuddy again 2021-06-21 19:15:21 +01:00
Yaroslav Kuznietsov a7444835dd
[TSVB] Replaces EuiCodeEditor 👉 Monaco editor (#100684)
* Сhanged EuiCodeEditor to CodeEditor (monaco) at markdown_editor.js

* Added css lang support for monaco-editor.

* Added .d.ts for css lang import directly from monaco.

* Moved handlebars_url language to the code_editor.

Moved handlebars_url language registration to the code_editor.
Changed the way of registration of languages.

* Added merge for markdown_handlebars lang.

* Changed to simple markdown syntax.

Handlebars syntax breaks highlighting of special chars in markdown syntax.

* Removed useless mergeConfig function.

* Removed legacy import.

* Refactor export from monaco-editor.

* Fixed 'Could not find a declaration file for module'

* Fixed tests.

* Fixed typings errors.

* Added comment to typings.

* Fixed clearMarkdown for Monaco editor.

* Made changes based on suggestions.

* Fixed types errors.

* Fixed function tests types errors.

* Fixes, based on nits.

* Fixes based on nits.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-18 21:25:11 +03:00
Tiago Costa cee33b004c
chore(NA): moving @kbn/ui-shared-deps into bazel (#101669)
* chore(NA): moving @kbn/io-ts-utils into bazel

* chore(NA): moving @kbn/ui-shared-deps into bazel

* chore(NA): compelte working build for @kbn/ui-shared-deps

* chore(NA): solve eslint problems

* chore(NA): solve typechecking

* chore(NA): debugger changes

* chore(NA): update optimizer basic integration tests

* chore(NA): ship kbn/ui-shared-deps metrics.json from new location at shared_built_assets

* chore(NA): use correct ui-shared-deps metrics file location

* chore(NA): remove webpack bazel config

* chore(NA): implement improvements on webpack config

* chore(NA): remove extra comment

* chore(NA): try esbuild-loader minimizer

* Revert "chore(NA): try esbuild-loader minimizer"

This reverts commit bffc49aaae.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-18 16:09:31 +01:00
Clint Andrew Hall 08ba5b3f4b
[canvas] Refactor Storybook from bespoke to standard configuration (#101962) 2021-06-17 18:57:44 -04:00
Tyler Smalley 00c180787f
[FTR] Stabilize SSLP functional tests (#102553)
* Removes spaces check, since spaces should always be available
* Disables Monitoring, SecuritySolutions, and Reporting in SSPL tests
until #102552 is completed

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-06-17 16:47:00 -04:00
Ryland Herrick ac07ebba87
[Security Solution] kbn package for generic hook utils (#101976)
* Adds boilerplate for new hook-utils package

* Move existing, identified utils into our hook-utils package

Updates references, and fixes a few missing config that were preventing
packages from building.

* Extracts a common type and adds a little more JSdoc for clarity

* Adds new useObservable hook

Similar to useAsync (a nearly identical interface), this is meant to
wrap a thunk returning an observable, allowing conditional invocation
and progressive updates as the observable continues to emit.

* Remove orphaned test

This function (and its tests) were moved to the hook-utils package; this
was simply missed.

* Remove optional chaining from kbn package

The build system does not currently support these typescript features.
While a valid fix would also have been to build separate browser and
node targets a la #99390, the use here was very minimal and so changing
to a supported syntax was the most pragmatic fix.

* Update old reference in test file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-17 12:09:17 -05:00
Steph Milovic 06be699862
[Security Solution] [Cases] Various Cases cleanups (#102103) 2021-06-17 10:52:04 -06:00
Josh Dover 02971177cc
Display Kibana overall status in the logs and have FTR wait for green status before running tests (#102108) 2021-06-17 10:19:07 -04:00
Liza Katz 8abb656d7f
[Kuery] Move json utils (#102058)
* Move JSON utils to utils package

* Imports from tests

* delete

* split package

* docs

* test

* test

* imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-16 18:15:47 +03:00
Wylie Conlon bdc87409ba
[Lens] Create mathColumn function to improve performance (#101908)
* [Lens] Create mathColumn function to improve performance

* Fix empty formula case

* Fix tinymath memoization

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-16 10:35:55 -04:00
CJ Cenizal 55a0dbbc09
Discourage use of legacy index templates (#101533)
* Hide legacy index templates table if the user doesn't have any.
* Render deprecation warning above legacy index templates table and in legacy index template wizard.
* Update index template doc link to point to the new docs.
2021-06-14 15:24:24 -07:00
Spencer 7cee2eefdc
[kbnArchiver] handle archives which have \r\n (#102118)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-14 17:01:22 -04:00
Dario Gieselaar 666bce3923
[APM] Enforce span creation/naming for ES searches (#101856) 2021-06-14 12:44:29 -04:00
Spencer bdaea87aa6
[kbnArchiver] fix save to non-existent file (#101974)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-10 21:16:15 -04:00
spalger a51b4a12e8 temporarily disable build-buddy 2021-06-10 14:37:14 -07:00
Wylie Conlon b35cde568b
[Lens] Formula editor (#99297)
* 💄 Hack to fix suggestion box

* 🐛 Fix validation messages

* 🐛 Relax operations check for managedReferences

* Change completion params

* 🏷️ Fix missing arg issue

*  Add more tinymath fns

* 🐛 Improved validation around math operations + multiple named arguments

* 🐛 Use new onError feature in math expression

* ♻️ Refactor namedArguments validation

* 🐛 Fix circular dependency issue in tests + minor fixes

* Move formula into a tab

* 🔥 Leftovers from previous merge

*  Move over namedArgs from previous function

*  Add tests for transferable scenarios

*  Fixed broken test

*  Use custom label for axis

* Allow switching back and forth to formula tab

* Add a section for the function reference

* Add modal editor and markdown docs

* Change the way math nodes are validated

* Use custom portal to fix monaco positioning

* Fix model sharing issues

* Provide signature help

* 🐛 Fix small test issue

* 🐛 Mark pow arguments as required

* 🐛 validate on first render only if a formula is present

* 🔥 Remove log10 fn for now

*  Improved math validation + add tests for math functions

* Fix mount/unmount issues with Monaco

* [Lens] Fully unmount React when flyout closes

* Fix bug with editor frame unmounting

* Fix type

* Add tests for monaco providers, add hover provider

* Add test for last_value

* Usability improvements

* Add KQL and Lucene named parameters

* Add kql, lucene completion and validation

* Fix autocomplete on weird characters and properly connect KQL

* Highlight functions that have additional requirements after validating

* Fix type error and move help text to popover

* Fix escape characters inside KQL

* 🐛 Fix dataType issue when moving over to Formula

* Automatically insert single quotes on every named param

* Only insert single quotes when typing kql= or lucene=

* Reorganize help popover

* Fix merge issues

* Update grammar for formulas

* Fix bad merge

* Rough fullscreen mode

* Type updates

* Pass through fullscreen state

* Remove more chrome from full screen mode

* Fix minor bugs in formula typing

* 🐛 Decouple column order of references and output

* 🔧 Fix tests and types

*  Add first functional test

* Fix copying formulas and empty formula

* Trigger suggestion prompt when hitting enter on function or typing kql=

* 🐛 Prevent flyout from closing while interacting with monaco

* refactoring

* move main column generation into parse module

* fix tests

* refactor small formula styles and markup

* documentation

* adjustments in formula footer

* Formula refactoring (#12)

* refactoring

* move main column generation into parse module

* fix tests

* more style and markup tweak for custom formula

* Fix tests

* [Expressions] Use table column ID instead of name when set

* [Lens] Create managedReference type for formulas

* Fix test failures

* Fix i18n types

* fix fullscreen flex issues

* Delete managedReference when replacing

* refactor css and markup; add button placeholders

* [Lens] Formulas

* Tests for formula

Co-authored-by: Marco Liberati <marco.liberati@elastic.co>

* added error count placeholder

* Add tooltips

* Refactoring from code review

* Fix some editor issues

* Update ID matching to match by name sometimes

* Improve performance of Monaco, fix formulas with 0, update labels

* Improve performance of full screen toggle

* Fix formula tests

* fix stuff

* Add an extra case to prevent insertion of duplicate column

* Simplify logic and add test for output ID

* add telemetry for Lens formula (#15)

* Respond to review comments

*  Improve the signatures with better documentation and examples

* adjust border styles to account for docs collapse

* refactor docs markup; restructure docs obj; styles

* Fix formula auto reordering (#18)

* fix formula auto reordering

* add unit test

* Fix and improve suggestion experience in Formula (#19)

*  Revisit documentation and suggestions

* 👌 Integrated feedback

*  Add query validation for quotes

* Usability updates & type fixes

* add search to formula

* fix form styles to match designs

* fix text styles; revert to Markdown for control

* 👌 Integrated more feedback

* improve search

* improve suggestions

* improve suggestions even more

* 🐛 Fix i18n issues (#22)

* Persist formula on leave, fix fullscreen and popovers

* Fix documentation tests

* 🏷️ fix type issue

* 🐛 Remove hidden operations from valid functions list

* 🐛 Fix empty string query edge case

* 🐛 Enable more suggestions + extends validation

* Fix tests that depended on setState being called without function

* Error state and text wrapping updates

*  Add new module to CodeEditor for brackets matching (#25)

* Fix type

* show warning

* keep current quick function

*  Improve suggestions within kql query

* 📷 Fix snapshot editor test

* 🐛 Improved suggestion for single quote and refactored debounce

* Fix lodash usage

* Fix tests

* Revert "keep current quick function"

This reverts commit ed477054c5.

* Improve performance of dispatch by using timeout

* Improve memoization of datapanel

* Fix escape characters

* fix reduced suggestions

* fix responsiveness

* fix unit test

* Fix autocomplete on nested math

* Show errors and warnings on first render

* fix transposing column crash

* Update comment

* 🐛 Fix field error message

* fix test types

* 📝 Fix i18n name

* 💄 Manage wordwrap via react component

* Fix selector for palettes that interferes with quick functions

* Use word wrapping by default

* Errors for managed references are handled at the top level

* 🐛 Move the cursor just next to new inserted text

* ⚗️ First pass for performance

* 🐛 Fix unwanted change

*  Memoize as many combobox props as possible

*  More memoization

* Show errors in hover

* Use temporary invalid state when moving away from formula

* Remove setActiveDimension and shouldClose, fixed by async setters

* Fix test dependency

* do not show quick functions tab

* increase documentation popover width

* fix functional test

* Call setActiveDimension when updating visualization

* Simplify handling of flyout with incomplete columns

* Fix test issues

* add description to formula telemetry

* fix schema

* Update from design feedback

* More review comments

* Hide callout border from v7 theme

Co-authored-by: dej611 <dej611@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
Co-authored-by: Joe Reuter <email@johannes-reuter.de>
Co-authored-by: Marco Liberati <marco.liberati@elastic.co>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2021-06-10 10:09:16 -04:00