Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD column to superuser playground table for if docker is enabled #400

Closed
wabscale opened this issue Sep 20, 2022 · 1 comment
Closed

ADD column to superuser playground table for if docker is enabled #400

wabscale opened this issue Sep 20, 2022 · 1 comment
Labels

Comments

@wabscale
Copy link
Collaborator

Add column for new docker row column with mui icon to indicate if it is on or off.

Column definitions here:

const useColumns = (state, enqueueSnackbar) => ([
{field: 'netid', headerName: 'Netid'},
{field: 'name', headerName: 'Name', width: 300},
{field: 'state', headerName: 'State', width: 200},
{field: 'image', headerName: 'Image', width: 150, valueGetter: (params) => params.value.title},
{field: 'image_tag', headerName: 'Tag', width: 150, valueGetter: (params) => params.value?.title ?? 'latest'},
{field: 'created', headerName: 'Created', type: 'dateTime', width: 170},
{field: 'created_delta', headerName: 'Age', width: 170},
{field: 'last_proxy_delta', headerName: 'Last Ping', width: 170},
{
field: 'redirect_url', headerName: 'Go To IDE', width: 120, renderCell: ({row}) => (
<React.Fragment>
{row.state === 'Running' && (
<Button
style={{
buttonSuccess: {
'backgroundColor': green[500],
'&:hover': {
backgroundColor: green[700],
},
},
}}
variant={'contained'}
color={'primary'}
component={'a'}
href={row.redirect_url}
target={'_blank'}
>
Go To IDE
</Button>
)}
</React.Fragment>
),
},
{
field: 'kill', headerName: 'Kill Session', width: 150, renderCell: ({row}) => (
<Button
variant={'contained'}
color={'error'}
size={'small'}
startIcon={<DeleteForeverIcon/>}
onClick={stopSession(row.id, state, enqueueSnackbar)}
>
Kill Session
</Button>
),
},
]);

@wabscale wabscale added feature New feature or request housekeeping frontend labels Sep 20, 2022
@wabscale wabscale moved this to Todo in AnubisLMS Sep 20, 2022
@dolf321
Copy link
Contributor

dolf321 commented Apr 6, 2023

Hi @wabscale, created a PR for this, please review #449.

Thanks!

@wabscale wabscale closed this as completed Apr 7, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in AnubisLMS Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants