mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-20 16:20:27 +08:00
实现公用的IP名单
This commit is contained in:
37
web/views/@default/servers/iplists/items.js
Normal file
37
web/views/@default/servers/iplists/items.js
Normal file
@@ -0,0 +1,37 @@
|
||||
Tea.context(function () {
|
||||
this.updateItem = function (itemId) {
|
||||
teaweb.popup(Tea.url(".updateIPPopup", {itemId: itemId}), {
|
||||
height: "26em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.deleteItem = function (itemId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除这个IP吗?", function () {
|
||||
that.$post(".deleteIP")
|
||||
.params({
|
||||
"itemId": itemId
|
||||
})
|
||||
.refresh()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加IP名单菜单
|
||||
*/
|
||||
this.createIP = function () {
|
||||
teaweb.popup(Tea.url(".createIPPopup", {listId: this.list.id}), {
|
||||
height: "23em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user