* WIP: register inventory metric threshold as lifecycle rule
* fix inventory executor error
* save alerts into ES
* temp
* basic format reason for inventory threshold
* clean up, fix i18n error and temporarily remove types
* delete serialized params
* include group name in the reason
* cleanup
* link to default metrics page
* grab the value and threshold for the inventory item
* fix typo
* fix check types
* remove threshold and currentValue, the reason field will contain this info for combined conditions
* remove thereshold and value from the reason, soon will be replaced by indexed reason field
* remove unnecessary export
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Alerting] Renamed Alerting framework AlertsClient to RulesClient according to the new terminology.
* fixed path
* fixed type checks
* fixed type checks
* [Discover] replace font awesome icons with eui
* [Discover] fix eslint
* [Discover] fix tests, update icon styles
* [Discover] fix eslint
* [Discover] fix functional related to awe icons
* [Discover] add empty line for scss file
* [Discover] fix eslint
* [Discover] simplify testSubjects
* Update src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_buttons.tsx
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
* Update src/plugins/discover/public/application/angular/doc_table/components/pager/tool_bar_pager_buttons.tsx
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
* [Discover] fix icons appearing problem
* [Discover] update test
* [Discover] remove redundant styles
* [Discover] update test snapshot
* Update src/plugins/discover/public/application/angular/doc_table/components/table_header/table_header_column.tsx
Co-authored-by: Tim Roes <mail@timroes.de>
* [Discover] change tool bar text size
* [Discover] update test
* [Discover] replace button with EuiButton
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Tim Roes <mail@timroes.de>
* Make types for setup more accurate. nonFatalErrors is always present
* Rename PostIngestSetupResponse to PostFleetSetupResponse
* Missed a rename to PostFleetSetupResponse
* Define schema for setup responses & share
* Add response schema for GET /agents/setup
* Response is array of enum; not enum
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [DOCS] Adds missions to landing page
* [DOCS] Adds links to release docs and improves missions
* [DOCS] Uses bold for top links
* [DOCS] Minor changes in ordering of items
* [DOCS] Updates links in landing page
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [data.search.session] Include version in search session saved object for warnings
* Don't show version message if not restorable
* Fix build
* fix ts, fix jest, add migration
* tests ts
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
* 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.
Vega is using the deprecated date histogram interval, which is failing the ES promotion.
Skipping the tests for now to unblock the snapshot promotion and the team can work to resolve the usage.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [TSVB] Add more functional tests for Gauge and TopN
* Update visual_builder_page.ts
* Update functions related to gauge color and filter ratio numerator in visual_builder_page
* Update visual_builder_page and add some more test subjects
* Update _tsvb_chart.ts
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add toggle to enable/disable rule install from SOs
* Fix lint and type tests
* Fix types for tests
* Enable prebuiltRulesFromSavedObjects with extra rules in fleet
* Restore rules and disable prebuiltRulesFromSavedObjects
* Pass explicit arguments instead of full config
* Set values in 'endpoint' setup
* Propagate prebuiltRulesFrom{FileSystem,SavedObjects} from configs
## [RAC] [TGrid] Migrate the TGrid's rendering to `EuiDataGrid`
This PR migrates TGrid's rendering to use `EuiDataGrid`, per the screenshots below:
![o11y_alerts](https://user-images.githubusercontent.com/4459398/126413504-e825a5a2-1cb5-475e-b514-01fb819793e1.png)
![security_solution_alerts](https://user-images.githubusercontent.com/4459398/126413546-28df8f28-fa81-4b97-91c6-667589ea683c.png)
Related RAC Issue: https://github.com/elastic/security-team/issues/1299
### Prerequisites to deleting legacy code (reducing bundle sizes)
To reduce the size of the `timelines` and `security_solution` plugins, legacy TGrid code and the dependency on `react-beautiful-dnd` will be removed in a follow-up PR.
- Related issue: https://github.com/elastic/kibana/issues/105941
The legacy code and dependencies will be deleted when the following tasks are completed (in follow-up PRs):
- Sorting: Map `redux` sort state to `EuiDataGrid`'s `sorting` prop
- Actions: Migrate draggable hover actions to `EuiDataGrid` `cellActions`
- related PR: <https://github.com/elastic/kibana/pull/105500>
- Use `BrowserFields` to display field metadata when hovering over a column
- related PR: <https://github.com/elastic/kibana/pull/105207>
- Migrate Security Solution's actions column config from a single column to multiple columns
### Desk testing
To desk test this PR, you must enable feature flags in the Observability and Security Solution:
- To desk test the `Observability > Alerts` page, add the following settings to `config/kibana.dev.yml`:
```
xpack.observability.unsafe.cases.enabled: true
xpack.observability.unsafe.alertingExperience.enabled: true
xpack.ruleRegistry.write.enabled: true
```
- To desk test the TGrid in the following Security Solution, edit `x-pack/plugins/security_solution/common/experimental_features.ts` and in the `allowedExperimentalValues` section set:
```typescript
tGridEnabled: true,
```
## 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
* Change security to a required plugin
* Change typings to reflect non-optional security dep
+ update KibanaLogic to no longer need a {} fallback
* Typings cleanup pt 2
Remove `!`s now that security is required
* Update checkAccess lib
- turns out I need to do a little more than just updating the requiredPlugin arr & types!
- based on my understanding of our 8.0 behavior Enterprise Search will not start if x-pack security is disabled, so we should probably opt to early disable the plugin for simplicity as well
* [PR feedback] yeet
* Adding function hooks into rule type definition and call extract fn on rule create
* Adding hooks for extracting and injecting saved object references. Adding extractReferences to create and update workflow
* Adding type template for extracted params
* Adding type template for extracted params
* Adding type template for extracted params
* Adding type template for extracted params
* Calling injectReferences function if defined. Finishing unit tests for create and update
* Adding tests for get
* Adding tests for find
* Cleanup
* Fixing types check
* Fixing functional tests
* Fixing functional tests
* Fixing tests
* Updating README
* Throwing boom error instead of normal error
* Adding framework level prefix to extracted saved object reference names
* Fixing types
* Fixing types
* PR fixes
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>