workflow-view-middleware-service
[arvados-workbench2.git] / src / views / workflow-panel / workflow-description-card.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import * as React from 'react';
6 import { StyleRulesCallback, WithStyles, withStyles, Card, CardHeader, Typography, CardContent } from '@material-ui/core';
7 import { ArvadosTheme } from '~/common/custom-theme';
8 import { WorkflowIcon } from '~/components/icon/icon';
9 import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
10
11 export type CssRules = 'card';
12
13 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
14     card: {
15         height: '100%'
16     }
17 });
18
19 interface WorkflowDescriptionCardDataProps {
20 }
21
22 type WorkflowDescriptionCardProps = WorkflowDescriptionCardDataProps & WithStyles<CssRules>;
23
24 export const WorkflowDescriptionCard = withStyles(styles)(
25     ({ classes }: WorkflowDescriptionCardProps) => {
26         return <Card className={classes.card}>
27             <CardHeader
28                 title={<Typography noWrap variant="body2">
29                     Workflow description:
30                 </Typography>} />
31             <CardContent>
32                 <DataTableDefaultView
33                     icon={WorkflowIcon}
34                     messages={['Please select a workflow to see its description.']} />
35             </CardContent>
36         </Card>;
37     });