[ARVADOS-WORKBENCH2] updated: 1.4.1-58-g589629e8

Git user git at public.curoverse.com
Thu Oct 24 13:58:51 UTC 2019


Summary of changes:
 .../link-account-panel/link-account-panel-root.tsx | 27 +++++++++++-----------
 .../link-account-panel/link-account-panel.tsx      |  2 +-
 .../site-manager-panel/site-manager-panel-root.tsx | 10 ++++----
 .../site-manager-panel/site-manager-panel.tsx      |  3 ++-
 4 files changed, 23 insertions(+), 19 deletions(-)

       via  589629e80967dc1f318561fbe6a4174e1da231a6 (commit)
      from  a8223b83cc9ae48174718d124a38a504d5312651 (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 589629e80967dc1f318561fbe6a4174e1da231a6
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Thu Oct 24 09:58:23 2019 -0400

    15530: Link account page has link to home cluster
    
    Site manager has links to other clusters.

diff --git a/src/views/link-account-panel/link-account-panel-root.tsx b/src/views/link-account-panel/link-account-panel-root.tsx
index 47473fa4..359f7798 100644
--- a/src/views/link-account-panel/link-account-panel-root.tsx
+++ b/src/views/link-account-panel/link-account-panel-root.tsx
@@ -19,6 +19,7 @@ import { UserResource } from "~/models/user";
 import { LinkAccountType } from "~/models/link-account";
 import { formatDate } from "~/common/formatters";
 import { LinkAccountPanelStatus, LinkAccountPanelError } from "~/store/link-account-panel/link-account-panel-reducer";
+import { Config } from '~/common/config';
 
 type CssRules = 'root';
 
@@ -32,7 +33,7 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
 export interface LinkAccountPanelRootDataProps {
     targetUser?: UserResource;
     userToLink?: UserResource;
-    remoteHosts: { [key: string]: string };
+    remoteHostsConfig: { [key: string]: Config };
     hasRemoteHosts: boolean;
     localCluster: string;
     loginCluster: string;
@@ -70,13 +71,13 @@ type LinkAccountPanelRootProps = LinkAccountPanelRootDataProps & LinkAccountPane
 
 export const LinkAccountPanelRoot = withStyles(styles)(
     ({ classes, targetUser, userToLink, status, isProcessing, error, startLinking, cancelLinking, linkAccount,
-        remoteHosts, hasRemoteHosts, selectedCluster, setSelectedCluster, localCluster, loginCluster }: LinkAccountPanelRootProps) => {
+        remoteHostsConfig, hasRemoteHosts, selectedCluster, setSelectedCluster, localCluster, loginCluster }: LinkAccountPanelRootProps) => {
         return <Card className={classes.root}>
             <CardContent>
                 {isProcessing && <Grid container item direction="column" alignContent="center" spacing={24}>
                     <Grid item>
                         Loading user info. Please wait.
-                       </Grid>
+		       </Grid>
                     <Grid item style={{ alignSelf: 'center' }}>
                         <CircularProgress />
                     </Grid>
@@ -89,29 +90,29 @@ export const LinkAccountPanelRoot = withStyles(styles)(
                             </Grid>
                             <Grid item>
                                 You can link Arvados accounts. After linking, either login will take you to the same account.
-                               </Grid >
+			</Grid >
                         </Grid>
                         <Grid container item direction="row" spacing={24}>
                             <Grid item>
                                 <Button disabled={!targetUser.isActive} color="primary" variant="contained" onClick={() => startLinking(LinkAccountType.ADD_OTHER_LOGIN)}>
                                     Add another login to this account
-				   </Button>
+			    </Button>
                             </Grid>
                             <Grid item>
                                 <Button color="primary" variant="contained" onClick={() => startLinking(LinkAccountType.ACCESS_OTHER_ACCOUNT)}>
                                     Use this login to access another account
-				   </Button>
+			    </Button>
                             </Grid>
                         </Grid>
                         {hasRemoteHosts && selectedCluster && <Grid container item direction="column" spacing={24}>
                             <Grid item>
                                 You can also link {displayUser(targetUser, false)} with an account from a remote cluster.
-                               </Grid>
+			</Grid>
                             <Grid item>
                                 Please select the cluster that hosts the account you want to link with:
-                                   <Select id="remoteHostsDropdown" native defaultValue={selectedCluster} style={{ marginLeft: "1em" }}
+                            <Select id="remoteHostsDropdown" native defaultValue={selectedCluster} style={{ marginLeft: "1em" }}
                                     onChange={(event) => setSelectedCluster(event.target.value)}>
-                                    {Object.keys(remoteHosts).map((k) => k !== localCluster ? <option key={k} value={k}>{k}</option> : null)}
+                                    {Object.keys(remoteHostsConfig).map((k) => k !== localCluster ? <option key={k} value={k}>{k}</option> : null)}
                                 </Select>
                             </Grid>
                             <Grid item>
@@ -129,17 +130,17 @@ export const LinkAccountPanelRoot = withStyles(styles)(
                                 {targetUser.isActive ? (loginCluster === "" ?
                                     <> <Grid item>
                                         This a remote account. You can link a local Arvados account to this one. After linking, you can access the local account's data by logging into the <b>{localCluster}</b> cluster as user <b>{targetUser.email}</b> from <b>{targetUser.uuid.substr(0, 5)}</b>.
-				     </Grid >
+						 </Grid >
                                         <Grid item>
                                             <Button color="primary" variant="contained" onClick={() => startLinking(LinkAccountType.ADD_LOCAL_TO_REMOTE)}>
                                                 Link an account from {localCluster} to this account
-					 </Button>
+						     </Button>
                                         </Grid> </>
-                                    : <Grid item>Must perform account linking on login cluster <b>{loginCluster}</b></Grid>
+                                    : <Grid item>Must perform account linking on login cluster <a href={remoteHostsConfig[loginCluster].workbench2Url + "/link_account"}>{loginCluster}</a></Grid>
                                 )
                                     : <Grid item>
                                         This an inactive remote account. An administrator must activate your account before you can proceed. After your accounts is activated, you can link a local Arvados account hosted by the <b>{localCluster}</b> cluster to this one.
-				 </Grid >}
+			  </Grid >}
                             </Grid>
                         </Grid>}
                 </div>}
diff --git a/src/views/link-account-panel/link-account-panel.tsx b/src/views/link-account-panel/link-account-panel.tsx
index e1ec8af7..60166cda 100644
--- a/src/views/link-account-panel/link-account-panel.tsx
+++ b/src/views/link-account-panel/link-account-panel.tsx
@@ -15,7 +15,7 @@ import {
 
 const mapStateToProps = (state: RootState): LinkAccountPanelRootDataProps => {
     return {
-        remoteHosts: state.auth.remoteHosts,
+        remoteHostsConfig: state.auth.remoteHostsConfig,
         hasRemoteHosts: Object.keys(state.auth.remoteHosts).length > 1 && state.auth.loginCluster === "",
         selectedCluster: state.linkAccountPanel.selectedCluster,
         localCluster: state.auth.localCluster,
diff --git a/src/views/site-manager-panel/site-manager-panel-root.tsx b/src/views/site-manager-panel/site-manager-panel-root.tsx
index 303995b8..9ba7a2d8 100644
--- a/src/views/site-manager-panel/site-manager-panel-root.tsx
+++ b/src/views/site-manager-panel/site-manager-panel-root.tsx
@@ -26,6 +26,7 @@ import { Field, FormErrors, InjectedFormProps, reduxForm, reset, stopSubmit } fr
 import { TextField } from "~/components/text-field/text-field";
 import { addSession } from "~/store/auth/auth-action-session";
 import { SITE_MANAGER_REMOTE_HOST_VALIDATION } from "~/validators/validators";
+import { Config } from '~/common/config';
 
 type CssRules = 'root' | 'link' | 'buttonContainer' | 'table' | 'tableRow' |
     'remoteSiteInfo' | 'buttonAdd' | 'buttonLoggedIn' | 'buttonLoggedOut' |
@@ -88,6 +89,7 @@ export interface SiteManagerPanelRootActionProps {
 
 export interface SiteManagerPanelRootDataProps {
     sessions: Session[];
+    remoteHostsConfig: { [key: string]: Config };
 }
 
 type SiteManagerPanelRootProps = SiteManagerPanelRootDataProps & SiteManagerPanelRootActionProps & WithStyles<CssRules> & InjectedFormProps;
@@ -114,14 +116,14 @@ export const SiteManagerPanelRoot = compose(
         }
     }),
     withStyles(styles))
-    (({ classes, sessions, handleSubmit, toggleSession }: SiteManagerPanelRootProps) =>
+    (({ classes, sessions, handleSubmit, toggleSession, remoteHostsConfig }: SiteManagerPanelRootProps) =>
         <Card className={classes.root}>
             <CardContent>
                 <Grid container direction="row">
                     <Grid item xs={12}>
                         <Typography paragraph={true} >
                             You can log in to multiple Arvados sites here, then use the multi-site search page to search collections and projects on all sites at once.
-                    </Typography>
+															  </Typography>
                     </Grid>
                 </Grid>
                 <Grid item xs={12}>
@@ -139,7 +141,7 @@ export const SiteManagerPanelRoot = compose(
                             {sessions.map((session, index) => {
                                 const validating = session.status === SessionStatus.BEING_VALIDATED;
                                 return <TableRow key={index} className={classes.tableRow}>
-                                    <TableCell>{session.clusterId}</TableCell>
+                                    <TableCell><a href={remoteHostsConfig[session.clusterId].workbench2Url}>{session.clusterId}</a></TableCell>
                                     <TableCell>{session.remoteHost}</TableCell>
                                     <TableCell>{validating ? <CircularProgress size={20} /> : session.username}</TableCell>
                                     <TableCell>{validating ? <CircularProgress size={20} /> : session.email}</TableCell>
@@ -161,7 +163,7 @@ export const SiteManagerPanelRoot = compose(
                         <Grid item xs={12}>
                             <Typography paragraph={true} className={classes.remoteSiteInfo}>
                                 To add a remote Arvados site, paste the remote site's host here (see "ARVADOS_API_HOST" on the "current token" page).
-                            </Typography>
+                        </Typography>
                         </Grid>
                         <Grid item xs={8}>
                             <Field
diff --git a/src/views/site-manager-panel/site-manager-panel.tsx b/src/views/site-manager-panel/site-manager-panel.tsx
index 4532e856..0f48565d 100644
--- a/src/views/site-manager-panel/site-manager-panel.tsx
+++ b/src/views/site-manager-panel/site-manager-panel.tsx
@@ -14,7 +14,8 @@ import { toggleSession } from "~/store/auth/auth-action-session";
 
 const mapStateToProps = (state: RootState): SiteManagerPanelRootDataProps => {
     return {
-        sessions: state.auth.sessions
+        sessions: state.auth.sessions,
+        remoteHostsConfig: state.auth.remoteHostsConfig
     };
 };
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list