Initial commit (code only without large binaries)

This commit is contained in:
robin
2026-02-15 18:58:44 +08:00
commit 35df75498f
9442 changed files with 1495866 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
Tea.context(function () {
this.ports = []
this.port = ""
this.clusterId = 0
if (this.clusters.length > 0) {
this.clusterId = this.clusters[0].id
this.$delay(function () {
this.changeCluster()
})
}
this.nodeId = 0
this.nodes = []
this.selectedNode = null
this.isDoing = false
this.result = null
this.before = function () {
this.isDoing = true
this.result = null
}
this.success = function (resp) {
this.result = resp.data
}
this.done = function () {
this.isDoing = false
}
this.changeCluster = function () {
this.nodeId = 0
this.$post(".nodeOptions")
.params({
clusterId: this.clusterId
})
.success(function (resp) {
this.nodes = resp.data.nodes
if (this.nodes.length > 0) {
this.nodeId = this.nodes[0].id
this.changeNode()
}
this.ports = resp.data.ports
if (this.ports.length > 0) {
this.port = this.ports[0].port + "/" + this.ports[0].protocol
}
})
}
this.changeNode = function () {
let that = this
this.selectedNode = this.nodes.$find(function (k, v) {
return v.id == that.nodeId
})
}
this.domain = ""
this.changeDomain = function () {
let newDomain = this.domain.replace(/\s+/, "")
if (newDomain != this.domain) {
this.domain = newDomain
}
}
})