mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-13 03:40:27 +08:00
实现数据库节点管理
This commit is contained in:
37
web/views/@default/db/index.js
Normal file
37
web/views/@default/db/index.js
Normal file
@@ -0,0 +1,37 @@
|
||||
Tea.context(function () {
|
||||
// 添加节点
|
||||
this.createNode = function () {
|
||||
teaweb.popup("/db/createPopup", {
|
||||
height: "30em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
window.location.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改节点
|
||||
this.updateNode = function (nodeId) {
|
||||
teaweb.popup("/db/updatePopup?nodeId=" + nodeId, {
|
||||
height: "30em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
window.location.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除节点
|
||||
this.deleteNode = function (nodeId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除此数据库节点吗?", function () {
|
||||
that.$post(".delete")
|
||||
.params({
|
||||
nodeId: nodeId
|
||||
})
|
||||
.refresh()
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user