* watcher uses es api from start
* CCR uses ES API from start contract
* Rollup uses ES API from start contract
* Transform uses ES API from start contract
* Snapshot_restore uses ES API from start contract
* remove excessive logging. platform logs all the lifecycles
* file uploader uses ES API from start contract
* remove unnecessary async
* use async getter
* update rollup custom client usage
* address cj comment
* roll back changes. maps tests are failing
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* 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.
* [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
* [@kbn/expect] "fork" expect.js into repo
* [eslint] autofix references to expect.js
* [tslint] autofix all expect.js imports
* now that expect.js is in strict mode, avoid reassigning fn.length
We have had `insert_final_newline = true` in our `.editorconfig` file since April 2015, but never validated it with eslint. I'm a little tired of extra changes showing up in PRs because some people use editors which respect the `.editorconfig` file and some don't, so I figured we might want to enable the rule in eslint so that the can be autofixed.
Votes requested please :)
* 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.
* [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
* Add ILM to i18nrc.json. Fix validation errors.
* Localize CCR and Rollups checkLicense errors.
* Fix bug in Remote Clusters checkLicense error.
* Use rollupJobs namespace in checkLicense.
* Fix small tipo
* [CCR] Add API to fetch ccr stats
* Add deserialization for recentAutoFollowErrors & autoFollowedClusters
* Add UI to display recent auto-follow pattern errors