diff --git a/src/main/decc-manager.ts b/src/main/decc-manager.ts index 56f6d34e75..745ead5bc7 100644 --- a/src/main/decc-manager.ts +++ b/src/main/decc-manager.ts @@ -114,7 +114,7 @@ export class DECCManager { const clusterPrefix = `decc` clusterStore.getByWorkspaceId(workspace.id).forEach(cluster => { - if (cluster.preferences.clusterName === `${username}@${clusterPrefix}-${deccCluster.metadata.name}`) { + if (cluster.preferences.clusterName === `${clusterPrefix}-${deccCluster.metadata.name}`) { clusterPresent = true; } }); @@ -143,23 +143,12 @@ export class DECCManager { id: deccCluster.metadata.uid, contextName: `${username}@${clusterPrefix}-${deccCluster.metadata.name}`, preferences: { - clusterName: `${username}@${clusterPrefix}-${deccCluster.metadata.name}`, + clusterName: `${clusterPrefix}-${deccCluster.metadata.name}`, httpsProxy: undefined, }, kubeConfigPath: ClusterStore.embedCustomKubeConfig(deccCluster.metadata.uid, YAML.stringify(jsConfig)), workspace: workspace.id, }; - - // let newCluster = new Cluster({ - // id: deccCluster.metadata.uid, - // contextName: `${username}@${clusterPrefix}-${deccCluster.metadata.name}`, - // preferences: { - // clusterName: `${username}@${clusterPrefix}-${deccCluster.metadata.name}`, - // httpsProxy: undefined, - // }, - // kubeConfigPath: ClusterStore.embedCustomKubeConfig(deccCluster.metadata.uid, YAML.stringify(jsConfig)), - // workspace: workspace.id, - // }); newClusters.push(newCluster); clusterStore.addCluster(...newClusters); diff --git a/static/keycloak_index.html b/static/keycloak_index.html index e8d9646b78..a1292a76cf 100644 --- a/static/keycloak_index.html +++ b/static/keycloak_index.html @@ -28,13 +28,13 @@ if(logoutUser){ ipcRenderer.send('keycloak-token', keycloak.idToken, keycloak.refreshToken); //TODO: check if token refresh is possible here - setInterval(() => { - let tokenRefreshAt = new Date(); - console.log(`keycloak interval: ${tokenRefreshAt.toString()}`); - keycloak.updateToken(10).error(() => keycloak.logout()); - console.log(keycloak.token); - ipcRenderer.send('keycloak-token-update', keycloak.idToken, keycloak.refreshToken); - }, 10000); + // setInterval(() => { + // let tokenRefreshAt = new Date(); + // console.log(`keycloak interval: ${tokenRefreshAt.toString()}`); + // keycloak.updateToken(10).error(() => keycloak.logout()); + // console.log(keycloak.token); + // ipcRenderer.send('keycloak-token-update', keycloak.idToken, keycloak.refreshToken); + // }, 10000); } }).error(function(error) { console.log('error: ' + JSON.stringify(error));