* [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
Attempts to make KQL syntax errors more sensical to the average user.
I initially tried to use a similar solution to the one we used for detecting usage of old lucene syntax. In other words, I tried to create rules in the grammar that would match strings containing common mistakes the user might make and throw custom error messages for each situation. This proved to be more difficult for detecting errors in the regular language. While the Lucene rules could be completely separated from the main grammar, the KQL error rules had to be mixed into the main grammar which made it much more complex and had a lot of unintended side effects.
So instead I decided to lean more heavily on PEG's built in error reporting. Giving certain rules human readable names allows the parser to use those names in the error reporting instead of auto generating a long list of possible characters that might be expected based on the matching rules. Since the PEG errors contain location information I was also able to add ascii art that points the user to exactly where the error occurred in their query string. While this approach is not quite as nice as bespoke error messages that tell the user exactly what is wrong in plain English, it's much more maintainable and I think it still results in much better error messages compared to what we have today.
I've also removed the old original kuery grammar (for queries like is(response, 200)). We were only using it to display an error if I user was still using the old syntax. This version of kuery hasn't existed since 6.3 and we've had error messages telling users this since then. I think it's safe to remove the legacy parser at this point, which greatly reduces the complexity of our error reporting.
* Fix hardcoded plugin name and license modes in common license checker
* Fix licensePreRoutingFactory scope issues
* PR feedback adjustments
* Use minimum license string instead of array of valid license
* Pass plugin name instead of ID for UX
* Return license status instead of `showLinks` and other flags
* Adjust factory closure for readability
* Fix test
* Additional PR feedback:
* Move license status constants to `/common`
* Internationalize plugin names that are passed to check license, and its error messages
* Remove `isAvailable` flag, change pre-routing logic to use `LICENSE_STATUS.VALID` instead
* Change constant `INACTIVE` to `EXPIRED`
* Convert check license test from mocha to jest
* Fix test
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.
* 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.
* Get basic scaffolding working
* Wire up cluster checkup data
* Add types for elasticsearch plugin
* Implement basics of checkup tab
* Update style of deprecations
* Add copy and reload button to checkup
* Add filtering by warning level
* Add deprecation logging tab
* Copy updates and cleanup
* Type cleanup
* Move deprecation logging to overview tab
* Make filters togglable
* Move sections into tabs and add support for grouping
* Cleanup and add clearer labels
* Use tables for message grouping
* Cleanup and small fixes
* Allow console to load relative URLs
* Add reindex in console button to reindex tasks
* Merge documentation UI and uiButtons
* Fix tests
* Filter bar tweaks
* Filter out index settings that can't be set
* Fix types
* Add tests for deprecation_logging
* Add tests for reindex templates
* Make KibanaConfig generic
* Simplify integration test
* Finish backend unit tests
* Fixup types
* Fix uiButton updating for reindex items
* Fixed background color stretching
* Pulling tabs out and re-ordering filter buttons
* Making accordions more item-list like
* Turned Healths into Badges
- Couldn’t do the conversion within the cell because it only passed color
* Fix overflow issue
* Optional filter and expand/collapse controls
* Reorganizing
- Added placeholder for moving action button up into accordion header
- Removed repetitive message name outputs
- Slightly better listing of each message when sorting by index
- Only showing number of severity when sorting by index
- Still need to allow showing all severity levels
- Added indice count when sorting by issue
* Putting `Deprecation logging` in a `EuiDescribedFormGroup`
* Added some stats, empty prompts, and all clear prompt
* Added docs link
* Cleaned up sass files
* Revert changes to fake_deprecations
* Update blacklisted settings
* wip
* Move data fetching and tab control
* Wire up overview summary
* Cleanup docs/uiButtons + move actions to index table
* Add expand/collapse all functionality
* Wire up search box
* Wire up severity indicators
* Fix types
* Round out functional tests
* Fix fake data
* Remove info deprecation level
* Fix extra space on cluster tab control bar
* Cleanup code and localize majority of UI controls
* Change overview tab to steps layout
* Update copy
* Localize overview tab
* Complete localization of checkup tabs
* Make ES version dynamic based on branch
* Add pagination to checkup tabs
* Rename checkup -> assistant
* Cleanup filter and group by bars
* WIP UI unit tests
* Copy tweaks
* Fix i18n formatting issues
* Update tests for copy
* Add tests for remaining UI
* Fix pagination w/ filter changes + table button color
* Small cleanup
* Add reindex button to old index deprecations
* Add shrunken indices setting to copy settings blacklist for #18469
* Add next steps to overview tab + update copy
* Remove usage of migration assistance API
* Use all/critical toggle for filter buttons
* Cloud upgrade copy
* Translate reindex button
* Remove hacked EUI type
* Show incomplete banner on all tabs
* Update copy for waiting for next version
* Review comments
* Update deprecation level type
* Update checkup tab snapshots
* Remove dependencies on types from #25168
* Use types from new global type defs
* Remove 'Reindex in Console' button
* Remove unused variable
* Translations for Cluster and Alerts
* Translations for cluster and alerts
* Translations for cluster and alerts
* Fix typos
* Update id
* Update Notification snapshot
* Translate lastEvent label
* Revert changes for untranslated label.
* Internationalize job details tabs and wrap instances in EuiErrorBoundary to visually localize the error.
* Localize no default index pattern message.
* Localize es interval errors.
* Localize job action menu and confirm delete modal.
* Remove unnecessary use of injectI18n from tabs.
* Localize job status.
* Localize steps.
* Remove template literals from FormattedMessages.
* fix tests and update snapshots
* fix id names
* fix test and update snapshots
* Update unit test snapshots
* fix issues
* Update snapshots
* Fix issues