mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-15 04:26:36 +08:00
增加证书OCSP错误日志管理
This commit is contained in:
62
web/views/@default/servers/certs/ocsp/index.js
Normal file
62
web/views/@default/servers/certs/ocsp/index.js
Normal file
@@ -0,0 +1,62 @@
|
||||
Tea.context(function () {
|
||||
this.certIds = []
|
||||
this.allChecked = false
|
||||
|
||||
this.$delay(function () {
|
||||
let that = this
|
||||
this.$watch("allChecked", function (b) {
|
||||
let boxes = that.$refs.certCheckboxes
|
||||
boxes.forEach(function (box) {
|
||||
if (b) {
|
||||
box.check()
|
||||
} else {
|
||||
box.uncheck()
|
||||
}
|
||||
that.changeCerts()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
this.changeCerts = function () {
|
||||
let boxes = this.$refs.certCheckboxes
|
||||
let that = this
|
||||
this.certIds = []
|
||||
boxes.forEach(function (box) {
|
||||
if (box.isChecked()) {
|
||||
let boxId = box.id
|
||||
that.certIds.push(parseInt(boxId.split("_")[1]))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.resetAllCerts = function () {
|
||||
this.$post(".resetAll")
|
||||
.success(function () {
|
||||
teaweb.successRefresh("重置成功")
|
||||
})
|
||||
}
|
||||
|
||||
this.resetCerts = function () {
|
||||
this.$post(".reset")
|
||||
.params({ certIds: this.certIds })
|
||||
.success(function () {
|
||||
teaweb.successRefresh("重置成功")
|
||||
})
|
||||
}
|
||||
|
||||
this.ignoreCerts = function () {
|
||||
this.$post(".ignore")
|
||||
.params({ certIds: this.certIds })
|
||||
.success(function () {
|
||||
teaweb.successRefresh("忽略成功")
|
||||
})
|
||||
}
|
||||
|
||||
// 查看证书详情
|
||||
this.viewCert = function (certId) {
|
||||
teaweb.popup("/servers/certs/certPopup?certId=" + certId, {
|
||||
height: "28em",
|
||||
width: "48em"
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user