@@ -379,7 +379,7 @@ async function serverFeatures(element: ServerTreeItem, params?: any): Promise<Fe
379379
380380 const response = await makeRESTRequest ( "HEAD" , serverSpec ) ;
381381 if ( ! response || response . status !== 200 ) {
382- children . push ( new OfflineTreeItem ( { parent : element , label : name , id : name } , element . name ) ) ;
382+ children . push ( new OfflineTreeItem ( { parent : element , label : name , id : name } , serverSpec . username || 'UnknownUser' ) ) ;
383383 credentialCache [ name ] = undefined ;
384384 } else {
385385 children . push ( new NamespacesTreeItem ( { parent : element , label : name , id : name } , element . name , serverSpec . username || 'UnknownUser' ) ) ;
@@ -397,14 +397,14 @@ export class OfflineTreeItem extends FeatureTreeItem {
397397 public readonly name : string ;
398398 constructor (
399399 element : ISMItem ,
400- serverName : string ,
400+ username : string ,
401401 ) {
402402 const parentFolderId = element . parent ?. id || "" ;
403403 super ( {
404404 id : parentFolderId + ":offline" ,
405405 label : `Unavailable at ${ new Date ( ) . toLocaleTimeString ( ) } ` ,
406406 parent : element . parent ,
407- tooltip : `Server could not be reached ` ,
407+ tooltip : `Server could not be accessed by ' ${ username } ' ` ,
408408 } ) ;
409409 this . name = "offline" ;
410410 this . contextValue = "offline" ;
@@ -454,7 +454,7 @@ async function serverNamespaces(element: ServerTreeItem, params?: any): Promise<
454454
455455 const response = await makeRESTRequest ( "GET" , serverSpec ) ;
456456 if ( ! response || response . status !== 200 ) {
457- children . push ( new OfflineTreeItem ( { parent : element , label : name , id : name } , element . name ) ) ;
457+ children . push ( new OfflineTreeItem ( { parent : element , label : name , id : name } , serverSpec . username || 'UnknownUser' ) ) ;
458458 credentialCache [ params . serverName ] = undefined ;
459459 } else {
460460 response . data . result . content . namespaces . map ( ( namespace ) => {
0 commit comments