[ARVADOS-WORKBENCH2] updated: 1.4.1-272-g5924c2b6
Git user
git at public.arvados.org
Tue Mar 3 14:51:03 UTC 2020
Summary of changes:
src/common/config.ts | 2 ++
.../user-dialog/attributes-dialog.tsx | 25 ++++++++------
.../virtual-machine-user-panel.tsx | 40 +++++++++++++---------
3 files changed, 40 insertions(+), 27 deletions(-)
via 5924c2b69f48a6b91243d1593b4f16bab0eace56 (commit)
via 63fe27f7e2715f9e6d5ea90cd1be791ea96410da (commit)
via 987db424780cd47b96305bb16ec744b284131828 (commit)
from 79ba1fb04fca00e440b47d28eb37f2127716343f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 5924c2b69f48a6b91243d1593b4f16bab0eace56
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Thu Feb 27 14:50:28 2020 -0500
16181: Default to empty string if SSHHelpHostSuffix undefined
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
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 5e131861..49d880e5 100644
--- a/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx
+++ b/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx
@@ -60,7 +60,7 @@ const mapStateToProps = (state: RootState) => {
requestedDate: state.virtualMachines.date,
userUuid: state.auth.user!.uuid,
helpText: state.auth.config.clusterConfig.Workbench.SSHHelpPageHTML,
- hostSuffix: state.auth.config.clusterConfig.Workbench.SSHHelpHostSuffix,
+ hostSuffix: state.auth.config.clusterConfig.Workbench.SSHHelpHostSuffix || "",
webShell: state.auth.config.clusterConfig.Services.WebShell.ExternalURL,
...state.virtualMachines
};
commit 63fe27f7e2715f9e6d5ea90cd1be791ea96410da
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Thu Feb 27 10:44:42 2020 -0500
16181: Rework the user attributes dialog a bit
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/src/views-components/user-dialog/attributes-dialog.tsx b/src/views-components/user-dialog/attributes-dialog.tsx
index 67b267ae..df44d62c 100644
--- a/src/views-components/user-dialog/attributes-dialog.tsx
+++ b/src/views-components/user-dialog/attributes-dialog.tsx
@@ -61,35 +61,38 @@ export const UserAttributesDialog = compose(
);
const attributes = (user: UserResource, classes: any) => {
- const { uuid, ownerUuid, createdAt, modifiedAt, modifiedByClientUuid, modifiedByUserUuid, firstName, lastName, href, username } = user;
+ const { uuid, ownerUuid, createdAt, modifiedAt, modifiedByClientUuid, modifiedByUserUuid,
+ firstName, lastName, username, email, isActive, isAdmin } = user;
return (
<span>
<Grid container direction="row">
<Grid item xs={5} className={classes.rightContainer}>
+ {uuid && <Grid item>Uuid</Grid>}
{firstName && <Grid item>First name</Grid>}
{lastName && <Grid item>Last name</Grid>}
- {ownerUuid && <Grid item>Owner uuid</Grid>}
+ {email && <Grid item>Email</Grid>}
+ {username && <Grid item>Username</Grid>}
+ {isActive && <Grid item>Is active</Grid>}
+ {isAdmin && <Grid item>Is admin</Grid>}
{createdAt && <Grid item>Created at</Grid>}
{modifiedAt && <Grid item>Modified at</Grid>}
+ {ownerUuid && <Grid item>Owner uuid</Grid>}
{modifiedByUserUuid && <Grid item>Modified by user uuid</Grid>}
{modifiedByClientUuid && <Grid item>Modified by client uuid</Grid>}
- {uuid && <Grid item>uuid</Grid>}
- {href && <Grid item>Href</Grid>}
- {username && <Grid item>Username</Grid>}
- {username && <Grid item>Username</Grid>}
</Grid>
<Grid item xs={7} className={classes.leftContainer}>
+ <Grid item>{uuid}</Grid>
<Grid item>{firstName}</Grid>
<Grid item>{lastName}</Grid>
- <Grid item>{ownerUuid}</Grid>
+ <Grid item>{email}</Grid>
+ <Grid item>{username}</Grid>
+ <Grid item>{isActive}</Grid>
+ <Grid item>{isAdmin}</Grid>
<Grid item>{createdAt}</Grid>
<Grid item>{modifiedAt}</Grid>
+ <Grid item>{ownerUuid}</Grid>
<Grid item>{modifiedByUserUuid}</Grid>
<Grid item>{modifiedByClientUuid}</Grid>
- <Grid item>{uuid}</Grid>
- <Grid item>{href}</Grid>
- <Grid item>{username}</Grid>
- <Grid item>{username}</Grid>
</Grid>
</Grid>
</span>
commit 987db424780cd47b96305bb16ec744b284131828
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Thu Feb 27 10:02:32 2020 -0500
16181: Support SSHHelpHostSuffix, fix user VM page render issues
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/src/common/config.ts b/src/common/config.ts
index 23faaf91..356ad391 100644
--- a/src/common/config.ts
+++ b/src/common/config.ts
@@ -53,6 +53,7 @@ export interface ClusterConfigJSON {
WelcomePageHTML: string;
InactivePageHTML: string;
SSHHelpPageHTML: string;
+ SSHHelpHostSuffix: string;
SiteName: string;
};
Login: {
@@ -168,6 +169,7 @@ export const mockClusterConfigJSON = (config: Partial<ClusterConfigJSON>): Clust
WelcomePageHTML: "",
InactivePageHTML: "",
SSHHelpPageHTML: "",
+ SSHHelpHostSuffix: "",
SiteName: "",
},
Login: {
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 a641ec63..5e131861 100644
--- a/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx
+++ b/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx
@@ -12,6 +12,7 @@ import { saveRequestedDate, loadVirtualMachinesUserData } from '~/store/virtual-
import { RootState } from '~/store/store';
import { ListResults } from '~/services/common-service/common-service';
import { HelpIcon } from '~/components/icon/icon';
+// import * as CopyToClipboard from 'react-copy-to-clipboard';
type CssRules = 'button' | 'codeSnippet' | 'link' | 'linkIcon' | 'rightAlign' | 'cardWithoutMachines' | 'icon';
@@ -59,6 +60,7 @@ const mapStateToProps = (state: RootState) => {
requestedDate: state.virtualMachines.date,
userUuid: state.auth.user!.uuid,
helpText: state.auth.config.clusterConfig.Workbench.SSHHelpPageHTML,
+ hostSuffix: state.auth.config.clusterConfig.Workbench.SSHHelpHostSuffix,
webShell: state.auth.config.clusterConfig.Services.WebShell.ExternalURL,
...state.virtualMachines
};
@@ -75,6 +77,7 @@ interface VirtualMachinesPanelDataProps {
userUuid: string;
links: ListResults<any>;
helpText: string;
+ hostSuffix: string;
webShell: string;
}
@@ -166,25 +169,30 @@ const virtualMachinesTable = (props: VirtualMachineProps) =>
</TableRow>
</TableHead>
<TableBody>
- {props.virtualMachines.items.map((it, index) =>
- <TableRow key={index}>
- <TableCell>{it.hostname}</TableCell>
- <TableCell>{getUsername(props.links, props.userUuid)}</TableCell>
- <TableCell>ssh {getUsername(props.links, props.userUuid)}@{it.hostname}</TableCell>
- {props.webShell !== "" && <TableCell>
- <a href={`${props.webShell}${it.href}/webshell/${getUsername(props.links, props.userUuid)}`} target="_blank" className={props.classes.link}>
- Log in as {getUsername(props.links, props.userUuid)}
- </a>
- </TableCell>}
- </TableRow>
- )}
+ {props.virtualMachines.items.map(it =>
+ props.links.items.map(lk => {
+ if (lk.tailUuid === props.userUuid) {
+ const username = lk.properties.username;
+ const command = `ssh ${username}@${it.hostname}${props.hostSuffix}`;
+ return <TableRow key={lk.uuid}>
+ <TableCell>{it.hostname}</TableCell>
+ <TableCell>{username}</TableCell>
+ <TableCell>
+ {command}
+ </TableCell>
+ {props.webShell !== "" && <TableCell>
+ <a href={`${props.webShell}${it.href}/webshell/${username}`} target="_blank" className={props.classes.link}>
+ Log in as {username}
+ </a>
+ </TableCell>}
+ </TableRow>;
+ }
+ return;
+ }
+ ))}
</TableBody>
</Table>;
-const getUsername = (links: ListResults<any>, userUuid: string) => {
- return links.items.map(it => it.tailUuid === userUuid ? it.properties.username : '');
-};
-
const CardSSHSection = (props: VirtualMachineProps) =>
<Grid item xs={12}>
<Card>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list