@@ -48,7 +48,7 @@ function(accUtils, ko, project, i18n, ArrayDataProvider, BufferingDataProvider,
48
48
} ,
49
49
{
50
50
headerText : this . labelMapper ( 'vz-managed-cluster-kubeconfig-heading' ) ,
51
- sortProperty : 'kubeConfig '
51
+ 'sortable' : 'disable '
52
52
} ,
53
53
{
54
54
headerText : this . labelMapper ( 'vz-managed-cluster-kubecontext-heading' ) ,
@@ -107,8 +107,10 @@ function(accUtils, ko, project, i18n, ArrayDataProvider, BufferingDataProvider,
107
107
108
108
this . chooseKubeConfig = ( ) => {
109
109
getKubeConfig ( ) . then ( kubeConfigPath => {
110
- if ( kubeConfigPath ) {
110
+ if ( Array . isArray ( kubeConfigPath ) ) {
111
111
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 ) ) ;
112
114
}
113
115
} ) ;
114
116
} ;
@@ -117,8 +119,15 @@ function(accUtils, ko, project, i18n, ArrayDataProvider, BufferingDataProvider,
117
119
const index = context . item . index ;
118
120
const managedClusterData = this . project . kubectl . vzManagedClusters . observable ( ) [ index ] ;
119
121
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 } ;
122
131
this . project . kubectl . vzManagedClusters . observable . replace ( managedClusterData , newManagedClusterData ) ;
123
132
}
124
133
} ) ;
@@ -251,6 +260,7 @@ function(accUtils, ko, project, i18n, ArrayDataProvider, BufferingDataProvider,
251
260
const index = context . item . index ;
252
261
const managedClusterData = this . project . kubectl . vzManagedClusters . observable ( ) [ index ] ;
253
262
await k8sHelper . startVerifyClusterConnectivity ( managedClusterData . kubeConfig , managedClusterData . kubeContext ) ;
263
+ await k8sHelper . startVerifyClusterConnectivity ( managedClusterData . kubeConfig , managedClusterData . kubeContext ) ;
254
264
} ;
255
265
256
266
this . createLink = function ( url , label ) {
0 commit comments