@@ -37,6 +37,7 @@ import { CustomResourceDefinitionStub } from './webview/common/createServiceType
3737import { OpenShiftTerminalManager } from './webview/openshift-terminal/openShiftTerminal' ;
3838import { LoginUtil } from './util/loginUtil' ;
3939import { PortForward } from './port-forward' ;
40+ import { kubefsUri } from './k8s/vfs/kuberesources.virtualfs' ;
4041
4142type ExplorerItem = KubernetesObject | Helm . HelmRelease | Context | TreeItem | OpenShiftObject | HelmRepo ;
4243
@@ -529,7 +530,7 @@ export class OpenShiftExplorer implements TreeDataProvider<ExplorerItem>, Dispos
529530 */
530531 loadKubernetesCore ( namespace : string | null , value : string ) {
531532 const outputFormat = this . getOutputFormat ( ) ;
532- const uri = this . kubefsUri ( namespace , value , outputFormat ) ;
533+ const uri = kubefsUri ( namespace , value , outputFormat ) ;
533534
534535 const query = this . getComparableQuery ( uri ) ;
535536 const openUri = workspace . textDocuments . map ( ( doc ) => doc . uri )
@@ -564,20 +565,6 @@ export class OpenShiftExplorer implements TreeDataProvider<ExplorerItem>, Dispos
564565 return 'yaml'
565566 }
566567
567- kubefsUri ( namespace : string | null | undefined , value : string , outputFormat : string , action ?: string ) : Uri {
568- const K8S_RESOURCE_SCHEME = 'k8smsx' ;
569- const K8S_RESOURCE_SCHEME_READONLY = 'k8smsxro' ;
570- const KUBECTL_RESOURCE_AUTHORITY = 'loadkubernetescore' ;
571- const KUBECTL_DESCRIBE_AUTHORITY = 'kubernetesdescribe' ;
572- const docname = `${ value . replace ( '/' , '-' ) } ${ outputFormat && outputFormat !== '' ? `.${ outputFormat } ` : '' } ` ;
573- const nonce = new Date ( ) . getTime ( ) ;
574- const nsquery = namespace ? `ns=${ namespace } &` : '' ;
575- const scheme = action === 'describe' ? K8S_RESOURCE_SCHEME_READONLY : K8S_RESOURCE_SCHEME ;
576- const authority = action === 'describe' ? KUBECTL_DESCRIBE_AUTHORITY : KUBECTL_RESOURCE_AUTHORITY ;
577- const uri = `${ scheme } ://${ authority } /${ docname } ?${ nsquery } value=${ value } &_=${ nonce } ` ;
578- return Uri . parse ( uri ) ;
579- }
580-
581568 /*
582569 * Returns the query string of the specified Uri without "nonce" param,
583570 * so the query strings can be compared.
@@ -640,7 +627,7 @@ export class OpenShiftExplorer implements TreeDataProvider<ExplorerItem>, Dispos
640627
641628 @vsCommand ( 'openshift.resource.openInConsole' )
642629 public static openInConsole ( component : KubernetesObject ) {
643- void commands . executeCommand ( 'extension.vsKubernetesLoad ' , { namespace : component . metadata . namespace , kindName : `${ component . kind } /${ component . metadata . name } ` } ) ;
630+ void commands . executeCommand ( 'openshift.resource.load ' , { namespace : component . metadata . namespace , kindName : `${ component . kind } /${ component . metadata . name } ` } ) ;
644631 }
645632
646633 @vsCommand ( 'openshift.explorer.reportIssue' )
0 commit comments