Commit graph

1776 commits

Author SHA1 Message Date
Kibana Machine c31154bf5c
chore(NA): moving @kbn/securitysolution-t-grid to babel transpiler (#109442) (#109677)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-23 17:16:24 +00:00
Kibana Machine c621b8eb6c
chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler (#109426) (#109674)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
2021-08-23 13:13:28 -04:00
Kibana Machine 48aa983b34
chore(NA): moving @kbn/securitysolution-hook-utils to babel transpiler (#109432) (#109666)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
2021-08-23 12:49:36 -04:00
Kibana Machine bf9413dc42
[APM] Support multiple route paths in useApmParams (#109370) (#109653)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-08-23 12:02:22 -04:00
Yaroslav Kuznietsov 94bdff6e8a
[Canvas] Expression tagcloud (#108036) (#109627)
* Added `expression_tagcloud` plugin.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	.github/CODEOWNERS
#	packages/kbn-optimizer/limits.yml
2021-08-23 09:58:32 -04:00
Kibana Machine b35cb348ba
chore(NA): moving @kbn/securitysolution-autocomplete to babel transpiler (#109423) (#109570)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-21 02:27:10 -04:00
Kibana Machine 9374b7b742
chore(NA): moving @kbn/alerts to babel transpiler (#109320) (#109563)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-20 21:15:09 -04:00
Kibana Machine 7114cf69bb
chore(NA): moving @kbn/securitysolution-utils to babel transpiler (#109439) (#109550)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
2021-08-20 19:25:22 -04:00
Kibana Machine fb8af4d7d3
chore(NA): moving @kbn/ui-shared-deps to babel transpiler (#109323) (#109509)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-20 14:45:32 -04:00
Kibana Machine a930371708
[7.x] chore(NA): moving @kbn/logging to babel transpiler (#108702) (#109412)
* 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>

* chore(NA): fix test failures

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-20 17:19:02 +00:00
Mikhail Shustov 878d6e8978
exclude tsx test and mock files from test coverage (#109203) (#109264)
# Conflicts:
#	packages/kbn-test/jest-preset.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 10:27:33 -04:00
Kibana Machine bcc5766751
chore(NA): moving @kbn/interpreter to babel transpiler (#108512) (#109410)
* chore(NA): moving @kbn/interpreter to babel transpiler

* chore(NA): fix imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-20 09:55:04 -04:00
Kibana Machine 0be1a78785
chore(NA): moving @kbn/optimizer to babel transpiler (#109231) (#109316)
* chore(NA): adds 7.16 into  backportrc

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

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-19 23:34:45 +00:00
Kibana Machine 4a630bb59f
chore(NA): moving @kbn/plugin-helpers to babel transpiler (#109085) (#109302)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-19 23:33:03 +00:00
Kibana Machine c21b885c47
chore(NA): moving @kbn/plugin-generator to babel transpiler (#109083) (#109230)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-19 09:52:50 -04:00
Kibana Machine 6ef22bee53
[RAC] [Observability] Use simpler alert severity level mapping (#109068) (#109172)
* [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>

Co-authored-by: mgiota <giota85@gmail.com>
2021-08-18 18:51:10 -04:00
Kibana Machine 8f910f4308
chore(NA): moving @kbn/mapbox-gl to babel transpiler (#109082) (#109164)
* chore(NA): moving @kbn/mapbox-gl to babel transpiler

* chore(NA): structure exports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-18 18:15:20 -04:00
Kibana Machine 4445dd7c90
[Security Solution] - Updating UI to work with new kibana privileges abstraction on alerts (#108961) (#109156)
## 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

Co-authored-by: Yara Tercero <yctercero@users.noreply.github.com>
2021-08-18 17:19:37 -04:00
Liza Katz d3a9cc540d
[Data cleanup] Remove geo filters (#109097) (#109118)
* Remove geo bounding box and geo polygon filters

* delete geo filters

* delete geo filters

* geo

* remove geo docs
2021-08-18 13:41:22 -04:00
Kibana Machine ac02266513
[RAC][Security Solution] Remove ALERT_RULE_ID in favor of ALERT_RULE_UUID (#108922) (#109108)
* 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>

Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
2021-08-18 13:09:38 -04:00
Dominique Clarke 0312e29cdd
[Observability][Exploratory View] revert exploratory view multi-series (#109091) 2021-08-18 10:56:31 -04:00
Kibana Machine d9232d495b
chore(NA): moving @kbn/legacy-logging to babel transpiler (#108703) (#109001)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-17 23:53:06 +00:00
Kibana Machine 763544392c
uptime - index default severity of warning for tls and monitor status alerts (#108731) (#108945)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
2021-08-17 21:01:19 +00:00
Mikhail Shustov dd33a5558e
[7.x] Update dependency @elastic/elasticsearch to ^7.15.0-canary.3 (#107536) (#108890)
* Update dependency @elastic/elasticsearch to ^8.0.0-canary.17 (#107536)

* Update dependency @elastic/elasticsearch to ^8.0.0-canary.15

* update tests for new error message building mechanism

* fix integration tests

* fix functional test

* mute new type errors

* fix new type errors

* bump es client to canaary.16

* fix integration test

* fix type errors in infra plugin

* mute type error in ml plugin

* fix type errors in monitoring plugin

* fix and mute errors in security solution plugin

* bump version to canary.18

* remove an unnecessary change

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: restrry <restrry@gmail.com>

* bump to canry3

* fix another conflict

* fix another conflict in test file

* fix test. use assetion against stable parts

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-17 14:14:50 -04:00
Kibana Machine 70d8ef3573
[Data][Es Query] Use ES types in Kuery functions (#108367) (#108848)
* 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>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-08-17 12:18:04 +00:00
Kibana Machine c9b6ce5abf
Removes supertest-as-promised dependency (#100486) (#108817)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-08-17 03:30:08 +00:00
Kibana Machine 22e637d9bc
[RAC] Disable RAC multi-tenancy (#108506) (#108765)
* Disable RAC multi-tenancy

Co-authored-by: Kerry Gallagher <471693+Kerry350@users.noreply.github.com>
2021-08-16 17:27:03 -04:00
Kibana Machine 2363c27285
[Uptime] adjust RAC RBAC and index settings (#108200) (#108752)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
2021-08-16 20:28:14 +00:00
Kibana Machine f94498dc94
chore(NA): moving @kbn/docs-utils to babel transpiler (#108190) (#108705)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-16 12:47:13 -04:00
Kibana Machine 3e3ca30aff
[Security Solution][CTI] Update legacy CTI signals to latest ECS threat fields (#107988) (#108628)
* 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>

Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
2021-08-14 18:25:57 +00:00
Kibana Machine 27f2b11791
[TGrid] Alerts status update use RAC api (#108092) (#108624)
Co-authored-by: Devin Hurley <devin.hurley@elastic.co>

Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
Co-authored-by: Devin Hurley <devin.hurley@elastic.co>
2021-08-14 00:40:33 -04:00
Kibana Machine 552c7a494d
chore(NA): moving @kbn/io-ts-utils to babel transpiler (#108517) (#108576)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-13 20:04:48 +00:00
Kibana Machine af9a14a17f
chore(NA): moving @kbn/es-archiver to babel transpiler (#108370) (#108575)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-13 16:02:12 -04:00
Kibana Machine c4a15b4299
[APM] Make environment & kuery required (#108338) (#108536)
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-08-13 12:17:25 -04:00
Caroline Horn 0ec9720a63
[KibanaPageTemplate] Adding a noDataConfig for templated add data screens (#108293) (#108474)
# Conflicts:
#	packages/kbn-optimizer/limits.yml
2021-08-13 01:04:47 -04:00
Kibana Machine 9203a5918b
[Data][Es Query] Use ES types instead of DslQuery (#108290) (#108447)
* es-query types

* jest and lint

* cc

* options

* type

* type

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-08-12 23:25:46 +00:00
Kibana Machine 65c551f568
Adds new operatorsList prop in exceptions builder to allow pass a list of operators. Add this prop in event filters form (#108015) (#108349)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: David Sánchez <davidsansol92@gmail.com>
2021-08-12 09:44:50 -04:00
Lukas Olson d2aa433d4d
Add scoring support to KQL (#103727) (#108321)
* 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>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-12 03:16:43 -04:00
Kibana Machine aa12d107c3
chore(NA): moving @kbn/crypto to babel transpiler (#108189) (#108313)
* chore(NA): moving @kbn/crypto to babel transpiler

* chore(NA): update configs

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-12 00:34:02 -04:00
Kibana Machine e792ea93d6
[kbn/es-archiver] fix flaky test (#108143) (#108262)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-11 21:16:39 +00:00
Spencer b3a714db5d
[perf-testing] send detailed APM data from report generation (#107592) (#108257)
Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	x-pack/scripts/functional_tests.js
2021-08-11 17:12:00 -04:00
Alejandro Fernández Haro eb3e7d9d50
[Status UI] Use the new output format of API GET /api/status (#107937) (#108227)
# Conflicts:
#	packages/kbn-optimizer/limits.yml
2021-08-11 14:23:46 -04:00
spalger 3f74b6e4ab skip flaky test (#108043)
(cherry picked from commit 441fb796e2)
2021-08-11 11:09:08 -07:00
Kibana Machine eec2adf154
chore(NA): moving @kbn/rule-data-utils to babel transpiler (#107573) (#108214)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-11 17:21:34 +00:00
Kibana Machine 9e558acdd0
[RAC] - Update field names (#107857) (#108170)
### 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.

Co-authored-by: Yara Tercero <yctercero@users.noreply.github.com>
2021-08-11 08:53:36 -04:00
Spencer 79e45f2190
[build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139)
* [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>
# Conflicts:
#	.gitignore
#	examples/hello_world/tsconfig.json
#	tsconfig.json
#	tsconfig.refs.json

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 05:08:54 -04:00
Kibana Machine 6b7330c6bd
chore(NA): moving @kbn/storybook to babel transpiler (#107547) (#108095)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-10 17:52:03 -04:00
Kibana Machine 32ebd0af7b
[Data cleanup] unify serializable state (#107745) (#108020)
* 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>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-08-10 13:33:44 +00:00
Kibana Machine c4cb0441c8
[APM] Make rangeFrom/rangeTo required (#107717) (#108017)
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-08-10 08:23:20 -04:00
Kibana Machine 3443bacf00
[RAC] [RBAC] Adds bulk update route to rule registry and bulk update function to alerts client (#106297) (#107965)
Adds a bulk update route (POST /internal/rac/alerts/bulk_update) to the rule registry and bulkUpdate function to the alerts as data client.

Co-authored-by: Devin W. Hurley <devin.hurley@elastic.co>
2021-08-10 01:29:09 +00:00
Kibana Machine 8952d83902
chore(NA): moving @kbn/analytics to babel transpiler (#107781) (#107924)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-09 14:36:41 -04:00
Kibana Machine 6b846f4d48
chore(NA): moving @kbn/cli-dev-mode to babel transpiler (#107779) (#107914)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-09 17:46:35 +00:00
Kibana Machine 158cc73087
chore(NA): moving @kbn/config to babel transpiler (#107763) (#107912)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-09 13:44:42 -04:00
Stacey Gammon 7111bcf5f4
Fix the API docs bug, where optional functions on interfaces were losing their children. (#107236) (#107905)
* Fix the bug and update tests

* update api docs

* Fix tests
# Conflicts:
#	api_docs/charts.mdx
#	api_docs/data.json
#	api_docs/data.mdx
#	api_docs/data_autocomplete.mdx
#	api_docs/data_field_formats.mdx
#	api_docs/data_index_patterns.mdx
#	api_docs/data_query.mdx
#	api_docs/data_search.json
#	api_docs/data_search.mdx
#	api_docs/data_ui.mdx
#	api_docs/deprecations_by_api.mdx
#	api_docs/deprecations_by_plugin.mdx
#	api_docs/es_ui_shared.mdx
#	api_docs/fleet.mdx
#	api_docs/reporting.json
#	api_docs/rule_registry.mdx
#	api_docs/security_solution.json
#	api_docs/security_solution.mdx
#	api_docs/timelines.json
#	api_docs/timelines.mdx
#	api_docs/visualizations.mdx
2021-08-09 12:51:00 -04:00
Matthew Kime 3717f0d47d
[7.x] [index patterns] index pattern create modal (#101853) (#107823)
* [index patterns] index pattern create modal (#101853)

index pattern creation flyout

* update docs

* update limits

* Update limits.yml

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-09 12:02:25 -04:00
Liza Katz 272a2af379
[7.x] [Data] Cleanup filter docs (#107169) (#107834)
* Update SM doc for alert per object (#107420)

Update stack monitoring doc to account for alert notification now being send for each node, index, or cluster based on the rule type, instead of always per cluster (PR# 102544)

* [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>
# Conflicts:
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.castestokbnfieldtypename.md
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getkbntypenames.md
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.buildqueryfromfilters.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.castestokbnfieldtypename.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.esqueryconfig.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.filter.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldsubtype.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.kuerynode.md
#	src/plugins/data/public/public.api.md

* doc

Co-authored-by: Ravi Kesarwani <64450378+ravikesarwani@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-07 14:48:17 -04:00
Madison Caldwell c172563e93
[Security Solution][RAC] Flatten alert fields (#107581) (#107832)
* 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-06 11:52:21 -04:00
Alejandro Fernández Haro 209b062454
[7.x] Disable Product check in @elastic/elasticsearch-js (#107642) (#107825)
* Disable Product check in @elastic/elasticsearch-js (#107642)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	package.json
#	yarn.lock

* Bump @elastic/elasticsearch-js version
2021-08-06 06:56:56 -04:00
Kibana Machine b1117dce3c
[RAC] integrating rbac search strategy with alert table (#107242) (#107822)
### Summary

We are integrating alert search strategy with RBAC on top of alert tables for security solution and o11y.

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
2021-08-05 23:31:47 -04:00
Marshall Main d089b3c421
[Security Solution] Siem signals -> alerts as data field and index aliases (#106049) (#107817)
* 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>
# Conflicts:
#	x-pack/plugins/security_solution/cypress/ccs_integration/detection_alerts/alerts_details.spec.ts
#	x-pack/plugins/security_solution/cypress/integration/detection_alerts/alerts_details.spec.ts
2021-08-05 20:51:59 -04:00
Chandler Prall 3f60e39569
Upgrade EUI to v36.1.0 (#107231) (#107799)
* 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>
# Conflicts:
#	packages/kbn-optimizer/limits.yml
2021-08-05 17:31:03 -04:00
Anton Dosov cda9966654
[7.x] [FieldFormats] Break from data plugin (#107173) (#107761)
* [FieldFormats] Break from `data` plugin (#107173)

# Conflicts:
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.castestokbnfieldtypename.md
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getkbntypenames.md
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.castestokbnfieldtypename.md
#	src/plugins/data/public/public.api.md

* update limits
2021-08-05 13:53:39 -04:00
Stacey Gammon 0b9be5df45
Remove line numbers from the json files (#107158) (#107758)
* 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
# Conflicts:
#	api_docs/apm.json
#	api_docs/canvas.json
#	api_docs/core.json
#	api_docs/core_saved_objects.json
#	api_docs/data.json
#	api_docs/data.mdx
#	api_docs/data_autocomplete.mdx
#	api_docs/data_field_formats.json
#	api_docs/data_field_formats.mdx
#	api_docs/data_index_patterns.json
#	api_docs/data_index_patterns.mdx
#	api_docs/data_query.mdx
#	api_docs/data_search.json
#	api_docs/data_search.mdx
#	api_docs/data_ui.mdx
#	api_docs/deprecations_by_api.mdx
#	api_docs/deprecations_by_plugin.mdx
#	api_docs/home.json
#	api_docs/lens.json
#	api_docs/monitoring.json
#	api_docs/presentation_util.json
#	api_docs/security.json
#	api_docs/security_solution.json
#	api_docs/timelines.json
2021-08-05 12:26:16 -04:00
Madison Caldwell 475e9e8541
[RAC][Security Solution] Add base Security Rule Type (#105096) (#107755)
* 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>

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-05 12:18:29 -04:00
Kibana Machine c77de2a138
chore(NA): moving @kbn/server-route-repository to babel transpiler (#107571) (#107716)
* chore(NA): moving @kbn/server-route-repository to babel transpiler

* chore(NA): update types

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-05 08:26:37 +00:00
Kibana Machine 1dc0b7c5af
chore(NA): moving @kbn/telemetry-tools to babel transpiler (#107540) (#107701)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-04 19:53:03 -04:00
Sergi Massaneda 8916d7281f
[RAC] [TGrid] Bulk actions to EuiDataGrid toolbar (#107141) (#107646)
* 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>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-04 12:20:25 -04:00
Yaroslav Kuznietsov 13ec91a998
[7.x] [Canvas] Expression progress (#104457) (#107620)
* [Canvas] Expression progress (#104457)

* Added `expression_progress` plugin.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	packages/kbn-optimizer/limits.yml

* Update limits.yml
2021-08-04 06:59:17 -04:00
Kibana Machine 912b6dcc86
chore(NA): moving @kbn/server-http-tools to babel transpiler (#107572) (#107602)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-03 19:38:15 -04:00
Kibana Machine a3b45c4bc0
chore(NA): moving @kbn/babel-code-parser to babel transpiler (#107574) (#107599)
* chore(NA): moving @kbn/babel-code-parser to babel transpiler

* chore(NA): fix package.json main field

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-03 23:27:39 +00:00
Kibana Machine 7fef2821a8
chore(NA): moving @kbn/es to babel transpiler (#107577) (#107595)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-03 19:26:00 -04:00
Kibana Machine 2d6278dce2
[cli-dev-mode] get values from completed state subjects (#107428) (#107545)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-03 18:01:07 +00:00
Dmitry Shevchenko aeb586b9d4
Implement RuleExecutionLog (#103463) (#107524) 2021-08-03 12:06:07 -04:00
Kibana Machine f1646432c5
chore(NA): moving @kbn/i18n to babel transpiler (#107447) (#107512)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-03 10:15:30 -04:00
Kibana Machine 8a9fd92f02
chore(NA): moving @kbn/monaco to babel transpiler (#107461) (#107492)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-03 00:04:21 -04:00
Kibana Machine 4b8a68a1a3
chore(NA): moving @kbn/typed-react-router-config to babel transpiler (#107437) (#107474)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-02 23:55:26 +00:00
Kibana Machine 9995d6f933
chore(NA): moving @kbn/test to babel transpiler (#107455) (#107476)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-02 19:53:52 -04:00
Kibana Machine 2abd99a4a3
[kbn/pm] Remove legacy build code (#107217) (#107449)
Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
2021-08-02 18:08:44 -04:00
Stacey Gammon 2fcf3e49ea
Improve deprecated API list, and update api docs (#106942) (#107441)
* Code to adjust deprecated api list

* updated docs

* fix and update tests
# Conflicts:
#	api_docs/core.json
#	api_docs/data.json
#	api_docs/data.mdx
#	api_docs/data_autocomplete.mdx
#	api_docs/data_field_formats.mdx
#	api_docs/data_index_patterns.json
#	api_docs/data_index_patterns.mdx
#	api_docs/data_query.mdx
#	api_docs/data_search.mdx
#	api_docs/data_ui.mdx
#	api_docs/deprecations.mdx
#	api_docs/kibana_react.mdx
#	api_docs/security_solution.json
#	api_docs/security_solution.mdx
2021-08-02 16:44:47 -04:00
Kibana Machine e4c59c8586
[data][bfetch] Avoid using Buffer in client code (#107278) (#107393)
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
2021-08-02 11:52:33 -04:00
Kibana Machine 12467c2a94
chore(NA): moving @kbn/dev-utils to babel transpiler (#107245) (#107331)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-30 18:24:02 -04:00
Kibana Machine d4a497ed9d
chore(NA): moving @kbn/utility-types to babel transpiler (#107159) (#107320)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-30 17:05:52 -04:00
Kibana Machine 73cb1647a5
chore(NA): moving @kbn/es-query to babel transpiler (#107281) (#107318)
* chore(NA): moving @kbn/es-query to babel transpiler

* chore(NA): update limits

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-30 16:02:22 -04:00
Kibana Machine 7581e1873f
[dev-utils/run] support --info flag when default log level changed (#107244) (#107316)
* [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>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-30 15:45:16 -04:00
Kibana Machine 7772d75514
[data] Extract @kbn/field-types to a package (#106973) (#107276)
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
2021-07-30 08:58:29 -04:00
Kibana Machine 30898c4fa8
chore(NA): moving @kbn/apm-config-loader to babel transpiler (#107146) (#107219)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-29 16:46:29 -04:00
Kibana Machine b88db9d372
chore(NA): moving @kbn/std to babel transpiler (#107177) (#107212)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-29 19:53:30 +00:00
Yara Tercero c949b4bb1d
[Timeline][RBAC] - Add RBAC logic to timeline alerts search strategy (#105333) (#107005)
## Summary

Adds RBAC layer to timeline plugin search strategy for alerts.
# Conflicts:
#	x-pack/plugins/alerting/server/alerting_authorization_client_factory.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-29 15:33:16 -04:00
Kibana Machine a565bdd03b
chore(NA): moving @kbn/common-utils to babel transpiler (#107148) (#107191)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-29 14:27:17 -04:00
Kibana Machine 64bc69e9cc
lower “indexPatternFieldEditor” bundle limit (#107006) (#107133)
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
2021-07-29 07:30:03 -04:00
Kibana Machine 9a631a779b
chore(NA): moving @kbn/utils to babel transpiler (#107010) (#107107)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-28 22:37:46 -04:00
Kibana Machine 3576b48345
chore(NA): moving @kbn/apm-utils to babel transpiler (#106989) (#107101)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-28 21:35:43 -04:00
Kibana Machine 8e7c5fe726
[kbn-pm] Default build and watch commands to use bazel (#105674) (#107090)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
2021-07-28 23:04:38 +00:00
Kibana Machine 6e1b5624be
chore(NA): moving @kbn/config-schema to babel transpiler (#106929) (#107088)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-28 18:53:21 -04:00
Kibana Machine f60b00ba9b
[Security Solutions] Removes deprecated types in kbn-securitysolution-* for newer kbn-es-query types (#106801) (#106869)
## 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-07-28 20:17:08 +00:00
Kibana Machine 8ee1419468
chore(NA): moving @kbn/ace to babel transpiler (#106922) (#107056)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-28 19:37:39 +00:00
Thomas Watson 96b2061780
Remove duplicate license comments (#106850) 2021-07-28 20:03:18 +02:00
Kibana Machine d4ef7a7eab
[Data][Filters] Move more filter utils to package and cleanup API (#106566) (#106988)
* 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>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-07-28 09:50:29 -04:00
Kibana Machine 69d0a7aa30
chore(NA): moving @elastic/datemath to babel transpiler (#106860) (#106921)
* 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

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-27 19:05:42 -04:00
Kibana Machine 4340d8d102
[Canvas] Expression metric (#104390) (#106808)
* Added `expression_metric` plugin.

* Update src/plugins/expression_metric/README.md

Co-authored-by: Corey Robertson <crob611@gmail.com>

Co-authored-by: Yaroslav Kuznietsov <kuznetsov.yaroslav.yk@gmail.com>
Co-authored-by: Corey Robertson <crob611@gmail.com>
2021-07-27 04:24:14 -04:00
Kibana Machine 92aadfa55d
[Telemetry] application usage views: allow tracking on any component and fix unmounting issues (#106507) (#106777)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Ahmad Bamieh <ahmadbamieh@gmail.com>
2021-07-26 17:24:13 -04:00
Yaroslav Kuznietsov daa98ee0c6
[Canvas] Expression image (#104318) (#106683)
* Added `expression_image` plugin.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/translations/translations/ja-JP.json
#	x-pack/plugins/translations/translations/zh-CN.json
2021-07-26 09:45:09 -04:00
Yaroslav Kuznietsov 17933a559c
[7.x] [Canvas] Expression repeat image (#104255) (#106638)
* [Canvas] Expression repeat image (#104255)

* Repeat Image plugin added.
# Conflicts:
#	packages/kbn-optimizer/limits.yml
#	x-pack/plugins/translations/translations/ja-JP.json
#	x-pack/plugins/translations/translations/zh-CN.json

* Removed not defined plugin `userSetup`.
2021-07-23 07:10:00 -04:00
Frank Hassanabad 94fc5d1139
[Security Solutions][Detection Engine] Creates an autocomplete package and moves duplicate code between lists and security_solution there (#105382) (#106612)
## 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

# Conflicts:
#	x-pack/plugins/translations/translations/ja-JP.json
2021-07-22 20:13:58 -04:00
Kibana Machine db64776ca0
[Security Solutions] Fixes exception lists to be able to filter on os type (#106494) (#106597)
## 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-07-22 17:12:45 -04:00
spalger 78b3b3b98b Revert "[i18n] [7.x] Integrate 7.14.0 Translations (#106359)"
This reverts commit 4d356ed432.
2021-07-22 13:47:56 -07:00
Ahmad Bamieh 4d356ed432
[i18n] [7.x] Integrate 7.14.0 Translations (#106359) 2021-07-22 11:41:06 -04:00
Kibana Machine 53dfb6bb31
[Logs UI] Index reason in log threshold executor (#106291) (#106531)
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2021-07-22 11:29:13 -04:00
Kibana Machine f70385fcee
[Exploratory View] Multi Series View (#103855) (#106498)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>

Co-authored-by: Shahzad <shahzad.muhammad@elastic.co>
Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
2021-07-22 06:30:38 -04:00
Tiago Costa a91dc36b26
chore(NA): improves @kbn/ui-shared-deps build performance (#105971) (#106472)
* 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>
# Conflicts:
#	test/scripts/jenkins_build_kibana.sh
2021-07-21 18:42:06 -04:00
Kibana Machine 2c4aaf67b6
[Es query] Move to package (#103530) (#106417)
May the forces of bootstrapping helps us 🙏🏻 😉

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-07-21 13:32:55 -04:00
Yaroslav Kuznietsov 8039d6fe7f
[Canvas] Expression shape (#103219) (#106414)
* 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.
# Conflicts:
#	packages/kbn-optimizer/limits.yml
2021-07-21 13:07:36 -04:00
Kibana Machine 5f97b42c81
[Security Solutions] Removes the elastic legacy client from lists and security_solution plugins (#106130) (#106342)
## 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-07-20 22:33:31 -04:00
Kibana Machine 112f03d8e5
[kbn/dev-utils] pull in extract() helper (#106277) (#106324)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-20 18:37:56 -04:00
Kibana Machine a74a3a2067
[RAC] [TGrid] Field browser implemented in EuiDataGrid toolbar (#105207) (#106278)
* 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>

Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
2021-07-20 14:12:28 -04:00
Kibana Machine 3f01f1fd59
[kbn/optimizer] store references to bazel target for all package files (#106171) (#106271)
* [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>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-20 13:40:18 -04:00
Aleh Zasypkin 9aa5c806e1
Introduce preboot lifecycle stage (#103636) (#106194)
# Conflicts:
#	.github/CODEOWNERS
#	src/core/server/ui_settings/ui_settings_service.ts
2021-07-20 03:11:45 -04:00
Devin W. Hurley 588989567b
[RAC] [RBAC] add space ids array to each alert document (#105173) (#106023)
* 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
# Conflicts:
#	x-pack/test/rule_registry/security_and_spaces/tests/trial/update_alert.ts
2021-07-16 18:27:12 -04:00
Kibana Machine b1e1a9ed7f
[Security Solution][RAC] Implement hover actions (#105500) (#106021)
Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
2021-07-16 18:09:32 -04:00
Kibana Machine 38f6c18e63
[UX] make route match optional in EnvironmentFilter (#105780) (#105969)
Closes #105757.

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-07-16 13:07:59 -04:00
Alison Goryachev 21a66ffd84
Improve painless validation handling in monaco (#105799) (#105949) 2021-07-16 10:50:22 -04:00
Dario Gieselaar b54873dc29
[7.x] [APM] Typed client-side routing (#104274) (#105745) 2021-07-15 10:16:44 -04:00
Yaroslav Kuznietsov d54d0b5852
[Canvas] Expression error (#103048) (#105724)
* 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>
# Conflicts:
#	packages/kbn-optimizer/limits.yml
#	src/plugins/expression_error/public/components/debug/debug.tsx
2021-07-15 07:41:16 -04:00
Kibana Machine 7ef09fc7b6
chore(NA): introduce preset for jest-integration tests on @kbn/test (#105144) (#105667)
* 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>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Mikhail Shustov <restrry@gmail.com>
2021-07-14 22:05:07 +00:00
Kibana Machine 6c64b249dc
[packages/rule-data-utils] Remove legacy build and watchs cripts (#105630) (#105650)
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.

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
2021-07-14 20:30:56 +00:00
Kibana Machine 2dacdae136
[Security Solutions][Detection Engine] Removes dead duplicated code and marks other duplicated code (#105374) (#105524)
## 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-07-14 03:41:39 +00:00
Kibana Machine 528c29e217
[kbn/optimizer] rewrite bazel-out paths to source paths (#105154) (#105369)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-12 20:22:58 -04:00
Spencer 6dee8d8fbc
[7.x] [theme] default to v8 theme (#94370) (#105290)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-12 16:29:09 -07:00
Greg Thompson b13e90e6d1
Enable CSS-in-JS styling with emotion (#98157) (#105223)
* 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>

Co-authored-by: Spencer <email@spalger.com>
2021-07-12 12:23:24 -04:00
Kibana Machine af4510fe47
[kbn/client/ui-settings] support using uiSettings in a specific space (#105116) (#105136)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-09 18:38:04 -04:00
Devin W. Hurley 1437f763c1
[7.x] [RAC] [RBAC] MVP RBAC for alerts as data (#100705) (#104976)
* [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>

* fixes failed integration test

Co-authored-by: Yara Tercero <yctercero@users.noreply.github.com>
Co-authored-by: Yara Tercero <yara.tercero@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-09 16:20:12 -04:00
Kibana Machine 277e148042
[paths] Add default lookup for kibana.yml at /etc/kibana (#103934) (#105009)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
2021-07-08 23:04:09 -04:00
Tim Roes a29edce017
Lower Kibana app bundle limits (#104688) (#104821)
# Conflicts:
#	packages/kbn-optimizer/limits.yml
2021-07-08 06:55:16 -04:00
Kibana Machine 09ed1bb7af
[plugin-helpers] Fix dependency resolution (#104556) (#104721)
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`

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
2021-07-07 15:46:00 -04:00
Kibana Machine 9ad2b23751
[apm-config-loader] refactor config loading (#104197) (#104565)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-07 00:06:37 +00:00
Kibana Machine 862426ab4b
[kbn/optimizer] maintain bundle ref support when using --filter (#104512) (#104545)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-06 22:51:55 +00:00
Kibana Machine b1335eab19
CCS Cypress integration (#103941) (#104496)
* 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>

Co-authored-by: Domenico Andreoli <domenico.andreoli@elastic.co>
Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>
2021-07-06 14:31:17 -04:00
Clint Andrew Hall 5846452f67
[storybook] Ignore TS-related HMR warnings (#103605) (#104363)
* [storybook] Ignore TS-related HMR warnings

* Fix casing

* Remove warnings filter

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-05 23:17:31 -04:00
Yulia Čech e604eebf91
Console definitions for 7.14 (rework) (#103681)
* Moved specs definitions from xpack to src and deleted console_extensions plugin

* Generated spec definitions using the script on elasticsearch 7.x branch

* Added some overrides and doc links fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-05 18:31:48 +02:00
Kibana Machine 062b4e044a
[Localization] Adds guidelines about markdown and long paragraphs (#104171) (#104193)
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
2021-07-01 15:38:54 -04:00
Kibana Machine bdfb417a54
[Canvas] Expression reveal image. (#101987) (#104076)
* 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>

Co-authored-by: Yaroslav Kuznietsov <kuznetsov.yaroslav.yk@gmail.com>
2021-07-01 09:09:53 -04:00
Kibana Machine f288e7a2f4
chore(NA): moving @kbn/es-archiver into bazel (#103770) (#103825)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-06-30 01:42:53 -04:00
Kibana Machine 4695120081
[packages] Migrate @kbn/test to Bazel (#103122) (#103812)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
2021-06-30 03:21:22 +00:00
Kibana Machine ab4d159620
chore(NA): remove unused transient dep declaration from @kbn/ui-shared-deps build file (#103666) (#103769)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-06-30 02:19:10 +01:00
Kibana Machine c803b93ba9
[eslint/module-migration] add support for re-export defs and test rule (#102840) (#103567)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-29 15:46:35 -04:00
Kibana Machine 39339ddce8
chore(NA): moving @kbn/test-subj-selector into bazel (#103562) (#103668)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-06-29 12:18:13 -04:00
Luke Elmers 6f31a759f4
[migrations v2] Integration test for multi-node cluster. (#100957) (#103559)
# Conflicts:
#	packages/kbn-test/src/es/test_es_cluster.ts
2021-06-28 18:34:31 -04:00
Kibana Machine a35147a28f
[kbn/optimizer] fix optimizerCache creation (#103190) (#103532)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-28 16:39:31 -04:00
Kibana Machine 57038168f0
[APM] Support records in strict_keys_rt (#103391) (#103524)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-06-28 16:07:17 -04:00
Kibana Machine ebe1f7c95d
chore(NA): moving @kbn/spec-to-console into bazel (#103470) (#103498)
* chore(NA): moving @kbn/spec-to-console into bazel

* chore(NA): fix licenses

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-06-28 13:08:28 -04:00