Files
EdgeAdmin/web/views/@default/api/node/createPopup.js
2021-01-01 20:49:19 +08:00

27 lines
648 B
JavaScript

Tea.context(function () {
this.hasHTTPS = false
this.grpcAddrs = []
this.restAddrs = []
this.changeListens = function (addrs) {
this.grpcAddrs = addrs
this.hasHTTPS = this.grpcAddrs.$any(function (k, v) {
return v.protocol == "https"
}) || (this.restIsOn && this.restAddrs.$any(function (k, v) {
return v.protocol == "https"
}))
}
this.changeRestListens = function (addrs) {
this.restAddrs = addrs
this.hasHTTPS = this.grpcAddrs.$any(function (k, v) {
return v.protocol == "https"
}) || (this.node.restIsOn && this.restAddrs.$any(function (k, v) {
return v.protocol == "https"
}))
}
this.restIsOn = false
})