Skip to content

Commit f1c3f3d

Browse files
authored
Show no collapse/expand state for 'Cannot connect to the Cluster' (#1981)
Signed-off-by: Denis Golovin dgolovin@redhat.com
1 parent 4d01a6c commit f1c3f3d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/odo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export class OpenShiftUrl extends OpenShiftObjectImpl {
240240

241241
export class OpenShiftClusterDown extends OpenShiftObjectImpl {
242242
constructor() {
243-
super(undefined, 'Cannot connect to the OpenShift cluster', ContextType.CLUSTER_DOWN, 'cluster-down.png');
243+
super(undefined, 'Cannot connect to the OpenShift cluster', ContextType.CLUSTER_DOWN, 'cluster-down.png', TreeItemCollapsibleState.None);
244244
}
245245
}
246246

src/openshift/openshiftItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default class OpenShiftItem {
9797

9898
static async getApplicationNames(project: OpenShiftObject, createCommand = false): Promise<Array<OpenShiftObject | QuickPickCommand>> {
9999
return OpenShiftItem.odo.getApplications(project).then((applicationList) => {
100-
if (applicationList.length === 0 && !createCommand) throw Error(errorMessage.Component);
100+
if (applicationList.length === 0 && !createCommand) throw new VsCommandError(errorMessage.Component);
101101
return createCommand ? [new QuickPickCommand('$(plus) Create new Application...', async () => {
102102
return OpenShiftItem.getName('Application name', Promise.resolve(applicationList));
103103
}), ...applicationList] : applicationList;

0 commit comments

Comments
 (0)