@@ -48,7 +48,7 @@ function(accUtils, ko, project, i18n, ArrayDataProvider, BufferingDataProvider,
4848 } ,
4949 {
5050 headerText : this . labelMapper ( 'vz-managed-cluster-kubeconfig-heading' ) ,
51- sortProperty : 'kubeConfig '
51+ 'sortable' : 'disable '
5252 } ,
5353 {
5454 headerText : this . labelMapper ( 'vz-managed-cluster-kubecontext-heading' ) ,
@@ -107,8 +107,10 @@ function(accUtils, ko, project, i18n, ArrayDataProvider, BufferingDataProvider,
107107
108108 this . chooseKubeConfig = ( ) => {
109109 getKubeConfig ( ) . then ( kubeConfigPath => {
110- if ( kubeConfigPath ) {
110+ if ( Array . isArray ( kubeConfigPath ) ) {
111111 this . project . kubectl . kubeConfig . observable ( kubeConfigPath ) ;
112+ } else if ( typeof kubeConfigPath === 'string' && kubeConfigPath . length > 0 ) {
113+ this . project . kubectl . kubeConfig . observable ( kubeConfigPath . split ( window . api . path . delimiter ) ) ;
112114 }
113115 } ) ;
114116 } ;
@@ -117,8 +119,15 @@ function(accUtils, ko, project, i18n, ArrayDataProvider, BufferingDataProvider,
117119 const index = context . item . index ;
118120 const managedClusterData = this . project . kubectl . vzManagedClusters . observable ( ) [ index ] ;
119121 getKubeConfig ( ) . then ( kubeConfigPath => {
120- if ( kubeConfigPath ) {
121- const newManagedClusterData = { ...managedClusterData , kubeConfig :kubeConfigPath } ;
122+ let kubeConfig ;
123+ if ( Array . isArray ( kubeConfigPath ) ) {
124+ kubeConfig = kubeConfigPath ;
125+ } else if ( typeof kubeConfigPath === 'string' && kubeConfigPath . length > 0 ) {
126+ kubeConfig = kubeConfigPath . split ( window . api . path . delimiter ) ;
127+ }
128+
129+ if ( kubeConfig ) {
130+ const newManagedClusterData = { ...managedClusterData , kubeConfig } ;
122131 this . project . kubectl . vzManagedClusters . observable . replace ( managedClusterData , newManagedClusterData ) ;
123132 }
124133 } ) ;
@@ -251,6 +260,7 @@ function(accUtils, ko, project, i18n, ArrayDataProvider, BufferingDataProvider,
251260 const index = context . item . index ;
252261 const managedClusterData = this . project . kubectl . vzManagedClusters . observable ( ) [ index ] ;
253262 await k8sHelper . startVerifyClusterConnectivity ( managedClusterData . kubeConfig , managedClusterData . kubeContext ) ;
263+ await k8sHelper . startVerifyClusterConnectivity ( managedClusterData . kubeConfig , managedClusterData . kubeContext ) ;
254264 } ;
255265
256266 this . createLink = function ( url , label ) {
0 commit comments