Skip to content

Commit f27ff50

Browse files
Web Applications: mark the namespace default one (#328)
* Web Applications: mark the namespace default one * Different icon for Web Applications folder
1 parent f654589 commit f27ff50

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/ui/serverManagerView.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ export class WebAppsTreeItem extends FeatureTreeItem {
684684
});
685685
this.name = 'Web Applications';
686686
this.contextValue = serverApiVersion.toString() + '/webapps';
687-
this.iconPath = new vscode.ThemeIcon('library');
687+
this.iconPath = new vscode.ThemeIcon('globe');
688688
}
689689
}
690690

@@ -708,15 +708,15 @@ async function namespaceWebApps(element: ProjectsTreeItem, params?: any): Promis
708708
const response = await makeRESTRequest(
709709
"GET",
710710
serverSpec,
711-
{ apiVersion: 1, namespace: "%SYS", path: `/cspapps/${params.ns}` }
711+
{ apiVersion: 1, namespace: "%SYS", path: `/cspapps/${params.ns}?detail=1` }
712712
);
713713
if (response?.status === 200) {
714714
if (response.data.result.content === undefined) {
715715
vscode.window.showErrorMessage(response.data.status.summary);
716716
return undefined;
717717
}
718-
response.data.result.content.map((webapp: string) => {
719-
children.push(new WebAppTreeItem({ parent: element, label: name, id: name }, webapp, params.serverApiVersion));
718+
response.data.result.content.map((webapp: any) => {
719+
children.push(new WebAppTreeItem({ parent: element, label: name, id: name }, webapp.name, webapp.default, params.serverApiVersion));
720720
});
721721
}
722722
}
@@ -726,7 +726,7 @@ async function namespaceWebApps(element: ProjectsTreeItem, params?: any): Promis
726726

727727
export class WebAppTreeItem extends SMTreeItem {
728728
public readonly name: string;
729-
constructor(element: ISMItem, name: string, serverApiVersion: number) {
729+
constructor(element: ISMItem, name: string, isDefault: boolean, serverApiVersion: number) {
730730
const parentFolderId = element.parent?.id || '';
731731
const id = parentFolderId + ':' + name;
732732
super({
@@ -736,6 +736,6 @@ export class WebAppTreeItem extends SMTreeItem {
736736
});
737737
this.name = name;
738738
this.contextValue = `${serverApiVersion.toString()}${serverItemIsWsFolder(element?.parent?.parent?.parent?.parent) ? "/wsFolder" : ""}/webapp`;
739-
this.iconPath = new vscode.ThemeIcon('file-code');
739+
this.iconPath = new vscode.ThemeIcon(isDefault ? 'folder-active' : 'folder');
740740
}
741741
}

0 commit comments

Comments
 (0)