Skip to content

Commit

Permalink
feat(5463): mr new design refactor, details in action
Browse files Browse the repository at this point in the history
Signed-off-by: gitdallas <[email protected]>
  • Loading branch information
gitdallas committed Aug 30, 2024
1 parent d9669f9 commit ace7c33
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ModelLabels from '~/pages/modelRegistry/screens/components/ModelLabels';
import { ModelRegistryContext } from '~/concepts/modelRegistry/context/ModelRegistryContext';
import { ArchiveRegisteredModelModal } from '~/pages/modelRegistry/screens/components/ArchiveRegisteredModelModal';
import { RestoreRegisteredModelModal } from '~/pages/modelRegistry/screens/components/RestoreRegisteredModel';
import { ModelVersionsTab } from '~/pages/modelRegistry/screens/ModelVersions/const';

type RegisteredModelTableRowProps = {
registeredModel: RegisteredModel;
Expand All @@ -32,19 +33,21 @@ const RegisteredModelTableRow: React.FC<RegisteredModelTableRowProps> = ({
const [isRestoreModalOpen, setIsRestoreModalOpen] = React.useState(false);
const rmUrl = registeredModelUrl(rm.id, preferredModelRegistry?.metadata.name);

const actions = isArchiveRow
? [
{
const actions = [
{
title: 'View details',
onClick: () => navigate(`${rmUrl}/${ModelVersionsTab.DETAILS}`),
},
isArchiveRow
? {
title: 'Restore model',
onClick: () => setIsRestoreModalOpen(true),
},
]
: [
{
}
: {
title: 'Archive model',
onClick: () => setIsArchiveModalOpen(true),
},
];
];

return (
<Tr>
Expand Down

0 comments on commit ace7c33

Please sign in to comment.