Commit graph

277 commits

Author SHA1 Message Date
patrykkopycinski cc4c1729d1
Bump jest related packages (#58095) 2020-06-20 21:05:09 +02:00
Chris Roberson e6cf4b36d3
[Monitoring] Ensure we use existing Elasticsearch config (#68389)
* Ensure we use existing Elasticsearch config

* Use separate type for this to ensure custom properties work

* PR suggestions

* PR feedback

* PR feedback

* Fix type issues

* PR feedback
2020-06-15 12:43:37 -04:00
igoristic de8714da67
Added cloud as an optional dependency (#69050) 2020-06-12 17:50:45 -04:00
igoristic b41151aeec
Fixed all external links (#68614)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-12 17:43:02 -04:00
Andrea Del Rio 2d1312f6d1
[Monitoring] SASS modularization (#68726) 2020-06-11 13:36:47 -07:00
Uladzislau Lasitsa b87eefc753
[uiSettings]: Migrate items owned by app arch to new platform (#66040)
* 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>
2020-06-05 10:55:42 +03:00
igoristic 6ef2a2c07e
Fixed access denied page (#68046)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-05 02:06:20 -04:00
Alexey Antonov d661d66faa
[New Platform Migration]: Management - Implement NP API (#66781)
* [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>
2020-06-03 18:55:06 +03:00
Chris Roberson a1a1d5d2f7
Ensure we query for more than 10 (#67172) 2020-06-02 10:41:04 -04:00
Yuliia Naumenko ce45dad8b6
Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE (#66838)
* Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE

* Changed alerting REST API to keep the pattern 'alerts/alert/{id}'

* fixed tests

* fixed tests

* Fixed jest tests

* Renamed plugin from alerting to alerts

* fixed tests

* fixed tests

* Fixed alert type check error

* Fixed find api

* fixed type checks

* fixed tests security issues

* Fixed view in app

* -

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 18:45:36 -07:00
Mikhail Shustov 53b95424fe
Deprecate es API exposed from setup contract (#67596)
* move elasticsearch client under legacy namespace

* update mocks and tests

* update platform code

* update legacy code

* update plugins using elasticsearch setup API

* update request handler context

* update docs

* rename remaining places

* address comments

* fix merge conflict error
2020-06-01 16:16:44 +02:00
Yuliia Naumenko d09bd63786
Changed actions API endpoints urls to follow Kibana STYLEGUIDE (#65936)
* Changed actions API endpoints urls to follow Kibana STYLEGUIDE

* Fixed tests

* fixed test

* fixed test

* resolved conflicts

* Fixed siem tests

* Fixed failing test

* fixed readme and test

* Changed actions api urls to follow the template 'api/{plugin}/{type}/{id}

* Fixed type checks

* Fixed tests and API

* fixed tests

* Fixed type checks

* fixed type check
2020-05-24 20:27:42 -07:00
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Greg Thompson 204fd5b5a2
Upgrade EUI to v23.3.1 (#65877)
* eui to 23.2.0

* nav drawer ts updates

* eui to 23.3.0

* src snapshot updates

* makeId -> htmlIdGenerator mocks

* EuiCodeBlock testenv element lookup

* x-pack snapshot updates

* remove obsolete EuiCode and EuiCodeBlock mocks

* eui to 23.3.1

* patch updates

* searchbar type update

* docViewer tabs use valid DOMString id

* docViewer snapshot

* header updates

* cert_search field wrapper update
2020-05-21 14:31:26 -05:00
CJ Cenizal bfdeb10c15
Reorganize Management apps into Ingest, Data, Alerts and Insights, Security, Kibana, and Stack groups (#65796) 2020-05-15 16:11:27 -07:00
Mikhail Shustov 0cc5d133d9
lint import from restricted zones for export exressions (#66588)
* line restricted zones for export exressions

* more robust rule

* fix or mute eslint errors

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-15 17:21:42 +02:00
Yuliia Naumenko 5ed5fda832
Allow registered alert types to be non-editable (#65606)
* 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
2020-05-12 13:38:22 -07:00
Alejandro Fernández Haro 398b660045
[Fix] Monitoring failing to start (#65516) 2020-05-07 17:53:27 +01:00
Michail Yasonik 35e10273d3
New nav (#64018)
Notably, also removes aria-hidden from many visualizations
2020-05-05 23:14:14 -05:00
Spencer ee270c7c3f
disallow external imports to src/core/utils (#64852) 2020-05-05 14:56:22 -07:00
dependabot[bot] 23282a2f37
Bump jquery from 3.4.1 to 3.5.0 (#64884) 2020-05-05 13:31:49 -04:00
Tyler Smalley df1874756f
Disallows commonjs in new platform public (#65218)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-05-05 09:33:09 -07:00
Larry Gregory 6a6deef151
Deprecate kibana user in favor of kibana_system user (#63186) 2020-05-05 11:36:40 -04:00
igoristic 59315bc84d
[Monitoring] NP Migration complete client cutover (#62908)
* Final phase before the complete cutover

* NP migration

* lint fix

* More NP stuff

* Moved Stack Monitoring client plugin outside legacy and fixed all tests

* ...

* Removed unused files

* Fix for main links

* Fixed more tests

* Fixed redirect when clicking on SM icon again

* Code review feedback

* Addressed code review feedback

* Fixed return value
2020-04-30 15:59:35 -04:00
Gidi Meir Morris 9fe7229357
[Alerting] migrates all remaining plugins to new platform (#64335)
Completes the migration of all Alerting Services plugins onto the Kibana Platform

It includes:

1. Actions plugin
2. Alerting plugin
3. Task Manager plugin
4. Triggers UI plugin

And touches the Uptime and Siem plugins as their use of the Task Manager relied on some of the legacy lifecycle to work (registering AlertTypes and Telemetry tasks after the Start stage has already began). The fix was simply to moves these registrations to the Setup stage.
2020-04-29 15:46:54 +01:00
Chris Roberson 989245793e
[Monitoring] Fix monitoring 7.7 deprecations (#63738)
* Fix monitoring 7.7 deprecations

* Switch order

* Add comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-22 09:06:40 -04:00
Alejandro Fernández Haro 9226d4cc94
[Telemetry] Use staging if it's not a distributable release (#63875)
* [Telemetry] Use staging if it's not a distributable release (instead of 'dev' vs. 'prod' approach)

* Rename isProd to isDistributable and useProdKey
2020-04-20 12:43:34 +01:00
igoristic dacc95fa85
[Monitoring] Fixed server response errors (#63181)
* Fixed server response errors

* Fixed async error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-16 20:07:24 -04:00
Gidi Meir Morris bb9f8845ae
[alerting] Adds an alertServices mock and uses it in siem, monitoring and uptime (#63489)
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.
2020-04-16 08:45:38 +01:00
Larry Gregory 9d89a4fb49
Support multiple reserved feature privileges (#61980)
* support multiple reserved feature privileges

* update reserved privilege ids

* additional testing

* Add ml_user and ml_admin reserved privileges

* prrevent reserved privilege ids from sttarting with 'reserved_'

* address pr feedback: dedicated reserved privilege type

* re-enable ML test suites

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-08 13:03:15 -04:00
Alejandro Fernández Haro 028313a8fe
[Telemetry] Add possibility of registering exclusive collectors for each collection (#62665)
* [Telemetry] Add posibility of regitering exclusive collectors for collections

* [Telemetry] Filter unwanted fields from the kibana.os telemetry payload

* Filter the collectors properly in bulkFetch

* Move "kibana" usage collector from Monitoring to OSS Telemetry

* Remove exclusivity of the "kibana_settings" collector

* Unify "kibana_stats" collector from Monitoring and Legacy

* Remove unused legacy constants

* Proper type for UsageCollectionSetup in monitoring

* Missed one undo

* Add unit tests to the migrated collectors

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-08 09:08:59 +01:00
Chris Roberson 8ffc08f2f7
[REVERT THE REVERT] [Monitoring] Cluster state watch to Kibana alerting (#62793)
* Revert "Revert "[Monitoring] Cluster state watch to Kibana alerting (#61685)""

This reverts commit f1bd3bdacb.

* Fix i18n error

* Fix test
2020-04-07 13:44:34 -04:00
spalger f1bd3bdacb Revert "[Monitoring] Cluster state watch to Kibana alerting (#61685)"
This reverts commit ab0cc8894a.
2020-04-06 17:05:09 -07:00
Chris Roberson ab0cc8894a
[Monitoring] Cluster state watch to Kibana alerting (#61685)
* WIP

* Add new alert with tests

* Fix type issues, and disable new alerting for tests

* Fix up the view all alerts view

* Turn off for merging

* Fix jest test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-06 15:31:01 -04:00
Pierre Gayvallet 468de51153
Add plugin start contract to getStartServices return value (#61216)
* add plugin own contract as third element of getStartServices result

* adapt plugins code

* update tests

* revert unknown to use void again

* update generated doc

* fix UT

* update mock to allow non-object `pluginStartContract`

* add @typeParam documentation
2020-03-26 10:49:05 +01:00
Tyler Smalley 1bcf848e46
Sets min_doc_count=0 for parent histogram of derivative aggregation (#61390)
From the docs: The specified metric must be numeric and the enclosing
histogram must have min_doc_count set to 0 (default for histogram
aggregations).

https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-derivative-aggregation.html#search-aggregations-pipeline-derivative-aggregation

This is now enforced, and currently failing the promotion of the current
Elasticsearch build

Related to https://github.com/elastic/kibana/pull/61387

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-03-25 22:22:04 -07:00
Chris Roberson 6c8cc4cf74
Fix issue with no logstash monitoring data in the top end of the time series (#61273) 2020-03-25 13:35:45 -04:00
Chris Roberson 223f774c3f
[Monitoring] Update /api/stats to use core.metrics (#60974)
* Align api/stats with the monitoring logic for kibana ops metrics

* Align collectors

* Add in locale to kibana_settings

* More tweaks

* PR feedback

* PR feedback
2020-03-24 15:53:43 -04:00
Larry Gregory b82cc6ed4a
Support for sub-feature privileges (#60563)
* initial server-side support for sub-feature privileges (#57507)

* initial server-side support for sub-feature privileges

* start addressing PR feedback

* renaming interfaces

* move privilege id collision check to security plugin

* additional testing

* change featurePrivilegeIterator import location

* fix link assertions following rebase from master

* Initial UI support for sub-feature privileges (#59198)

* Initial UI support for sub-feature privileges

* Address PR feedback

* display deleted spaces correctly in the privilege summary

* additional testing

* update snapshot

* Enables sub-feature privileges for gold+ licenses (#59750)

* enables sub-feature privileges for gold+ licenses

* Address PR feedback

* address platform review feedback
2020-03-24 11:12:49 -04:00
Alejandro Fernández Haro 452193fdba
[Telemetry] Server-side Migration to NP (#60485)
* [Telemetry] Migration to NP

* Telemetry management advanced settings section + fix import paths + dropped support for injectVars

* Fix i18nrc paths for telemetry

* Move ui_metric mappings to NP registerType

* Fixed minor test tweaks

* Add README docs (#60443)

* Add missing translation

* Update the telemetryService config only when authenticated

* start method is not a promise anymore

* Fix mocha tests

* No need to JSON.stringify the API responses

* Catch handleOldSettings as we used to do

* Deal with the forbidden use case in the optIn API

* No need to provide the plugin name in the logger.get(). It is automatically scoped + one missing CallCluster vs. APICaller type replacement

* Add empty start method in README.md to show differences with the other approach

* Telemetry collection with X-Pack README

* Docs update

* Allow monitoring collector to send its own ES client

* All collections should provide their own ES client

* PR feedback

* i18n NITs from kibana-platform feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 18:49:38 +00:00
Chris Roberson 3a396027f6
[Monitoring] Migrate server to NP (#56675)
* 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
2020-03-20 14:02:15 -04:00
Court Ewing 7ac8e4d9cc Move x-pack plugins/server/common to x-pack/legacy 2019-06-20 13:34:48 -04:00
Matthew Kime 80eb1e1583
d13n docTitle (#39162)
* refactor doc title so it can be used outside of angular service
2019-06-19 09:31:42 -05:00
Chris Roberson b09e3a622f
[Monitoring] Metricbeat migration flyout and instructions (#35228)
* Initial attempt at a reactor of how this works

* Enter and exiting setup mode with migration buttons working

* Adding monitoring url step back in and some small cleanup

* Elasticsearch steps

* Add missing file

* Better organization here

* Remove this debug logic

* Clean up

* PR feedback

* Add in monospacing

* Persist monitoring url in local storage

* Rework the steps

* Change node to server, and add missing files

* Fix linting issues

* Fix api integration tests

* PR feedback

* Pass down if the product is the "primary" or not, then use that to show certain warnings in the UI (just supported for Kibana right now)

* Elasticsearch migration will work slightly differently in that all nodes must be partially migrated before we can disable internal collection

* More PR feedback

* PR feedback

* Better links

* Fix tests

* This should open in a new tab

* PR feedback

* Design and PR feedback

* Fix these tests

* PR feedback

* Remove debug

* PR feedback

* Update the import path

* Update this import path too

* PR feedback

* Fix i18n
2019-06-14 14:21:53 -04:00
Chris Roberson b1a7bcb40a
Ensure we provide the cluster when toggling completed recoveries (#38543) 2019-06-13 12:44:29 -04:00
Chris Roberson 25802019ae
[Monitoring] Integrate logs source for Logs UI (#36929)
* Define and use an internal log ui source configuration

* Fix urls in tests

* Remove unnecessary code
2019-06-13 09:28:54 -04:00
Mike Place 6c0f83a515
Minor changes to text on Alerting in Stack Monitoring application (#38388)
* Minor changes to text.

* "Basic" is a proper name, so it should be capatalized.

* Cluster Alerts are plural.

* Fix tests to align with help text changes

* Missed one test file
2019-06-13 14:46:36 +02:00
igoristic 35a5706e16
Flooring number down to whole second (#38065) 2019-06-12 15:24:33 -04:00
Stacey Gammon cde4fb6ed5
Small step to consolidating refresh interval types. Stop exporting from all embeddable apis. Conform to time filter one. (#38681) 2019-06-12 08:08:19 -04:00
Ahmad Bamieh c308048f04
[Telemetry] move from xpack main (#35403)
* enabling xpack in new plugins

* move telemetry into separate new platform plugin

* remap constants

* resolved hacks issue

* remove extra dir

* js -> ts

* run linter

* fix tests

* reset kibana.yml

* reset kibana.yml

* ts types

* add telemetry translations to i18n

* use deprecated configs

* checkout config.yml

* fix test

* move telemetry from xpack_main in api_integration

* add telemetry apis

* hide banner

* remove routes/get_stats in favor of collectors/get_stats

* code review fixes
2019-06-12 13:53:48 +03:00