diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ArchiveModelVersionModal.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ArchiveModelVersionModal.tsx index b65587f90..e2362f34a 100644 --- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ArchiveModelVersionModal.tsx +++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ArchiveModelVersionModal.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import { + Alert, Form, FormGroup, Modal, @@ -63,10 +64,16 @@ export const ArchiveModelVersionModal: React.FC = onClose={onClose} data-testid="archive-model-version-modal" > - +
+ {error && ( + + {error.message} + + )} + {description} =
+ onCancel={onClose} + onSubmit={onConfirm} + submitLabel="Archive" + isSubmitLoading={isSubmitting} + isSubmitDisabled={isDisabled} + error={error} + alertTitle="Error" + /> ); }; diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ArchiveRegisteredModelModal.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ArchiveRegisteredModelModal.tsx index 77b6912e3..f1f6d198f 100644 --- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ArchiveRegisteredModelModal.tsx +++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/ArchiveRegisteredModelModal.tsx @@ -70,16 +70,16 @@ export const ArchiveRegisteredModelModal: React.FC - - +
{error && ( - {error.message} + {'error.message'} )} + {description} ); diff --git a/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/RestoreModelVersionModal.tsx b/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/RestoreModelVersionModal.tsx index b9c57d856..fa673c316 100644 --- a/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/RestoreModelVersionModal.tsx +++ b/clients/ui/frontend/src/app/pages/modelRegistry/screens/components/RestoreModelVersionModal.tsx @@ -1,6 +1,14 @@ import * as React from 'react'; -import { Modal } from '@patternfly/react-core/deprecated'; import DashboardModalFooter from '~/app/components/DashboardModalFooter'; +import { + Form, + Modal, + ModalHeader, + ModalBody, + Alert, + FormGroup, + TextInput, +} from '@patternfly/react-core'; interface RestoreModelVersionModalProps { onCancel: () => void; @@ -37,26 +45,39 @@ export const RestoreModelVersionModal: React.FC = } }, [onSubmit, onClose]); + const description = ( + <> + {modelVersionName} will be restored and returned to the versions list. + + ); + return ( - } data-testid="restore-model-version-modal" > - {modelVersionName} will be restored and returned to the versions list. + + + + {error && ( + + {error.message} + + )} + + {description} + + ); };