This commit is contained in:
GoEdgeLab
2024-07-27 15:42:58 +08:00
parent 7279dc873f
commit d7d0c8fbfe
490 changed files with 2158 additions and 738 deletions

View File

@@ -24,6 +24,30 @@ Tea.context(function () {
})
}
this.secondaryClusters = []
this.secondaryClusterIds = this.secondaryClusters.map(function (v) {
return v.id
})
this.addSecondary = function () {
let that = this
let selectedClusterIds = [this.clusterId].concat(this.secondaryClusterIds)
teaweb.popup("/clusters/selectPopup?selectedClusterIds=" + selectedClusterIds.join(",") + "&mode=multiple", {
height: "30em",
width: "50em",
callback: function (resp) {
if (resp.data.cluster != null) {
that.secondaryClusterIds.push(resp.data.cluster.id)
that.secondaryClusters.push(resp.data.cluster)
}
}
})
}
this.removeSecondary = function (index) {
this.secondaryClusterIds.$remove(index)
this.secondaryClusters.$remove(index)
}
/**
* 安装
*/
@@ -35,6 +59,7 @@ Tea.context(function () {
this.installMethod = method
}
this.selectSSHHost = function (host) {
this.sshHost = host
this.changeSSHHost()