[ARVADOS-WORKBENCH2] updated: 1.2.0-181-gcdc8a73
Git user
git at public.curoverse.com
Tue Aug 28 07:08:43 EDT 2018
Summary of changes:
src/common/unionize.ts | 14 ++
src/components/breadcrumbs/breadcrumbs.tsx | 2 +-
src/components/side-panel/side-panel.tsx | 128 -----------
src/components/tree/tree.tsx | 7 +-
src/index.tsx | 36 ++-
src/models/resource.ts | 36 ++-
src/models/user.ts | 18 +-
src/routes/routes.ts | 72 ++++++
.../ancestors-service/ancestors-service.ts | 44 ++++
src/services/services.ts | 22 +-
.../user-service.ts} | 10 +-
src/store/auth/auth-action.ts | 5 +-
src/store/breadcrumbs/breadcrumbs-actions.ts | 46 ++++
.../collection-panel/collection-panel-action.ts | 23 +-
.../collection-panel-files-actions.ts | 4 +-
src/store/collections/collection-copy-actions.ts | 8 +-
src/store/collections/collection-create-actions.ts | 14 +-
src/store/collections/collection-move-actions.ts | 2 +
src/store/collections/collection-update-actions.ts | 17 +-
.../uploader/collection-uploader-actions.ts | 5 +-
src/store/context-menu/context-menu-actions.ts | 76 ++++++-
src/store/data-explorer/data-explorer-action.ts | 4 +-
.../data-explorer-middleware-service.ts | 18 ++
src/store/details-panel/details-panel-action.ts | 41 +---
src/store/details-panel/details-panel-reducer.ts | 7 +-
src/store/dialog/dialog-actions.ts | 7 +-
src/store/favorite-panel/favorite-panel-action.ts | 2 +
.../favorite-panel-middleware-service.ts | 105 +++++----
src/store/favorites/favorites-actions.ts | 7 +-
src/store/navigation/navigation-action.ts | 109 ++-------
src/store/project-panel/project-panel-action.ts | 16 +-
.../project-panel-middleware-service.ts | 135 ++++++-----
src/store/project/project-action.ts | 39 ----
src/store/project/project-reducer.test.ts | 165 --------------
src/store/project/project-reducer.ts | 154 -------------
src/store/projects/project-create-actions.ts | 22 +-
src/store/projects/project-move-actions.ts | 17 +-
src/store/projects/project-update-actions.ts | 18 +-
src/store/properties/properties-actions.ts | 12 +
src/store/properties/properties-reducer.ts | 14 ++
src/store/properties/properties.ts | 23 ++
src/store/resources/resources-actions.ts | 31 +++
src/store/resources/resources-reducer.ts | 13 ++
src/store/resources/resources.ts | 37 +++
.../side-panel-tree/side-panel-tree-actions.ts | 162 ++++++++++++++
src/store/side-panel/side-panel-action.ts | 35 ++-
src/store/side-panel/side-panel-reducer.test.ts | 33 ---
src/store/side-panel/side-panel-reducer.ts | 107 ---------
src/store/snackbar/snackbar-actions.ts | 4 +-
src/store/snackbar/snackbar-reducer.ts | 2 +-
src/store/store.ts | 80 +++----
src/store/tree-picker/tree-picker-actions.ts | 8 +-
src/store/tree-picker/tree-picker-reducer.ts | 28 ++-
src/store/tree-picker/tree-picker.ts | 6 +-
src/store/workbench/workbench-actions.ts | 194 ++++++++++++++++
src/views-components/api-token/api-token.tsx | 6 +-
src/views-components/breadcrumbs/breadcrumbs.ts | 30 +++
.../collection-panel-files.ts | 15 +-
.../context-menu/action-sets/project-action-set.ts | 5 +-
.../action-sets/root-project-action-set.ts | 9 +-
.../data-explorer/data-explorer.tsx | 11 +-
src/views-components/data-explorer/renderers.tsx | 46 +++-
.../details-panel/details-panel.tsx | 22 +-
.../dialog-forms/copy-collection-dialog.ts | 3 +-
.../dialog-forms/create-collection-dialog.ts | 6 +-
.../dialog-forms/create-project-dialog.ts | 5 +-
.../dialog-forms/move-collection-dialog.ts | 3 +-
.../dialog-forms/move-project-dialog.ts | 2 +-
.../dialog-forms/update-collection-dialog.ts | 5 +-
.../dialog-forms/update-project-dialog.ts | 5 +-
.../main-app-bar/main-app-bar.test.tsx | 62 ++---
src/views-components/main-app-bar/main-app-bar.tsx | 20 +-
.../project-tree-picker/project-tree-picker.tsx | 3 +-
.../side-panel-tree/side-panel-tree.tsx | 69 ++++++
src/views-components/side-panel/side-panel.tsx | 45 ++++
src/views-components/tree-picker/tree-picker.ts | 23 +-
src/views/collection-panel/collection-panel.tsx | 148 ++++++------
src/views/favorite-panel/favorite-panel-item.ts | 29 ---
src/views/favorite-panel/favorite-panel.tsx | 61 ++---
src/views/process-panel/process-panel.tsx | 20 +-
src/views/project-panel/project-panel-item.ts | 31 ---
src/views/project-panel/project-panel.tsx | 77 ++++---
src/views/workbench/workbench.tsx | 249 ++-------------------
83 files changed, 1649 insertions(+), 1605 deletions(-)
create mode 100644 src/common/unionize.ts
delete mode 100644 src/components/side-panel/side-panel.tsx
create mode 100644 src/routes/routes.ts
create mode 100644 src/services/ancestors-service/ancestors-service.ts
copy src/services/{link-service/link-service.ts => user-service/user-service.ts} (65%)
create mode 100644 src/store/breadcrumbs/breadcrumbs-actions.ts
delete mode 100644 src/store/project/project-action.ts
delete mode 100644 src/store/project/project-reducer.test.ts
delete mode 100644 src/store/project/project-reducer.ts
create mode 100644 src/store/properties/properties-actions.ts
create mode 100644 src/store/properties/properties-reducer.ts
create mode 100644 src/store/properties/properties.ts
create mode 100644 src/store/resources/resources-actions.ts
create mode 100644 src/store/resources/resources-reducer.ts
create mode 100644 src/store/resources/resources.ts
create mode 100644 src/store/side-panel-tree/side-panel-tree-actions.ts
delete mode 100644 src/store/side-panel/side-panel-reducer.test.ts
delete mode 100644 src/store/side-panel/side-panel-reducer.ts
create mode 100644 src/store/workbench/workbench-actions.ts
create mode 100644 src/views-components/breadcrumbs/breadcrumbs.ts
create mode 100644 src/views-components/side-panel-tree/side-panel-tree.tsx
create mode 100644 src/views-components/side-panel/side-panel.tsx
delete mode 100644 src/views/favorite-panel/favorite-panel-item.ts
delete mode 100644 src/views/project-panel/project-panel-item.ts
via cdc8a73914399a401642ca553e9d3d8b2d42db5c (commit)
via cc493b89840b48f40c2beaf626994724331aa196 (commit)
via ed7a4222422dc52642365c83cc10ab0196da909a (commit)
via 1a90c384645ab8880d68abb5dbee1d1193f80538 (commit)
via ddac62fc3f788162bd56bbd5bcacc2f9395c9cca (commit)
via 64fcf842a75ade29706401a47759deab406f0dfd (commit)
via cda707f957a027a484f24f44090a4e5b995572a8 (commit)
via b979b48045c915f0ea95bb95d591f8ac306ddf06 (commit)
via 5627bf1a83323d2b0364cb069564998eb8c6ca7a (commit)
via 4157d0e93444cd1d2a631e7826f8cd831863b58a (commit)
via c3bec339e0f247f7cbc8698120b8ecf43629d3e7 (commit)
via 0c46a74e6c0397fa153c345857977f8654ec4471 (commit)
via 09257d57b005094ea3752a7e90b90aa38518a0cf (commit)
via e6e91f83b899ef4a05a1b3af56d78388058c5e73 (commit)
via fc14bf232fe2cb77bf1f14ab0002fca606234214 (commit)
via ef649661d35999d3d6847861185172fac3e92db1 (commit)
via 1e32e6134cd53c30cd8a9410572a443b37f76f2e (commit)
via 1c0f11ed17dea5be97e8ca63385f979925f1fb08 (commit)
via d6d85de50096eb0053d58c5022fd4e949c830929 (commit)
via 45cfc5acaa27151778f245bce76b027c06698b3d (commit)
via c4489d532c800a91ea66f3aaec98fc4a299e3e1e (commit)
via e9a65be7cd7d5889d885794bf46ac3c6277eca3c (commit)
via 540750a7749cb71ea0a8fde4b7a3689eeaa1c3dd (commit)
via 2df6bac4eea43c9079641cd05262b29cbd285905 (commit)
via 6ce4e6e255691116f2c8e229d45df571dffa6b9a (commit)
from fb15af5c500ad8469240c59b17ff73b889bb022b (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 cdc8a73914399a401642ca553e9d3d8b2d42db5c
Merge: fb15af5 cc493b8
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Tue Aug 28 13:08:29 2018 +0200
merge master
Feature #13858
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --cc src/index.tsx
index c6a5da2,c7f76c6..d3115a6
--- a/src/index.tsx
+++ b/src/index.tsx
@@@ -27,7 -27,9 +27,10 @@@ import { collectionFilesActionSet } fro
import { collectionFilesItemActionSet } from './views-components/context-menu/action-sets/collection-files-item-action-set';
import { collectionActionSet } from './views-components/context-menu/action-sets/collection-action-set';
import { collectionResourceActionSet } from './views-components/context-menu/action-sets/collection-resource-action-set';
+import { processActionSet } from './views-components/context-menu/action-sets/process-action-set';
+ import { addRouteChangeHandlers } from './routes/routes';
+ import { loadWorkbench } from './store/workbench/workbench-actions';
+ import { Routes } from '~/routes/routes';
const getBuildNumber = () => "BN-" + (process.env.REACT_APP_BUILD_NUMBER || "dev");
const getGitCommit = () => "GIT-" + (process.env.REACT_APP_GIT_COMMIT || "latest").substr(0, 7);
@@@ -45,10 -47,9 +48,10 @@@ addMenuActionSet(ContextMenuKind.COLLEC
addMenuActionSet(ContextMenuKind.COLLECTION_FILES_ITEM, collectionFilesItemActionSet);
addMenuActionSet(ContextMenuKind.COLLECTION, collectionActionSet);
addMenuActionSet(ContextMenuKind.COLLECTION_RESOURCE, collectionResourceActionSet);
+addMenuActionSet(ContextMenuKind.PROCESS, processActionSet);
fetchConfig()
- .then(config => {
+ .then((config) => {
const history = createBrowserHistory();
const services = createServices(config);
const store = configureStore(history, services);
diff --cc src/routes/routes.ts
index 0000000,0279bb0..0bf7110
mode 000000,100644..100644
--- a/src/routes/routes.ts
+++ b/src/routes/routes.ts
@@@ -1,0 -1,71 +1,72 @@@
+ // Copyright (C) The Arvados Authors. All rights reserved.
+ //
+ // SPDX-License-Identifier: AGPL-3.0
+
+ import { History, Location } from 'history';
+ import { RootStore } from '../store/store';
+ import { matchPath } from 'react-router';
+ import { ResourceKind, RESOURCE_UUID_PATTERN, extractUuidKind } from '~/models/resource';
+ import { getProjectUrl } from '../models/project';
+ import { getCollectionUrl } from '~/models/collection';
+ import { loadProject, loadFavorites, loadCollection } from '../store/workbench/workbench-actions';
+
+ export const Routes = {
+ ROOT: '/',
+ TOKEN: '/token',
+ PROJECTS: `/projects/:id(${RESOURCE_UUID_PATTERN})`,
+ COLLECTIONS: `/collections/:id(${RESOURCE_UUID_PATTERN})`,
++ PROCESS: `/processes/:id(${RESOURCE_UUID_PATTERN})`,
+ FAVORITES: '/favorites',
+ };
+
+ export const getResourceUrl = (uuid: string) => {
+ const kind = extractUuidKind(uuid);
+ switch (kind) {
+ case ResourceKind.PROJECT:
+ return getProjectUrl(uuid);
+ case ResourceKind.COLLECTION:
+ return getCollectionUrl(uuid);
+ default:
+ return undefined;
+ }
+ };
+
+ export const addRouteChangeHandlers = (history: History, store: RootStore) => {
+ const handler = handleLocationChange(store);
+ handler(history.location);
+ history.listen(handler);
+ };
+
+ export const matchRootRoute = (route: string) =>
+ matchPath(route, { path: Routes.ROOT, exact: true });
+
+ export const matchFavoritesRoute = (route: string) =>
+ matchPath(route, { path: Routes.FAVORITES });
+
+ export interface ProjectRouteParams {
+ id: string;
+ }
+
+ export const matchProjectRoute = (route: string) =>
+ matchPath<ProjectRouteParams>(route, { path: Routes.PROJECTS });
+
+ export interface CollectionRouteParams {
+ id: string;
+ }
+
+ export const matchCollectionRoute = (route: string) =>
+ matchPath<CollectionRouteParams>(route, { path: Routes.COLLECTIONS });
+
+
+ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
+ const projectMatch = matchProjectRoute(pathname);
+ const collectionMatch = matchCollectionRoute(pathname);
+ const favoriteMatch = matchFavoritesRoute(pathname);
+ if (projectMatch) {
+ store.dispatch(loadProject(projectMatch.params.id));
+ } else if (collectionMatch) {
+ store.dispatch(loadCollection(collectionMatch.params.id));
+ } else if (favoriteMatch) {
+ store.dispatch(loadFavorites());
+ }
+ };
diff --cc src/views/process-panel/process-panel.tsx
index 08bd370,0000000..70a7a40
mode 100644,000000..100644
--- a/src/views/process-panel/process-panel.tsx
+++ b/src/views/process-panel/process-panel.tsx
@@@ -1,129 -1,0 +1,141 @@@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as React from 'react';
+import {
+ StyleRulesCallback, WithStyles, withStyles, Card,
+ CardHeader, IconButton, CardContent, Grid, Chip
+} from '@material-ui/core';
+import { ArvadosTheme } from '~/common/custom-theme';
+import { ProcessResource } from '~/models/process';
+import { DispatchProp, connect } from 'react-redux';
+import { RouteComponentProps } from 'react-router';
+import { MoreOptionsIcon, ProcessIcon } from '~/components/icon/icon';
+import { DetailsAttribute } from '~/components/details-attribute/details-attribute';
+import { RootState } from '~/store/store';
++import { ContextMenuKind } from '~/views-components/context-menu/context-menu';
++import { openContextMenu } from '~/store/context-menu/context-menu-actions';
+
+type CssRules = 'card' | 'iconHeader' | 'label' | 'value' | 'content' | 'chip' | 'headerText' | 'link';
+
+const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+ card: {
+ marginBottom: theme.spacing.unit * 2,
+ width: '60%'
+ },
+ iconHeader: {
+ fontSize: '1.875rem',
+ color: theme.customs.colors.green700
+ },
+ label: {
+ fontSize: '0.875rem',
+ },
+ value: {
+ textTransform: 'none',
+ fontSize: '0.875rem'
+ },
+ content: {
+ display: 'flex',
+ paddingBottom: '0px ',
+ paddingTop: '0px',
+ '&:last-child': {
+ paddingBottom: '0px ',
+ }
+ },
+ link: {
+ fontSize: '0.875rem',
+ '&:hover': {
+ color: theme.palette.primary.main,
+ cursor: 'pointer'
+ }
+ },
+ chip: {
+ height: theme.spacing.unit * 2.5,
+ width: theme.spacing.unit * 12,
+ backgroundColor: theme.customs.colors.green700,
+ color: theme.palette.common.white,
+ fontSize: '0.875rem',
+ borderRadius: theme.spacing.unit * 0.625
+ },
+ headerText: {
+ fontSize: '0.875rem',
+ display: 'flex',
+ position: 'relative',
+ justifyContent: 'flex-start',
+ top: -theme.spacing.unit * 4.5,
+ left: theme.spacing.unit * 3,
+ }
+});
+
+interface ProcessPanelDataProps {
+ item: ProcessResource;
+}
+
+interface ProcessPanelActionProps {
+ onContextMenu: (event: React.MouseEvent<HTMLElement>, item: ProcessResource) => void;
+}
+
+type ProcessPanelProps = ProcessPanelDataProps & ProcessPanelActionProps & DispatchProp & WithStyles<CssRules> & RouteComponentProps<{ id: string }>;
+
+export const ProcessPanel = withStyles(styles)(
+ connect((state: RootState) => ({
+ item: state.collectionPanel.item,
+ tags: state.collectionPanel.tags
+ }))(
+ class extends React.Component<ProcessPanelProps> {
+ render() {
- const { classes, onContextMenu, item } = this.props;
++ const { classes } = this.props;
+
+ return <div>
+ <Card className={classes.card}>
+ <CardHeader
+ avatar={<ProcessIcon className={classes.iconHeader} />}
+ action={
+ <IconButton
+ aria-label="More options"
- onClick={event => onContextMenu(event, item)}>
++ onClick={this.handleContextMenu}>
+ <MoreOptionsIcon />
+ </IconButton>
+ }
- title="Pipeline template that generates a config file from a template"
- />
++ title="Pipeline template that generates a config file from a template" />
+ <CardContent className={classes.content}>
+ <Grid container direction="column">
+ <Grid item xs={8}>
+ <DetailsAttribute classLabel={classes.label} classValue={classes.value}
+ label='Status' value={<Chip label="Complete" className={classes.chip} />} />
+ <DetailsAttribute classLabel={classes.label} classValue={classes.value}
+ label='Started at' value="1:25 PM 3/23/2018" />
+ <DetailsAttribute classLabel={classes.label} classValue={classes.value}
+ label='Finished at' value='1:25 PM 3/23/2018' />
+ </Grid>
+ </Grid>
+ <Grid container direction="column">
+ <Grid item xs={8}>
+ <DetailsAttribute classLabel={classes.link} classValue={classes.value}
+ label='Container output' />
+ <DetailsAttribute classLabel={classes.link} classValue={classes.value}
+ label='Show inputs' />
+ <DetailsAttribute classLabel={classes.link} classValue={classes.value}
+ label='Show command' />
+ </Grid>
+ </Grid>
+ </CardContent>
+ <span className={classes.headerText}>This container request was created from the workflow FastQC MultiQC</span>
+ </Card>
+ </div>;
+ }
++
++ handleContextMenu = (event: React.MouseEvent<any>) => {
++ // const { uuid, name, description } = this.props.item;
++ const resource = {
++ uuid: '',
++ name: '',
++ description: '',
++ kind: ContextMenuKind.PROCESS
++ };
++ this.props.dispatch<any>(openContextMenu(event, resource));
++ }
+ }
+ )
+);
diff --cc src/views/workbench/workbench.tsx
index d8daed5,12010ac..27470fa
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@@ -52,14 -26,21 +26,21 @@@ import { FileRemoveDialog } from '~/vie
import { MultipleFilesRemoveDialog } from '~/views-components/file-remove-dialog/multiple-files-remove-dialog';
import { UploadCollectionFilesDialog } from '~/views-components/upload-collection-files-dialog/upload-collection-files-dialog';
import { CollectionPartialCopyDialog } from '~/views-components/collection-partial-copy-dialog/collection-partial-copy-dialog';
+ import { SidePanel } from '~/views-components/side-panel/side-panel';
+ import { Routes } from '~/routes/routes';
+ import { Breadcrumbs } from '~/views-components/breadcrumbs/breadcrumbs';
+ import { CreateProjectDialog } from '~/views-components/dialog-forms/create-project-dialog';
+ import { CreateCollectionDialog } from '~/views-components/dialog-forms/create-collection-dialog';
+ import { CopyCollectionDialog } from '~/views-components/dialog-forms/copy-collection-dialog';
+ import { UpdateCollectionDialog } from '~/views-components/dialog-forms/update-collection-dialog';
+ import { UpdateProjectDialog } from '~/views-components/dialog-forms/update-project-dialog';
import { MoveProjectDialog } from '~/views-components/dialog-forms/move-project-dialog';
import { MoveCollectionDialog } from '~/views-components/dialog-forms/move-collection-dialog';
- import { CopyCollectionDialog } from '~/views-components/dialog-forms/copy-collection-dialog';
-
++import { ProcessPanel } from '~/views/process-panel/process-panel';
- const DRAWER_WITDH = 240;
const APP_BAR_HEIGHT = 100;
- type CssRules = 'root' | 'appBar' | 'drawerPaper' | 'content' | 'contentWrapper' | 'toolbar';
+ type CssRules = 'root' | 'appBar' | 'content' | 'contentWrapper';
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
@@@ -235,11 -162,9 +162,10 @@@ export const Workbench = withStyles(sty
<main className={classes.contentWrapper}>
<div className={classes.content}>
<Switch>
- <Route path='/' exact render={() => <Redirect to={`/projects/${this.props.authService.getUuid()}`} />} />
- <Route path="/projects/:id" render={this.renderProjectPanel} />
- <Route path="/favorites" render={this.renderFavoritePanel} />
- <Route path="/collections/:id" render={this.renderCollectionPanel} />
- <Route path="/process/:id" render={this.renderProcessPanel} />
+ <Route path={Routes.PROJECTS} component={ProjectPanel} />
+ <Route path={Routes.COLLECTIONS} component={CollectionPanel} />
+ <Route path={Routes.FAVORITES} component={FavoritePanel} />
++ <Route path={Routes.PROCESS} component={ProcessPanel} />
</Switch>
</div>
{user && <DetailsPanel />}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list