@@ -118,15 +118,6 @@ export abstract class OpenShiftObjectImpl implements OpenShiftObject {
118118 return this . name ;
119119 }
120120
121- get command ( ) : VSCommand {
122- if ( this . contextValue === ContextType . LOGIN_REQUIRED ) {
123- return {
124- command : 'openshift.explorer.login' ,
125- title : 'Login to the cluster' ,
126- } ;
127- }
128- }
129-
130121 get description ( ) : string {
131122 let suffix = '' ;
132123 if ( this . contextValue === ContextType . COMPONENT ) {
@@ -229,7 +220,14 @@ export class OpenShiftClusterDown extends OpenShiftObjectImpl {
229220
230221export class OpenShiftLoginRequired extends OpenShiftObjectImpl {
231222 constructor ( ) {
232- super ( undefined , 'Please log in to the cluster' , ContextType . LOGIN_REQUIRED , 'cluster-down.png' ) ;
223+ super ( undefined , 'Please log in to the cluster' , ContextType . LOGIN_REQUIRED , 'cluster-down.png' , TreeItemCollapsibleState . None ) ;
224+ }
225+
226+ get command ( ) : VSCommand {
227+ return {
228+ command : 'openshift.explorer.login' ,
229+ title : 'Login to the cluster' ,
230+ } ;
233231 }
234232}
235233
@@ -573,7 +571,7 @@ export class OdoImpl implements Odo {
573571 return [ ... await this . _getComponents ( application ) , ... await this . _getServices ( application ) ] . sort ( compareNodes ) ;
574572 }
575573
576- async getComponents ( application : OpenShiftObject , condition : ( value : OpenShiftObject ) => boolean = ( value ) => value . contextValue === ContextType . COMPONENT || value . contextValue === ContextType . COMPONENT_NO_CONTEXT || value . contextValue === ContextType . COMPONENT_PUSHED ) : Promise < OpenShiftObject [ ] > {
574+ async getComponents ( application : OpenShiftObject , condition : ( value : OpenShiftObject ) => boolean = ( value ) : boolean => value . contextValue === ContextType . COMPONENT || value . contextValue === ContextType . COMPONENT_NO_CONTEXT || value . contextValue === ContextType . COMPONENT_PUSHED ) : Promise < OpenShiftObject [ ] > {
577575 return ( await this . getApplicationChildren ( application ) ) . filter ( condition ) ;
578576 }
579577
0 commit comments