@@ -379,7 +379,7 @@ async function serverFeatures(element: ServerTreeItem, params?: any): Promise<Fe
379
379
380
380
const response = await makeRESTRequest ( "HEAD" , serverSpec ) ;
381
381
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' ) ) ;
383
383
credentialCache [ name ] = undefined ;
384
384
} else {
385
385
children . push ( new NamespacesTreeItem ( { parent : element , label : name , id : name } , element . name , serverSpec . username || 'UnknownUser' ) ) ;
@@ -397,14 +397,14 @@ export class OfflineTreeItem extends FeatureTreeItem {
397
397
public readonly name : string ;
398
398
constructor (
399
399
element : ISMItem ,
400
- serverName : string ,
400
+ username : string ,
401
401
) {
402
402
const parentFolderId = element . parent ?. id || "" ;
403
403
super ( {
404
404
id : parentFolderId + ":offline" ,
405
405
label : `Unavailable at ${ new Date ( ) . toLocaleTimeString ( ) } ` ,
406
406
parent : element . parent ,
407
- tooltip : `Server could not be reached ` ,
407
+ tooltip : `Server could not be accessed by ' ${ username } ' ` ,
408
408
} ) ;
409
409
this . name = "offline" ;
410
410
this . contextValue = "offline" ;
@@ -454,7 +454,7 @@ async function serverNamespaces(element: ServerTreeItem, params?: any): Promise<
454
454
455
455
const response = await makeRESTRequest ( "GET" , serverSpec ) ;
456
456
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' ) ) ;
458
458
credentialCache [ params . serverName ] = undefined ;
459
459
} else {
460
460
response . data . result . content . namespaces . map ( ( namespace ) => {
0 commit comments