X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/d0611f387f0ec0163fc8f6053a7715bc3d592700..5b88c131a4bbff645ab7791ce9d6c2e3dcca49a9:/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx diff --git a/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx b/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx index d8725461..66ea017e 100644 --- a/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx +++ b/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx @@ -4,7 +4,7 @@ import React from 'react'; import { connect } from 'react-redux'; -import { Grid, Typography, Button, Card, CardContent, TableBody, TableCell, TableHead, TableRow, Table, Tooltip } from '@material-ui/core'; +import { Grid, Typography, Button, Card, CardContent, TableBody, TableCell, TableHead, TableRow, Table, Tooltip, Chip } from '@material-ui/core'; import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'; import { ArvadosTheme } from 'common/custom-theme'; import { compose, Dispatch } from 'redux'; @@ -16,7 +16,7 @@ import { SESSION_STORAGE } from "services/auth-service/auth-service"; // import * as CopyToClipboard from 'react-copy-to-clipboard'; import parse from "parse-duration"; -type CssRules = 'button' | 'codeSnippet' | 'link' | 'linkIcon' | 'rightAlign' | 'cardWithoutMachines' | 'icon'; +type CssRules = 'button' | 'codeSnippet' | 'link' | 'linkIcon' | 'rightAlign' | 'cardWithoutMachines' | 'icon' | 'chipsRoot'; const EXTRA_TOKEN = "exraToken"; @@ -56,7 +56,10 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ icon: { textAlign: "right", marginTop: theme.spacing.unit - } + }, + chipsRoot: { + margin: `0px -${theme.spacing.unit / 2}px`, + }, }); const mapStateToProps = (state: RootState) => { @@ -109,7 +112,7 @@ export const VirtualMachineUserPanel = compose( render() { const { virtualMachines, links } = this.props; return ( - + {virtualMachines.itemsAvailable === 0 && } {virtualMachines.itemsAvailable > 0 && links.itemsAvailable > 0 && } {} @@ -169,11 +172,12 @@ const virtualMachineSendRequest = (props: VirtualMachineProps) => ; const virtualMachinesTable = (props: VirtualMachineProps) => - +
Host name Login name + Groups Command line Web shell @@ -181,7 +185,7 @@ const virtualMachinesTable = (props: VirtualMachineProps) => {props.virtualMachines.items.map(it => props.links.items.map(lk => { - if (lk.tailUuid === props.userUuid) { + if (lk.tailUuid === props.userUuid && lk.headUuid === it.uuid) { const username = lk.properties.username; const command = `ssh ${username}@${it.hostname}${props.hostSuffix}`; let tokenParam = ""; @@ -191,6 +195,17 @@ const virtualMachinesTable = (props: VirtualMachineProps) => return {it.hostname} {username} + + + { + (lk.properties.groups || []).map((group, i) => ( + + + + )) + } + + {command}