clean up reused vue-parts

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-16 18:28:54 +03:00
1 parent 10e68510c4
commit 2a818601f9
25 files changed
+3 -1819

No files matched your search

-8
View File
@@ -143,20 +143,12 @@ export class ClusterManager {
return this.getCluster(clusterId)?.uninstallFeature(name);
}
protected async refreshCluster(clusterId: ClusterId) {
const cluster = this.getCluster(clusterId);
if (cluster) {
await cluster.refreshStatus();
}
}
static ipcListen(clusterManager: ClusterManager) {
const handlers = {
[ClusterIpcMessage.ADD]: clusterManager.addCluster,
[ClusterIpcMessage.STOP]: clusterManager.stopCluster,
[ClusterIpcMessage.REMOVE]: clusterManager.removeCluster,
[ClusterIpcMessage.REMOVE_WORKSPACE]: clusterManager.removeAllByWorkspace,
[ClusterIpcMessage.REFRESH]: clusterManager.refreshCluster,
[ClusterIpcMessage.FEATURE_INSTALL]: clusterManager.installFeature,
[ClusterIpcMessage.FEATURE_UPGRADE]: clusterManager.upgradeFeature,
[ClusterIpcMessage.FEATURE_REMOVE]: clusterManager.uninstallFeature,
+3 -6
View File
@@ -160,18 +160,15 @@ export class Cluster implements ClusterModel {
}
async installFeature(name: string, config: any) {
await installFeature(name, this, config)
await this.refreshStatus()
return await installFeature(name, this, config)
}
async upgradeFeature(name: string, config: any) {
await upgradeFeature(name, this, config)
await this.refreshStatus()
return await upgradeFeature(name, this, config)
}
async uninstallFeature(name: string) {
await uninstallFeature(name, this)
await this.refreshStatus()
return await uninstallFeature(name, this)
}
getPrometheusApiPrefix() {