[arvados] updated: 2.7.0-6295-geeaff3c673
git repository hosting
git at public.arvados.org
Tue May 14 15:58:51 UTC 2024
Summary of changes:
services/workbench2/cypress/e2e/workflow.cy.js | 1 +
.../src/store/workflow-panel/workflow-panel-actions.ts | 11 ++---------
.../context-menu/action-sets/workflow-action-set.ts | 4 ++--
3 files changed, 5 insertions(+), 11 deletions(-)
via eeaff3c673d68a412a3743aabfcbd94fe143fc1f (commit)
from 5bf73506d2630a957f16573cfc33bd2bbb09e6ad (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit eeaff3c673d68a412a3743aabfcbd94fe143fc1f
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue May 14 11:58:45 2024 -0400
21535: replaced deleteWorkflow with removeWorkflowPermanently for consistency Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/services/workbench2/cypress/e2e/workflow.cy.js b/services/workbench2/cypress/e2e/workflow.cy.js
index 9e3c5eac56..8cfd87eb5b 100644
--- a/services/workbench2/cypress/e2e/workflow.cy.js
+++ b/services/workbench2/cypress/e2e/workflow.cy.js
@@ -242,6 +242,7 @@ describe('Registered workflow panel tests', function() {
cy.goToPath(`/projects/${activeUser.user.uuid}`);
cy.get('[data-cy=project-panel] table tbody').contains(workflowResource.name).rightclick();
cy.get('[data-cy=context-menu]').contains('Delete Workflow').click();
+ cy.get('[data-cy=confirmation-dialog-ok-btn]').should('exist').click();
cy.get('[data-cy=project-panel] table tbody').should('not.contain', workflowResource.name);
});
});
diff --git a/services/workbench2/src/store/workflow-panel/workflow-panel-actions.ts b/services/workbench2/src/store/workflow-panel/workflow-panel-actions.ts
index 5821d9a05d..ecb0c96b73 100644
--- a/services/workbench2/src/store/workflow-panel/workflow-panel-actions.ts
+++ b/services/workbench2/src/store/workflow-panel/workflow-panel-actions.ts
@@ -126,14 +126,6 @@ export const getWorkflowDetails = (state: RootState) => {
return workflow || undefined;
};
-export const deleteWorkflow = (workflowUuid: string, ownerUuid?: string) =>
- async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- if(ownerUuid) dispatch<any>(navigateTo(ownerUuid));
- dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Removing ...', kind: SnackbarKind.INFO }));
- await services.workflowService.delete(workflowUuid);
- dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Removed.', hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
- };
-
export const openRemoveWorkflowDialog =
(resource: ContextMenuResource, numOfWorkflows: Number) => (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
const confirmationText =
@@ -158,7 +150,7 @@ export const openRemoveWorkflowDialog =
export const REMOVE_WORKFLOW_DIALOG = "removeWorkflowDialog";
-export const removeWorkflowPermanently = (uuid: string) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+export const removeWorkflowPermanently = (uuid: string, ownerUuid?: string) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
const resource = getState().dialog.removeWorkflowDialog.data.resource;
const checkedList = getState().multiselect.checkedList;
@@ -166,6 +158,7 @@ export const removeWorkflowPermanently = (uuid: string) => async (dispatch: Disp
//if no items in checkedlist, default to normal context menu behavior
if (!uuidsToRemove.length) uuidsToRemove.push(uuid);
+ if(ownerUuid) dispatch<any>(navigateTo(ownerUuid));
const workflowsToRemove = uuidsToRemove
.map(uuid => getResource(uuid)(getState().resources) as Resource)
diff --git a/services/workbench2/src/views-components/context-menu/action-sets/workflow-action-set.ts b/services/workbench2/src/views-components/context-menu/action-sets/workflow-action-set.ts
index b71ed93d15..6da6a7102f 100644
--- a/services/workbench2/src/views-components/context-menu/action-sets/workflow-action-set.ts
+++ b/services/workbench2/src/views-components/context-menu/action-sets/workflow-action-set.ts
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0
import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
-import { openRunProcess, deleteWorkflow } from "store/workflow-panel/workflow-panel-actions";
+import { openRunProcess, openRemoveWorkflowDialog } from "store/workflow-panel/workflow-panel-actions";
import { DetailsIcon, AdvancedIcon, OpenIcon, Link, StartIcon, DeleteForever } from "components/icon/icon";
import { copyToClipboardAction, openInNewTabAction } from "store/open-in-new-tab/open-in-new-tab.actions";
import { toggleDetailsPanel } from "store/details-panel/details-panel-action";
@@ -56,7 +56,7 @@ export const workflowActionSet: ContextMenuActionSet = [
icon: DeleteForever,
name: "Delete Workflow",
execute: (dispatch, resources) => {
- dispatch<any>(deleteWorkflow(resources[0].uuid, resources[0].ownerUuid));
+ dispatch<any>(openRemoveWorkflowDialog(resources[0], resources.length));
},
},
],
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list