Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project.
OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest`
Blocker to #72569
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [ML] table config in the URL state
* [ML] fix job list on the management page
* [ML] store query filter in the URL
* [ML] fix context for the management page
* [ML] update module_list_card.tsx in Logs UI
* [ML] fix unit tests
* [ML] fix unit tests
* [ML] fix unit tests
* [ML] move utils functions
* [ML] url generator to support both job and group ids
* [Metrics UI] Add endpoint for Metrics API
* Adding the ability to caculate the interval based on a module
* fixing types
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Mimics metrics permissions for alert mgmt in logs feature
* Updates logs security functional tests
Alert management permissions were added for read and all logs users in this PR, so both of these users now have "Stack Management" appear in the nav.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Metrics UI] Fix Metrics Explorer API to return empty results when field is missing from aggregation
* Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.ts
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Fixing type
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Removes the `npStart` legacy singleton used during the migration to the new platform. The singleton was used in API calls to access the `http.fetch` service. To remove the singleton we have injected `fetch` as a dependency in all functions.
Upgrade to Storybook 6 and attempt to use the declarative configuration.
The goals of this PR (as part of Kibana's Storybook roadmap, are:
Upgrade to Storybook 6
Still allow running Storybooks with yarn storybook plugin_name
Use the declarative configuration to (hopefully) make the configuration simpler to use an easier to understand, as well as avoiding deprecation warnings and loss of future compatibility
The ways in which what I have so far differs from how we do things today are:
In the alias configuration it takes a path to a storybook configuration directory instead of the storybook.js file from before
Each plugin (it doesn't have to be a plugin; can be any directory) has a .storybook/main.js (the aliases file in @kbn/storybook specifies these locations) where they can define their Storybook configuration. You can require('@kbn/storybook').defaultConfig to get defaults and override them
@kbn/storybook has a preset that can provide Webpack and Babel configuration and Storybook parameters and decorators
Instead of dynamically creating the list of stories to import, we define them in the globs of the stories property in .storybook/main.js.
Do not build a DLL. We are using @kbn/ui-shared-deps as externals. Startup time is not quite as fast but still acceptable.
Other things done in this PR:
Allow default exports in .stories. to allow for Common Story Format CSF stories
Add guard in Webpack configuration needed for overriding CSS rules
Update filename casing check to allow for files with required names in Storybook
Clean up observability stories
Rename *.examples.tsx and *.story.tsx to *.stories.tsx
* Add ability to fetch anomalies by metric
* Add ability to fetch anomalies to timeline
* Show anomaly annotation on timeline
* Fix type check
* Fix typos
* Add influencers to tooltip, add legend
* Remove unused variable
* Only show anomalies with a score greater than 50
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add ratio alerting to log threshold alerts
* Fix i18n
* Move grouped query must not filtering from outer to inner clause
* Use new ratio alerting layout
* Use better defaults for ratio alerts
* Remove div wrapper
* Remove type casting, use user-defined type guards
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* added comment about importing lodash library
* fixed space with prefer
* cleaned up extra space and removed comments for lodash/fp
* took out the comment in server files
* Remove newlines
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
This adds dataset-specific categorization warnings for the categorization module. The warnings are displayed in call-outs on the relevant tabs as well as the job setup screens if a prior job with warnings exists. To that end this also changes the categorization job configuration to enable the partitioned categorization mode.
Co-authored-by: Alejandro Fernández Gómez <antarticonorte@gmail.com>
* adds metrics ml integration
* Add ability to create ml jobs from inventory
* Fix i18n stuff
* Fix typecheck
* renames jobs, updates datafeeds
* adds allow_no_indices: true for datafeeds
* Revert "[Metrics UI] Replace Snapshot API with Metrics API (#76253)"
This reverts commit 0ca647286a.
* Add ability to fetch anomalies
* Fix typecheck
* Fix typecheck
* Fix i18n
* Fix lint, use the right partition field
* Delete log files
* Fix merge
* Fix merge issues
* Update name of jobs
* Remove CPU job
* [Metrics UI] Replace Snapshot API with Metrics API (#76253)
- Remove server/lib/snapshot
- Replace backend for /api/infra/snapshot with data from Metrics API
- Fixing tests with updates to the snapshot node
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add links back to ML for anomalies and manage jobs
* Fix typecheck
* Remove unecessary validation
Co-authored-by: Michael Hirsch <michaelahirsch@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Chris Cowan <chris@chriscowan.us>
This fixes#76493 by querying for the "unknown" (i.e. empty) dataset using an exists clause. This should be in line with how ML anomaly detection treats missing partition values.
* Grouped features for space management
* Apply suggestions from code review
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Address PR Feedback
* docs changes
* updating types/docs
* update APM feature name
* Reintroduce extraAction following EUI update
* change ordering of infra features, and render callout for management category
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Remove server/lib/snapshot
- Replace backend for /api/infra/snapshot with data from Metrics API
- Fixing tests with updates to the snapshot node
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [ML] Switching to new es client
* further conversions
* fixing tests
* updating responses
* test commit
* refactoring shared services to removed context parameter
* removing last scoped clients
* removing ml js client
* udating file data viz errors
* fixing jest tests
* fixing types after merge with master
* error response changes
* adding default sizes to some requests
* adding custom error types for license checks
* tidying up shared function checks
* removing test data
* removing need for DummyKibanaRequest
* updating comment
* fixing functional api tests
* removing comments
* fixing types after master merge
* throw error rather than return it
* removing placeholder error
* changes based on review comments
* fixing types after merge with master
* fixing missing return
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* bump ts to v4
* MOAR RAM
* fix type errors for OSS
* first pass on x-pack errors
* second pass on x-pack type errors
* 3rd pass on x-pack type-errors
* mute errors if complex cases
* don't delete if spread suffices
* mute other complex cases
* make User fields optional
* fix optional types
* fix tests
* fix typings for time_range
* fix type errors in x-pack/tests
* rebuild kbn-pm
* remove leftovers from master update
* fix alert tests
* [Telemetry Checker] TS4 Fixes
* bump to 4.0.1-rc
* fix new errors in master
* bump typescript-eslint to version supporting TS v4 syntax
* fix merge commit errors
* update to the stable TS version 4.0.2
* bump ts-eslint to version supporting ts v4
* fix typo
* fix type errors after merge
* update ts in another new package.json
* TEMP: remove me
* Revert "TEMP: remove me"
This reverts commit dc0fc3bae6.
* [Telemetry] Update snapshot for new TS4 SyntaxKind
* bump prettier to support TS v4 syntax
* fix prettier rules
* last style change
* fix new type errors
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Catherine Liu <catherine.liu@elastic.co>
Co-authored-by: Ryan Keairns <contactryank@gmail.com>
Co-authored-by: Catherine Liu <catherineqliu@outlook.com>
Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
* improve test stability
* Replace SearchRequest = any with Record<string, any>
* Remove SearchResponse = any from data plugin
* docs
* logs
* Revert "Replace SearchRequest = any with Record<string, any>"
This reverts commit 9914ab5a01.
* code review
* list control
* null check
* null null null
* Jest fix
This replaces the use of the old graphql-based `useSource` hook with the new plain JSON `useLogSource` hook.
It also fixes two more problems:
- A rendering problem with the source configuration loading screen and a `setState` race condition in the `useLogSource` hook.
- A non-backwards-compatible change of the `/link-to/:sourceId/logs` route in #61162.
* [Metrics UI] Fix hasData call to ensure it has data not just indices
* Fixing formatting
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This PR removes the alerting and actions ui privileges (alerting:show, actions:show, etc...) and instead relies on the standard Kibana feature control model to decide whether management displays the Alerts Management section under management.
* Add test for logs and metrics telemetry
* wait before you go
* Remove kubenetes
* Fix type check
* Add back kubernetes test
* Remove kubernetes
* Don't allow deleting default default view.
* Fix bug with duplicate loads of data.
Because the load data function takes options.source and the source of options can change, we need to remove it from deps
* Remove unused variable
* Reload when loadData function is changed
* Don't send the request immediately
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This adds several missing Machine Learning capabilities checks to the UI to make sure the user doesn't run into downstream errors resulting from the lack of permissions. It also updates the messages of the permission prompt screens to refer to the new Kibana Machine Learning permissions instead of the old built-in roles.
This PR adds _Role Based Access-Control_ to the Alerting framework & Actions feature using Kibana Feature Controls, addressing most of the Meta issue: https://github.com/elastic/kibana/issues/43994
This also closes https://github.com/elastic/kibana/issues/62438
This PR includes the following:
1. Adds `alerting` specific Security Actions (not to be confused with Alerting Actions) to the `security` plugin which allows us to assign alerting specific privileges to users of other plugins using the `features` plugin.
2. Removes the security wrapper from the savedObjectsClient in AlertsClient and instead plugs in the new AlertsAuthorization which performs the privilege checks on each api call made to the AlertsClient.
3. Adds privileges in each plugin that is already using the Alerting Framework which mirror (as closely as possible) the existing api-level tag-based privileges and plugs them into the AlertsClient.
4. Adds feature granted privileges arounds Actions (by relying on Saved Object privileges under the hood) and plugs them into the ActionsClient
5. Removes the legacy api-level tag-based privilege system from both the Alerts and Action HTTP APIs
This removes an unnecessary JSON encoding step of values before they are passed to the field column component used in the log entry example rows in both the Anomalies and Categories tabs.
This modifies the ML job setup flyout of the anomalies tab to offer a list of the two available modules. Via the list each of the modules' jobs can be created or re-created.
* Add test for logs and metrics telemetry
* wait before you go
* Remove kubenetes
* Fix type check
* Add back kubernetes test
* Remove kubernetes
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* creating overview page and menu
* styling the home page
* adjusting breadcrumb
* renaming isnt working
* renaming isnt working
* renaming isnt working
* fixing import
* fixing scroll when resize window
* fixing eslint errors
* prepending links
* adding target option
* refactoring
* adding dark mode support
* fixing prettier format
* fixing i18n
* reverting some unnecessary changes
* addressing PR comments
* fixing functional tests
* ordering observability menu
* fixing tests
* addressing PR comments
* fixing scroll
* addressing pr comments
* addressing pr comments
* creating overview page
* mocking data
* mocking data
* refactoring
* crearting apm chart
* adding overview page
* adding metric charts
* adding charts
* changing mock data location
* adding mock registry
* adding date picker
* adding route validation
* adding io-ts
* adding io-ts
* adding io-ts support
* fixing imports and mock data
* adding app folder
* creating a section for each plugin
* adding stats
* adding domain min max
* refactoring xcoordinaters
* fixing route
* adding bucket size
* adding group property on logs
* adding home page
* dont break page if location state is undefined
* each component fetches its own data
* Refactoring
* adding loading indicator to chart
* fixing uptime chart
* adding brush functionality to charts
* fixing refresh button and auto refresh function
* adding horizontal line to accordion section
* adding emptySection to dashboard page
* adding add data button
* adding resources section
* removing margins from horizontal rule
* changing min interval to 60s
* fixing empty section
* removing unnecessary code
* adding unit tests
* fixing imports
* adding initial story book for observability
* removeing uptime mock data
* fixing xDomain to show correct data on x-axis
* fixing empty state alignment
* adding story book and other improvements
* adding news component
* adding support to custom colors on EuiProgress and EuiStats
* removing infra mock data
* adding error message when api throwns an error
* adding alert section
* Adding alerts
* adding alert api call
* addressing PR comments
* adding storybook
* adding feedback button
* addressing PR comments
* chamging plugins return data
* fixing kibana app navigation
* fixing unit test
* fixing ts issues
* addressing PR comments
* using lodash truncate
* adding comment
* updating public documentation
* fixing alerts request
* fixing unit test
* fixing unit test
* aligin beta badge to the center
* adding moment duration to get the units as seconds
* addressing PR comments
* addressing PR comments
This add support for the new index name patterns `logs-*` and `metrics-*` of the new indexing strategy to the Logs and Metrics UI source configurations in the form of a migration and changed defaults.
* Remove top level chart
Remove top level anomalies chart
* Refactor table columns to accomodate new formatting
* Tyical vs actual stats in expanded row
* Format message based on actual vs typical
* Start fleshing out log rate examples endpoint and lib methods
* Use the real document ID for expanded rows so React doesn't re-render content
* Add all data fetching resources for log entry rate examples
* Move log entry example and severity indicator components to a shared location
* Render examples for log rate
* Add severity indicator
* Styling tweaks
* Move horizontal button popover menu to a shared components so log rate table can use it
* Revert "Move horizontal button popover menu to a shared components so log rate table can use it"
This reverts commit f80db5984d.
* Add "view in stream" and "view in anomaly explorer" links
* Hook links into the new context menu component
* Add log column headers and add styling tweaks etc
* Fix translations
* Tweak comments
* Chart tweaks
* Update x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/expanded_row.tsx
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* PR amendments
- Pass href to context menu items
- Fix start and end times used for example logs
- Use "fewer" rather than "less"
* Update x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/table.tsx
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Update x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Update x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Update x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/table.tsx
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Update x-pack/plugins/infra/server/routes/log_analysis/results/log_entry_rate_examples.ts
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Update x-pack/plugins/infra/server/routes/log_analysis/results/log_entry_rate_examples.ts
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Update x-pack/plugins/infra/server/routes/log_analysis/results/log_entry_rate_examples.ts
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Update x-pack/plugins/infra/server/routes/log_analysis/results/log_entry_rate_examples.ts
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* PR amendments
- Fix typechecking
- Add an empty log example column header to account for the context menu
- Add anomaly start time to rows
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* chore(NA): upgrade oss to lodash4
chore(NA): migrate cli, cli_plugin, cli_keystore, dev, test_utils and apm src script to lodash4
chore(NA): missing file for cli plugin
chore(NA): add src core
chore(NA): es archiver and fixtures
chore(NA): try to fix functional test failure
chore(NA): migrate src/legacy entirely to lodash4 except src/legacy/core_plugins
chore(NA): move legacy core plugins to lodash4
chore(NA): upgrade optimize to lodash4
chore(NA): upgrade to lodash4 on advanced_settings, charts, console and dashboard
chore(NA): migrate to lodash4 on dev_tools, discover, embeddable, es_ui)shared, expressions, home plugins
chore(NA): upgrade data plugin to lodash4
chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4
chore(NA): missing data upgrades to lodash4
Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4"
This reverts commit 137055c5fed2fc52bb26547e0bc1ad2e3d4fe309.
Revert "Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4""
This reverts commit f7e73688782998513d9fb6d7e8f0765e9beb28d1.
Revert "chore(NA): missing data upgrades to lodash4"
This reverts commit 92b85bf947a89bfc70cc4052738a6b2128ffb076.
Revert "chore(NA): upgrade data plugin to lodash4"
This reverts commit 88fdb075ee1e26c4ac979b6681d8a2b002df74c6.
chore(NA): upgrade idx_pattern_mgt, input_control_vis, inspector, kbn_legacy, kbn_react, kbn_usage_collections, kbn_utils, management and maps_legacy to lodash4
chore(NA): map src plugin data to lodash3
chore(NA): missing lodash.clonedeep dep
chore(NA): change packages kbn-config-schema deps
chore(NA): update renovate config
chore(NA): upgrade vis_type plugins to lodash4
chore(NA): move vis_type_vislib to lodash3
chore(NA): update visualizations and visualize to lodash4
chore(NA): remove lodash 3 types from src and move test to lodash4
chore(NA): move home, usage_collection and management to lodash 3
Revert "chore(NA): move home, usage_collection and management to lodash 3"
This reverts commit f86e8585f02d21550746569af54215b076a79a3d.
chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3
chore(NA): update x-pack test to mock lodash4
Revert "chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3"
This reverts commit 2d10fe450533e1b36db21d99cfae3ce996a244e0.
* chore(NA): move x-pack and packages to lodash 4
* chore(NA): remove mention to lodash from main package.json
* chore(NA): remove helper alias for lodash4 and make it the default lodash
* chore(NA): fix last failing types in the repo
* chore(NA): fix public api
* chore(NA): fix types for agg_row.tsx
* chore(NA): fix increment of optimizer modules in the rollup plugin
* chore(NA): migrate `src/core/public/http/fetch.ts` (#5)
* omit undefined query props
* just remove merge usage
* fix types
* chore(NA): fixes for feedback from apm team
* chore(NA): recover old behaviour on apm LoadingIndeicatorContext.tsx
* chore(NA): fixes for feedback from watson
* Platform lodash4 tweaks (#6)
* chore(NA): fix types and behaviour on src/core/server/elasticsearch/errors.ts
* Canvas fixes for lodash upgrade
* [APM] Adds unit test for APM service maps transform (#7)
* Adds a snapshot unit test for getConnections and rearranges some code to make testing easier
* reverts `ArrayList` back to `String[]` in the painless script within `fetch_service_paths_from_trace_ids.ts`
* chore(NA): update yarn.lock
* chore(NA): remove any and use a real type for alerts task runner
Co-authored-by: Gidi Meir Morris <github@gidi.io>
* chore(NA): used named import for triggers_actions_ui file
* chore(NA): fix eslint
* chore(NA): fix types
* Delete most uptime lodash references.
* Simplify. Clean up types.
* [Uptime] Delete most uptime lodash references (#8)
* Delete most uptime lodash references.
* Simplify. Clean up types.
* chore(NA): add eslint rule to avoid using lodash3
* chore(NA): apply changes on feedback from es-ui team
* fix some types (#9)
* Clean up some expressions types.
* chore(NA): missing ts-expect-error statements
* Upgrade lodash 4 vislib (#11)
* replace lodash 3 with lodash 4 on vislib plugin
* Further changes
* further replacement of lodash3 to 4
* further work on upgrading to lodash 4
* final changes to update lodash
* chore(NA): upgrade data plugin to lodash4
chore(NA): upgrade data plugin public to lodash4
chore(NA): fix typecheck task
chore(NA): fix agg_config with hasIn
chore(NA): assign to assignIn and has to hasIn
chore(NA): upgrade data plugin server to lodash4
chore(NA): new signature for core api
fix(NA): match behaviour between lodash3 and lodash4 for set in search_source
* chore(NA): remove lodash3 completely from the repo
* chore(NA): fix x-pack/test/api_integration/apis/metrics_ui/snapshot.ts missing content
* chore(NA): fix lodash usage on apm
* chore(NA): fix typecheck for maps
* Patch lodash template (#12)
* Applying changes from https://github.com/elastic/kibana/pull/64985
* Using isIterateeCall, because it seems less brittle
* Also patching `lodash/template` and `lodash/fp/template`
* Reorganizing some files...
* Revising comment
* Ends up `_` is a function also... I hate JavaScript
Co-authored-by: Pierre Gayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Oliver Gupte <ogupte@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: kobelb <brandon.kobel@elastic.co>
* Switches mount callbacks to only use start deps
Fixes#58014
* Sets up skeleton logs data fetchers for overview
* Fixes type hacks for logs fetcher
* Prevent kibana from crashing on initial load
* Fixes types and linting errors
* Fixes some linting import/export issues
Co-authored-by: Alejandro Fernández Gómez <alejandro.fernandez@elastic.co>
* Works-ish
* Load the default view without throwing error
* Design feedback
* Update Saved Views design on Metrics explorer
* Fix types
* UX improvements when saving and editng
* Only load default view if there is no state from anywhere else.
* Add loading indicator and other polish
* Hide saved view menu when opening modals
* Fix typecheck
* Fix typo
* Fix translations
* move last snapshot to inline
* move legacy files to legacy subfolder
* move request types out of legacy
* export Headers from http instead of elasticsearch
* renaming - first pass
* renaming - second pass
* fix core mocks
* adapt new calls
* update generated doc
* fix IT test mocks
* fix new usages
This modifies the routes related to log rate and category analysis to use the new programmatic APIs provided by the `ml` plugin to access the results index and job info. Because that access is facilitated via the request context, the log analysis lib was converted from classes to plain functions.
At the same time the routes have been updated to use the most recent validation and error handling patterns.
* add babel support for export type
* bump ts version to 3.9.3
* rebuild kbn-pm
* bump typescript-eslint
* fix error in security plugin UI
* check export as works
* fix app migration type
* use correct test subj attribute
* fix errors from the old PR
* embeddable is already passed in props
* explicitly define type of fetch
* add some types for viz
* fix fetch type p.2
* add null to allow spreading without type errors due to override
* add type guard to fix type error
* cast to any, since cannot assign unknown
* add timestamp to known types
* fix type error in fetch
* fix type error. id is always defined in attibutes
* declare a type
* move ts-ignore to the lines with errors
* declare tuple type explicitly
* mute type error. cannot assign unknown
* fix errors. id is always defined
* fix error type
* fix override errors. id is always defined
* fix error. extends any doesn't work anymore
* fix type error. type is always defined
* env doesn't always contain values
* fix type error
* cast to string
* add: logs is already declared in getNodeLogsUrl
* state is already passed in props
* fix some errors in timelion
* number of fragments is always defined
* 'absolute' is not just string, but value
* TEMP: option is always defined
* always true if cast to promise manually
* both props are always defined
* explicitly define returned SO type
* workaround type
* bump tslib to be compatible with ts v3.9
* test private property
* rebuild kbn-pm
* Fix ts errors for beats management
* Fix type inference broken by the TS 3.9 upgrade
* Fix ingest manager saved object attributes typings
* Fix TS errors in cross_cluster_replication and index_management.
* Fix TS error in Watcher.
* roll back colorRange wrong type
* fix security plugin types
* TypeScript 3.9 fixes for APM
* Fix ColorRange types.
* fix actions & alerts errors. ByGidi
* fix lists error
* More APM fixes
* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`
Fixes#67804.
* fix platform type error
* Fix visualizations types.
* Fix data plugin types.
* bump TS version to 3.9.5
* Fix telemetry TS errors
* Fix dashboard code
* Adding Canvas Fixes for TS 3.9
* Fix case and security_solution types
* roll back to the old export syntax. new one might cause problems in api-extractor
* update docs
* Fix timelion code
* Fix meta
* Fix types
* fix type errors om ingest_manager
* bump babel deps
* enable private props & methods syntax
* update kbn-pm dist
* whitelist 0BSD license
* use @babel/plugin-proposal-private-methods in default set as well
* disable new babel plugins
* Revert "disable new babel plugins"
This reverts commit 04d959431d.
* cleanup security_solution types
* Fixes type error for newer TypeScript
* update docs
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Metrics UI] Fix Inventory View sorting by handling null values
* Fixing situation where the id is not unique
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This refactors the browser-side plugin bootstrap code such that the eagerly loaded bundle `infra.plugin.js` is minimal and the rest of the logs and metrics app bundles are loaded only when the apps are visited.
* Migrated uiSettings items to new platform
* API changes
* Fixed translations
* Fixed comment and i18n
* Fixed tests
* Fixed internalization
* Fix karma tests
* made code more explicit
* Fixed plugin
* Added consts for ui settings ids.
* Added id for another settings
* Fixed tests.
* Improved imports
* Fix imports to public which were happening from the server.
* Fixed paths
* Moved styles to plugin.ts
* Moved styles
* Fixed docs
* Fix ci
* Fix ci
* fix documentation
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
* Add context variables for metric, value and threshold with descriptions
* Remove timestamp from this PR
* sentences are hard
* Fix lint rules
* Add more usage examples
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Metrics UI] Add overrides to Snapshot API to support alert previews
* Renaming tests from infra to metrics_ui; renaming waffle to snapshot; adding tests for overrides
* removing limit and afterKey; removing extra interval
* Setting the minimum value for lookbackSize
* chore(NA): avoids imports of server or public code into common
* chore(NA): fix imports from public or server into common
* chore(NA): fix typechecking for data plugin stubs
* chore(NA): fix types and tests related with licensing plugin
* chore(NA): fix problems on infra plugin
* chore(NA): fix typo on .eslintrc.js
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
* chore(NA): migrate to license mock usage on security plugin licensing module
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
* [New Platform Migration]: Management - Implement NP API
Part of #47432
* partial progress on a number of management sections
* fix passing history
* Fixed types
* Fixed routing for Ingest Node Pipelines
* introduce and use react router wrapped eui components
* react router utils
* work in progress => hashRouter to router
* more partial progress
* remove console.log
* use reactRouterNavigate for management_sidebar
* Breadcrumbs will need to make use of the reactRouterNavigate function
* [triggersActions] app. Hash Router -> Router
* Replace /app/kibana#/management urls to /app/management
* remove ui/public/management
* fix some links to management apps
* fix management url for functional tests
* add data-test-subj for EuiSideNavItem
* partial progress
* fix some of ts issues
* Fixed breadcrumbs for data index management
* [kibana/spaces] section
* fix functional test
* [role_management] fix Breadcrumbs
* [api_keys] fix Breadcrumbs and Navigation
* Fixed routing for remote cluster
* [role_mapping] Partial progress
* [users] partial progress
* [watcher] partial progress
* fix eslint issues
* [snapshot_restore] partial progress
* [rollup_jobs] partial progress
* Fixed routing for cross cluster replications (partial progress). Enhanced reactRouterNavigate
* Perf optimization: fix extra re-rendering
* fix TS errors
* x-pack fix config for functional tests
* Fixed routing for index lifecycle management
* fix some broken CI tests
* fix PR comment
* [snapshot_restore] move onClick into reactRouterNavigate
* fix some jest
* fix some functional tests
* fix functiona test: management scripted fields testing regression for issue
* fix some functional tests
* [licence_management] partial progress
* Fixed x-pack jest tests
* [saved_object_management] partial progress
* Fixed some tests
* fix functional test: should add new role myroleEast
* Reverted part of changes for ml
* [transforms] partial progress
* fix TS errors
* fix functional: redirects to Kibana home
* add support of Backward compatibility
* fix functional: Saved objects management feature controls saved objects management global visualize all privileges listing redirects to Kibana home
* fix PR comment
* fix TS issues
* Fixed x-pack jest tests
* fix oss JEST
* Fixed functional test
* fix functional test
* fix PR comment
* Fixed i18n
* fix typo
* fix Styles
* Fixed paths for cross_cluster_replication
* fix wrong link
* Fixed jest
* Fixed some comments
* fix sorting
* fix type check
* fixed x-pack jest
* fixed x-pack jest
* reverted using of parentHistory
* Add debugging toasts to CCR.
* Comment out non-CCR functional tests.
* Fix typo.
* Uncomment non-CCR functional tests.
* Enable CCR.
* fix CI
* Add comment to explain why CCR is enabled by default and move config variable back to original location in CCR plugin.
* revert some changes in APM
* add space between index pattern name and tags
* fix function test
* Update x-pack/plugins/security/public/management/management_urls.ts
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Update x-pack/plugins/security/public/management/api_keys/api_keys_management_app.tsx
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Update x-pack/plugins/spaces/public/management/spaces_management_app.tsx
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Update x-pack/plugins/security/public/management/roles/roles_management_app.tsx
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Update x-pack/plugins/security/public/management/users/users_management_app.tsx
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Update x-pack/plugins/security/public/management/management_urls.ts
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Update x-pack/plugins/security/public/management/management_urls.ts
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* [security] getUrlForApp -> navigateToApp
* [mp] fix Uncaught (in promise) undefined
Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
LogPositionState doesn't always reevaluate the value of `endTimestamp`
when live stream is on. The [dependencies][1] for it to change rely on the
scroll position to update. If there's less than one scroll page or the
previous API call didn't return any entries, the `endTimestamp` would
not update.
We force `Date.now()` as an `endTimestamp` on the API call to ensure it
always gets the latest entries possible, regardless of the state. This
introduces some inconsistency that will be fixed once work beings on #65493.
[1]: fe4c164681/x-pack/plugins/infra/public/containers/logs/log_position/log_position_state.ts (L160-L173)
* [Metrics UI] Adding support for multiple groupings to Metrics Explorer
* Adding keys to title parts
* removing commented line
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Metrics UI] Fix validation for threshold values
* removing unused dependency
* cleaning up a bit
* Fixing validation to set error message per threshold
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Allow registered alert types to be non-editable
* Fixed isUiEditEnabled values
* Fixed due to comments
* fixed failing tests
* Enable alert type selection per alert consumer, only 'alerting' consumer can display other consumers alert types, but in case if it isEditable
* fixed tests
* Removed consumer property from the client side alert type registry and added server side property producer which purpose is to manage a feature logic
* fixed type check
* Fixed tests and type checks
* Removed error message for non registered plugins
* Fixed failing tests
* Fixed due to comments
* fixed test
* -
* revert logic for requiresAppContext
* Added close toast after saving alert
* [Metrics UI] Fix p95/p99 charts and alerting error
- Fixes#65561
* Fixing open in visualize for percentiles
* Adding test for P95; refactoring to use first consitently
* Added support for docLinks plugin in Connectors forms and missing save capabilities for modal dialog
* Fixed tests
* Extended alert context with application capabilities
* Fixed due to comments
* Fixed typecheck
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* migrate files from legacy path to new plugin path
* update file paths to reflect migrated files
* move minimal legacy client files back to legacy path in order to run kibana
* Completes the full cutover to the new kibana platform removing all shims and legacy adapters.
* Adds APM to ignored list for casing check.
* - moves public/utils/pickKeys.ts to common/utils/pick_keys.ts
- exposes getTraceUrl as a plugin static export of apm/public and updates import in infra
- fixes FeaturesPluginSetup import in apm/public app
- renames get_apm_index_pattern_titles -> get_apm_index_pattern_title
- getApmIndexPatternTitle is now a synchronous getter function
- removes unused comments and xpack.apm.apmForESDescription i18n translations
* Moves automatic index pattern saved object creation from
plugin start to when the Home screen first renders
* removed unnecessary legacy css imports
* fixed ci issues by:
- moving readOnly badge, and help extension setup to occure only
when apm app is mounted
- registering saved object types
- also moved createStaticIndexPattern from a react useEffect on the
APM home screen to when the app is mounted
* [Metrics UI] Add Charts to Alert Conditions
- Reorganize files under public/alerting
- Change Metrics Explorer API to force interval
- Add charts to expression rows
- Allow expression rows to be collapsable
- Adding sum aggregation to Metrics Explorer for parity
* Adding interval information to Metrics Eexplorer API
* Moving data hook into the expression charts component
* Revert "Adding interval information to Metrics Eexplorer API"
This reverts commit f6e2fc11be.
* Reducing the opacity for the threshold areas
* Changing darkMode to use alertsContext.uiSettings
* chore(NA): async import on infra plugin in order to avoid infra plugin on apm
* chore(NA): add async import into infra plugin to reduce apm bundle size
* docs(NA): including small note
* fix(NA): pass pluginsSetup as an argument
* chore(NA): fix missing type
* chore(NA): split register in two functions
* chore(NA): only register once
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Metrics UI] Fixes for editing alerts in alert management
* Change EuiFieldSearch to use onChange instead of onSearch
* Fixing groupBy
* Fixing the correct groupBy
* Add tests for datemath: `after` direction with a negative operator
* Add tests for datemath: `after` direction with a positive operator
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Work on #61313 has revealed that we don't have amock for AlertServices, which creates coupling between us and any solution depending on us, which makes it harder to make changes in our own code.
This PR adds mocks and uses them in SIEM, Monitoring and Uptime, so that we can make future changes without having to change outside solutions.