X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/454ef1c106b3d738526d65ecfae8db98ad7bebc2..6ead1b122e52a587963383f6a15edf6dfc166ef6:/src/views/virtual-machine-panel/virtual-machine-admin-panel.tsx

diff --git a/src/views/virtual-machine-panel/virtual-machine-admin-panel.tsx b/src/views/virtual-machine-panel/virtual-machine-admin-panel.tsx
index dda2889feb..85a204e3ff 100644
--- a/src/views/virtual-machine-panel/virtual-machine-admin-panel.tsx
+++ b/src/views/virtual-machine-panel/virtual-machine-admin-panel.tsx
@@ -29,10 +29,11 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     },
 });
 
-const mapStateToProps = ({ virtualMachines }: RootState) => {
+const mapStateToProps = (state: RootState) => {
     return {
-        logins: virtualMachines.logins,
-        ...virtualMachines
+        logins: state.virtualMachines.logins,
+        userUuid: state.auth.user!.uuid,
+        ...state.virtualMachines
     };
 };
 
@@ -46,6 +47,7 @@ const mapDispatchToProps = (dispatch: Dispatch): Pick<VirtualMachinesPanelAction
 interface VirtualMachinesPanelDataProps {
     virtualMachines: ListResults<any>;
     logins: VirtualMachineLogins;
+    userUuid: string;
 }
 
 interface VirtualMachinesPanelActionProps {
@@ -98,7 +100,7 @@ const virtualMachinesTable = (props: VirtualMachineProps) =>
                 <TableRow key={index}>
                     <TableCell>{it.uuid}</TableCell>
                     <TableCell>{it.hostname}</TableCell>
-                    <TableCell>["{props.logins.items[0].username}"]</TableCell>
+                    <TableCell>["{props.logins.items.map(it => it.userUuid === props.userUuid ? it.username : '')}"]</TableCell>
                     <TableCell className={props.classes.moreOptions}>
                         <Tooltip title="More options" disableFocusListener>
                             <IconButton onClick={event => props.onOptionsMenuOpen(event, it)} className={props.classes.moreOptionsButton}>
