mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-09 00:20:26 +08:00
实现缓存策略部分管理功能
This commit is contained in:
37
web/views/@default/servers/components/cache/index.js
vendored
Normal file
37
web/views/@default/servers/components/cache/index.js
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
Tea.context(function () {
|
||||
// 创建策略
|
||||
this.createPolicy = function () {
|
||||
teaweb.popup("/servers/components/cache/createPopup", {
|
||||
height: "27em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
window.location.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改策略
|
||||
this.updatePolicy = function (policyId) {
|
||||
teaweb.popup("/servers/components/cache/updatePopup?cachePolicyId=" + policyId, {
|
||||
height: "27em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
window.location.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除策略
|
||||
this.deletePolicy = function (policyId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除此缓存策略吗?", function () {
|
||||
that.$post("/servers/components/cache/delete")
|
||||
.params({
|
||||
cachePolicyId: policyId
|
||||
})
|
||||
.refresh()
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user