换成单集群模式

This commit is contained in:
robin
2026-03-02 20:07:53 +08:00
parent 5d0b7c7e91
commit 2a76d1773d
432 changed files with 5681 additions and 5095 deletions

View File

@@ -58,8 +58,7 @@ Tea.context(function () {
this.request.domain = ""
}
let primaryClusterId = (typeof selectedApp.primaryClusterId !== "undefined" && selectedApp.primaryClusterId !== null) ? Number(selectedApp.primaryClusterId) : 0
let backupClusterId = (typeof selectedApp.backupClusterId !== "undefined" && selectedApp.backupClusterId !== null) ? Number(selectedApp.backupClusterId) : 0
let appClusterIds = Array.isArray(selectedApp.clusterIds) ? selectedApp.clusterIds.map(Number) : []
let allowed = []
for (let i = 0; i < this.clusters.length; i++) {
@@ -68,7 +67,7 @@ Tea.context(function () {
if (clusterId <= 0) {
continue
}
if (clusterId === primaryClusterId || clusterId === backupClusterId) {
if (appClusterIds.indexOf(clusterId) >= 0) {
allowed.push(cluster)
}
}
@@ -120,7 +119,7 @@ Tea.context(function () {
return
}
if (this.request.clusterId.length === 0) {
teaweb.warn("当前应用未绑定可用集群,请先在应用设置中配置主集群/备集群")
teaweb.warn("当前应用未绑定可用集群,请先在应用设置中配置所属集群")
return
}
if (this.request.domain.length === 0) {