[SR] Single and multiple repository delete#34593
[SR] Single and multiple repository delete#34593jen-huang merged 2 commits intoelastic:feature/snapshotsfrom
Conversation
|
Pinging @elastic/es-ui |
💚 Build Succeeded |
cjcenizal
left a comment
There was a problem hiding this comment.
Tested locally, code LGTM! I had a couple questions and suggestions, the most significant of which was a suggested change to the structure of the notification logic.
|
|
||
| type DeleteRepository = (names: Array<Repository['name']>) => void; | ||
|
|
||
| type OnSuccessCallback = (repositoriesDeleted: Array<Repository['name']>) => void; |
There was a problem hiding this comment.
Just a thought... what if we used the string type everywhere instead of Repository['name']? What would the impact be on readability and type-checking?
Personally, I think seeing string would be easier to understand. And I don't see any downside, because it simplifies the requirements of many variable types because they'll only need to "know" about strings, not repositories. But my mental model of this code is incomplete as is my knowledge of TS, so maybe I'm just not seeing the meaning/value behind Repository['name'].
I can imagine the argument that it will allow us to change the type of name to some other value without needing to update all of our types everywhere, but I think that's a very unlikely scenario. Is there another benefit?
There was a problem hiding this comment.
I agree with CJ, I would have simply written (repositoriesDeleted: string[]) as it is very unlikely that the Repository['name'] changes from string to another type. Then it could also be applied on L18 (and basically everywhere).
| const repositoriesToDelete = [...repositoryNames]; | ||
| deleteRepositories(repositoriesToDelete).then(({ data, error }) => { | ||
| // Surface success notifications | ||
| if (data.success && data.success.length) { |
There was a problem hiding this comment.
Can we rename success to itemsDeleted here and in the API endpoint? I find it a little easier to understand, there's precedent since we do this for the CCR API and I've updated the Remote Clusters API to use this name too. Similarly, can we rename data.error to data.errors? This will help differentiate it from error.
Also what do you think of destructuring data at the top here? I think it should be safe, since both success and error are always defined on the response.
And last thing... I'm finding it difficult to follow the parallel logic branches of the two error-types. I know it might also seem a bit more verbose, but if we use a catch to separate the two branches then personally I would also find it easier to follow the logic. This would be possible if we update deleteRepositories to throw an error instead of returning it. Here's the general idea of what I'm thinking:
// This helper is extracted onto line 22
function getErrorTitle(i18n, count, name) {
const hasMultipleErrors = count > 1;
if (hasMultipleErrors) {
return i18n.translate(
'xpack.snapshotRestore.deleteRepository.errorMultipleNotificationTitle',
{
defaultMessage: 'Error removing {count} repositories',
values: {
count,
},
}
);
return i18n.translate('xpack.snapshotRestore.deleteRepository.errorSingleNotificationTitle', {
defaultMessage: "Error removing repository '{name}'",
values: { name },
});
}
// ...
deleteRepositories(repositoriesToDelete)
// Destructure the 200 response into success and error (or itemsDeleted and errors)
.then(({ success, error }) => {
// Surface success notifications
if (success.length) {
const hasMultipleSuccesses = success.length > 1;
const successMessage = hasMultipleSuccesses
? i18n.translate(
'xpack.snapshotRestore.deleteRepository.successMultipleNotificationTitle',
{
defaultMessage: 'Removed {count} repositories',
values: { count: success.length },
}
)
: i18n.translate(
'xpack.snapshotRestore.deleteRepository.successSingleNotificationTitle',
{
defaultMessage: "Removed repository '{name}'",
values: { name: success[0] },
}
);
toastNotifications.addSuccess(successMessage);
if (onSuccessCallback.current) {
onSuccessCallback.current([...success]);
}
}
if (error.length) {
const errorTitle = getErrorTitle(i18n, error.length, error[0]);
toastNotifications.addDanger(errorTitle);
}
})
.catch(error => {
const errorTitle = getErrorTitle(i18n, repositoriesToDelete.length, repositoriesToDelete[0]);
toastNotifications.addDanger(errorTitle);
});| { | ||
| defaultMessage: 'Error removing {count} repositories', | ||
| values: { | ||
| count: (data.errors && data.errors.length) || repositoriesToDelete.length, |
There was a problem hiding this comment.
It looks like data.errors is a typo here and on line 97, since we're expecting data.error right?
| <RepositoryDeleteProvider> | ||
| {(deleteRepository: (names: Array<Repository['name']>) => void) => { | ||
| {( | ||
| confirmDeleteRepository: ( |
There was a problem hiding this comment.
I find this name a bit confusing because I imagine that the modal is where the user confirms the delete action. But if I understand the code correctly, we're using confirmDeleteRepository to open the confirmation modal. Can we rename this to communicate that we're prompting the user for confirmation? How about promptUserToDeleteRepository or simply promptUser since the context of "deleting repositories" is already established by the component name?
There was a problem hiding this comment.
You don't need to type twice everything 😊 This is the beauty of Typescript, once you typed the source, the consumer get the types. So this can simply be
<RepositoryDeleteProvider>
{confirmDeleteRepository => {
return (Then by doing that, we realize that you have a wrong type for DeleteRepository on L18 of "repository_delete_provider.tsx".
It should be
type DeleteRepository = (names: string[], onSuccess: OnSuccessCallback) => void;And then we realize that we don't need to type the arguments of the function, as you already gave it a type
// "names" and "onSuccess" are types through "DeleteRepository"
const confirmDeleteRepository: DeleteRepository = (names, onSuccess = () => undefined): void => {
setIsModalOpen(true);
setRepositoryNames(names);
onSuccessCallback = onSuccess;
};And suddenly you start loving Typescript 😄
| <RepositoryDetails | ||
| repositoryName={currentRepository} | ||
| onClose={closeRepositoryDetails} | ||
| onRepositoryDelete={onRepositoryDelete} |
There was a problem hiding this comment.
Minor nit, but maybe onRepositoryDeleted (past tense) is clearer? This also complements the name of its parameter, repositoriesDeleted.
| }; | ||
|
|
||
| await Promise.all([ | ||
| ...repositoryNames.map(name => { |
There was a problem hiding this comment.
Minor nit: map returns a new array, so I think you can remove the wrapping array literal and remove the destructuring. Same on line 43.
sebelga
left a comment
There was a problem hiding this comment.
Overall LGTM @jen-huang ! I did not test it locally but made a few comments about style and Typescript. 😊
| }; | ||
|
|
||
| const renderModal = () => { | ||
| if (!isModalOpen || !repositoryNames || !repositoryNames.length) { |
There was a problem hiding this comment.
|| !repositoryNames || !repositoryNames.length should never happen. If it does, it means that there is a problem at line L38 & L39. I would not set the modal open on L38 if that happens and console log a warning that this should not happen and return early.
| } | ||
| const closeModal = () => { | ||
| setIsModalOpen(false); | ||
| setRepositoryNames([]); |
There was a problem hiding this comment.
Do we need this line and reset the array? As it is closed it is hidden anyway.
| const [repositoryNames, setRepositoryNames] = useState<Array<Repository['name']>>([]); | ||
| const [isModalOpen, setIsModalOpen] = useState<boolean>(false); | ||
| const deleteRepository: DeleteRepository = names => { | ||
| const onSuccessCallback = useRef<OnSuccessCallback | null>(null); |
There was a problem hiding this comment.
Do we really need to use this hook instead of a simple let onSuccessCallBack; ? Something like this
let onSuccessCallback: OnSuccessCallback;
const confirmDeleteRepository: DeleteRepository = (
names: string[],
onSuccess: OnSuccessCallback = () => undefined
): void => {
setIsModalOpen(true);
setRepositoryNames(names);
onSuccessCallback = onSuccess;
};| } | ||
| ); | ||
| toastNotifications.addSuccess(successMessage); | ||
| if (onSuccessCallback.current) { |
There was a problem hiding this comment.
With the above change, the if would not be necessary and would simply be onSuccessCallback([...data.success]);
| <RepositoryDeleteProvider> | ||
| {(deleteRepository: (names: Array<Repository['name']>) => void) => { | ||
| {( | ||
| confirmDeleteRepository: ( |
There was a problem hiding this comment.
You don't need to type twice everything 😊 This is the beauty of Typescript, once you typed the source, the consumer get the types. So this can simply be
<RepositoryDeleteProvider>
{confirmDeleteRepository => {
return (Then by doing that, we realize that you have a wrong type for DeleteRepository on L18 of "repository_delete_provider.tsx".
It should be
type DeleteRepository = (names: string[], onSuccess: OnSuccessCallback) => void;And then we realize that we don't need to type the arguments of the function, as you already gave it a type
// "names" and "onSuccess" are types through "DeleteRepository"
const confirmDeleteRepository: DeleteRepository = (names, onSuccess = () => undefined): void => {
setIsModalOpen(true);
setRepositoryNames(names);
onSuccessCallback = onSuccess;
};And suddenly you start loving Typescript 😄
| .mockResolvedValueOnce(mockEsResponse) | ||
| .mockResolvedValueOnce(mockEsResponse); | ||
| const expectedResponse = { success: names, error: [] }; | ||
| await expect( |
There was a problem hiding this comment.
I personally read this better (and it's shorter). But it's just a preference 😊
const response = await getAllHandler(mockRequest, callWithRequest, mockResponseToolkit);
expect(response).toEqual(expectedResponse);
💚 Build Succeeded |
* [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 e34ee47. * 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
* [SR] Snapshot and restore plugin boilerplate (elastic#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 (elastic#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 (elastic#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 (elastic#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. (elastic#34598) * [SR] Single and multiple repository delete (elastic#34593) * Add single/multi repository delete API and UI * Address PR feedback * [SR] Add SnapshotTable and SnapshotDetails. (elastic#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 (elastic#35031) * Fix eslint issues and add (de)serialization for repositories * Add comment about flattening settings * [SR] Surface repository errors and index failures more prominently (elastic#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 (elastic#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 (elastic#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 (elastic#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 e34ee47. * Fix space * [SR] Add permissions UI and Cloud-specific repository type UI branch (elastic#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
* [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 e34ee47. * 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
Adds single and multiple repository delete endpoint and UIs.
There is a known issue for repositories with commas in their name where loading their detail panel results in a 404 due to an ES issue: elastic/elasticsearch#40817. Repositories with commas in their name also can't be deleted using this new delete endpoint. Since the fix on ES side will likely be putting some character restrictions for the name, I'm ignoring that edge case for now.
Confirmation modal for multiple delete by selecting repositories from table:

Confirmation modal for single delete:

Success and error toasts:
