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,44 @@
Tea.context(function () {
this.keyword = ""
this.status = ""
let allServers = []
this.clusters.forEach(function (cluster) {
let servers = cluster.servers
servers.forEach(function (server) {
server.cluster = cluster
allServers.push(server)
})
})
this.servers = allServers
this.$delay(function () {
this.$watch("keyword", function () {
this.reloadServers()
})
this.$watch("status", function () {
this.reloadServers()
})
})
this.reloadServers = function () {
let that = this
this.servers = allServers.$copy().$findAll(function (k, v) {
if (that.keyword.length > 0
&& !teaweb.match(v.cluster.name, that.keyword)
&& !teaweb.match(v.cluster.dnsName, that.keyword)
&& !teaweb.match(v.name, that.keyword)
&& !teaweb.match(v.dnsName, that.keyword)) {
return false
}
if (that.status == "ok" && !v.isOk) {
return false
}
if (that.status == "notOk" && v.isOk) {
return false
}
return true
})
}
})