mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-20 16:20:27 +08:00
实现一些阈值设置细节
This commit is contained in:
41
web/views/@default/clusters/cluster/node/thresholds/index.js
Normal file
41
web/views/@default/clusters/cluster/node/thresholds/index.js
Normal file
@@ -0,0 +1,41 @@
|
||||
Tea.context(function () {
|
||||
this.createThreshold = function () {
|
||||
teaweb.popup(Tea.url("/clusters/cluster/settings/thresholds/createPopup", {
|
||||
clusterId: this.clusterId,
|
||||
nodeId: this.nodeId
|
||||
}), {
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.updateThreshold = function (thresholdId) {
|
||||
teaweb.popup(Tea.url("/clusters/cluster/settings/thresholds/updatePopup", {
|
||||
thresholdId: thresholdId
|
||||
}), {
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.deleteThreshold = function (thresholdId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除这个阈值吗?", function () {
|
||||
that.$post(".delete")
|
||||
.params({
|
||||
thresholdId: thresholdId
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.success("删除成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user