[ARVADOS-WORKBENCH2] updated: 1.4.1-56-g4afb565c

Git user git at public.curoverse.com
Mon Oct 28 15:19:50 UTC 2019


Summary of changes:
 src/common/config.ts                               |  2 ++
 src/views-components/main-app-bar/main-app-bar.tsx |  3 ++-
 src/views/main-panel/main-panel-root.tsx           | 13 ++++++++-----
 src/views/main-panel/main-panel.tsx                |  3 ++-
 4 files changed, 14 insertions(+), 7 deletions(-)

       via  4afb565c2c72fdde73cefba6f6c968d97f0b1aa8 (commit)
      from  4f1347018edbddff73c8bc1c82f4ff963c11dd1f (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 4afb565c2c72fdde73cefba6f6c968d97f0b1aa8
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Mon Oct 28 11:19:23 2019 -0400

    13936: Use Workbench.SiteName for the upper left banner

diff --git a/src/common/config.ts b/src/common/config.ts
index 8f182324..40ba8012 100644
--- a/src/common/config.ts
+++ b/src/common/config.ts
@@ -46,6 +46,7 @@ export interface ClusterConfigJSON {
         FileViewersConfigURL: string;
         WelcomePageHTML: string;
         InactivePageHTML: string;
+        SiteName: string;
     };
 }
 
@@ -145,6 +146,7 @@ export const mockClusterConfigJSON = (config: Partial<ClusterConfigJSON>): Clust
         FileViewersConfigURL: "",
         WelcomePageHTML: "",
         InactivePageHTML: "",
+        SiteName: "",
     },
     ...config
 });
diff --git a/src/views-components/main-app-bar/main-app-bar.tsx b/src/views-components/main-app-bar/main-app-bar.tsx
index 475b29e1..ce1cab4c 100644
--- a/src/views-components/main-app-bar/main-app-bar.tsx
+++ b/src/views-components/main-app-bar/main-app-bar.tsx
@@ -32,6 +32,7 @@ interface MainAppBarDataProps {
     buildInfo?: string;
     children?: ReactNode;
     uuidPrefix: string;
+    siteBanner: string;
 }
 
 export type MainAppBarProps = MainAppBarDataProps & WithStyles<CssRules>;
@@ -44,7 +45,7 @@ export const MainAppBar = withStyles(styles)(
                     <Grid container item xs={3} direction="column" justify="center">
                         <Typography variant='h6' color="inherit" noWrap>
                             <Link to={Routes.ROOT} className={props.classes.link}>
-                                arvados workbench ({props.uuidPrefix})
+                                <span dangerouslySetInnerHTML={{ __html: props.siteBanner }} /> ({props.uuidPrefix})
                             </Link>
                         </Typography>
                         <Typography variant="caption" color="inherit">{props.buildInfo}</Typography>
diff --git a/src/views/main-panel/main-panel-root.tsx b/src/views/main-panel/main-panel-root.tsx
index 16fc7a1f..e7daaf00 100644
--- a/src/views/main-panel/main-panel-root.tsx
+++ b/src/views/main-panel/main-panel-root.tsx
@@ -30,23 +30,26 @@ export interface MainPanelRootDataProps {
     uuidPrefix: string;
     isNotLinking: boolean;
     isLinkingPath: boolean;
+    siteBanner: string;
 }
 
 type MainPanelRootProps = MainPanelRootDataProps & WithStyles<CssRules>;
 
 export const MainPanelRoot = withStyles(styles)(
-    ({ classes, loading, working, user, buildInfo, uuidPrefix, isNotLinking, isLinkingPath }: MainPanelRootProps) =>
+    ({ classes, loading, working, user, buildInfo, uuidPrefix,
+        isNotLinking, isLinkingPath, siteBanner }: MainPanelRootProps) =>
         loading
             ? <WorkbenchLoadingScreen />
             : <>
-               { isNotLinking && <MainAppBar
+                {isNotLinking && <MainAppBar
                     user={user}
                     buildInfo={buildInfo}
-                    uuidPrefix={uuidPrefix}>
+                    uuidPrefix={uuidPrefix}
+                    siteBanner={siteBanner}>
                     {working ? <LinearProgress color="secondary" /> : null}
-               </MainAppBar> }
+                </MainAppBar>}
                 <Grid container direction="column" className={classes.root}>
-                    { user ? (user.isActive || (!user.isActive && isLinkingPath) ? <WorkbenchPanel isNotLinking={isNotLinking} isUserActive={user.isActive} /> : <InactivePanel />) : <LoginPanel /> }
+                    {user ? (user.isActive || (!user.isActive && isLinkingPath) ? <WorkbenchPanel isNotLinking={isNotLinking} isUserActive={user.isActive} /> : <InactivePanel />) : <LoginPanel />}
                 </Grid>
             </>
 );
diff --git a/src/views/main-panel/main-panel.tsx b/src/views/main-panel/main-panel.tsx
index 5bf03da3..dab4533f 100644
--- a/src/views/main-panel/main-panel.tsx
+++ b/src/views/main-panel/main-panel.tsx
@@ -18,7 +18,8 @@ const mapStateToProps = (state: RootState): MainPanelRootDataProps => {
         buildInfo: state.appInfo.buildInfo,
         uuidPrefix: state.auth.localCluster,
         isNotLinking: state.linkAccountPanel.status === LinkAccountPanelStatus.NONE || state.linkAccountPanel.status === LinkAccountPanelStatus.INITIAL,
-        isLinkingPath:  state.router.location ? matchLinkAccountRoute(state.router.location.pathname) !== null : false
+        isLinkingPath: state.router.location ? matchLinkAccountRoute(state.router.location.pathname) !== null : false,
+        siteBanner: state.config.clusterConfig.Workbench.SiteName
     };
 };
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list