@@ -29,18 +29,21 @@ const extension: JupyterFrontEndPlugin<void> = {
2929 router : IRouter ,
3030 toolbarRegistry : IToolbarWidgetRegistry ,
3131 ) : Promise < void > => {
32- console . log ( 'jupyterlab-logout extension is activated!' ) ;
3332 console . log (
3433 '%cWelcome to HUNT Workbench!' ,
3534 'margin: 12px; color: #00509e; font-weight: bold; font-size: 20px' ,
3635 ) ;
3736 if ( window && window . location && window . location . origin ) {
3837 const hubUrl = `${ window . location . origin } /hub/home` ;
3938 console . log (
40- `%cHub: ${ hubUrl } ` ,
39+ `%cHub control panel : ${ hubUrl } ` ,
4140 'margin: 24px 12px 24px 12px; font-size: 14px' ,
4241 ) ;
4342 }
43+ console . log (
44+ '%cGetting started: https://docs.hdc.ntnu.no/do-science/hunt-workbench/getting-started/' ,
45+ 'margin: 24px 12px 24px 12px; font-size: 14px' ,
46+ ) ;
4447 console . log (
4548 '%cAre you looking for troubleshooting guides?' ,
4649 'margin: 12px; color: #00509e; font-weight: bold; font-size: 20px' ,
@@ -49,6 +52,7 @@ const extension: JupyterFrontEndPlugin<void> = {
4952 '%chttps://docs.hdc.ntnu.no/do-science/hunt-workbench/troubleshooting/' ,
5053 'margin: 24px 12px 24px 12px; font-size: 14px' ,
5154 ) ;
55+ console . log ( 'activating jupyterlab-logout extension' ) ;
5256
5357 app . commands . addCommand ( CommandIds . hdcdocs , {
5458 label : 'Documentation' ,
@@ -102,7 +106,15 @@ const extension: JupyterFrontEndPlugin<void> = {
102106 label : 'Control Panel' ,
103107 isVisible : ( ) => false ,
104108 execute : ( args : any ) => {
105- router . navigate ( '/hub/home' , { hard : true } ) ;
109+ let hubUrl = '/hub/home' ;
110+ if ( window && window . location && window . location . origin ) {
111+ hubUrl = `${ window . location . origin } /hub/home` ;
112+ // Redirect without router since redirecting to external URL
113+ console . log ( `Redirecting to ${ hubUrl } ` ) ;
114+ window . open ( hubUrl , '_blank' ) ;
115+ } else {
116+ router . navigate ( hubUrl , { hard : true } ) ;
117+ }
106118 } ,
107119 } ) ;
108120
@@ -179,6 +191,8 @@ const extension: JupyterFrontEndPlugin<void> = {
179191 } ) ;
180192 return lougoutDivWidget ;
181193 } ) ;
194+
195+ console . log ( 'jupyterlab-logout extension is activated!' ) ;
182196 } ,
183197} ;
184198
0 commit comments