Commit graph

33 commits

Author SHA1 Message Date
patrykkopycinski cc4c1729d1
Bump jest related packages (#58095) 2020-06-20 21:05:09 +02:00
Alison Goryachev 82ce718b01
[CCR] Fix follower indices table not updating after pausing (#69228) 2020-06-18 15:15:15 -04:00
Mikhail Shustov f593455a62
Bump TypeScript to v3.9 (#67666)
* 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>
2020-06-11 10:04:09 +02: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
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02: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
CJ Cenizal 8f99f60bc4
Fix pagination bugs in CCR and Remote Clusters (#65931) 2020-05-14 14:05:19 -07: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
Alison Goryachev 85539ee855
Reorder ES management nav (#65082) 2020-05-04 14:47:47 -04:00
CJ Cenizal f1d1b8c195
Fix CCR search bug caused by paused follower indices (#64717) 2020-05-04 11:05:14 -07:00
CJ Cenizal 84aef3995e
Add CCR client integration test that asserts that the UI consumes the expected API when editing a follower index (#64440) 2020-04-27 12:20:19 -07:00
CJ Cenizal 91f7911d15
Move CCR out of legacy (#62890)
* Convert common/services and server/lib to TypeScript. Update Jest tests.
  - Remove deserializeAutoFollowPattern behavior that returned an empty object if the pattern was undefined.
* Localize mocks with the component integration tests.
* Update API unit tests to use NP mocks.
  - Break up test files.
  - Use inline mocked ES response instead of fixture files.
  - Move remaining fixture files into client integration tests directory.
* Make API route validation more strict.
* Publish isUiDisabled as part of Remote Clusters contract.
* Default trackUiMetric service to be a no-op.
* Remove security dependency.
  - Fix license check so that CCR won't render if the license is invalid.
  - Fix server security check to be more precise by checking if ES has security disabled.
* Render timestamp for autofollow errors.
2020-04-22 07:15:25 -07:00
Court Ewing 7ac8e4d9cc Move x-pack plugins/server/common to x-pack/legacy 2019-06-20 13:34:48 -04:00
Peter Pisljar 5baf958adf
removing angular from indexPatterns (#34418) 2019-06-14 10:39:50 +02:00
CJ Cenizal c55b0af584
Block requests to ui_metric API if telemetry is disabled (#35268)
* Block requests to ui_metric API if telemetry is disabled
- Export trackUiMetric helper method from ui_metric app.
- Remove createUiMetricUri helper.
- Add support for an array of metric types.
- Update README.
* Throw error if trackUiMetric is called with a string containing a colon.
2019-04-25 15:08:51 -07:00
Sébastien Loix 63975b84ca
Convert testBed to Typescript + refactor client integration tests (#34981) 2019-04-25 08:28:17 +02:00
CJ Cenizal 4d130c733c
[CCR] Instrument CCR and Remote Clusters to track UI metric telemetry (#34826) 2019-04-12 08:24:41 -07:00
Sébastien Loix 3bc39bdf77
[CCR] Client tests auto-follow pattern & follower index forms (#34449) 2019-04-09 11:43:04 +02:00
CJ Cenizal b94c68abde
Add space at bottom of Auto-follow Pattern Form. (#34469) 2019-04-03 12:41:52 -07:00
CJ Cenizal 7a4b3ced60
Update copy to refer to Cross-Cluster Search/Replication. (#33872) 2019-03-27 19:53:19 -07:00
Sébastien Loix 67acefc283
[CCR] Client integration tests (table lists) (#33525) 2019-03-26 08:47:29 +01:00
Jen Huang 52a89e2ca1
[CCR] Add data-test-subj to forms and buttons (#30325)
* Add data-test-subj to follower indices

* Add more more follower index subjects

* Fix remote cluster subjects, add subject for license link

* Add subjects to auto follow pattern form

* Add subjects to auto follow pattern table and detail panel

* Address PR feedback

* Make context menu subjects unique, add row and cell subjects to both tables
2019-02-15 15:38:28 -08:00
CJ Cenizal 1d2a6fafd1
[CCR] i18n feedback (#30028)
* Remove unused Chinese translations.
2019-02-14 17:36:56 -08:00
CJ Cenizal e4ba818ff5
Reintroduce linting rule that requires single-quotes in x-pack. (#30893)
* Reintroduce linting rule that requires single-quotes in x-pack.
* Remove redundant quotes rule for ML.
* Convert ES-UI code to single quotes.
  - Dev tools
  - CCR
  - ILM
  - Index management
  - License management
  - Remote clusters
  - Rollup
  - Watcher
* Convert Graph code to single quotes.
* Convert Maps to single quotes.
* Convert Monitoring code to single quotes.
* Convert Reporting code to single quotes.
* Convert Security code to single quotes.
* Convert Telemetry code to single quotes.
* Convert Upgrade Assistant code to single quotes.
* Convert Grok Debugger to single quotes.
2019-02-14 12:08:37 -08:00
Jen Huang 23c5a49853
Fix ordering of CCR plugin (#30596) 2019-02-11 08:25:59 -08:00
Court Ewing 2ce51a5be5 Update paths to ui, server, deprecation, plugin_discovery in src/legacy
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.
2019-02-11 10:41:37 -05:00
Jen Huang 30989fbca7
[CCR] Follower index CRUD (#27936)
* [CCR] Refactor redux for Auto-follow pattern detail panel (#27491)

* [CCR] Refactor redux for Auto-follow pattern detail panel

* [CCR] Small refactor

* [CCR] Change to present tense

* [CCR] Display auto-follow pattern name even if it does not exist

* [CCR] Use href to edit auto-follow pattern + remove middelware to update "pattern" query params

* [CCR] Fix navigation back bug + set 2 ids for detail and edit an auto-follow pattern

* [CCR] Replace api middleware with redux-thunk action

* [CCR] Show detail footer close button even when cluster is not valid

* [CCR] Add endpoints for fetching and creating follower indices (#27646)

* Add GET /follower_indices endpoint with deserialization logic and tests.

* Add POST /follower_indices endpoint with serialization logic and tests.

* [CCR]  Add unit tests for RemoteClusterForm, RemoteClusterList, and RemoteClusterTable (#27647)

* Use componentDidUpdate instead of getDerivedStateFromProps.

* Add unit tests for RemoteClusterForm, RemoteClusterList, and RemoteClusterTable.

* Add jest mock for eui `makeId()` utility and get deterministic aria IDs for snapshots

* Update snapshot for Remote Cluster list test

* [CCR] Follower indices table and detail panel (#27804)

* Store for follower indices

* Initial work for follower indices table and detail panel

* Fix load auto-follow stats load as middleware was removed

* [CCR] Create follower index UI form (#27864)

* Initial setup Follower Index form

* Working form without client validation

* Add client side validation for follower index

* Add client validation to check if index already exist

* Improve error message when leader index does not exist

* Remove update method for follower index

* Clear api error on field change

* Fix i18n error

* Update snapshots

* [CCR] Add pause, resume, and unfollow actions for follower indices (#28305)

* Add pause and resume follower index routes

* Add unfollow route

* Add api methods for new routes

* Adjust routes to have bulk capabilities, add corresponding actions

* Refresh list after pausing/resuming, remove items after unfollowing

* First pass at UI for pause and unfollow (and resume, but that is not visible due to ES stats response)

* Handle additional conditions needed for unfollowing leader index, add placeholder code to deduce paused status

* PR feedback

* [CCR] Advanced settings UI for follower indices (#28267)

* Add client side validation of advanced settings form
* Move form entry row to separate component
* Add server side serialization for advanced settings
* Ignore advanced settings input when that section is hidden.
  - Cache and restore input when the section is shown again.

* [CCR] Show remote cluster validation in CCR forms, and add edit follower index (#28778)

* [CCR] Advanced settings component

* Remove preview active on toggle settings

* Add client side validation of advanced settings form

* Move form entry row to separate component

* Add title to panel

* Add i18n translation of advanced settings

* Update Follower index form with toggle for advanced settings

* Add server side serialisation for advanced settings

* Make code review changes

* Fix test: mock constant dependency

* Add section to edit follower index

* Show confirm modal before updating follower index

* Add edit icon in table + update server endpoint to pause / resume

* [CCR] Show remote cluster validation in follower index form & auto-follow pattern form

* PR feedback, cleanup form sizes, add redirect to edit remote cluster

* Fix routing, remove unused code, adjust auto follow pattern edit loading error page

* Adjust error messages and make remote cluster not found edit page the same

* Fix functionality as result of merge

* Fix validation, reorder actions, fix tests, and address feedback

* PR feedback and fix validation pt 2

* Adjust remote cluster validation

* Fix i18n

* Fix api error not showing on add follower form

* [CCR]  Integrate new follower index info ES API (#29153)

* Integrate new follower index info ES API

* Collate data from follower stats and info apis when retrieving all followers and single follower
* Add follower settings info to detail panel
* Add paused/active UI state
* Surface follower default settings to UI

* Adjust tests

* Address PR feedback

* Update snapshots

* [CCR] Surface license errors in-app and refine permissions error UI. (#29228)

* Fix camelcasing bug in XPackInfo.
* Silently swallow API error when checking for index name availability.
* Fix typo in followerIndexForm fatal error.
* Add permissions check before allowing user to access the app.

* Refine wording of CCR permission denied page, to specify cluster privileges. (#29533)

* [CCR] Improve form error handling and general UX (#29419)

* Remove unnecessary eslint disable-line

* [CCR] Implement Advanced Settings design feedback (#29543)

* Use EuiSwitch to toggle advanced settings in Create Follower Index form.
* Move 'optional' from each Advanced Setting field to the section heading.
* Change Advanced Settings switch label and description to emphasize that you can customize them or use the defaults.
* Prepopulate Advanced Settings fields with default values.
* When editing a follower index, check if advanced settings have been edited and open them if so.
* Add 'Reset to default' button below advanced settings fields if their values are different than the default.
* Remove 'Default' copy from Advanced Settings descriptions.
* Simplify toggleAdvancedSettings function, add comments, and fix React console error.

* [CCR] Follower index list fixes from design feedback (#29484)

* Delete remote cluster settings before updating

* Fix detail panel z-index

* Remove default descriptor from follower index detail panel setting values

* Follower index confirm action copy adjustments

* Change z-index styling to use EUI vars

* [CCR] Improve remote clusters test coverage (#29487)

* Add Jest test for RemoteClusterForm validation state.
* Extract validation functions out of RemoteClusterForm and add unit tests.
  - Return null instead of undefined from validators.
* Add unit tests for different types of remote clusters in RemoteClusterTable.
* Add unit test for RemoteClusterList empty prompt.
* Add tests verifying behavior for row link, row delete button, and detail panel delete button.
  - Use getRouterLinkProps to assign onClick and href to edit buttons in row and detail panel.

* [CCR] Adjust spacing around descriptions in list views, link to transport port docs, etc (#29789)

* Adjust spacing around description around descriptions in list views so that it's even on top and bottom.
* Add link to transport port docs from Remote Cluster form.
* Move 'View in Index Management' link from the detail panel body into the footer.

* Re-order follower index form sections: remote cluster, leader index, follower index. (#29885)

* Fix deep-linking to follower index after creating/updating it. (#29865)

* [CCR] Copy edits (#29676)

* Use 'Resume/pause data replication' in context menu and row actions.
* Update copy of 'Update' confirm modal for a paused follower index.
* Update copy of 'Update' confirm modal for an active follower index.
* Update copy of 'Pause data replication' confirm modal.
* Update copy of 'Resume data replication' confirm modal.
* Update copy for permissions check.
* Update copy of table empty state.
* Update copy around tables.
* Update form copy.
* Update copy for RemoteClustersFormField callouts.
* Convert 'data replication' -> 'replication'.
* Update copy for Unfollow confirm modal.
* Update copy for form API error and Auto-follow Patterns table.
* Update form save button labels to be 'Create' and 'Update'.
* Move API errors to bottom of form, into same position as sync validation errors. Remove spacer from SectionError implementation.

* [CCR] Open index after unfollowing leader (#29887)

* Open index after unfollowing leader, fix some variable names

* Fix typo

* Add comment

* [CCR] IE and Screen reader accesibility (#29731)

* Fix api endpoit for auto-follow stats

* Prevent letter wrapping in IE for the Remote cluster "connection" table column

* Move inline style to CSS class to fix IE flex bug

* [CCR] Add callout to paused follower index detail panel (#30013)

* Add callout to paused follower index detail panel

* Update copy

* Skip call to ccr stats api if follower index is paused (#30027)

* [CCR] Add integration tests for follower indices (#30064)

* [CCR] Add integration tests for follower indices

* Import advanced settings value from app constants
2019-02-05 14:01:17 -08:00
Aleh Zasypkin d05437703d
Introduce I18nService core service and I18nContext. (#29379) 2019-02-04 13:38:00 +01:00
Bill McConaghy 06bbf1da65
making badges clickable to filter in index management (#29635)
* making badges clickable to filter in index management

* improving a11y for clickable badge
2019-01-30 21:02:07 -05:00
Bill McConaghy a95be511f1
add follower badge to index management (#29177)
* add follower badge to index management

* fixing i18n id
2019-01-23 19:38:54 -05:00
dave.snider@gmail.com d9b922ef4b
Management design sidenav cleanup (#28222)
Adjustments so nav menu works better with large screens.
2019-01-16 10:03:41 -08:00
Sébastien Loix 93e4f12dbc
[CCR] Tell user when multiple auto-follow patterns try to replicate the same data (#27783)
* Fix small tipo

* [CCR] Add API to fetch ccr stats

* Add deserialization for recentAutoFollowErrors & autoFollowedClusters

* Add UI to display recent auto-follow pattern errors
2018-12-28 07:50:37 +01:00
CJ Cenizal 2371e58590
[CCR] Remote Clusters and Cross-cluster Replication apps (#26777) 2018-12-18 17:59:10 -08:00