import { PanelDefaultView } from '~/components/panel-default-view/panel-default-view';
import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
-type CssRules = 'root' | "toolbar" | "button";
+type CssRules = 'root' | "button";
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
width: '100%',
height: '100%'
},
- toolbar: {
- paddingBottom: theme.spacing.unit * 3,
- textAlign: "right"
- },
button: {
marginLeft: theme.spacing.unit
},
configurable: true,
sortDirection: SortDirection.ASC,
filters: [],
- render: uuid => <ResourceName uuid={uuid} />,
- width: "450px"
+ render: uuid => <ResourceName uuid={uuid} />
},
{
name: "Status",
configurable: true,
filters: [],
render: uuid => <ProcessStatus uuid={uuid} />,
- width: "75px"
},
{
name: ProjectPanelColumnNames.TYPE,
type: ResourceKind.PROJECT
}
],
- render: uuid => <ResourceType uuid={uuid} />,
- width: "125px"
+ render: uuid => <ResourceType uuid={uuid} />
},
{
name: ProjectPanelColumnNames.OWNER,
selected: true,
configurable: true,
filters: [],
- render: uuid => <ResourceOwner uuid={uuid} />,
- width: "200px"
+ render: uuid => <ResourceOwner uuid={uuid} />
},
{
name: ProjectPanelColumnNames.FILE_SIZE,
selected: true,
configurable: true,
filters: [],
- render: uuid => <ResourceFileSize uuid={uuid} />,
- width: "50px"
+ render: uuid => <ResourceFileSize uuid={uuid} />
},
{
name: ProjectPanelColumnNames.LAST_MODIFIED,
configurable: true,
sortDirection: SortDirection.NONE,
filters: [],
- render: uuid => <ResourceLastModifiedDate uuid={uuid} />,
- width: "150px"
+ render: uuid => <ResourceLastModifiedDate uuid={uuid} />
}
];
render() {
const { classes } = this.props;
return <div className={classes.root}>
- <div className={classes.toolbar}>
- <Button color="primary" onClick={this.handleNewCollectionClick} variant="raised" className={classes.button}>
- New collection
- </Button>
- <Button color="primary" variant="raised" className={classes.button}>
- Run a process
- </Button>
- <Button color="primary" onClick={this.handleNewProjectClick} variant="raised" className={classes.button}>
- New project
- </Button>
- </div>
{this.hasAnyItems()
? <DataExplorer
id={PROJECT_PANEL_ID}
return resource.ownerUuid === this.props.currentItemId;
}
- handleNewProjectClick = () => {
- this.props.dispatch<any>(openProjectCreateDialog(this.props.currentItemId));
- }
-
- handleNewCollectionClick = () => {
- this.props.dispatch<any>(openCollectionCreateDialog(this.props.currentItemId));
- }
-
handleContextMenu = (event: React.MouseEvent<HTMLElement>, resourceUuid: string) => {
const menuKind = resourceKindToContextMenuKind(resourceUuid);
const resource = getResource<ProjectResource>(resourceUuid)(this.props.resources);