X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c7e85a03f2726bd20bc10aeb9edb2cc826f16909..0ac34fb81d10d664c7b7994612504f989d1c3d29:/src/views/site-manager-panel/site-manager-panel-root.tsx 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 2b6d3c97a4..c0a64e1c40 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' | @@ -33,8 +34,8 @@ type CssRules = 'root' | 'link' | 'buttonContainer' | 'table' | 'tableRow' | const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { - width: '100%', - overflow: 'auto' + width: '100%', + overflow: 'auto' }, link: { color: theme.palette.primary.main, @@ -88,6 +89,7 @@ export interface SiteManagerPanelRootActionProps { export interface SiteManagerPanelRootDataProps { sessions: Session[]; + remoteHostsConfig: { [key: string]: Config }; } type SiteManagerPanelRootProps = SiteManagerPanelRootDataProps & SiteManagerPanelRootActionProps & WithStyles & InjectedFormProps; @@ -106,7 +108,7 @@ const submitSession = (remoteHost: string) => }; export const SiteManagerPanelRoot = compose( - reduxForm<{remoteHost: string}>({ + reduxForm<{ remoteHost: string }>({ form: SITE_MANAGER_FORM_NAME, touchOnBlur: false, onSubmit: (data, dispatch) => { @@ -114,14 +116,14 @@ export const SiteManagerPanelRoot = compose( } }), withStyles(styles)) - (({ classes, sessions, handleSubmit, toggleSession }: SiteManagerPanelRootProps) => + (({ classes, sessions, handleSubmit, toggleSession, remoteHostsConfig }: SiteManagerPanelRootProps) => - + 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. - + @@ -129,6 +131,7 @@ export const SiteManagerPanelRoot = compose( Cluster ID + Host Username Email Status @@ -138,9 +141,12 @@ export const SiteManagerPanelRoot = compose( {sessions.map((session, index) => { const validating = session.status === SessionStatus.BEING_VALIDATED; return - {session.clusterId} - {validating ? : session.username} - {validating ? : session.email} + {remoteHostsConfig[session.clusterId] ? + {session.clusterId} + : session.clusterId} + {session.remoteHost} + {validating ? : session.username} + {validating ? : session.email}