[arvados-workbench2] updated: 2.7.0-166-g5c898f83
git repository hosting
git at public.arvados.org
Thu Oct 19 20:57:06 UTC 2023
Summary of changes:
.../action-sets/process-resource-action-set.ts | 33 ++++++++--------------
1 file changed, 12 insertions(+), 21 deletions(-)
via 5c898f83a2bdd822a27484664e771dc4c5027851 (commit)
from 23064a8e0ced7fb43269434e73d553c0338fd6b8 (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 5c898f83a2bdd822a27484664e771dc4c5027851
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Oct 19 16:56:58 2023 -0400
20382: refactored process-resource-action-set to remove duplicate code Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/context-menu/action-sets/process-resource-action-set.ts b/src/views-components/context-menu/action-sets/process-resource-action-set.ts
index 6db875f2..64b90ff4 100644
--- a/src/views-components/context-menu/action-sets/process-resource-action-set.ts
+++ b/src/views-components/context-menu/action-sets/process-resource-action-set.ts
@@ -116,17 +116,16 @@ export const processResourceActionSet: ContextMenuActionSet = [
],
];
-export const runningProcessResourceActionSet = [
+const runningProcessOnlyActionSet: ContextMenuActionSet = [
[
- ...processResourceActionSet.reduce((prev, next) => prev.concat(next), []),
{
name: "CANCEL",
icon: StopIcon,
execute: (dispatch, resources) => {
- dispatch(cancelRunningWorkflow(resources[0].uuid));
+ dispatch<any>(cancelRunningWorkflow(resources[0].uuid));
},
},
- ],
+ ]
];
export const processResourceAdminActionSet: ContextMenuActionSet = [
@@ -144,24 +143,16 @@ export const processResourceAdminActionSet: ContextMenuActionSet = [
],
];
-export const runningProcessResourceAdminActionSet: ContextMenuActionSet = [
+export const runningProcessResourceActionSet = [
[
...processResourceActionSet.reduce((prev, next) => prev.concat(next), []),
- {
- component: TogglePublicFavoriteAction,
- name: "Add to public favorites",
- execute: (dispatch, resources) => {
- dispatch<any>(togglePublicFavorite(resources[0])).then(() => {
- dispatch<any>(publicFavoritePanelActions.REQUEST_ITEMS());
- });
- },
- },
- {
- name: "CANCEL",
- icon: StopIcon,
- execute: (dispatch, resources) => {
- dispatch<any>(cancelRunningWorkflow(resources[0].uuid));
- },
- },
+ ...runningProcessOnlyActionSet.reduce((prev, next) => prev.concat(next), []),
+ ],
+];
+
+export const runningProcessResourceAdminActionSet: ContextMenuActionSet = [
+ [
+ ...processResourceAdminActionSet.reduce((prev, next) => prev.concat(next), []),
+ ...runningProcessOnlyActionSet.reduce((prev, next) => prev.concat(next), []),
],
];
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list