Commit graph

142 commits

Author SHA1 Message Date
Kibana Machine
deaf2322f5
Adding content type (#143800) (#144102)
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
(cherry picked from commit bbbf9f8985)

Co-authored-by: Kurt <kc13greiner@users.noreply.github.com>
2022-10-27 06:56:42 -07:00
Kibana Machine
15a598233f
[Files] Use blurhash for images (#142493) (#142858)
* added blurhash dep

* send blurhash from client

* added blurhash to server side

* added blurhash to headers

* added hash to files headers part ii

* move custom header name to shared

* added server side test to make sure blurhash is being stored with the file

* move blurhash logic to common components logic

* wip: moving a lot of stuff around and breaking up image component to parts

* added logic for loading blurhash client-side using header values

* reorder some stuff, added http to files context for example

* added resize files test

* tweak sizes of the blurs

* removed custom blurhash header

* renamed util to blurhash

* fixed some loading states to not show alt text, updated stories to show blurhash and removed styling on container

* remove http from filescontext

* pass blurhash to image component

* improved usability of the component by passing in wrapper props and allowing consumers to set an image size the same way they can for EuiImage

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* removed all traces of blurhash field from file saved object

* create special file image metadata type

* rename blurhash files and return full image metadata

* refactor blurhash in upload state to image metadata factory

* finish refactor of blurhash file

* pass back the original image size to the metadata

* more refactoring and added some comments to the metadata type

* pass metadata type through to endpoint

* pass metadata type through on client side

* wip

* updated files example to pass through shape of metadata

* some final touches

* updated comment

* make default size original

* rename common -> util

* update import path after refactor

* update style overrides for the blurhash story

* MyImage -> Img

* fix type lints

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit dbbf3ad42b)

Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
2022-10-06 08:05:34 -07:00
Kibana Machine
8ae26a1c89
[Files] Use upload component in files example (#141362) (#141388)
* added modal and removed hardcoded image upload

* remove unused var

* added shared imports file and hooked up modal component to example app

* use the Image component from files and update the title for the files modal

* set and show custom metadata

* fix content type not being passed through to upload or to picker component

* remove old commented out code

(cherry picked from commit 50df4630f5)

Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
2022-09-22 05:40:43 -07:00
Julian Gernun
0f7cfd16f7
137988 browser fields UI (#140516)
* first commit

* first commit

* get auth index and try field caps

* use esClient

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* wait for promise to finish

* logs for debugging

* format field capabilities

* add simplier browserFields mapper

* update response and remove width

* update response

* refactor

* types and refactor

* update api response

* fix column ids

* add columns toggle and reset

* sort visible columns id on toggle on

* merging info

* call api

* load info on browser field loaded

* remove logs

* add useColumns hook

* remove browser fields dependency

* update fn name

* update types

* update imported type package

* update mock object

* error message for no o11y alert indices

* add endpoint integration test

* activate commented tests

* add unit test

* comment uncommented tests

* fix tests

* review by Xavier

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* remove unnecessary api calls

* update types

* update param names + right type

* update types

* update id and index to be same type as rest

* update timelines id and index format

* add schema update on load

* add functional test

* fix tests

* reactivate skipped test

* update row action types to work with new api

* rollback basic fields as array update o11y render cell fn

* update cell render fn to handle strings too

* update column recovery on update

* recover previous deleted column stats

* add browser fields error handling

* add toast on error and avoid calling field api when in siem

* remove spread operator

* add toast mock

* update render cell cb when value is an object

* remove not needed prop

* fix browser field types

* fix reset fields action

* add missing hook dependency

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix browser field modal types

* update browser field types

* update render cell

* update export type

* fix default columns

* remove description column in browser field modal

* fix populate default fields on reset

* delete description field in triggers_actions_ui

* avoid to refetch the data because all the data is already there

* remove description tests

* insert new column in first pos + minor fixes

* update onToggleColumn callback to avoid innecesary calls

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2022-09-20 16:31:25 +02:00
Constance
98f73d674a
Upgrade EUI to v63.0.6 - updates to new EuiPageTemplate and deprecates old page components (#139524)
* Update all usages of EuiPageTemplate to EuiPageTemplate_Deprecated

* EuiPageContent_Deprecated as EuiPageContent

* EuiPageContentBody_Deprecated as EuiPageContentBody

* EuiPageContentHeader_Deprecated as EuiPageContentHeader

* EuiPageContentHeaderSection_Deprecated as EuiPageContentHeaderSection

* EuiPageSideBar_Deprecated as EuiPageSideBar

* EuiPageContent__Deprecated to EuiPageContent_Deprecated

* Fix rogue semi-colons

* WIP: NoDataConfigPage & NoDataPage converted to new template

- `withSolutionNav` not yet handled

* WIP: KibanaPageTemplateInner converted to use new template

- Pushes existing `pageHeader` prompts onto created EuiPageTemplate.PageHeader
- Uses `isEmptyState` to push `pageHeader` props to EuiPageTemplate.EmptyPrompt instead (if `children` are not supplied)

* WIP: `withSolutionNav` now renders the sidebar content properly

- Collapsing isn’t working (minWidth isn’t updating)

* Fixing stickiness of sidebar

* [Security] Fixed SecuritySolutionTemplateWrapper’s usage

- Moved `bottomBar` to EuiPageTemplate.BottomBar (now contained in just the page contents)
- Change EuiPanel children wrapper with EuiPageTemplate.Section

* [O11y] Wrap `children` with EuiPageTemplate.Section

* Fix getting_started usage

* WIP: Fixing types

* Removing `template` pass through

* Set EUI to 63.0.0

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* More import fixes

* Sidebar component update

* Expand `KibanaPageTemplate` to all namespaced EUI counterparts

- Updated `docs/tutorials` mdx page
- Fixed SolutionNav prop types

* Updated the tutorial mdx page

* [Stack Management] Updated app layout to new template

- Some temporary props applied for BWC until all other pages can be converted
- Converted `API Keys` page’s layout (and especially prompt usags) to new paradigm

* Fix circular dep

* Fix new circular dependency

- copying and pasting types from KibanaPageTemplateProps, but ah well

* [Security Solution] Remove `template` prop - no longer a prop on Kibana/EuiPageTemplate

* [O11y] Allow customizing EuiPageTemplate.Section wrapper

- converts pageBodyProps
- fixes non-centered loading template

* [Enterprise Search] Update page templates

- fix layouts by auto-wrapping an EuiPageSection for padding, while adding a `customPageSections` prop for more custom sections/layouts

- re-center 404 errors

- update tests

* Update KibanaPageTemplate tests

* Update snapshots

* Fix FTR test with removed EUI classNames

* Fix FTR tests with changed kbn classNames

* Update failing dashboard snapshots

- drop shadow changed slightly in EUI

* Fix failing Security Cypress test

* [O11y] Fix Inventory page using deprecated CSS hooks

* [O11y][Uptime] Fix missing bottom bars

- Modifies ObservabilityPageTemplate to accept a `bottomBar` prop (a la the old EuiPageTemplate behavior)

NOTE: This opinionated page layout structure is starting to feel like it could be potentially limiting / have all the same pitfalls the previous EuiPageTemplate did. If so, consider something closer to the Enterprise Search page template conversion (`customPageSections`).

- Misc cleanup: Use `KibanaPageTemplate` over `EuiPageTemplate`

* [O11y] Fix route template typing

- Since theObservabilityPageTemplate is using the new Eui/KibanaPageTemplate, its child templates and types need to be updated accordingly

* Fix broken minWidth behavior

- was an EUI issue that required a patch release
+ update snapshots

* [Security Solution] Type fixes, restore empty state

- Fix empty state logic removed in a previous commit
- bogarts KibanaPageTemplate's `isEmptyState` prop instead of using `template="noData"`

- extend template wrappers to past ...rest to underlying Kibana/EuiPageTemplate

+ replace EuiPageTemplate with KibanaPageTemplate for consistency

* Fix failing synthetics selector

* Grab EUI v63.0.6

- for deprecation tags and section tag support

* Fix Kibana Overview plugin layout

- needs to use KibanaPageTemplate.Section to get padding back

- use `bottomBorder` prop over horizontal rules

- restore previous page color via panelled=false

* Convert Home plugin to new KibanaPageTemplate

- use KibanaPageTemplate.Section instead to preserve page width/paddings

- use `bottomBorder` instead of `EuiHorizontalRule`

- NOTE: This causes margins to decrease slightly from xxl to xl (largest padding available for EuiPageSection) - this can be restored by CSS overrides if desired

- update CSS to preserve previous looks, + convert to logical properties

* [O11y] Fix non-centered empty/loading states

* [O11y] Restore subdued background on various empty state prompts

* [O11y] Fix all instances of views that require a scrollable full-height child

+ restore comment for inventory view

* [O11y][ux] Fix broken sidebar

- The entire app was missing a wrapping EuiProvider, and as such breakpoint utils were not working, and the sidebar was missing

+ misc cleanup
  - remove unnecessary fragment
  - remove role="main" attr - now that EuiPageTemplate sets a `main` tag, they'll conflict
  - add isEmptyState to center loading component

* [APM Cypress tests] harden flaky test

* [APM Cypress tests] Fix failing Cypress test, again

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-07 15:35:23 -05:00
Alexey Antonov
6ed79f42db
[Lens] Introduce separate dimension groups for mosaic rows and columns (#139214)
* [Lens] Introduce separate dimension groups for mosaic rows and columns

* swap labels

* fix nits

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2022-09-07 22:55:12 +03:00
Jean-Louis Leysens
b8a2068c58
[Files] Distinct FilesClient and ScopedFilesClient (#139718)
* FilesClient -> ScopedFilesClient

* added unscoped, global files client

* slight update to types

* also export the FilesClient type

* update JSDocs

* refactor
2022-09-07 10:56:54 +02:00
Joe Reuter
43e7050865
improve "debug in sandbox" functionality (#139724) 2022-08-31 10:27:17 +02:00
Pierre Gayvallet
383d8fab58
Move client-side application service to packages (#139502)
* deletes unused utils file

* just some fix while I see it

* creating empty packages

* moving all the things

* package build success

* start fixing usages

* fix the scoped history type issue

* export internal utils

* add default for mock

* fix test import

* fix external import

* start fixing external usages

* more usages

* more usages

* more usages

* More usages

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* fix integration test imports

* fix more test types

* remove public/utils from the core bundle

* trying to import from the package

* updating README's

* remove unused test types from mock package

* cleanup test types

* use import type

* add author to packages

* more import type

* remove dead path from some config

* remove src/core/utils/index.ts (and pray)

* update tsdoc

* fix new file usage

* fix paths

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-30 10:08:44 -07:00
Jean-Louis Leysens
a066ef4887
Update README.md (#139277) 2022-08-24 14:47:41 +02:00
Jean-Louis Leysens
ac0688b90f
[Files] Create files example plugin (#139019)
* created files example stub

* implementing whimsical design

* added base64d image

* updated files client and example plugin to work end-to-end with browser

* added file deletion funcitonality

* added codeowners entry

* refactor downloadSrc to getDownloadHref

* react-query -> @tanstack/react-query

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-08-23 10:38:22 +02:00
Joe Reuter
e9dd7efa8e
[Lens] Add section for how to handle refresh using search sessions (#138396)
* update readme

* use refresh in example
2022-08-12 20:57:06 +02:00
Julian Gernun
762962dcf8
[RAM] Alerts table functional tests (#137857)
* first commit

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* add triggersActionsUi as service

* use same configurationId

* add triggers action ui page object

* load infra alerts

* rollback triggers actions ui page and working test

* restore removed tests

* remove not needed fragment

* refactor test to use examples plugin

* remove import from moved resource

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-08 10:25:22 -07:00
Spencer
bebec37f04
[eslint] fix and skip violations for cross-boundary imports (#136911) 2022-07-29 13:57:55 -05:00
Nick Peihl
69dc7e2b77
[Maps] Custom raster source example plugin (#136761) 2022-07-26 14:41:45 -07:00
Jiawei Wu
cd3d2d79c7
[RAM] Stack management/o11y rule details parity (#136778)
* stack management/o11y rule details parity

* Hide edit button in stack management

* Add tests

* Move fetching summary out of o11y

* Undo changes to hooks in o11y

* Fix test and add new tests

* Remove customLoadExecutionLog prop

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-26 13:14:05 +02:00
Jiawei Wu
09872f071c
[RAM] Refactor: move shareable component sandbox to its own plugin (#134611)
* Move shareable component sandbox to its own plugin

* Add newline and fix test

* disable lint for no-default-export on example tests

* Fix lint

* Address feedback

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-19 09:30:11 -07:00
Joe Reuter
b5583eb5ec
[Lens] Fix rotating number example (#134234)
* fix rotating number example

* fix nav

* add label
2022-06-13 18:41:46 +02:00
Vadim Kibana
1b2c58f58e
ui_actions_enchanced to /src (#133512)
* move ui_actions_enhanced to /src

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* move translations to /src

* fix typescript errors

* update config files

* update ts configs

* fix config path

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-07 18:33:21 +02:00
Tim Sullivan
53688bf336
[Screenshotting] fix server crash with non-numeric width or height (#132384)
* throw error early if invalid layout

* add layout id test

* add new error type

* add error type to usage tracking

* fix tweak

* add comment note

* fix telemetry check

* fix ts

* fix moot change

* fix ts

* Update x-pack/plugins/screenshotting/server/layouts/create_layout.ts

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>

* fix ts

* fix snapshots

* fix bundling issue in canvas

* convert LayoutTypes to a string literal union

* cleanup

* remove screenshotting from reporting plugin example required bundles

* export as type

* fix ts

* fix more ts

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
2022-06-03 09:34:54 -07:00
Matthew Kime
3de12352b8
[data views] IIndexPattern / IndexPattern => DataView (#133086)
* no more index pattern objects, only data view

* add tsconfig entry to vis default editor
2022-06-01 13:53:25 -05:00
spalger
3730dd0779 fix all violations 2022-04-16 01:37:30 -05:00
Michael Dokolin
3627b866a3
[Screenshotting] Documentation (#129794)
* Provide defaults for the screenshotting options to make usage closer to the zero-conf
* Add screenshotting example integration
* Add integration tests to cover screenshotting example
* Add screenshotting plugin readme
* Add tutorial to the developer guide
2022-04-15 08:29:05 +02:00
Michael Dokolin
2736f9ec45
[Screenshotting] Add possibility to capture expressions (#128552)
* Fix the react expression renderer to avoid unnecessary rerendering
* Add screenshotting app for expressions rendering
* Refactor screenshotting to move formatting logic inside screenshots service
* Extend screenshotting plugin to support capturing expressions
2022-04-07 12:00:26 +02:00
Nodir Latipov
3e2761d981
[Unified search] Create unified search plugin (#127651)
* [Unified search] Create unified search plugin

* add unified_search into USES_STYLED_COMPONENTS

* fix JEST group 4

* update limits for data plugin

* fix: remove unifiedSearch plugin from x-pack/plugins/file_upload

* feat: updated .github/CODEOWNERS and set @elastic/kibana-app-services as a code owner

* apply PR comments

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* feat: moved filter bar, apply filters folders and apply filter action from Data plugin to unified search plugin

* fix Checks

* fix Checks

* fix Linting and Default CI Group #16

* fix Checks

* fix Checks

* fix Linting (with types)

* fix show FILTER_BAR

* fix Jest Tests

* feat replece indexPatternsContranct in setIndexPatterns to DataViewsContract

* feat: removed unnecessary interface in unified search

* fix Checks

* fix Checks

* fix Jest Tests, Checks

* fix Checks

* resolve comments

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-05 12:23:31 +05:00
Spencer
2ad2a4c271
[eslint] ensure that all imports are resolvable (#129002) 2022-04-04 15:37:06 -04:00
Ying Mao
25d9f5d97e
[Response Ops] Renaming Alert to Rule (#129136)
* Rename all the things

* Fixing checks

* Removing unnecessary change

* Fixing checks
2022-04-04 07:32:32 -04:00
Marco Liberati
b47ee8bc1c
🐛 Fix editor crash for multiple layers (#127891) 2022-03-17 10:48:15 +01:00
Brandon Kobel
82f143c2b0
Use response-ops GitHub team everywhere, no more alerting services (#126518)
* Use response-ops GitHub team everywhere, no more alerting services

* Update x-pack/test/plugin_api_integration/plugins/event_log/kibana.json

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

Co-authored-by: Ying Mao <ying.mao@elastic.co>
2022-03-01 08:56:26 -08:00
Marco Liberati
f8491e2573
[Lens][Example] Change custom link example to point to playground (#126345)
*  Change custom link to point to playground

* 🐛 Add filters when navigating to playground

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-01 14:43:33 +01:00
Vadim Kibana
d9a3e5e7f2
Delete Discover URL generator (#125824)
* remove discover url generator

* update mock

* use locator in discover example plugin

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-17 13:35:49 +01:00
Marco Liberati
48ce5d18ae
[Lens][Example] Testing playground for Lens embeddables (#125061)
* ⚗️ First pass

*  Add Lens testing playground

*  Add partition preset

* 👌 Addressed feedback

* 💄 Add thumbnail for example catalog

* 🔧 Convert image to png

* 🔥 Remove extra debug buttons

* 🐛 Fix error handling

* 🐛 Fix buttons bug
2022-02-15 18:20:01 +01:00
Michael Dokolin
9ac191674b
[Screenshotting] Add custom context support in the screenshot mode (#124942)
* Add custom context support to the screenshot mode plugin
* Delegate custom context handling to the screenshot mode plugin
* Move screenshot layout flag to the custom context
2022-02-11 10:14:07 +01:00
Joe Reuter
0cdc636b5d
[Lens] Navigation prompt API (#123539)
* expose vis registration

* add example app

* remove file

* fix and stabilize

* tsconfig fix

* fix type problems

* wire it up

* handle migrations

* fix problems

* fix tests

* fix types and add tests

* fix types of example

* fix merge problems

* code review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-10 12:12:24 -07:00
Ying Mao
270adf4958
[Alerting] Rename alert instance to alert and changing signature of alert (instance) factory alert creation (#124390)
* Rename alert instance to alert and add create fn to alert factory

* Rename alert instance to alert and add create fn to alert factory

* Fixing types

* Fixing types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-07 14:38:24 -07:00
Joe Reuter
2f869baf18
[Lens] Expose vis registration (#122348)
* expose vis registration

* add example app

* remove file

* fix and stabilize

* tsconfig fix

* fix type problems

* handle migrations

* fix problems

* fix tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-04 21:18:13 +01:00
Shahzad
5b8af6c1ea
[Exploratory view] Allow ability add extra actions in lens embeddable (#123713) 2022-01-28 11:15:49 +01:00
Georgii Gorbachev
ba0833f42b
[Security Solution][Detections] Rule execution logging overhaul (#121644)
**Epic:** https://github.com/elastic/kibana/issues/118324
**Tickets:** https://github.com/elastic/kibana/issues/119603, https://github.com/elastic/kibana/issues/119597, https://github.com/elastic/kibana/issues/91265, https://github.com/elastic/kibana/issues/118511

## Summary

The legacy rule execution logging implementation is replaced by a new one that introduces a new model for execution-related data, a new saved object and a new, cleaner interface and implementation.

- [x] The legacy data model is deleted (`IRuleStatusResponseAttributes`, `IRuleStatusSOAttributes`)
- [x] The legacy `siem-detection-engine-rule-status` saved object type is deleted and marked as deleted in `src/core`
- [x] A new data model is introduced (`x-pack/plugins/security_solution/common/detection_engine/schemas/common/rule_monitoring.ts`). This data model doesn't contain a mixture of successful and failed statuses, which should simplify client-side code (e.g. the code of Rule Management and Monitoring tables, as well as Rule Details page).
- [x] A new `siem-detection-engine-rule-execution-info` saved object is introduced (`x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/rule_execution_info/saved_object.ts`).
  - [x] This SO has 1:1 association with the rule SO, so every rule can have 0 or 1 execution info associated with it. This SO is used in order to 1) update the last execution status and metrics and 2) fetch execution data for N rules more efficiently comparing to the legacy SO.
  - [x] The logic of creating or updating this SOs is based on the "upsert" approach (planned in https://github.com/elastic/kibana/issues/118511). It does not fetch the SO by rule id before updating it anymore.
- [x] Rule execution logging logic is rewritten (see `x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log`). The previous rule execution log client is split into two objects: `IRuleExecutionLogClient` for using it from route handlers, and `IRuleExecutionLogger` for writing logs from rule executors.
  - [x] `IRuleExecutionLogger` instance is scoped to the currently executing rule and space id. There's no need to pass rule id, name, type etc to `.logStatusChange()` every time.
- [x] Rule executors and related functions are updated.
- [x] API routes are updated, including the rule preview route which uses a special "spy" implementation of `IRuleExecutionLogger`. A rule returned from an API endpoint now has optional `execution_summary` field of type `RuleExecutionSummary`.
- [x] UI is updated to use the new data model of `RuleExecutionSummary`:
  - [x] Rule Management and Monitoring tables
  - [x] Rule Details page
- [x] A new API route is introduced for fetching rule execution events: `/internal/detection_engine/rules/{ruleId}/execution/events`. It is used for rendering the Failure History tab (last 5 failures) and is intended to be used in the coming UI of Rule Execution Log on the Details page.
- [x] Rule Details page and Failure History tab are updated to use the new data models and API routes.
- [x] I used `react-query` for fetching execution events
  - [x] See `x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.tsx`
  - [x] The lib is updated to the latest version
- [x] Tests and fixed and updated according to all the changes
- [x] Components related to rule execution statuses are all moved to `x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status`.
- [x] I left a lot of `// TODO: https://github.com/elastic/kibana/pull/121644` comments in the code which I'm planning to address and remove in a follow-up PR. Lots of clean up work is needed, but I'd like to unblock the work on Rule Execution Log UI.

## In the next episodes

- Address and remove `// TODO: https://github.com/elastic/kibana/pull/121644` comments in the code
- Make sure that SO id generation for `siem-detection-engine-rule-execution-info` is safe and future-proof. Sync with the Core team. If there are risks, we will need to choose between risks and performance (reading the SO before updating it). It would be easy to submit a fix if needed.
- Add APM integration. Use `withSecuritySpan` in methods of `rule_execution_log` citizens.
- Add comments to the code and README.
- Add test coverage.
- Etc...

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2022-01-21 00:17:26 +03:00
Alexey Antonov
2c52ac28cb
[Lens] Provide formula helper to simplify integration of Lens instances (#122371)
* [Lens] Provide formula helper to simplify integration of Lens instances

Closes: #103055

* remove generateFormulaColumns from start contract

* upsertFormulaColumn

* add upsertFormulaColumn to start contract

* add integration with embedded_lens_examples

* upsert -> insertOrReplace

* add support of overriding operations

* add docs

* fix TS issues

* fix some comments

* fix PR comments

* fix PR comments

* fix CI

* Update x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula_helper.ts

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>

* Update x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula_helper.ts

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>

* remove useEffect

* move baseLayer part into getLensAttributes

* introduce stateHelperApi

* Map -> WeakMap

* remove [params.operations] from params

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-17 22:42:09 +03:00
Shivindera Singh
6dc31d768d
add KibanaThemeProvider support for kibana-app-services (#122370)
add KibanaThemeProvider support for kibana-app-services
2022-01-13 07:30:10 -07:00
Tim Sullivan
7d977a33b2
[Reporting] Remove export * usage (#121458)
* [Reporting] Remove export * usage

* remove common/index.ts

* revert one-line move

* fix eslint w/ types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-12-20 22:11:40 -07:00
Ersin Erdal
b6a85e7b83
[RAC][Refactoring] Rename alerting types in triggers_actions_ui (#121107)
* [RAC][Refactoring] Rename alerting types in triggers_actions_ui
2021-12-17 18:35:05 +01:00
Patrick Mueller
b4c44a135e
[alerting] replace internal legacy API calls with new APIs (#121048)
resolves https://github.com/elastic/kibana/issues/116939

Removes the remaining calls to the legacy HTTP alerting endpoints by internal Kibana code.
2021-12-16 15:56:02 -05:00
ymao1
7c27163d6a
[Alerting] Renaming AlertType to RuleType and updating Alerting Task Runner (#120661)
* Renaming AlertType to RuleType and updating Alerting Task Runner

* Fixing types

* Fixing types

* holy cannoli

* Fixing types

* Fixing types and tests

* Fixing types and tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-12-09 09:21:38 -05:00
Michael Dokolin
903e75ee03
[Reporting] Decouple screenshotting plugin from the reporting (#120110)
* Add screenshotting plugin
* Move screenshotting plugin configuration options
* Remove unused browser type configuration option
2021-12-06 22:00:57 +01:00
Tyler Smalley
92a8636f0f
Upgrade Typescript to 4.3.5 (#104470)
Co-authored-by: Mikhail Shustov <restrry@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
Co-authored-by: Kyle Pollich <kpollich1@gmail.com>
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
Co-authored-by: Candace Park <candace.park@elastic.co>
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: spalger <spencer@elastic.co>
2021-12-02 16:27:41 -08:00
Tiago Costa
9d662b77be
chore(NA): splits types from code on @kbn/i18n (#119256)
* chore(NA): auto creation of the package.json for the new types pkg rule

* chore(NA): first alpha api extractor working version

* chore(NA): support kbn-analytics

* chore(NA): correctly read tsconfig files and deps from ts_config rule

* chore(NA): layed out pkg_npm_types tree artifact custom rule

* chore(NA): missing todos

* chore(NA): node modules link mapping

* chore(NA): fully working pkg_npm_types rule

* chore(NA): fix changes on new packages using elastic datemath pkgs

* docs(NA): remove todo

* docs(NA): last todo text correction

* chore(NA): removed commented lines

* fix(NA): include missing package version

* chore(NA): include license keys

* chore(NA): change mock types package into private

* chore(NA): disable validator on ts_project rule

* chore(NA): use the wrapper for ts_project

* commit using @elastic.co

* chore(NA): commit using @elastic.co

* chore(NA): split types from code on @kbn/i18n

* chore(NA): update yarn.lock file

* chore(NA): split @kbn/i18n and @kbn/i18n-react

* chore(NA): missing import fix

* chore(NA): fix jest project configs

* chore(NA): change imports on kbn i18n

* chore(NA): change imports on kbn i18n

* chore(NA): correct loader imports

* chore(NA): missnig i18nLoader export key

* chore(NA): fix type exports

* chore(NA): export type only

* chore(NA): export type only

* fix(NA): type exports

* chore(NA): missing @Kbn/i18n/react imports

* chore(NA): missing skip path for kbn-i18n-react

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-24 17:18:03 +00:00
Joe Reuter
8398d53da4
[Lens] Get rid of giant union type (#118848) 2021-11-19 13:00:35 +01:00
Greg Thompson
cd8c648012
Upgrade EUI to v41.0.0 (#117242)
* eui to v41.0.0

* update eui i18n tokens

* sass tokens

* EuiLoadingKibana

* EuiCodeEditor

* subdued

* betaBadgeProps

* EuiCodeEditor null-loader

* src secondary -> success

* [enterprise_search] Deprecate 'secondary' color prop

* [apm] Deprecate 'secondary' color prop

* [canvas] Deprecate 'secondary' color prop

* [cases] Deprecate 'secondary' color prop

* [cross_cluster_replication] Deprecate 'secondary' color prop

* [data_enhanced] Deprecate 'secondary' color prop

* [data_visualizer] Deprecate 'secondary' color prop

* [fleet] Deprecate 'secondary' color prop

* [index_management] Deprecate 'secondary' color prop

* [infra] Deprecate 'secondary' color prop

* [ingest_pipelines] Deprecate 'secondary' color prop

* [maps] Deprecate 'secondary' color prop

* [ml] Deprecate 'secondary' color prop

* [monitoring] Deprecate 'secondary' color prop

* [observability] Deprecate 'secondary' color prop

NB: conditional became `type === 'success' ? 'success' : type` after find&replace, which felt fairly redundant, so I simplified it

* [osquery] Deprecate 'secondary' color prop

* [painless_lab] Deprecate 'secondary' color prop

* [remote_clusters] Deprecate 'secondary' color prop

* [rollup] Deprecate 'secondary' color prop

* [security] Deprecate 'secondary' color prop

* [security_solution] Deprecate 'secondary' color prop

NB: several conditional became `type === 'success' ? 'success' : type` after find&replace, which felt fairly redundant, so I simplified them

* [snapshot_restore] Deprecate 'secondary' color prop

* [spaces] Deprecate 'secondary' color prop

* [transform] Deprecate 'secondary' color prop

* [triggers_actions_ui] Deprecate 'secondary' color prop

* [uptime] Deprecate 'secondary' color prop

* [watcher] Deprecate 'secondary' color prop

* [infra] replace ambiguous 'secondary' color

- GaugesSectionVis doesn't appear to use the color property but it's required by the SeriesOverrides types, so changing it just in case

* [examples] Deprecate 'secondary' color prop

* [uptime] deprecate 'subdued' prop on EuiButtonIcon

* revert EuiKeyPadMenuItem betaBadge props

* mobileOptions

* examples/ updates

* fix brace import

* fix type exports

* update expressions_explorer requiredBundles

* remove make_id mocks

* snapshot updates

* fix import 🤦

* Fix `ReferenceError: ace is not defined` Jest failures

* Remove unused brace import (?)

- Assuming here, as no code editor is actually being used in this file

* Fix failing Jest test due to EuiCodeEditor moving to es_ui_shared plugin

+ minor cleanup of `jest.mock()`s

* Fix failing Jest test due to snapshot update

* Fix failing `TypeError: Cannot read properties of undefined (reading 'euiBorderRadius')` Jest test

- since this is being mount()'d, EuiThemeProvider as a wrapper is needed to prevent the failure

* access uiSettings

* Move react-ace dependency into kbn-ui-shared-deps-npm

* Revert App Search shenanigans

- caused local unsaved changes shenanigans, somehow

* secondary -> success

Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen@elastic.co>
2021-11-18 12:29:51 -06:00
Shahzad
13dedff792
[Exploratory view] Fix embeddable example (#117495)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-15 10:11:54 -07:00