// Check that only old collection action are available on context menu
cy.get('[data-cy=collection-panel-options-btn]').click();
cy.get('[data-cy=context-menu]')
- .should('contain', 'Recover version')
+ .should('contain', 'Restore version')
.and('not.contain', 'Add to favorites');
cy.get('body').click(); // Collapse the menu avoiding details panel expansion
// Check that old collection action isn't available on context menu
cy.get('[data-cy=collection-panel-options-btn]').click()
- cy.get('[data-cy=context-menu]').should('not.contain', 'Recover version')
+ cy.get('[data-cy=context-menu]').should('not.contain', 'Restore version')
cy.get('body').click(); // Collapse the menu avoiding details panel expansion
// Make another change, confirm new version.
.and('not.contain', 'Edit collection');
cy.get('body').click();
- // Recover first version
+ // Restore first version
cy.get('[data-cy=collection-version-browser]').within(() => {
cy.get('[data-cy=collection-version-browser-select-1]').click();
});
cy.get('[data-cy=collection-panel-options-btn]').click()
- cy.get('[data-cy=context-menu]').contains('Recover version').click();
- cy.get('[data-cy=confirmation-dialog]').should('contain', 'Recover version');
+ cy.get('[data-cy=context-menu]').contains('Restore version').click();
+ cy.get('[data-cy=confirmation-dialog]').should('contain', 'Restore version');
cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
cy.get('[data-cy=collection-info-panel]')
.should('not.contain', 'This is an old version');
export const RemoveFavoriteIcon: IconType = (props) => <Star {...props} />;
export const PublicFavoriteIcon: IconType = (props) => <Public {...props} />;
export const RenameIcon: IconType = (props) => <Edit {...props} />;
-export const RecoverVersionIcon: IconType = (props) => <FlipToFront {...props} />;
+export const RestoreVersionIcon: IconType = (props) => <FlipToFront {...props} />;
export const RestoreFromTrashIcon: IconType = (props) => <RestoreFromTrash {...props} />;
export const ReRunProcessIcon: IconType = (props) => <Cached {...props} />;
export const SearchIcon: IconType = (props) => <Search {...props} />;
const mapped = mapTreeValues(services.collectionService.extendFileURL)(sorted);
dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES(mapped));
dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_PANEL_LOAD_FILES));
- }).catch(e => {
+ }).catch(() => {
dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_PANEL_LOAD_FILES));
dispatch(snackbarActions.OPEN_SNACKBAR({
- message: `Error getting file list: ${e.errors[0]}`,
+ message: `Error getting file list`,
hideDuration: 2000,
kind: SnackbarKind.ERROR }));
});
import { navigateTo } from "../navigation/navigation-action";
import { dialogActions } from "../dialog/dialog-actions";
-export const COLLECTION_RECOVER_VERSION_DIALOG = 'collectionRecoverVersionDialog';
+export const COLLECTION_RESTORE_VERSION_DIALOG = 'collectionRestoreVersionDialog';
-export const openRecoverCollectionVersionDialog = (uuid: string) =>
+export const openRestoreCollectionVersionDialog = (uuid: string) =>
(dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(dialogActions.OPEN_DIALOG({
- id: COLLECTION_RECOVER_VERSION_DIALOG,
+ id: COLLECTION_RESTORE_VERSION_DIALOG,
data: {
- title: 'Recover version',
- text: "Do you want to make this the new collection's head version? If you don't want to modify the current head version, you can just make a copy.",
- confirmButtonLabel: 'Recover',
+ title: 'Restore version',
+ text: "This will copy the content of the selected version to the head. To make a new collection with the content of the selected version, use 'Make a copy' instead.",
+ confirmButtonLabel: 'Restore',
uuid
}
}));
};
-export const recoverVersion = (resourceUuid: string) =>
+export const restoreVersion = (resourceUuid: string) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
try {
// Request que entire record because stored old versions usually
dispatch<any>(navigateTo(headVersion.uuid));
} catch (e) {
dispatch(snackbarActions.OPEN_SNACKBAR({
- message: `Couldn't recover version: ${e.errors[0]}`,
+ message: `Couldn't restore version: ${e.errors[0]}`,
hideDuration: 2000,
kind: SnackbarKind.ERROR
}));
import { connect } from "react-redux";
import { ConfirmationDialog } from "~/components/confirmation-dialog/confirmation-dialog";
import { withDialog, WithDialogProps } from "~/store/dialog/with-dialog";
-import { COLLECTION_RECOVER_VERSION_DIALOG, recoverVersion } from '~/store/collections/collection-version-actions';
+import { COLLECTION_RESTORE_VERSION_DIALOG, restoreVersion } from '~/store/collections/collection-version-actions';
const mapDispatchToProps = (dispatch: Dispatch, props: WithDialogProps<any>) => ({
onConfirm: () => {
props.closeDialog();
- dispatch<any>(recoverVersion(props.data.uuid));
+ dispatch<any>(restoreVersion(props.data.uuid));
}
});
-export const RecoverCollectionVersionDialog = compose(
- withDialog(COLLECTION_RECOVER_VERSION_DIALOG),
+export const RestoreCollectionVersionDialog = compose(
+ withDialog(COLLECTION_RESTORE_VERSION_DIALOG),
connect(null, mapDispatchToProps)
)(ConfirmationDialog);
\ No newline at end of file
AdvancedIcon,
OpenIcon,
Link,
- RecoverVersionIcon
+ RestoreVersionIcon
} from "~/components/icon/icon";
import { openCollectionUpdateDialog } from "~/store/collections/collection-update-actions";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
import { copyToClipboardAction, openInNewTabAction } from "~/store/open-in-new-tab/open-in-new-tab.actions";
-import { openRecoverCollectionVersionDialog } from "~/store/collections/collection-version-actions";
+import { openRestoreCollectionVersionDialog } from "~/store/collections/collection-version-actions";
import { TogglePublicFavoriteAction } from "../actions/public-favorite-action";
import { togglePublicFavorite } from "~/store/public-favorites/public-favorites-actions";
import { publicFavoritePanelActions } from "~/store/public-favorites-panel/public-favorites-action";
[
...commonActionSet.reduce((prev, next) => prev.concat(next), []),
{
- icon: RecoverVersionIcon,
- name: 'Recover version',
+ icon: RestoreVersionIcon,
+ name: 'Restore version',
execute: (dispatch, { uuid }) => {
- dispatch<any>(openRecoverCollectionVersionDialog(uuid));
+ dispatch<any>(openRestoreCollectionVersionDialog(uuid));
}
},
]
import { AllProcessesPanel } from '../all-processes-panel/all-processes-panel';
import { NotFoundPanel } from '../not-found-panel/not-found-panel';
import { AutoLogout } from '~/views-components/auto-logout/auto-logout';
-import { RecoverCollectionVersionDialog } from '~/views-components/collections-dialog/recover-version-dialog';
+import { RestoreCollectionVersionDialog } from '~/views-components/collections-dialog/restore-version-dialog';
type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content';
<ProcessCommandDialog />
<ProcessInputDialog />
<ProjectPropertiesDialog />
- <RecoverCollectionVersionDialog />
+ <RestoreCollectionVersionDialog />
<RemoveApiClientAuthorizationDialog />
<RemoveComputeNodeDialog />
<RemoveGroupDialog />