chore: deprecate robot duplication
This commit is contained in:
@@ -77,7 +77,6 @@ interface RecordingsTableProps {
|
||||
handleIntegrateRecording: (id: string, fileName: string, params: string[]) => void;
|
||||
handleSettingsRecording: (id: string, fileName: string, params: string[]) => void;
|
||||
handleEditRobot: (id: string, name: string, params: string[]) => void;
|
||||
handleDuplicateRobot: (id: string, name: string, params: string[]) => void;
|
||||
}
|
||||
|
||||
const LoadingRobotRow = memo(({ row, columns }: any) => {
|
||||
@@ -155,7 +154,6 @@ const TableRowMemoized = memo(({ row, columns, handlers }: any) => {
|
||||
<MemoizedOptionsButton
|
||||
handleRetrain={() =>handlers.handleRetrainRobot(row.id, row.name)}
|
||||
handleEdit={() => handlers.handleEditRobot(row.id, row.name, row.params || [])}
|
||||
handleDuplicate={() => handlers.handleDuplicateRobot(row.id, row.name, row.params || [])}
|
||||
handleDelete={() => handlers.handleDelete(row.id)}
|
||||
robotType={row.type}
|
||||
/>
|
||||
@@ -184,7 +182,7 @@ export const RecordingsTable = ({
|
||||
handleIntegrateRecording,
|
||||
handleSettingsRecording,
|
||||
handleEditRobot,
|
||||
handleDuplicateRobot }: RecordingsTableProps) => {
|
||||
}: RecordingsTableProps) => {
|
||||
const { t } = useTranslation();
|
||||
const theme = useTheme();
|
||||
const [page, setPage] = React.useState(0);
|
||||
@@ -506,10 +504,9 @@ export const RecordingsTable = ({
|
||||
handleIntegrateRecording,
|
||||
handleSettingsRecording,
|
||||
handleEditRobot,
|
||||
handleDuplicateRobot,
|
||||
handleRetrainRobot,
|
||||
handleDelete: async (id: string) => openDeleteConfirm(id)
|
||||
}), [handleRunRecording, handleScheduleRecording, handleIntegrateRecording, handleSettingsRecording, handleEditRobot, handleDuplicateRobot, handleRetrainRobot, notify, t, refetch]);
|
||||
}), [handleRunRecording, handleScheduleRecording, handleIntegrateRecording, handleSettingsRecording, handleEditRobot, handleRetrainRobot, notify, t, refetch]);
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
@@ -777,11 +774,10 @@ interface OptionsButtonProps {
|
||||
handleRetrain: () => void;
|
||||
handleEdit: () => void;
|
||||
handleDelete: () => void;
|
||||
handleDuplicate: () => void;
|
||||
robotType: string;
|
||||
}
|
||||
|
||||
const OptionsButton = ({ handleRetrain, handleEdit, handleDelete, handleDuplicate, robotType }: OptionsButtonProps) => {
|
||||
const OptionsButton = ({ handleRetrain, handleEdit, handleDelete, robotType }: OptionsButtonProps) => {
|
||||
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
|
||||
|
||||
const handleClick = (event: React.MouseEvent<HTMLElement>) => {
|
||||
@@ -826,13 +822,6 @@ const OptionsButton = ({ handleRetrain, handleEdit, handleDelete, handleDuplicat
|
||||
<ListItemIcon><DeleteForever fontSize="small" /></ListItemIcon>
|
||||
<ListItemText>Delete</ListItemText>
|
||||
</MenuItem>
|
||||
|
||||
{robotType !== 'scrape' && (
|
||||
<MenuItem onClick={() => { handleDuplicate(); handleClose(); }}>
|
||||
<ListItemIcon><ContentCopy fontSize="small" /></ListItemIcon>
|
||||
<ListItemText>Duplicate</ListItemText>
|
||||
</MenuItem>
|
||||
)}
|
||||
</Menu>
|
||||
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user