marginBottom: theme.spacing.unit
},
label: {
+ boxSizing: 'border-box',
color: theme.palette.grey["500"],
width: '40%'
},
value: {
+ boxSizing: 'border-box',
width: '60%',
display: 'flex',
alignItems: 'flex-start',
}
});
-
-
export const RENAME_FILE_DIALOG = 'renameFileDialog';
export interface RenameFileDialogData {
name: string;
}
};
-export const doCollectionPartialCopy = ({ name, description, projectUuid }: CollectionPartialCopyFormData) =>
+export const copyCollectionPartial = ({ name, description, projectUuid }: CollectionPartialCopyFormData) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(startSubmit(COLLECTION_PARTIAL_COPY_FORM_NAME));
const state = getState();
import { withDialog } from "~/store/dialog/with-dialog";
import { CollectionCreateFormDialogData } from '~/store/collections/collection-create-actions';
import { COLLECTION_UPLOAD_FILES_DIALOG, submitCollectionFiles } from '~/store/collections/collection-upload-actions';
-import { DialogCollectionFilesUpload } from '../dialog-upload/dialog-collection-files-upload';
+import { DialogCollectionFilesUpload } from '~/views-components/dialog-upload/dialog-collection-files-upload';
-export const UploadCollectionFilesDialog = compose(
+export const FilesUploadCollectionDialog = compose(
withDialog(COLLECTION_UPLOAD_FILES_DIALOG),
reduxForm<CollectionCreateFormDialogData>({
form: COLLECTION_UPLOAD_FILES_DIALOG,
import { compose } from "redux";
import { reduxForm } from 'redux-form';
import { withDialog, } from '~/store/dialog/with-dialog';
-import { CollectionPartialCopyFormData, doCollectionPartialCopy, COLLECTION_PARTIAL_COPY_FORM_NAME } from '~/store/collections/collection-partial-copy-actions';
+import { CollectionPartialCopyFormData, copyCollectionPartial, COLLECTION_PARTIAL_COPY_FORM_NAME } from '~/store/collections/collection-partial-copy-actions';
import { DialogCollectionPartialCopy } from "~/views-components/dialog-copy/dialog-collection-partial-copy";
export const PartialCopyCollectionDialog = compose(
withDialog(COLLECTION_PARTIAL_COPY_FORM_NAME),
- reduxForm({
+ reduxForm<CollectionPartialCopyFormData>({
form: COLLECTION_PARTIAL_COPY_FORM_NAME,
- onSubmit: (data: CollectionPartialCopyFormData, dispatch) => {
- dispatch(doCollectionPartialCopy(data));
+ onSubmit: (data, dispatch) => {
+ dispatch(copyCollectionPartial(data));
}
}))(DialogCollectionPartialCopy);
\ No newline at end of file
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { ProcessInformationCard } from '~/views/process-panel/information-card';
import { Grid } from '@material-ui/core';
+import { ProcessInformationCard } from '~/views/process-panel/information-card';
+import { SubprocessesCard } from '~/views/process-panel/subprocesses-card';
export class ProcessPanel extends React.Component {
render() {
return <div>
- <Grid container>
+ <Grid container spacing={16}>
<Grid item xs={7}>
<ProcessInformationCard />
</Grid>
+ <Grid item xs={5}>
+ <SubprocessesCard />
+ </Grid>
</Grid>
</div>;
}
-}
\ No newline at end of file
+}
--- /dev/null
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as React from 'react';
+import { ArvadosTheme } from '~/common/custom-theme';
+import { StyleRulesCallback, withStyles, WithStyles, Card, CardHeader, CardContent, Grid, Switch } from '@material-ui/core';
+import { DetailsAttribute } from '~/components/details-attribute/details-attribute';
+
+type CssRules = 'root' | 'label' | 'value' | 'switch';
+
+const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+ root: {
+
+ },
+ label: {
+ paddingRight: theme.spacing.unit * 2,
+ textAlign: 'right'
+ },
+ value: {
+
+ },
+ switch: {
+ height: '18px'
+ }
+});
+
+type SubprocessesProps = WithStyles<CssRules>;
+
+export const SubprocessesCard = withStyles(styles)(
+ class extends React.Component<SubprocessesProps> {
+
+ state = {
+ queued: true,
+ active: true,
+ completed: true,
+ failed: true
+ };
+
+ handleChange = (name: string) => (event: any) => {
+ this.setState({ [name]: event.target.checked });
+ }
+
+ render() {
+ const { classes } = this.props;
+ return (
+ <Card className={classes.root}>
+ <CardHeader title="Subprocesses and filters" />
+ <CardContent>
+ <Grid container direction="row">
+ <Grid item xs={3}>
+ <DetailsAttribute classLabel={classes.label} classValue={classes.value}
+ label='Subprocesses:' value="6" />
+ </Grid>
+ </Grid>
+ <Grid container direction="row">
+ <Grid item xs={3}>
+ <DetailsAttribute classLabel={classes.label} classValue={classes.value}
+ label='Queued:' value='2'>
+ <Switch classes={{ bar: classes.switch }}
+ checked={this.state.queued}
+ onChange={this.handleChange('queued')}
+ value="queued"
+ color="primary" />
+ </DetailsAttribute>
+ <DetailsAttribute classLabel={classes.label} classValue={classes.value}
+ label='Active:' value='1'>
+ <Switch classes={{ bar: classes.switch }}
+ checked={this.state.active}
+ onChange={this.handleChange('active')}
+ value="active"
+ color="primary" />
+ </DetailsAttribute>
+ </Grid>
+ <Grid item xs={3}>
+ <DetailsAttribute classLabel={classes.label} classValue={classes.value}
+ label='Completed:' value='2'>
+ <Switch classes={{ bar: classes.switch }}
+ checked={this.state.completed}
+ onChange={this.handleChange('completed')}
+ value="completed"
+ color="primary" />
+ </DetailsAttribute>
+ <DetailsAttribute classLabel={classes.label} classValue={classes.value}
+ label='Failed:' value='1'>
+ <Switch classes={{ bar: classes.switch }}
+ checked={this.state.failed}
+ onChange={this.handleChange('failed')}
+ value="failed"
+ color="primary" />
+ </DetailsAttribute>
+ </Grid>
+ </Grid>
+ </CardContent>
+ </Card>
+ );
+ }
+ }
+);
\ No newline at end of file
import { RenameFileDialog } from '~/views-components/rename-file-dialog/rename-file-dialog';
import { FileRemoveDialog } from '~/views-components/file-remove-dialog/file-remove-dialog';
import { MultipleFilesRemoveDialog } from '~/views-components/file-remove-dialog/multiple-files-remove-dialog';
-import { SidePanel } from '~/views-components/side-panel/side-panel';
import { Routes } from '~/routes/routes';
+import { SidePanel } from '~/views-components/side-panel/side-panel';
+import { ProcessPanel } from '~/views/process-panel/process-panel';
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 { 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 { ProcessPanel } from '~/views/process-panel/process-panel';
-import { UploadCollectionFilesDialog } from '~/views-components/dialog-forms/upload-collection-files-dialog';
-import { PartialCopyCollectionDialog } from '~/views-components/dialog-forms/partial-copy-collection-dialog';
+import { FilesUploadCollectionDialog } from '~/views-components/dialog-forms/files-upload-collection-dialog';
+import { PartialCopyCollectionDialog } from '~/views-components/dialog-forms/partial-copy-collection-dialog';
const APP_BAR_HEIGHT = 100;
<PartialCopyCollectionDialog />
<FileRemoveDialog />
<CopyCollectionDialog />
+ <FileRemoveDialog />
<MultipleFilesRemoveDialog />
<UpdateCollectionDialog />
- <UploadCollectionFilesDialog />
+ <FilesUploadCollectionDialog />
<UpdateProjectDialog />
<MoveCollectionDialog />
<MoveProjectDialog />