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.
* [Metrics UI] Refactor containers to hooks
* clean up depends; move useInterval out of useWaffleTime;
* converting WithWaffleFilters to useWaffleFilters
* Removing WithWaffleOptions
* Refactor WithWaffleViewState to useWaffleViewState
* Removing obsolete files
* Fixing race condition with complext state
* Adding undefined to RisonValue; unwinding changes trying to work around bad type
* Switching to context
* Change assertion to ignore the length of the current URL
* Fixing test frameork to accept urls longer then 230 characters
* Fixes#59395; Refactor WithMetricsTime to hook; Fixes brushing on metric detail page; fixes refresh button on metric detail page
* Fixing tests with adding timeRange
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Rename some alert types
* Use sentence case for remaining changes + fix jest test
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
resolves https://github.com/elastic/kibana/issues/60135
See the reference issue for how to configure Kibana to test this manually.
There are no automated tests for this ATM.
The basic test scenario is to create a role with just the Uptime space
privilege, make sure it get to the Alerts and Actions management app,
make sure you can create an action (server log), and alert (index threshold),
and that the alert and action run successfully.
Then repeat with just the Metrics space privilege.
* Add `context` to `logEntryRT`
* Query context fields
* Extract value to prevent type assertion
Co-Authored-By: Felix Stürmer <weltenwort@users.noreply.github.com>
* Add test for the context fields
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This PR:
1. Adds a callout on the Alerting UI when security is enabled but TLS is not
2. Cleans up displayed error message when creation fails due to TLS being switched off
* [Metrics Alert] Align date_histogram to last bucket
- adds extended_bounds to date_histogram
- change range query to use epoch_millis
- add lte to range query
- add offset to date_histogram to realign buckets
* Removing unused import
* Adding note about calculating FROM to be more clear
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* First pass
* First pass
* Add new routes
* Getting closer
* Remove legacy server code, and other fixes
* Register the plugin with xpack
* Pass a legacy client to telemetry
* Suport callWithInternalUser
* Remove this
* More NP work
* Fix some tests
* Fix broken test
* Move over new telemetry changes, and fix other issues
* Fix TODO item
* Reuse the same schema as elasticsearch module
* Use a singular config definition here
* Disable this for now
* Use the right method
* Use custom config again
* Tweak the config to make this optional
* Remove these
* Remove these unnecessary files
* Fix jest test
* Fix some linting issues
* Fix type issue
* Fix localization issues
* Use the elasticsearch config
* Remove todos
* Fix this check
* Move kibana alerting over
* PR feedback
* Use new metrics core service
* Change config for xpack_api_polling_frequency_millis
* Make sure this is disabled for now
* Disable both
* Update this to the new function
* Tighten up legacy api needs
* Check for existence
* Fix jest tests
* Cleaning up the plugin definition
* Create custom type in our plugin
* Revert this change
* Fix CI issues
* Add these tests back
* Just use a different collector type
* Handle errors better
* Use custom type
* PR feedback
* Fix type issues
* PR feedback
This moves the navigation bar and the source configuration loading indicator such that the bar is immediately visible and usable even before the source configuration has finished loading.
closes#56728
* [Metrics Alerts] Fix error when a metric reports no data
* Clarify no data case handler, add separate error state
* Throw error state when callCluster fails
* Add a hook for seamlessly handling onClick and href props of links, buttons etc
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Updated EUI to 20.0.1; updated typescript usage
* snapshots
* Upgrade to eui 20.0.2, fix one more type
* PR feedback
* Update EUI icon usage to the correct types
* Updated with master
* [Infra] Add basic backend for metric threshold alerts
* Define separate fired/recovered action groups
* Allow alerting on arbitrary search fields besides host.name
* Add list and delete endpoioints
* Add groupBy alerts
* Remove extraneous routes and SavedObject logic
* Remove additional SavedObject code
* Remove renotify logic from executor
* Fix action group type
* Fix scheduledActions typecheck
* Fix i18n
* Migrate alerting to new platform
* Add alerting to infra dependencies
* Add comment about future use
* Adjust alert params tm names to sync with UI; default to Entire Infrastructure alert
* Add support for between comparator
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Metrics UI] Add custom metrics interface to Inventory View
* WIP
* Adding workflows for editing custom metrics
* Polishing visual design
* Removing extra text
* Fixing types and return values
* fixing i18n
* Adding aria labels for clearity
* Changing custom group by to match same width as custom metric
* updating integration test for custom metrics
* Fixing type def
In the NP the routes have already the app name on them. Adding it to
this button made the app name double
/app/metrics/metrics/settings
/app/logs/logs/settings
The button only needs to go to the settings page within the app where
it's being loaded, so we can safely drop the prefix.
Closes#58233
* Ensure only one element has scroll
Apparently having multiple elements with scroll confuses the
`react-beautiful-dnd` mechanism to determine the position of the
elements. Adding `overflowY` to the app root fixes it.
* Fix upper bound check for log column reordering
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Closes @56832 Migrates uses of the saved objects client to the internal
and context scoped clients exposed in the new platform core setup
* moves apm server, common, and typings dirs to the new plugin directory
* fixes path imports and type errors
* fixes some lint errors
* fixes CI failure. Use internal saved objects client like before.
* uses the context-scoped saved objects client for saving runtime APM indices,
and uses the internal saved objects client when creating apm index
pattern, so that any user who navigates to apm can trigger it
* fixes the type check error by updating import paths
* renamed files and directories to snake_case to pass scripts/check_file_casing
* rebase fixes and commit filename case changes
* moves get_indices_privileges.ts out of legacy path
* Fully migrates metrics and logs to the NP
Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Basic cleanup before refactoring for shim work
* shim WIP
* Removes the configuration adapter
* WIP more stuff
* WIP refactoring of shimming work
* WIP continues
* Logging UI now runs on top of new platform shim
* WIP continues
* Removes unused imports and variables
* Basic infra NP server shim in place
* Reimplemented graphql http error handling for infra NP server shim
* Adds new platform infra plugin to handle NP config for legacy server shim
* Basic cleanup before refactoring for shim work
* shim WIP
* Removes the configuration adapter
* WIP more stuff
* WIP refactoring of shimming work
* WIP continues
* Logging UI now runs on top of new platform shim
* WIP continues
* Removes unused imports and variables
* Basic infra NP server shim in place
* Reimplemented graphql http error handling for infra NP server shim
* Adds new platform infra plugin to handle NP config for legacy server shim
* Adds comment about duplicating full config for NP config
* Use New Platform features plugin to registerFeature()
* Re-arranging and relying on request context as uch as possible
* Refactors KibanaRequest for RequestHandlerContext
* fixes types for callWithRequest
* Moves callWithRequest method override types directly into class to get them working, need to fix this when we understand it better
* Fixes callWithRequest framework types
* Removes a few NP_TODO comments
* Fix broken imports
* Ensure GraphQL resolvers are actually passed requestContext and not the raw request, and switch to the savedObjects client via requestContext
* Remove the legacy traces of the savedObjects plugin
* Fixes TSVB access with NP raw requests and requestContext
* Remove unused getUiSettingsService (moved to requestContext)
* Migrate to new Spaces plugin
* Fix calculateMetricInterval after merged changes
* Reinstate and migrate the infrastructure metadata route
* Fix various type check errors
* Amend InfraSources lib unit tests
Mock the savedObjects client differently
* Amend MetricsExplorer API response
Renaming of variable inadvertently broke the response
* Remove GraphQLI references from feature controls tests
* Remove other GraphiQL references
* Fix security / access issue
* Add a framework level registerRoute method which always adds access tags by default
* *Temp* disable test
* Migrate the log rate validation endpoint to the new platform
Fully migrates the [Logs UI] log rate setup index validation #50008 PR to New Platform routing etc
* Amend types
* Example of how to expose APM get indices method in NP
* Fix calls to TSVB bug caused by object mutation
This is a temp fix as the TSVB NP migration will supercede this
* Converts getApmIndices function to accept saved object client, implements usage in infra
* Fix APM setup_request tests
* Fixes some unused references for linting
* Migrate all work from #50730 to NP
* Remove duplicate declaration files for rison_node and add a single source of truth at x-pack/typings/rison_node.d.ts for x-pack uses
* Moved type file back into infra plugin to bypass strange break
* Updates apm indices method signature per feedback from @elastic/apm-ui
* Change TSVB link to use KQL for filters; Apply filterQuery to TSVB requests
* Add test for filterQuery in TSVB data
* Reverting yarn.lock
* updating tests; removing derivedIndexPattern
* Removing commented out code
* Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/populate_series_with_tsvb_data.ts
Co-Authored-By: Felix Stürmer <weltenwort@users.noreply.github.com>
* Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/populate_series_with_tsvb_data.ts
Co-Authored-By: Felix Stürmer <weltenwort@users.noreply.github.com>
* Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/populate_series_with_tsvb_data.ts
Co-Authored-By: Felix Stürmer <weltenwort@users.noreply.github.com>
* Escaping possible double quotes in id fields and adding test case
* [Infra UI] Format arrays as ul elements in LogEntryFieldColumn
* Add enzyme test for LogEntryFieldColumn
* Fix tests
* Swap ul's for comma separation
* Use semantic markup for inline list
* Fix tests
* Use ::after element for comma separation
* Move ::after element to :not(:last-child)
* Hoist CommaSeparatedLi
* Use EuiThemeProvider in tests instead of isEnzyme prop
* Suppress type error with issue link
* [Infra UI] Support metrics for different docs in Metric Explorer
* Adding minimum_should_match to query
* Check there are shoulds before setting minimum_should_match
* [Infra UI] Link to Metrics Detail page from Metrics Explorer for compatible group bys
* Adding test for incompatible group bys
* renaming for clearity
* Changing out SourceQuery for SourceConfiguration
* Fixing tests to ensure link it validated
* Make tests more robust
* Update x-pack/plugins/infra/public/components/metrics_explorer/chart_context_menu.tsx
Co-Authored-By: Felix Stürmer <weltenwort@users.noreply.github.com>
* Adding definite assingment operattors
* Fixing flaky test
* Fixes display of date picker and streaming button grid
* Removes unused dependency that somehow slipped through the commit hook linter >.<
* Changes streaming button to empty style to de-emphasize a bit
* Updates streaming message to match standard case
* Updates yarn.lock for new core-js version that auto updated during bootstrap
* Removes unnecessary import
* Move log entry flyout and memoize some values
In preparation to the addition of an action menu, the log entry flyout
now lives in a directory.
* Add log entry action menu with uptime link
* Add component tests
* Remove static reference from memoization key
* Improve uptime filter value check
* Use an object as useVisibility return value
This PR adds column headers to the Logs UI. The header row also contains a quick link to the column configuration flyout. The detail flyout link, which was previously coupled to the `message` field, is now an independent column at the last position.
closeselastic/kibana#35780closeselastic/kibana#36105
* Adding link-to page for resolving IP to Host Details
* Adding intl support
* Adding source provider for link to via IP
* removing Source.Provider in favor of useSource hook
* rollback yarn.lock changes
* rollback package.json changes
* Initial code to force collectors to indicate when they are ready
* Add and fix tests
* Remove debug
* Add ready check in api call
* Fix prettier complaints
* Return 503 if not all collectors are ready
* PR feedback
* Add retry logic for usage collection in the reporting tests
* Fix incorrect boomify usage
* Fix more issues with the tests
* Just add debug I guess
* More debug
* Try and handle this exception
* Try and make the tests more defensive and remove console logs
* Retry logic here too
* Debug for the reporting tests failure
* I don't like this, but lets see if it works
* Move the retry logic into the collector set directly
* Add support for this new collector
* Localize this
* This shouldn't be static on the class, but rather static for the entire runtime
* Returning live data
* Adding TSVB data population
* adding tests
* Adding UI
* Adding rough draft of metrics control
* Breaking out metric component; adding useCallback to callbacks; adding intl strings
* seperating out form
* Break metrics form out; change to custom color picker; create custom color palette;
* fixing bug with color picker
* changes to color palette; fix callback issue
* Fixing count label
* Fix chart label to truncate
* Changing by to graph per
* Making the metric popover wider to ease field name truncation
* critical changes to the import order
* Changing metrics behavior
* Hide metrics when choosing document count
* Updating chart tooltip; fixing types;
* Setting intial state to open metrics; Tweaking toolbar sizes
* fixing linting issues
* Allow users to filter by a grouping by clicking on the title
* Change rate to rateMax; add rateMin and rateAvg; fix title text-align
* Use relative paths to fix base path bug
* fixing typescript errors; removing rateAvg and rateMin; removing extranious files;
* Fixing formatting issues
* Fixing i18n linting errors
* Changing to elastic-charts
* fixing typing errors with charts
* Moving afterKey out of URL to fix bug with pagination
* Adding support for multiple axises
* Adding tests for useMetricsExplorerData hook
* breaking up the charting code; removing multi-axis support; changing color palette to use blue and red for first two color
* Adding drop down menu to charts for filtering and linking to TSVB
* Adding more tests for useMetricsExplorerData hook; adding error message; adding chart options to non-groupby charts
* only display groupings that have the metric fields
* Refactor page level state into custom hook; add test for options handlers;
* Fixing linting
* removing color picker
* removing useInterval
* Changing group by to use the pills; Changing context menu button; adding icons to context menu.
* Adding test for color palette
* Adding test for createFormatterForMetric()
* removing tsx extension; adding tests for createMetricLabel()
* removing tsx extension; adding tests for createMetricLabel()
* re-organizing helpers
* Moving helpers from libs to helpers; adding test for metricToFormat
* Fixing bug in tsvb link fn; adding timeRange props; adding createTSVBLink() test
* fixing timeRange fixture import; fixing aria label for action button
* removing some unecessary useCallbacks
* Adding test for MetricsExplorerChartContextMenu component
* Fixing linting issues
* Optimizing test
* Adding empty prompts for no metrics and no data
* Removing duplicate sereis def
* tcs has lost it's mind so I had to copy enzyme_helpers.tsx into our plugin
* Appeasing prettier
* Update x-pack/plugins/infra/public/components/metrics_exploerer/metrics.tsx
Co-Authored-By: simianhacker <chris@chriscowan.us>
* fixing path typo
* Adding supportFiltering to dependicy; change options to be more specific
* remove typo
* Fixing typo
* Adding logColumns to source fixture; fixing typo
* Fixing path to be more sane
* Adding brushing to Metrics Explorer Charts
* [SR] Snapshot and restore plugin boilerplate (#32276)
* Initial plugin set up
* Set up client shell
* Add initial repository list routes
* Fix merge issues and some typings
* Decouple server from plugin.ts files, tighten up typings
* Use exported constant for required license
* Translate plugin name, more typings
* Fix more types, move list components under /home
* Remove unused var
* Change scss prefix
* Uncouple unmount logic from routing shim, and some other PR feedback
* [SR] Repository list and details UI (#33367)
* Initial pass at repositories list UI
* Add detail panel for file system repositories, and a generic detail panel with json settings view
* Add detail components for other types
* Add detail panel footer, rename `useStateValue` to `useAppState`
* Fix detail panel footer
* Fix unused vars
* PR feedback
* PR feedback
* [SR] Refactor proposal (#33690)
* Move app dependencies to its own context provider
* Add index.ts barrel file for common types
* Move Enums to constants.ts file
* Refactor function component using `React.FunctionComponent<Props>`
* Refactor service folder structure
* Fix type import
* Move REPOSITORY_DOC_PATHS from common to public constants
* Move AppCore and AppPlugins interfaces back to shim and re-export them from app types
* [SR] Create and edit repositories UI (#34020)
* Add routing and placeholder form
* Fix typings
* Set up edit repository route, and basic form UI
* Add typings for wrapCustomError, and copy extractCausedByChain from CCR wrapEsError
* Throw errors that are already boomified
* Create and edit for basic repository types (fs, url, source)
* Add repository verification UI to table and details
* Create and edit for plugin repository types (hdfs, azure, s3, gcs)
* Fix linting
* Fix test
* Fix test
* Remove unused import
* Fix duplicate i18n key
* Fix details opening on cancel edit, remove unnecessary Fragments, definition file for some EUI components to x-pack, rename saveError
* Remove breaks
* Adjust add and edit repo routes so they don't conflict with list route
* Add repo plugin and types doc links to form
* Bootstrap documentation service
* Bootstrap text service and replace RepositoryTypeName component with it
* Bootstrap breadcrumb service and replace usages
* Bootstrap httpService, remove chrome and http from app dependencies(!)
* Add request creator and replace all instances of useRequest and sendRequest with it
* Fix typo
* Simplify update repository and update repository setting methods
* Adjust copy
* Lint
* Remove unused var
* Remove unused import
* [SR] Add API for retrieving snapshots. (#34598)
* [SR] Single and multiple repository delete (#34593)
* Add single/multi repository delete API and UI
* Address PR feedback
* [SR] Add SnapshotTable and SnapshotDetails. (#34837)
* Remove associations between multiple repositories with a single snapshot.
* Retrieve complete snapshot details in getAllHandler.
* Fix cleanup function bug in useRequest hook.
* Fix bug in useRequest which prevented old data from being cleared when subsequent requests returned errors.
* Add initialValue config option to useRequest.
* Add formatDate service to text module.
* [SR] Fix linting and add (de)serialization for repositories (#35031)
* Fix eslint issues and add (de)serialization for repositories
* Add comment about flattening settings
* [SR] Surface repository errors and index failures more prominently (#35042)
* Add links to repositories from Snapshot Table and Snapshot Details.
- Rename services/breadcrumbs to services/navigation and add linkToRepository function.
- Refactor home component to update active tab when URL was changed.
* Add warning callout to let user know when their repositories contain errors.
* Sort failures by shard and add test for snapshot serialization.
* Sort failures and indices.
* Add filter for filtering snapshots by their repository.
* Surface states with humanized text, icons, and tooltips where necessary.
* Fix pluralization of seconds.
* Surface failures tab even if there are none.
- Display a '-' for missing times and durations.
- Create DataPlaceholder component.
* [SR] Polish repositories UX (#35123)
* Refactor repository detail panel to load repository based directly on route param.
* Display repository detail panel while table is loading.
* Make 'Edit repository' table action a link instead of a button.
* Render disabled EuiSelect as a readonly EuiFieldText.
* Prepend HDFS URI with hdfs:// protocol.
* Present scheme options for Read-Only URL repository as a select.
* [SR] Add client-side validation to repository form and link to snapshots from details (#35238)
* Add client side repository form validation, extract `flatten` into common lib
* Add snapshot count to repository details and link to snapshot list
* Reset validation when changing repository type
* Fix snapshot list filter deep linking for repository names with slashes and spaces
* Fix imports
* PR feedback
* [SR] Design and copywriting fixes (#35591)
* Split repository form into two steps; move `clean_settings.ts` to server
* Default to snapshots tab, adjust snapshot empty prompt, add app description
* Add minimum timeout to list view requests to avoid flicker, use EuiEmptyPrompt for loading screen, add doc link to settings step
* Add information about snapshots to delete repository behavior, add doc link for source only toggle, add size notation help text
* Add main doc link
* Copywriting and i18n fixes, and add some common settings to third party repo types
* Add fields to third party repo detail panel
* More copywriting fixes
* Use spinner for duration and end time if snapshotting is still in progress
* Show all repository type options, mark missing plugins
* Revert "Show all repository type options, mark missing plugins"
This reverts commit e34ee47cec.
* Fix space
* [SR] Add permissions UI and Cloud-specific repository type UI branch (#35833)
* Add missing permissions UI and cloud-specific repository type UI branch
* Add ES UI as owners of /snapshot_restore directory
* Add no repository types callout for Cloud edge case
* Redirect invalid section param to repositories
* Add warning empty prompt if all repositories have errrors
* Replace repository cards with EuiCard
* Add snapshot doc link to repository error empty prompt
* Remove auto-verification from list and get routes, add separate verification route, add manual verification to repository detail panel
* Update copy and remove obsolete test
* Remove unused scss files
* Final changes to repository cards
This exposes an API on the Kibana server object (old platform style) to define internal source configurations, which can not be edited by the user and take precedence above any stored configurations.
* [Infra UI] Adding from Infra UI to Uptime
* Removed unused variable
* Adding tests for link generation
* Sometimes the IP address will be an array with [IPv4, IPv6]
* Ensuring only IPv4 addresses are returned; adding tests;
* only showing uptime link for host's with ip addresses
* Returning live data
* Adding TSVB data population
* adding tests
* Adding UI
* Adding rough draft of metrics control
* Breaking out metric component; adding useCallback to callbacks; adding intl strings
* seperating out form
* Break metrics form out; change to custom color picker; create custom color palette;
* fixing bug with color picker
* changes to color palette; fix callback issue
* Fixing count label
* Fix chart label to truncate
* Changing by to graph per
* Making the metric popover wider to ease field name truncation
* critical changes to the import order
* Changing metrics behavior
* Hide metrics when choosing document count
* Updating chart tooltip; fixing types;
* Setting intial state to open metrics; Tweaking toolbar sizes
* fixing linting issues
* Allow users to filter by a grouping by clicking on the title
* Change rate to rateMax; add rateMin and rateAvg; fix title text-align
* Use relative paths to fix base path bug
* fixing typescript errors; removing rateAvg and rateMin; removing extranious files;
* Fixing formatting issues
* Fixing i18n linting errors
* Changing to elastic-charts
* fixing typing errors with charts
* Moving afterKey out of URL to fix bug with pagination
* Adding support for multiple axises
* Adding tests for useMetricsExplorerData hook
* breaking up the charting code; removing multi-axis support; changing color palette to use blue and red for first two color
* Adding drop down menu to charts for filtering and linking to TSVB
* Adding more tests for useMetricsExplorerData hook; adding error message; adding chart options to non-groupby charts
* only display groupings that have the metric fields
* Refactor page level state into custom hook; add test for options handlers;
* Fixing linting
* removing color picker
* removing useInterval
* Changing group by to use the pills; Changing context menu button; adding icons to context menu.
* Adding test for color palette
* Adding test for createFormatterForMetric()
* removing tsx extension; adding tests for createMetricLabel()
* removing tsx extension; adding tests for createMetricLabel()
* re-organizing helpers
* Moving helpers from libs to helpers; adding test for metricToFormat
* Fixing bug in tsvb link fn; adding timeRange props; adding createTSVBLink() test
* fixing timeRange fixture import; fixing aria label for action button
* removing some unecessary useCallbacks
* Adding test for MetricsExplorerChartContextMenu component
* Fixing linting issues
* Optimizing test
* Adding empty prompts for no metrics and no data
* Removing duplicate sereis def
* tcs has lost it's mind so I had to copy enzyme_helpers.tsx into our plugin
* Appeasing prettier
* Update x-pack/plugins/infra/public/components/metrics_exploerer/metrics.tsx
Co-Authored-By: simianhacker <chris@chriscowan.us>
* fixing path typo
* Adding supportFiltering to dependicy; change options to be more specific
* remove typo
* Fixing typo
* Adding logColumns to source fixture; fixing typo
* Fixing path to be more sane
* Add "View Surrounding Logs" functionality
Move Logs Flyout state from Redux to Hooks
* Cleanup unused imports etc
* Amend for Prettier
* Stop live streaming when a filter is applied
* Change tooltip wording
* Compose functions for props higher in the component hierarchy
* Don't make a request at all without a flyoutId
* Handle no response
* Use TimeKey on document
* Appease Prettier
* Clean up unused props
* Use shared InfraTimeKey fragment
* Add semicolon
* Fix maps layer flyout
* Fixing some flyout headers with border and size
* Using euiOverflowShadow to remove warnings
* Fixed up some regular modal usages
* Added danger colors to EuiConfirmModals where necessary
* Use new snapshot endpoint
* Remove old nodes endpoint
* Reintroduce NAME_FIELDS for displayable names.
* Use camelCase consistently.
* Distinguish node name and node id correctly.
* Adjust functional tests.
* Make prettier.
* Use exact same date histogram as before.
* Enable test for metric values again.
* Add test for new groupBy behaviour.
* Add 'Service Type' to groupBy fields.
* Fix date histogram offset and adjust tests.
* Always query for all metrics.
* Adding readonly badge to the discover application
* Dashboard get a badge
* Visualize gets a badge
* Timelion gets a badge
* Canvas gets a badge
* Maps gets a badge
* Infra gets a badge
* Graph gets a badge
* Dev Tools gets a badge
* Index Patterns get badges
* Advanced Settings get badges
* Infra and i18n are super chill friends
* Using proper i18n prefix for xpack
* Adding badges to the uptime application
* APM gets a badge!
* Adding functional tests for the discover read-only badge
* Functional tests for everyone!
* Removing unused import
* Fixing chrome service mock
* Switching from ChromeBadge | null to ChromeBadge | undefined
* Fixing canvas badge assertst
* Fixing Logs ui capabilities
* More ChromeBrand | null to ChromeBrand | undefined related changes
* Using named badges
* Revert "Using named badges"
This reverts commit c0e341bee1.
* i18n'ing the uptime read-only badges
* Adding ChromeService tests for badges
* Starting to add tests for the legacy badge API
* Changing capitalization of "Read Only" to "Read only"
* Adjusting styles
* Adding $setupBadgeAutoClear tests
* Changing the badge tooltip
* Fixing timelion i18n prefix
* Changing where Canvas sets the breadcrumbs
* Using a read-only badge with an icon
* Update x-pack/plugins/canvas/public/angular/controllers/canvas.js
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update src/legacy/core_plugins/timelion/public/app.js
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Changing discover's read-only verbiage
* Removing tests for code that moved to an untested part of Kibana
* Fixing issues introduced with the rebase
* Fixing priv ileges snapshot
* Adding back dropped docs
* Fixing plugin plugin doc
* Ensuring iconType is set as well
* Updating badge api, angular components moved
* graph to Graph
* Fixing linter
* Switching from aria-label to data-test-badge-label for testing
The tabIndex allows screenreaders to work properly
* Fixing eslint error
* Fixing more issues introduced by the merge from master
* APM updates badge in React hook
* Applying changes suggested by Aleh
* Add new graphql endpoint for snapshot data
* Polishing.
* Keep type generic that is used outside snapshots
* Keep one more generic type generic
* Use camelCase for consistency.
* Refine type names
* Add return types.
* Use idiomatic javascript.
* Factor out getAllCompositeAggregationData<T>()
* Refine naming.
* More idiomatic JavaScript, more types.
* When APM is disabled, we were throwing an error in infra
uiCapabilities.apm is undefined in these situations, so we can't check
uiCapabilities.apm.save
* Fixing tslint issues
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* GAP - Actions Restructured and Extensible (#25347)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* Goodbyyeee
* Adding app actions to the reserved privileges
* update snapshot
* UI/API changes to facilitate disabling features within spaces (#24235)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* GAP - Actions Restructured and Extensible (#25347)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* Goodbyyeee
* Adding app actions to the reserved privileges
* Begin to allow features to be disabled within spaces
typescript fixes
additional cleanup
attempt to resolve build error
fix tests
more ts updates
fix typedefs on manage_spaces_button
more import fixes
test fixes
move user profile into xpack common
Restructure space management screen
fix SASS references
design edits
remove Yes/No language from feature toggles
fix casing
removed unused imports
update snapshot
fix sass reference for collapsible panel
Fix sass reference, take 2
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* extract migration logic into testable unit
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* Design edits (#12)
enables customize avatar popover
update tests, and simplify editing space identifier
remove references to user profile
remove unused test suite
remove unnecessary sass import
removes security's capability_decorator
* fix i18n
* updates toggleUiCapabilities to use new feature definitions
* cleanup and testing
* remove references to old feature interface
* readd lost spacer
* adds feature route testing
* additional i18n
* snapshot update
* copy edits
* fix ml app icon
* add missing export
* remove unnecessary sass import
* attempt to fix build
* fix spaces api tests
* esArchiver mapping updates
* rename toggleUiCapabilities -> toggleUICapabilities
* removes shared collapsible_panel component in favor of plugin-specific components
* some copy and style adjustments
* fix test following rebase
* add lost types file
* design edits
* remove stale export
* feature feedback; fixes cached disabled features
* GAP: Security disables UI capabilities (#25809)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* First, very crappy implementation
* Adding tests for disabling ui capabilities
* All being set to false no longer requires a clone
* Using _.mapValues makes this a lot more readable
* Checking those privileges dynamically
* Fixing some broken stuff when i introduced checkPrivilegesDynamically
* Adding conditional plugin tests
* Renaming conditional plugin to optional plugin
* Fixing type errors
* GAP - Actions Restructured and Extensible (#25347)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* Goodbyyeee
* Adding app actions to the reserved privileges
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* GAP - Actions Restructured and Extensible (#25347)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* Goodbyyeee
* Adding app actions to the reserved privileges
* Update x-pack/plugins/security/server/lib/authorization/disable_ui_capabilities.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/plugins/security/server/lib/authorization/check_privileges_dynamically.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Disabling all ui capabilities if route is anonymous
* More typescript
* Even more typescript
* Updating snapshot
* Less any
* More safer
* Another one
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* GAP - Actions Restructured and Extensible (#25347)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* Goodbyyeee
* Adding app actions to the reserved privileges
* update snapshot
* Update x-pack/plugins/security/server/lib/authorization/check_privileges.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/plugins/security/server/lib/authorization/check_privileges.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Fixing type errors
* Only disabling navLinks if a feature is registered for them
* Adding non i18n'ed tooltip
* Making metadata and tooltip optional
* i18n'ing tooltips
* Responding to peer review comments
* GAP - Role API Structure (#26740)
* Updated the role api PUT structure
* Minimum is an array now
* Updating get route to naively support the new structure
* Renaming and removing some serialized methods
* Updating Role PUT api tests
* Fixing PUT jest tests
* Fixing GET tests
* Updating PrivilegeSerializer tests
* Renaming features to feature for the GET, so we're consistent
* Validating features and feature privileges
* Update x-pack/plugins/security/server/lib/authorization/privilege_serializer.test.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/plugins/security/server/lib/authorization/privilege_serializer.test.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/plugins/security/server/lib/authorization/privilege_serializer.test.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Renaming some variables/members of the PrivilegesSerializer
* Fixing privileges serializer tests
* Fixing register privileges with cluster tests
* Fixing the role creation for the api integration tests
* Generalizing regex within the feature registry
* update tests
* [GAP] - Support infra features (#26955)
## Summary
This PR adds the `Infrastructure` and `Logs` apps as toggle-able features via Granular Application Privileges.
* [GAP] - Enables xpack_main to populate UI Capabilities (#27031)
## Summary
Currently, plugins that register features via `xpackMainPlugin.registerFeature({...})` also have to specify their own `uiCapabilities` via `injectDefaultVars`, which is counter-intuitive and cumbersome. We've accepted this complexity for OSS plugins, but x-pack and third-party plugins should not have to concern themselves with such implementation details.
This PR removes that requirement for x-pack and third-party plugins, so all they have to do is register features, and ensure that their feature privileges contain the appropriate UI Capabilities in the `ui` property.
### Notes
This implementation intentionally does not alter UI Capabilities that come in via OSS Kibana. The capabilities defined there should be the source of truth, regardless of which distribution is used.
### Example
<pre>
xpackMainPlugin.registerFeature({
id: 'graph',
name: 'Graph',
icon: 'graphApp',
<b>navLinkId: 'graph',</b>
privileges: {
all: {
app: [],
savedObject: { ... },
<b>ui: ['showWriteControls'],</b>
},
read: {
app: [],
savedObject: { ... },
<b>ui: ['someOtherCapability],</b>
}
}
});
</pre>
Will be translated to the following UI Capabilities:
```
uiCapabilities: {
navLinks: {
graph: true
},
graph: {
showWriteControls: true,
someOtherCapability: true,
}
}
```
xpack_main is **not responsible** for disabling UI capabilities, so this will initialize all capabilities with a value of `true`.
* Hide write controls for the visualization application (#26536)
* Hide write controls for the timelion application (#26537)
* blacklist feature ids (#27493)
* [GAP] - Support management links (#27055)
## Summary
This enables management links to be toggled via UI Capabilities.
## TODO
- [x] Implement spaces controls
- [x] Implement security controls
- [x] Testing
- [ ] (optional) - dedicated display for managing management links?
* Enables the feature catalogue registry to be controlled via uiCapabil… (#27945)
* Enables the feature catalogue registry to be controlled via uiCapabilities
* update snapshot
* xpack_main populates uiCapabilities with the full list of catalogue entries
* builds application privileges using catalogue actions
* prevent 'catalogue' from being registered as a feature id
* fix mocha tests
* fix merge
* update snapshots
* GAP - Discover and NavLinks Functional Testing (#27414)
* Adding very basic Discover tests
* Ensuring discover is visible in both spaces
* Parsing the DOM to determine the uiCapabilities
* Making this.wreck `any` because the type definitions suck
* Specifying auth when requesting ui capabilities
* Beginning architecture to support permutation testing
* Adding documentation of the different configurations we'd like to test
* Fixing type errors
* Beginning to work on the framework to test the combinations
* Adding some factories
* Pushing forward, not a huge fan of what I have right now
* The new-new
* Less weird types
* Revising some things after talking with Larry
* Switching from wreck to axios
* Restructuring some files
* Changing to a space with all features, and a space with no features
* Beginning to add the security only tests
* Adding a navLinksBuilder
* Adding spaces only tests
* Not disabling ui capabilities, or authing app/api access when we
shouldn't be
* Can't get rid of management
* Adding more user types
* More users, this is starting to really suck
* Renaming some things...
* Revising which users we'll test in which ui capabilities "test suite"
* Adding some more user scenarios for the security_only configuration
* Adding security_only user scenarios
* Adding space scenarios
* Fixing type errors
* Udpating the readme for the spaces we're testing with
* Adding global read discover security ui functional tests
* Adding tests to make sure save buttons are shown/hidden
The actual implementation is broken somewhere
* Fixing tests after GIS is added and conflicts happened for infra
* Adding discover ui capability tests
* Fixing navlinks tests
* Adding discover view tests
* Adding UI tests for spaces being disabled
* Fixing tests
* Removing wreck dependency, it's garbage
* Fixing typo
* Updating ui capabilities README.md and adding another user for the
security and spaces ui capability tests
* Updating yarn lock file
* Consolidation some types
* Adding VisualizeDisabledSpace to the scenarios.
* Fixing esArchives with .kibana_2
* Disable features optional again
* Adding ensureCurrentUrl: false
* Fixing space selector tests
* Fixing gis privileges, they use saved objects
* Fixing find's element staleness checks
* Update x-pack/test/functional/es_archives/spaces/disabled_features/data.json
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Generalizing logic to get appNavLinksText
* Removing duplicate license header
* Adding GIS mappingst
* Fixing readme
* We love our future selfs
* Adding GisRead scenario
* Whoops
* Adding note about funky syntax for use with exhaustive switches
* Using a centralized list of features
* Give it some time
* Even more time?
* Space Management - accessibility & i18n improvements (#28195)
## Summary
1) Improves the accessibility for the spaces management screen:
- Customize Space Avatar popover now receives focus when toggled
- Labels are more descriptive, providing context
- Delete Space modal correctly focuses
2) Improves i18n support
- fixed a couple hard-coded strings
3) Adds a "Features" column to the spaces grid page, which shows a brief summary of the number of features enabled for each space:
![image](https://user-images.githubusercontent.com/3493255/50785093-93b78280-127d-11e9-975e-7209d35211ff.png)
Related: https://github.com/elastic/kibana/issues/28184
* Feature Controls - spaces - functional tests (#28213)
* adds tests for /api/features/v1 endpoint
* update failing management test
* Fc/run ui capability tests (#28362)
* Running the UI Capability Tests as part of the normal CI runs
* Adding uptime feature to get these tests passing
* Adding features and sorting
* Adding uptime security_only uiCapability tests, and fixing devTools
* Fixing the docs
* Fixing section panel i18n issue
* Removing unused import
* Updating snapshots
* Feature Controls - The new new role API (#28441)
These changes allow us to build the most recent UI where spaces can be "grouped" and edited at once. This changes the kibana section of the role definition to the following:
```
{
kibana: [
{
base: ['read'],
feature: {
discover: ['all'],
dashboard: ['all']
},
spaces: ['*']
},
{
base: ['read'],
feature: {
discover: ['all'],
dashboard: ['all']
},
spaces: ['marketing', 'sales']
}
]
}
```
If the `spaces` property isn't provided (for example if the user isn't using Spaces) then it'll default to `['*']`.
There are a few other stipulations that we're implementing with this approach.
1. Each "item" can be for 1 to many spaces OR globally. We can't specify both space privileges and global privileges in the same "item" because for Spaces we translate `all` to `space_all`, etc. so we can give them different privileges, and this becomes problematic when trying to serialize/deserialize to ES.
2. Additionally, each space can only appear once. The ES model would allow this, but the role management UI becomes more complicated if we were to allow this when calculating effective privileges.
* Feature Controls - Discover Save Button Test #28500 (#28501)
* Adding some debug logs
* Setting ui settings using the functional services
* Doing the same for the spaces disabled features
* Removing console.log debug statements
* Using save instead of showWriteControls
* Reload when adjusting visible features within the users active space (#28409)
## Summary
Changes to the visible features within a space are not visible until the page is refreshed. Because of this, when a user is editing their active space, their changes are not immediately visible.
This updates the space management screen to force a refresh when updating the visible features inside the active space. It also introduces a modal warning that this will happen:
![image](https://user-images.githubusercontent.com/3493255/50923423-ebd7bb80-141a-11e9-92bd-2779020578a4.png)
* Throwing error if we register a feature after getAll is called (#29030)
* Throwing error if we register a feature after getAll is called
* Fixing some tests
* Fixing feature route tests
* Removing unused imports
* Fixing merge conflict
* Feature Controls - Fixing fallout of removing the legacy fallback (#29141)
* Fixing use of mode.useRbacFoRequest to mode.useRbac
* Fixing ui capability tests
* [Feature Controls] - Fix a11y for customize feature section (#29174)
## Summary
Fixes the displayed and announced text for the "show"/"hide" button of the Customize Visible Features section of the spaces management page.
This was inadvertently broken following a merge from master at some point.
* Feature Controls: Fixing k7's new "nav links" (#29198)
* Fixing k7's new applist for feature controls
* Renaming appSwitcher to appsMenu
* Feature Controls - Dashboard (#29139)
* Using addRouteSetupWork to implement the redirect
* Using centralized addSetupWork
* Fixing dashboard functional feature privileges tests
* Ensuring landing page and create dashboard redirect to the home-page
* Adding more tests to ensure the redirects work properly
* Adding disabled space feature tests for Dashboards
* Update src/ui/public/capabilities/route_setup.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update test/functional/page_objects/common_page.js
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Fixing ui capability tests after adding createNew
* Removing unnecessary `return undefined`
* requireUICapabilities -> requireUICapability
* Updating dashboard ui capability tests
* Fixing issue with the selection column appearing on Dashboards
* Fixing ui capability dashboard space only tests
* [FC] - Move management and catalogue entries out of privilege definition (#28354)
* Moves catalogue and management entries from privilege defintion to base feature definition
* Update new management menu to respect items disabled via UI Capabilities
* add test
* re-add index pattern entries
* re-add advanced settings icon
* fix tests
* remove management and catalogue entries from read-only users
* bring it back now y'all
* catalogue updates for xpack plugins
* Introduces 'grantWithBaseRead' flag
* update privileges from all -> read where necessary
* rename feature builder functions
* catalogue and management items should cascade to privileges when not specified
* add catalogue entry for uptime app
* Simplify feature registrations using inherited catalogue/management entries
* consolidate and fix privilege building logic
* rename variables
* remove debug code
* remove duplicate lodash import
* Update x-pack/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts
Co-Authored-By: legrego <lgregorydev@gmail.com>
* [GAP] - Role Management UI (#26840)
![image](https://user-images.githubusercontent.com/3493255/51063094-72310080-15c7-11e9-9274-debf0e9b84f1.png)
![image](https://user-images.githubusercontent.com/3493255/51063108-8aa11b00-15c7-11e9-92fc-31c922086e05.png)
![image](https://user-images.githubusercontent.com/3493255/51063165-cb992f80-15c7-11e9-894d-630c109211d3.png)
---------
Edge-case scenarios:
1) [x] '*' and spaces in the same "entry"
Handled via `_transform_errors` at the API level. Renders a partial read-only view in the UI.
2) [x] same space appearing in multiple "entries"
Handled via `_transform_errors` at the API level. Renders a partial read-only view in the UI.
3) [x] base and feature privileges being set on the same "entry"
UI does not allow this to be set, but UI is smart enough to display the correct effective privilege in this case.
4) [x] multiple base privileges set in the same "entry"
UI does not allow this to be set, but UI is smart enough to apply the most permissive base privilege when displaying and performing privilege calculations.
5) [x] multiple feature privileges for the same "entry" (ml_all and ml_read)
UI does not allow for this to be set, but UI is smart enough to apply the most permissive base privilege when displaying and performing privilege calculations.
--------
## Summary
This updates the role management UI to allow application privileges to be customized globally and per-space.
## TODO:
- [x] [First Design review](https://github.com/legrego/kibana/pull/13)
- [ ] Second Design review
- [ ] Copy review
- [x] i18n
- [x] Handle deleted/unknown features
- [x] Handle deleted/unknown spaces
- [x] Cleanup & refactoring
- [x] Testing
* [Feature Controls, Spaces] - Don't load bundles for hidden apps (#29617)
## Summary
This enables the spaces plugin to issue a 404 if the requested application is disabled within the users active space.
To enable this functionality, the `app` property was moved to the root feature level, with the option to override at the privilege level. This follows the same logic as `catalogue` and `management` sections.
This will enable automatic app "protections" for those which only specify a single UI application, including:
1) Timelion
2) Canvas
3) Monitoring
4) APM
5) Code (when it merges)
6) GIS
7) Graph
8) ML
* [Feature Controls] - Copy Edits (#29651)
## Summary
Copy edits from today's session
* [Feature Controls] - Rename-a-thon (#29709)
* post-merge cleanup
* [Feature Controls] - fixes from recent merge from master (#29826)
## Summary
this pr will contain any required changes to fix CI from the recent merge from master, which includes the new k7 redesign design and dark mode
* Feature Controls: Adding privileges tooltip for Dev Tools (#30008)
* Adding privileges tooltip for Dev Tools
* appeasing the linter
* [Feature Controls] - Fix displayed space base privilege (#30133)
## Summary
This fixes the displayed space base privilege when a global base privilege is influencing the dropdown control:
1) Add global 'read' privilege
2) Configure space privilege -- note default base privilege of 'read'
3) Change space base privilege to 'custom'
Prior to this fix, the dropdown would not honor the change; it would keep 'read' as the selected option.
* Feature Controls: Adding read privileges for advanced settings and index patterns (#30106)
* Adding read privileges for advanced settings and index patterns
* Fixing the tests and the actual code itself
* Feature Controls - spaces not a security mechanism warning (#29853)
* Changing copy for the spaces not a security mechanism warning
* Using Gail's wording
* [Feature Controls] - Fixes from merging from master (8.0) (#30267)
* improve typings
* fix xpack_main type definitions
* test updates
* Fc/functional test move (#29835)
* Moving dashboard feature control tests to the dashboard application
* Moving more tests around
* Fixing some tests, no longer using uiSettings service, doesn't play
nicely with spaces
* Fixing esarchived issue
* Renaming some files
* [Feature Controls] - Readonly view for Advanced Settings using UICapabilities (#30243)
## Summary
This builds on the work done in https://github.com/elastic/kibana/pull/30106 to enable a read-only mode for the Advanced Settings screen:
- Input fields are disabled
- Save options are not displayed
- "Reset to default" options are not displayed
* Feature Controls: No Wildcards (#30169)
* A poorly named abstraction enters the room
* No more wildcards, starting to move some stuff around
* Splitting out the feature privilege builders
* Using actions instead of relying on their implementation
* We don't need the saved object types any longer
* Explicitly specifying some actions that used to rely on wildcards
* Fixing api integration test for privileges
* Test fixture plugin which adds the globaltype now specifies a feature
* Unauthorized to find unknown types now
* Adding tests for features with no privileges
* Update x-pack/test/saved_object_api_integration/security_and_spaces/apis/find.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Adding back accidentally deleted test
* Using the shared XPackMainPlugin definition
* Fixing privileges
* [Feature Controls] - Readonly mode for Canvas using UICapabilities (#29264)
## Summary
Updates Canvas to respect UICapabilities when determining if a user has read or read/write access to the application:
1) Adds a `showWriteControls` UI Capability to the Canvas's `all` privilege.
2) Removes the `setCanUserWrite` Redux action
3) Sets the initial (and only) state for `state.transient.canUserWrite` based on the UI Capability.
Closes https://github.com/elastic/kibana/issues/27695
* [Feature Controls] - Readonly mode for Maps using UICapabilities (#30437)
## Summary
This updates the maps application to support a read-only mode:
1) Removes selection/delete from Maps listing page
2) Removes "save" option
## TODO:
- [x] Functional UI Tests
* Add typings for x-pack/test to support .html imports (#30570)
We're importing `ui/capabilities` from the x-pack/test project, which
implicitly traverses into typings which are potentially importing .html
files, so we have to teach TypeScript about it.
* [Feature Controls] - Readonly mode for Timelion using UICapabilities (#30128)
## Summary
Updates Timelion to respect UICapabilities when determining if a user has read or read/write access to the application.
A previous PR was responsible for hiding the save controls, but this PR adds testing and the appropriate UICapabilities to the registered privilege definition.
* remove stray debug code
* [Feature Controls] - Updates from src/ui move to src/legacy/ui (#30678)
* dummy commit
* fix import path
* update message identifier
* fix snapshot
* remove unused translations
* Feature Controls: Adding read/write privileges for all applications (#30732)
* Adding read/write privileges for all applications
* Using default for advanced settings, canvas, maps and timelion
* Update x-pack/test/ui_capabilities/security_only/tests/canvas.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/canvas.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/maps.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/maps.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/timelion.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* [Feature Controls] - Readonly mode for Visualize using UICapabilities (#29714)
* enable read-only view, and enable app redirection for visualize app
* Hide 'Edit Visualization' dashboard context menu item if visualizations are not editable
* Hide 'Add new visualization' button if action is not available
* show 'Visualize' button on discover view only if viz app is available
* update tests
* allow visualizations to be created, but not saved for read-only users
* adds functional tests for visualize
* add tests for showing/hiding the visualize button in the discover app
* fix visualize tests following merge from master
* tests for edit viz feature from dashboards
* cleanup
* remove unnecessary call to set ui settings
* remove unused variables
* reduce flakyness of tsvb tests
* renames visualize.showWriteControls => visualize.save
* fix ui capability tests
* fix tests
* fix references to timePicker page object
* fix ts errors
* adds 'editable' property to embeddable metadata instead of hardcoded capability checks
* Remove unnecessary read-only considerations
* revert unnecessary mock changes
* [Feature Controls] - Adds missing uptime icon (#30716)
## Summary
Adds missing feature icon for Uptime application.
Needs https://github.com/elastic/kibana/pull/30678 to merge before this will go green.
* Feature Controls - Fix branch (#31135)
* Updating snapshot
* Switching visualize to use the default branch of the switch
* Fixing esarchive
* Feature Controls - Graph (#30762)
* Adding graph functional tests
* Fixing Privilieges API test
* Adding graph ui capability tests
* Update x-pack/test/ui_capabilities/security_only/tests/graph.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/graph.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_and_spaces/tests/graph.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/graph.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/spaces_only/tests/graph.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Apply suggestions from code review
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Removing hard-coded constants
* Adding Graph delete button
* Fixing ui capability tests
* [Feature Controls] - Fixes page width for spaces management screen (#30723)
## Summary
Fixes the skinny spaces management screen following the redesign of the overall management area.
Needs https://github.com/elastic/kibana/pull/30678 to merge before this will go green.
* Feature Controls - Dev Tools (#30712)
* Adding functional tests
* Addingn Dev_Tools ui capability tests
* Adding some api tests for console's API
* Apply suggestions from code review
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Moving uiCapability definition
* Giving user_1 dashboard access to space_2
* Using the default in the switch for devtools/visualize
* Using forceLogout, maps are leaving us on a 404 page
* Fixing privileges API tests
* Feature Controls- Fix Merge Conflicts (#31651)
* Removing duplicated and outdated tests
* Updating snapshot
* Fixing type script errors
* Getting rid of some double quotes
* Adding saved_object:url access to discover temporarily to fix tests
* Fixing dashboard tests, updating snapshots
* Fixing security only find tests
* Removing reduntant test
* Trying to give it more time
* Fixing it 20 seconds to redirect away from the create new dashboard
* Feature Controls - No more route defaults for dashboards (#31767)
* No more route defaults for dashboards
* Verbose logging...
* Changing some ciGroups to try to narrow down the problem
* Revert "Verbose logging..."
This reverts commit 3198e73b61.
* Revert "No more route defaults for dashboards"
This reverts commit 525cd94dc5.
* Chaning the method in which we do the redirect
* Fixing type issue
* Update index.ts
* Update index.ts
* Feature Controls - Only allowing features to register all and read privileges (#31526)
* Only allowing features to register all and read privileges
* Making all and read optional properties required some existence checks
* Using Aleh's superior solution!
* No more unnecessary `as any`
* Feature Controls - Saved Object Management (#31332)
* Adding savedObject uiCapabilities that mirror the savedobject actions
* Using uiCapabilities to limit which types to search for
* Restricting which saved objects can be deleted based on type
* Hiding "view in app" button when we aren't allowed to
* Filtering the saved objects relationships based on the valid saved
object types
* Using dedicated savedObjectsManagement ui capabilities
* Adding readonly mode of viewing an object
* Displaying View In App if you can actually do so
* No more operations
* Moving saved objects ui capability population to kibana plugin
* Updating x-pack jest tests
* Adding security only saved objects management ui capability tests
* Adding security and spaces tests
* Adding spaces only saved objects managment ui capability tests
* Adding saved object management listing page functional tests
* Adding functional tests for edit visualization
* Consolidating canViewInApp and getInAppUrl into the same file
* Fixing imports
* One more stray import/export
* Adding back esFrom source
* Revert "Adding back esFrom source"
This reverts commit dfb626ace3.
* Updating jest snapshots
* Updating privileges
* Adding some logging
* Back to 10 seconds
* Trying to get more logs...
* Back to normal logging levels
* Fixing ui capability tests
* Putting timeouts back.
* Feature Controls - UI capability API integration tests with fixture plugins (#32086)
* Only testing the foo plugin for security and spaces
* Using the foo plugin with the security_only tests
* Changing spaces only tests to use the foo plugin
* Using list of features from api, and fixing bug with the spaces
interceptor
* Adding catalogue tests, which are alluding to another bug
* saved_objects catalogue aren't driven by ui capabilites presently
* Expanding the coverage for the spaces only catalogue tests
* Fixing some catalogue asserts
* Fixing catalogue tests for spaces_only, I had it backwards
* Adjusting Readme, adding "global read" scenario for security only tests
* Responding to PR feedback
* Adding back saved objects tests I accidentally deleted
* Fixing typescript issues, we can't import EUI on the server
* Fixing eslint error
* Updating Jest snapshots, fixing chrome mock
* Fixing dashboard listing test
* Adding missing await and forcing logout for graph functional tests
* Putting i18n string back
* Fixing type script issue
* Fixing canvas assert because of merge
* Fixing saved object api error assertations
* user-action is now a saved object type
* Fixing typescript error
* Fixing saved object actions as a result of the merge
* Feature Controls - Infrastructure and Logging (#31843)
* hide infra/logs apps if disabled via UICapabilities
* adds tests
* adds UICapability tests for infra and log apps
* update expected privilege/action mapping
* adds feature controls security tests for infraHome
* adds infra spaces feature control tests
* remove debug code
* a sample readonly implementation, ignoring 'logs' privileges
* ts fixes
* fix capability expectations
* Removing RequiresUICapability component, since there are no usages
* Driving the source configuration seperately for logs/infrastructure
* Adding infrastructure feature controls security functional tests
* Adding spaces infrastructure tests
* Adding logs functional tests
* Reworking the ui capability tests to be more consistent
* Fixing privileges API
* Forcing logout
* Fixing comma issue introduced by merge
* Fix merge conflicts and loading/unloading esarchives more consistently
* Removing unnecessary !!
* Fixing saved object management tests
* Fixing more tests
* Using the new context APIs
* Revert "Using the new context APIs"
This reverts commit 4776f1fc86.
* Adding future version of ui capabilities react provider
* Switching the order of the HOC's for infra and making the future the
default
* Applying Felix's PR feedback
* Protecting Infra's GraphQL APIs
* Updating privileges list
* Using the introspection query
* No longer using apollo context library, rephrasing test descriptions
* Fixing issue introduced by merge conflict, I forgot a }
* Putting back missplaced data test subj
* Updating jest snapshots
* Feature Controls - Short URLs (#32418)
* Discover is showing creating short urls properly
* Adding Discover functional tests
* When dashboards show the share menu you can always create short urls
* Visualize now displays the short urls link appropriately
* Dashboard all gets access to saved objects and updating privileges api
test
* Updating and adding short url test to url panel content
* Fixing misspelling
* Updating jest snapshot
* Adding comment why allowShortUrl is always true for Dashboards
* Updating snapshots
* Fixing snapshots, mocking chrome.getInjected
* Feature Controls - Uptime (#32577)
* Adding uptime functional tests
* Enabling feature controls for uptime
* Updating the privileges API's actions
* Using a single access tag for limiting API access
* Revising the behavior of maps read-only mode (#33338)
* Feature Controls - APIs (#32915)
* Using HapiJS's scopes to perform authorization on api endpoints
* Revert "Using HapiJS's scopes to perform authorization on api endpoints"
This reverts commit f73810c22d.
* Switching the syntax of the api tags
* Fixing privileges API
* Typescriptifying some dependencies of the api authorization extensions
* Using dedicated typescript file for api post auth filtering
* Adding tests and restructuring the flow of the api authorization
* Adjusting uptime's usage of privileges and the privileges test
* Integrating PR feedback
* Fixing graph test subject, thanks Joe!
* Consolidating hideWriteControls dashboard listing test
* Reusing maps constants
* Adding type to saved object management ui capability tests
* Feature Controls - Index Pattern Management (#33314)
* Enabling feature controls for index patterns
* Updating privileges API tests
* Fixing saved object management's view index patterns in app logic
* Fixing forgotten canViewInApp tests
* Fixing maps spaces functional tests
* Feature Controls - Differentiating the privileges with the same actions (#32266)
* Differentiating the privileges with the same actions
* The types for the lodash.uniqwith packare aren't right, and we need to
customize the isEqual also, so we're gonna do it ourselves
* Fixing dev tools ui capability
* Removing are equivalent privileges prevention, it's not what we really
need
* Requiring all to be more permissive than read on startup
* Transparently differentiating "all" from "read" feature privileges
* Fixing jest tests
* Adding the allHack: action to the space and global base privileges
* Changing actions to be readonly
* Adding JSDoc's for the Actions class and specifically the `allHack`
action
* Making the import of xpack_main types consistent
* Feature Controls: APM (#32812)
* Adding APM read privilege and adding functional UI tests
* Beginning to validate the APM routes are protected properly
* Protecting APM's APIs
* Specifying CI group
* Fixing privileges
* Adding forgotten apm show ui capability
* Fixing apm's privileges
* Fixing merge-conflict with privileges allHack: and APM
* address canvas feedback (#34269)
* [Feature Controls] - Plugin postInit (#29172)
## Summary
Throwing this up as a straw ~man~ person. If we like it, I can split it out and point the OSS changes against master if we'd prefer.
Introduces a `postInit` plugin hook that is called after all plugins have gone through their `preInit` and `init` phases, which allows the security plugin to call `registerPrivilegesWithCluster` after all plugins have had an opportunity to register their features.
* Feature Controls - Adds bulk toggle for showing/hiding features within a space (#34288)
## Summary
Adds a "Change all" option to the spaces management screen to allow all features to be shown/hidden:
![image](https://user-images.githubusercontent.com/3493255/55344105-85db5d00-547a-11e9-9325-136d1c13f40e.png)
Closes#34184
* Feature Controls - Unregistered Applications Authorization (#34122)
* Converting the app authorization to use typescript
* Adding jest tests
* Only authorizing app routes that are registered for features
* Using ProtectedApplications to lazily get feature applications
* Removing unneeded mocked headers as part of the authorization
* Adding some logging for the app authorization
* Fixing imports, thanks tslint --fix!
* Updating snapshots
* Feature Controls - Disable privilege form until spaces are selected (#34386)
## Summary
This disables the privilege selection until one or more spaces are selected in the role management form:
![image](https://user-images.githubusercontent.com/3493255/55432524-1724ff00-5561-11e9-86f6-1589ba3fa701.png)
* Feature Controls - Visualize read-only create new (#34209)
* Allowing users to create new visualizations, even if they can't be saved
* Fixing privileges and tests
* Updating snapshot
* Removing visualize edit ui capability
* Feature Controls - Actions Version Prefix (#34405)
* Prefixing actions with version
* Updating privileges api integration test
* Update x-pack/plugins/security/server/lib/authorization/actions/saved_object.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Requiring version to be a not empty string
* Updating jest snapshots
* Changing the 403 messages for the saved object client
* Fixing ui/chrome mock
* Feature Controls - Displaying share menu on dashboards when in read-only mode (#34207)
* Displaying share menu on dashboards when in read-only mode
* Fixing test description, thanks Luke!
* Fixing dashboard view mode tests because the share menu is now visible
* migrate from tslint to eslint
* Feature Controls - Reserved Role Apps (#30525)
* Removing feature privileges from ml/monitoring/apm
* Adding monitoring/ml/apm as hard-coded global privileges
* A poorly named abstraction enters the room
* No more wildcards, starting to move some stuff around
* Splitting out the feature privilege builders
* Using actions instead of relying on their implementation
* We don't need the saved object types any longer
* Explicitly specifying some actions that used to rely on wildcards
* Fixing api integration test for privileges
* Test fixture plugin which adds the globaltype now specifies a feature
* Unauthorized to find unknown types now
* Adding reserved privileges tests
* Adding reserved privileges in a designated reserved bucket
* Fixing ui capability tests
* Adding spaces api tests for apm/ml/monitoring users
* Adding more roles to the security only ui capability tests
* You can put a role with reserved privileges using the API
* Adding support to get roles with _reserved privileges
* Adding APM functional tests
* Adding monitoring functional tests
* Fixing typo
* Ensuring apm_user, monitoring_user alone don't authorize you
* Adding ml functional tests
* Fixing test
* Fixing some type errors
* Updating snapshots
* Fixing privileges tests
* Trying to force this to run from source
* Fixing TS errors
* Being a less noisy neighbor
* Forcing logout for apm/dashboard feature controls security tests
* Fixing the security only ui capability tests
* Removing test that monitoring now tests itself
* Fixing some ui capability tests
* Cleaning up the error page services
* Fixing misspelling in comment
* Using forceLogout for monitoring
* Removing code that never should have been there, sorry Larry
* Less leniency with the get roles
* Barely alphabetical for a bit
* Apply suggestions from code review
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Removing errant timeout
* No more hard coded esFrom source
* More nits
* Adding back esFrom source
* APM no longer uses reserved privileges, reserved privileges are
pluggable
* Fixing typescript errors
* Fixing ui capability test themselves
* Displaying reserved privileges for the space aware and simple forms
* Removing ability to PUT roles with _reserved privileges.
Removing ability to GET roles that have entries with both reserved and
feature/base privileges.
* Updating jest snapshots
* Changing the interface for a feature to register a reserved privilege to
include a description as well
* Displaying features with reserved privileges in the feature table
* Adjusting the reserved role privileges unit tests
* Changing usages of expect.js to @kbn/expect
* Changing the CalculatedPrivilege's _reserved property to reserved
* Allowing reserved privileges to be assigned at kibana-*
* Updating forgotten snapshot
* Validating reserved privileges
* Updating imports
* Removing --esFrom flag, we don't need it anymore
* Switching from tslint's ignore to eslint's ignore
* Feature Controls - Adds feature registration to plugin generator (#34537)
## Summary
This updates the plugin generator to allow plugin authors to automatically register their feature with the Feature Registry, for control via Spaces/Security.
Running:
```
elastic-mbp:kibana larry$ node scripts/generate_plugin.js test-plugin
? Provide a short description An awesome Kibana plugin
? What Kibana version are you targeting? master
? Should an app component be generated? Yes
? Should translation files be generated? Yes
? Should a hack component be generated? Yes
? Should a server API be generated? Yes
? Should SCSS be used? Yes
```
Generates the following:
```js
import { resolve } from 'path';
import { existsSync } from 'fs';
import { i18n } from '@kbn/i18n';
import exampleRoute from './server/routes/example';
export default function (kibana) {
return new kibana.Plugin({
require: ['elasticsearch'],
name: 'test_plugin',
uiExports: {
app: {
title: 'Test Plugin',
description: 'An awesome Kibana plugin',
main: 'plugins/test_plugin/app',
},
hacks: [
'plugins/test_plugin/hack'
],
styleSheetPaths: [resolve(__dirname, 'public/app.scss'), resolve(__dirname, 'public/app.css')].find(p => existsSync(p)),
},
config(Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),
}).default();
},
init(server, options) { // eslint-disable-line no-unused-vars
const xpackMainPlugin = server.plugins.xpack_main;
if (xpackMainPlugin) {
const featureId = 'test_plugin';
xpackMainPlugin.registerFeature({
id: featureId,
name: i18n.translate('testPlugin.featureRegistry.featureName', {
defaultMessage: 'test-plugin',
}),
navLinkId: featureId,
icon: 'discoverApp',
app: [featureId, 'kibana'],
catalogue: [],
privileges: {
all: {
api: [],
savedObject: {
all: [],
read: ['config'],
},
ui: ['show'],
},
read: {
api: [],
savedObject: {
all: [],
read: ['config'],
},
ui: ['show'],
},
},
});
}
// Add server routes and initialize the plugin here
exampleRoute(server);
}
});
}
```
* Updating core system docs
* Fixing infra's dates with data for the functional tests
* [Feature Controls] - Move UICapabilities to the new platform (#30585)
## Summary
This moves the UI Capabilities service into the new platform, shimming into the old platform in a way that is consistent with the `i18n` service.
* Fixing uptime functional api tests
* Removing .only...
This PR refactors the source configuration state and source configuration form state to hooks. Aside from slightly improved performance due to memoization, it should not lead to visible differences.
* Remove custom date picker for Metrics page, replace with EuiSuperDatePicker. Remove redux-observable for metrics-time state, replace with hooks.
Pass through refreshInterval and set it as part of the startMetricsAutoReload action
Refactor metric time controls to use EuiSuperDatePicker
Remove redux / redux-observable usage for MetricsTime, replace with hooks
Add useInterval hook and hook up to auto reloading
Add refresh interval support to the URL
Use more concise syntax
Add small styling
Add tests for metric_time
Add extra test
Add correct typings
Update time range immediately when auto reload is turned on (so we don't wait for the first interval to elapse)
Use stricter typing
Remove custom date range picker
Amend translations after removing custom date range picker
* Amend test for CI sensitivity
* Amend test assertions
* DRY up with useCallback
Previously, the `theme:darkMode` and `dateFormat` settings were only read once, which made them susceptible to race conditions during initialization. This introduces and uses a new `useKibanaUiSetting` hook to reactively consume the settings.
This changes two things with how the log entries are loaded:
* This adds a reload action that is triggered when the stream item container is mounted. This is the case when the source configuration is being updated. Previously, the entry list was only loaded during the initialization of the log position url state container (which only happened once).
* This also adds handling of log entry loading failures (e.g. because the configuration has been changed to use an invalid timestamp field) by emptying out the log entry list in the store. Previously, the old log entries would be kept.
fixes#34033
This adds a specialization of the styled-components api, which is correctly typed according to the new theme variable type definitions included in EUI (elastic/eui#1750) and made available in Kibana via #33873.
This restores the functionality of the graphql type generation scripts after #33093. In particular, it properly sets up the babel import hook so schemata can once more be imported from `.ts/.tsx` files.
* chore(NA): first changes on every package.json order to support new babel 7. chore(NA): build for kbn-pm with babel 7.
* chore(NA): patch babel register to load typescrit
* chore(NA): first working version with babel 7 replacing typescript compiler.
* fix(NA): common preset declaration in order to make it work with babel-loader.
* chore(na): organizing babel preset env package json.
* chore(NA): mocha tests enabled.
* fix(NA): typo on importing
* test(NA): majority of x-pack tests ported to use babel-jest
* fix(NA): report info button test with babel-jest.
* fix(NA): polling service tests.
* test(na): fix server plugins plugin tests.
* test(NA): batch of test fixs for jest tests under babel-jest hoisting.
* chore(NA): add babel plugin to hoist mock prefixed vars on jest tests.
* chore(NA): update yarn.lock file.
* chore(NA): tests passing.
* chore(NA): remove wrong dep
* chore(NA): fix tsconfig
* chore(NA): skip babel for ts-jest.
* chore(NA): selectively apply the plugin to strip off namespace from ts files.
* chore(NA): remove not needed changes from ts tests
* chore(NA): removed ts-jest dependency. chore(NA): migrate ts tests on x-pack to use babel-jest with the new pattern.
* chore(NA): migrate kibana default distribution typescript tests to run with babel-jest and the new test mock pattern.
* chore(NA): merge and solve conflicts with master.
* chore(NA): fix problems reported by eslint
* chore(NA): fix license ovveride for babel-plugin-mock-imports
* chore(NA): update jest integration tests for kbn pm
* chore(NA): update babel jest integration tests for kbn pm.
* test(NA): update jest integration snapshot for kbn pm.
* chore(NA): apply changes according to the pull request reviews.
* chore(NA): apply changes according to the pull request reviews.
* refact(NA): migrate jest tests to the new pattern.
* fix(NA): babel 7 polyfill in the tests bundle.
* chore(NA): restore needed step in order to compile x-pack with typescript.
* chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7
* Revert "chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7"
This reverts commit 2707d538f5.
* fix(NA): import paths for tabConfigConst
* chore(NA): fix transpiling error on browser tests
* chore(NA): simplify kbn babel preset package.
* chore(NA): migrate build to use babel transpiler for typescript excluding xpack.
* fix(NA): introduced error on test quick task.
* fix(NA): fix preset for client side code on build.
* fix(NA): build with babel
* fix(NA): negated patterns in the end.
* fix(NA): kbn_tp_sample_panel_action creation.
* fix(NA): babel typescript transform plugin workaround when exporting interface name.
* refact(NA): remove not needed type cast to any on jest test.
* docs(NA): add developement documentation about jest mocks test pattern.
* chore(NA): missing unmerged path.
* chore(NA): fix jest tests for template.
* [CCR] Client integration tests (table lists) (#33525)
* Force user to re-authenticate if token refresh fails with `400` status code. (#33774)
* Improve performance of the Logstash Pipeline Viewer (#33793)
Resolves#27513.
_This PR is a combination of #31293 (the code changes) + #33570 (test updates). These two PRs were individually reviewed and merged into a feature branch. This combo PR here simply sets up the merge from the feature branch to `master`._
Summary of changes, taken from #31293:
## Before this PR
The Logstash Pipeline Viewer UI would make a single Kibana API call to fetch all the information necessary to render the Logstash pipeline. This included information necessary to render the detail drawer that opens up when a user clicks on an individual vertex in the pipeline.
Naturally, this single API call fetched _a lot_ of data, not just from the Kibana server but also, in turn, from Elasticsearch as well. The "pro" of this approach was that the user would see instantaneous results if they clicked on a vertex in a pipeline and opened the detail drawer for that vertex. The "cons" were the amount of computation Elasticsearch had to perform and the amount of data being transferred over the wire between Elasticsearch and the Kibana server as well as between the Kibana server and the browser.
## With this PR
This PR makes the Kibana API call to fetch data necessary for **initially** rendering the pipeline — that is, with the detail drawer closed — much lighter. When the user clicks on a vertex in a pipeline, a second API call is then made to fetch data necessary for the detail drawer.
## Gains, by the numbers
Based on a simple, 1-input, 1-filter, and 1-output pipeline.
* Before this PR, the Elasticsearch `logstash_stats` API responses (multiple calls were made using the `composite` aggregation over the `date_histogram` aggregation) generated a total of 1228 aggregation buckets (before any `filter_path`s were applied but across all `composite` "pages"). With this PR, the single `logstash_stats` API response (note that this is just for the initial rendering of the pipeline, with the detail drawer closed) generated 12 buckets (also before any `filter_path`s were applied). That's a **99.02% reduction** in number of buckets.
* Before this PR, the Elasticsearch `logstash_stats` API responses added up to 70319 bytes. With this PR, the single `logstash_stats` API response for the same pipeline is 746 bytes. That's a **98.93% reduction** in size.
* Before this PR, the Elasticsearch `logstash_state` API response was 7718 bytes. With this PR, the API response for the same pipeline is 2328 bytes. That's a **69.83% reduction** in size.
* Before this PR the Kibana API response was 51777 bytes. With this PR, the API response for the same pipeline is 2567 bytes (again, note that this is just for the initial rendering of the pipeline, with the detail drawer closed). That's a **95.04% reduction** in size.
* [Maps] split settings into layer and source panels (#33788)
* [Maps] split settings into layer and source panels
* fix SCSS import
* [env] exit if starting as root (#21563)
* [env] exit if starting as root
* fix windows
* s/--allow-root
* Typescript sample panel action (#33602)
* Typescript sample panel action
* Update EUI version to match main cabana version
* update yarn.lock
* add back typings include
* use correct relative path
* Home page "recent links" should communicate saved object type #21896 (#33694)
* adds object type for screen order
* adds object type for pointer hovering
* Update src/legacy/ui/public/chrome/directives/header_global_nav/components/header.tsx
Co-Authored-By: rockfield <philipp.b@ya.ru>
This fixes the `small` font scale of the log viewer to correctly reference the EUI font size again. Before this fix, the `small` font scale was rendered larger than `medium`. Similarly, the tick labels of the log minimap were being rendered too large.
Both resulted from a breaking change of the exported variable names in elastic/eui#1590.
fixes#32759
* Reorganise primary and sub navigation of Infrastructure
Add routed_tabs component
Amend routing (use an index and nested routes) and reorganise directory structure
Shift hosts / kubernetes / docker selection to subnavigation
Change path
Amend existing URLs
Use proper types
Amend document_title component
Reorganise title / source config button / info text
Maintain compatibility with old URLs
* Remove dead code
* Bump z-index on suggestions panel
* Ensure documentTitle responds to updates
* Use the same noop function and remove disabled option
* Use buttonSize="m" and add "Hosts" translation back
* Remove all "Home" wording
* Remove unused translations with script
* Don't nest <Link /> within a tab
* Comment out metrics-explorer tab until needed
* Don't create duplicate History entries
This replaces the custom relative time component in the Logs UI live streaming inline loading indicator with the one from `react-intl`. This was not done at the time of the initial i18n introduction (#25213), because of #26237, which apparently has since been resolved via #26468. Visual changes should be limited to `now` being shown instead of `0s ago`.
* First pass at ensuring click events do not swallow keyUp event, also ensure menu doesn't open / close for no reason
* Add comment
* Add key
* Revert changes
* Remove icons on badges within context menu
* Remove unused translation with script
This moves the `log_summary` state out of the redux store into a stateful hook in anticipation of the requirements of creating a fully embeddable log viewer.
This picks the specific fields to submit for source configuration creation instead of just passing through the object. Before this, the newly included `message` field configuration would be erroneously included and lead to an error.
This fixes the message reconstruction rules to actually use the `xpack.infra.sources.default.fields.message` field configuration from the Kibana config file.
fixeselastic/kibana#31355
* Fixed a simple argument bug and removed infra date picker EUI types
* Fixes for EUI date picker types
* eui_8.0.0
* fix type errors in query_bar
* Small changes for EUI types
* Updates EUI to 9.0.0 and removes @types/react-datepicker as it now ships with EUI
* Updates to EUI 9.0.1 and removes duplicate types in infra eui.d.ts
* ts-ignore applied to ongoing type error with styled components and EUI
* Changes EuiProgress props to avoid TS errors
* Updates EUI 9.0 snapshots
* Updates kibana root snapshots for EUI 9.0 upgrade
* Update detail_panel.test.js for EUI changes
* Updated functioanl and unit tests to properly inspect EuiTableRowCell rendered values
* Fix docs_level_security_roles.js func tests
* Update EUI to 9.0.2
* Fixed failing snapshot for EUI icon default prop
* Adding legend controls
* Adding url support and finishing feature
* Moving config to right side; setting min/max to data boundries when deactivating auto
* Removing legend from max and min labels
* removing uneseccary unshift(0)
* Change autobounds behavior
Remove old Feedback link component (removed with K7)
Add a HelpCenterContent component
Add HelpCenterContent to Infrastructure
Add HelpCenterContent to Logs
* bump typescript version to 3.3.3333
* fix tests after updating TS version
* suppress type errors until they fixed appropriately
* address comments
* add type def for UnconnectedKibanaLink
* remove fix @ts-ignore
* fix snapshot test. provide displayName
* Add a custom and specific InvalidNode Error so that more helpful information can be displayed on the Metrics page
Add a custom error for an invalid node check
Add a component for displaying help when using an invalid node
Throw the specific error from kibana_metrics_adapter
Add an enum for specific error codes
Look for and handle invalid node error in metrics/index
Amend container to pass Error instance
Add source configuration flyout to metrics/index to facilitate change source config button
* Add explicit type for err parameter
* Remove i18n injection, use FormattedMessage component
* Stylistic index changes
* Move Error typings to common
This commit accompanies the four that precede it. Rather than squash
them altogether, the four previous commits all do nothing except move
files to help avoid conflicts.
This adds a `@timestamp` alias to the mapping of the builtin log sample dataset to make it compatible with other log indices. It also adds the index pattern `kibana_sample_data_logs*` to the default `logAlias` setting in order for the sample data to show up in a default setup.
fixeselastic/kibana#29450
* First foray into turning .application background off
* Hopefully fixing the last few plugins
* Update EUI to 6.9.0
* removing hacks
* last fixes
* Remove a few more `100vh`
* Can I remember to copy & REPLACE
* EUI at 6.10.0
Removes support for the k6 navigation style from master. All but the first commit are targeted at a specific section of Kibana. Please take a look at the areas you're familiar with and check it off the list. We'll plan to merge this right before feature freeze.
- [ ] home
- [ ] discover
- [ ] context
- [ ] visualize
- [ ] dashboard
- [ ] devtools
- [ ] timelion
- [ ] graph
- [x] monitoring
- [ ] gis
- [ ] infra
- [x] ml
- [ ] security
- [ ] uptime
- [x] beatscm
@elastic/kibana-app @elastic/kibana-security @elastic/ml-ui @elastic/infrastructure-ui @elastic/kibana-gis @elastic/stack-monitoring @elastic/es-ui
See https://github.com/elastic/elasticsearch/pull/38254
Using the `version` parameter to implement optimistic concurrency is not going to be supported in 7.0, so we need to replace our usage of document version with the new `_seq_no` and `_primary_term` parameters. These fields are returned in the same way that `_version` was returned on all read/write requests except for search, where it needs to be requested by sending `seq_no_primary_term: true` in the body of the search request. These parameters are sent back to Elasticsearch on write requests with the `if_seq_no` and `if_primary_term` parameters, and are functionally equivalent to sending a `version` in a write request before elastic/elasticsearch#38254.
To make these updates I searched the code base for uses of a `version` and `_version`, then triaged each usage, so I'm fairly confident that I got everything but it's possible something slipped through the cracks, so if you know of any usage of the document version field please help me out by double checking that I converted it.
- [x] **Saved Objects**: @elastic/kibana-platform, @elastic/es-security - for BWC and ergonomics the `version` provided by the Saved Objects client/API was not removed, it was converted from a number to a string whose value is `base64(json([_seq_no, _primary_term]))`. This allows the Saved Objects API and its consumers to remain mostly unmodified, as long as the underlying value in the version field is irrelevant. This was the case for all usages in Kibana, only thing that needed updating was tests and TS types.
- [x] **Reporting/esqueue**: @joelgriffith, @tsullivan - the version parameter was used here specifically for implementing optimistic concurrency, and since its usage was contained within the esqueue module I just updated it to use the new `_seq_no` and `_primary_term` fields.
- [x] **Task Manager**: @tsullivan @njd5475 - Like esqueue this module uses version for optimistic concurrency but the usage is contained with the module so I just updated it to use, store, and request the `_seq_no` and `_primary_term` fields.
- [ ] **ML**: @elastic/ml-ui - Best I could tell the only "version" in the ML code refers to the stack version, 077245fed8
- [ ] **Beats CM**: @elastic/beats - Looks like the references to `_version` in the code is only in the types but not in the code itself. I updated the types to use `_seq_no` and `_primary_term`, and their camelCase equivalents where appropriate. I did find a method that used one of the types referencing version but when investigating its usage it seemed the only consumer of that method was itself so i removed it. 52d890fed7
- [x] **Spaces (tests)**: @elastic/kibana-security - The spaces test helpers use saved objects with versions in a number of places, so I updated them to use the new string versions where the version was predictable, and removed the assertion on version where it wasn't. We test the version in the saved objects code so this should be fine.
* updating fields
* Migrate to ESC event.dataset
* Migragte fields to ECS fields
* renaming variable
* Reverting back to host.name
* Changing from Top Hits to Terms Agg for getting node name; change host.name back to host.hostname for name.
* Changing back to host.name
* Moving from using the document source to an aggregation for node name
* Updating tests with new data format and data.
* removing unused fields
* adding test data for docker 6.6.0
* Adding docker tests for 6.6.0
* Fixing jest tests
* Fixing tests
* Adding the most critical line of code in the entire project
* Fix ECS-compatible apache rules and restore old ones
* Fix ECS-compatible nginx rules and restore old ones
* Add tests for apache2 in ECS and pre-ECS format
* Add tests for nginx in ECS and pre-ECS format
* removing console.log
* Fixing tests
This adds a configuration UI to change various properties of an infrastructure data source. The properties that can be currently changed are:
* name
* index pattern for metrics
* index pattern for logs
* fields like the timestamp, container/host/pod identification
It is meant as a basis for providing configurability for other source properties like outgoing links and formatting rules in the future.
* Use metric_time prefix for metric_time actions
* Add refetch capabilities to with_metrics
* Pass through refetch to index
* Add no data message and refetch button to metrics/index
Next stage: Extract into shared component between metrics and waffle map
* Remove "refetching" and just use "loading"
No need for the explictness, just reuse the loading state, as there's no value to differentiating refetching vs loading here
* Add no_data component
* Amend for Prettier
* Use no_data component
* Change naming to better reflect current components
* Introduce notion of two empty states: no indices and no data
Also changes nodes_overview and logs to use moved component
* Add no_data functionality
* Remove metrics specific no data component, use the new shared component
* Change import order
* Use no_data component in nodes_overview
* Refactor logs to use shared no data component
* Import intl
* Revert testing value
* Pass handler correctly to avoid circular references
* Satisfy type check
* Remove one last unused component
* Addding initial table implimentation
* Moving waffle map to seperate component; adding contextual menu to nodes; adding filter to groups; adding pagination; adding sorting
* Fixing EUI types for EuiInMemoryTable to work for EVERYONE
* Adding server plugin for tslint for VIM; Fixing tests
* Adding the view switcher
* removing dependency
* updating yarn.lock
* Change padding to use EUI rules
* Rename waffle/index to nodes_overview; move table to nodes_overview
* Adding missed files in last commit
* Adding textOnly to the columns that need special truncation because they are buttons
* Fixed an error in the merge
* Fixing merge issues
* Adding flyout to log viewer
* Adding filtering
* Fixing typescript errors
* Adding a test for graphql; fixing test data for 7.0.0
* Adding terminate_after:1 to logItem request
* fixing test data
* Switching back to old data
* Fixing data for tests
* Adding i18n translations
* changing label from add to set
* Make flyout call more robust; fixing typings
* Adding loading screen to flyout
* Fixing linting errors
* Update x-pack/plugins/infra/public/components/logging/log_flyout.tsx
Co-Authored-By: simianhacker <chris@chriscowan.us>
* Fixing visible mis-spelling
* Fixing types
* Change withLogFlyout to be conditional; Add icon instead of onClick for flyout
* Adding dark mode support
* Adding user-select:none to icon div
* Removing remnants of a failed experiment
* Adding aria-label to view details button
* Fixing padding on date element
* Removing unused variable that somehow got past the linters
* Fixing empty_kibana
* Fixing data for infra
* Fixing merge weirdness
* [Infra UI] Add Support for Grouping By Custom Field
* fixiing typescript errors
* Serializing custom options to url so they persist accross reloads
* Fixing more errors
* removing label; moving custom field to top of menu
* fixing typescript error
* Adding intl formatMessage to strings