[arvados-workbench2] updated: 2.4.0-63-g3c3d3d40
git repository hosting
git at public.arvados.org
Fri May 20 22:30:34 UTC 2022
Summary of changes:
.../action-sets/workflow-action-set.ts | 15 ++++
.../details-panel/workflow-details.tsx | 88 ++++++++++++++++++++++
2 files changed, 103 insertions(+)
create mode 100644 src/views-components/context-menu/action-sets/workflow-action-set.ts
create mode 100644 src/views-components/details-panel/workflow-details.tsx
via 3c3d3d40033879249cd8e8f483f30cfa565d31bd (commit)
from cc9e1b294ee50dbb25d68e89538ac1a7a3643396 (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 3c3d3d40033879249cd8e8f483f30cfa565d31bd
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Fri May 20 18:30:23 2022 -0400
19143: Add missing files
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/src/views-components/context-menu/action-sets/workflow-action-set.ts b/src/views-components/context-menu/action-sets/workflow-action-set.ts
new file mode 100644
index 00000000..2aa78904
--- /dev/null
+++ b/src/views-components/context-menu/action-sets/workflow-action-set.ts
@@ -0,0 +1,15 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
+import { openRunProcess } from "store/workflow-panel/workflow-panel-actions";
+
+export const workflowActionSet: ContextMenuActionSet = [[
+ {
+ name: "Run",
+ execute: (dispatch, resource) => {
+ dispatch<any>(openRunProcess(resource.uuid, resource.ownerUuid, resource.name));
+ }
+ },
+]];
diff --git a/src/views-components/details-panel/workflow-details.tsx b/src/views-components/details-panel/workflow-details.tsx
new file mode 100644
index 00000000..7076823c
--- /dev/null
+++ b/src/views-components/details-panel/workflow-details.tsx
@@ -0,0 +1,88 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import React from 'react';
+import { DefaultIcon, WorkflowIcon } from 'components/icon/icon';
+import { WorkflowResource } from 'models/workflow';
+import { DetailsData } from "./details-data";
+import { DefaultView } from 'components/default-view/default-view';
+import { DetailsAttribute } from 'components/details-attribute/details-attribute';
+import { ResourceOwnerWithName } from 'views-components/data-explorer/renderers';
+import { formatDate } from "common/formatters";
+import { Grid } from '@material-ui/core';
+import { withStyles, StyleRulesCallback, WithStyles, Button } from '@material-ui/core';
+import { openRunProcess } from "store/workflow-panel/workflow-panel-actions";
+import { Dispatch } from 'redux';
+import { connect } from 'react-redux';
+import { ArvadosTheme } from 'common/custom-theme';
+
+export interface WorkflowDetailsCardDataProps {
+ workflow?: WorkflowResource;
+}
+
+export interface WorkflowDetailsCardActionProps {
+ onClick: (wf: WorkflowResource) => () => void;
+}
+
+const mapDispatchToProps = (dispatch: Dispatch) => ({
+ onClick: (wf: WorkflowResource) =>
+ () => wf && dispatch<any>(openRunProcess(wf.uuid, wf.ownerUuid, wf.name)),
+});
+
+type CssRules = 'runButton';
+
+const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+ runButton: {
+ boxShadow: 'none',
+ padding: '2px 10px 2px 5px',
+ fontSize: '0.75rem'
+ },
+});
+
+export const WorkflowDetailsAttributes = connect(null, mapDispatchToProps)(
+ withStyles(styles)(
+ ({ workflow, onClick, classes }: WorkflowDetailsCardDataProps & WorkflowDetailsCardActionProps & WithStyles<CssRules>) => {
+ return <Grid container>
+ <Button onClick={workflow && onClick(workflow)} className={classes.runButton} variant='contained'
+ data-cy='details-panel-run-btn' color='primary' size='small'>
+ Run
+ </Button>
+ {workflow && workflow.description !== "" && <Grid item xs={12} >
+ <DetailsAttribute
+ label={"Description"}
+ value={workflow?.description} />
+ </Grid>}
+ <Grid item xs={12} >
+ <DetailsAttribute
+ label={"Workflow UUID"}
+ linkToUuid={workflow?.uuid} />
+ </Grid>
+ <Grid item xs={12} >
+ <DetailsAttribute
+ label='Owner' linkToUuid={workflow?.ownerUuid}
+ uuidEnhancer={(uuid: string) => <ResourceOwnerWithName uuid={uuid} />} />
+ </Grid>
+ <Grid item xs={12}>
+ <DetailsAttribute label='Created at' value={formatDate(workflow?.createdAt)} />
+ </Grid>
+ <Grid item xs={12}>
+ <DetailsAttribute label='Last modified' value={formatDate(workflow?.modifiedAt)} />
+ </Grid>
+ <Grid item xs={12} >
+ <DetailsAttribute
+ label='Last modified by user' linkToUuid={workflow?.modifiedByUserUuid}
+ uuidEnhancer={(uuid: string) => <ResourceOwnerWithName uuid={uuid} />} />
+ </Grid>
+ </Grid >;
+ }));
+
+export class WorkflowDetails extends DetailsData<WorkflowResource> {
+ getIcon(className?: string) {
+ return <WorkflowIcon className={className} />;
+ }
+
+ getDetails() {
+ return <WorkflowDetailsAttributes workflow={this.item} />;
+ }
+}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list