Skip to content
Snippets Groups Projects
Commit bd76b9b1 authored by ali asaria's avatar ali asaria
Browse files

Expand fake UI for workflows

parent 34ca9592
No related branches found
No related tags found
No related merge requests found
import { Box, Button, ButtonGroup, Sheet, Table, Typography } from '@mui/joy'; import {
import { ReactFlow } from '@xyflow/react'; Box,
Button,
ButtonGroup,
List,
ListItem,
ListItemButton,
ListItemContent,
ListItemDecorator,
Sheet,
Table,
Typography,
} from '@mui/joy';
import { Background, ControlButton, Controls, ReactFlow } from '@xyflow/react';
import '@xyflow/react/dist/style.css'; import '@xyflow/react/dist/style.css';
import { WorkflowIcon } from 'lucide-react';
const initialNodes = [ const initialNodes = [
{ {
...@@ -39,7 +52,7 @@ export default function Workflows({ experimentInfo }) { ...@@ -39,7 +52,7 @@ export default function Workflows({ experimentInfo }) {
flexDirection: 'column', flexDirection: 'column',
height: '100%', height: '100%',
overflow: 'hidden', overflow: 'hidden',
pb: 2, mb: 3,
}} }}
> >
<Typography level="h1">Workflows</Typography> <Typography level="h1">Workflows</Typography>
...@@ -55,39 +68,60 @@ export default function Workflows({ experimentInfo }) { ...@@ -55,39 +68,60 @@ export default function Workflows({ experimentInfo }) {
height: '100%', height: '100%',
}} }}
> >
<Box flex={2}> <Box flex={1}>
<Typography level="title-lg" mb={2}> <Typography level="title-lg" mb={2}>
List Workflows
</Typography> </Typography>
<Table> <List>
<thead> {[1, 2, 3].map((i) => (
<tr> <ListItem key={i}>
<th>Workflow</th> <ListItemButton>
<th>Status</th> <ListItemDecorator>
<th>&nbsp;</th> <WorkflowIcon />
</tr> </ListItemDecorator>
</thead> <ListItemContent>Workflow {i}</ListItemContent>
<tbody> &rarr;
{[1, 2, 3].map((i) => ( </ListItemButton>
<tr key={i}> </ListItem>
<td>Workflow {i}</td> ))}
<td>Running</td> </List>
<td>
<ButtonGroup>
<Button>Edit</Button>
<Button>View</Button>
</ButtonGroup>
</td>
</tr>
))}
</tbody>
</Table>
</Box> </Box>
<Box flex={2}> <Box flex={3} display="flex" flexDirection="column">
<Typography level="title-lg" mb={2}> <Typography level="title-lg" mb={2}>
Preview Workflow 1
</Typography> </Typography>
<ReactFlow nodes={initialNodes} edges={initialEdges} /> <Box
sx={{
display: 'flex',
width: '100%',
height: '100%',
overflow: 'hidden',
flexDirection: 'row',
}}
>
<ReactFlow
nodes={initialNodes}
edges={initialEdges}
fitView
style={{ backgroundColor: '#F7F9FB' }}
>
<Background color="#96ADE9" />
<Controls>
<ControlButton
onClick={() => {
alert('hi');
}}
>
a
</ControlButton>
</Controls>
</ReactFlow>
<Box pl={2} display="flex" flexDirection="column" gap={1}>
<Button>Edit</Button>
<Button>Run</Button>
<Button>Fight</Button>
</Box>
</Box>
</Box> </Box>
</Sheet> </Sheet>
</Sheet> </Sheet>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment