实现API节点远程升级

This commit is contained in:
GoEdgeLab
2023-03-05 12:05:18 +08:00
parent b5cba51456
commit 2ac7f6d14a
12 changed files with 426 additions and 69 deletions

View File

@@ -1,7 +1,7 @@
Tea.context(function () {
// 创建节点
this.createNode = function () {
teaweb.popup("/api/node/createPopup", {
teaweb.popup(".node.createPopup", {
width: "50em",
height: "30em",
callback: function () {
@@ -16,11 +16,20 @@ Tea.context(function () {
this.deleteNode = function (nodeId) {
let that = this
teaweb.confirm("确定要删除此节点吗?", function () {
that.$post("/api/delete")
that.$post(".delete")
.params({
nodeId: nodeId
})
.refresh()
})
}
// 升级节点
this.upgradeNode = function (nodeId) {
teaweb.popup(".node.upgradePopup?nodeId=" + nodeId, {
onClose: function () {
teaweb.reload()
}
})
}
})