Initial commit (code only without large binaries)
This commit is contained in:
46
EdgeAdmin/web/views/@default/clusters/anti-ddos/index.js
Normal file
46
EdgeAdmin/web/views/@default/clusters/anti-ddos/index.js
Normal file
@@ -0,0 +1,46 @@
|
||||
Tea.context(function () {
|
||||
this.createPackage = function () {
|
||||
teaweb.popup("/clusters/anti-ddos/createPopup", {
|
||||
height: "26em",
|
||||
callback: function () {
|
||||
teaweb.successRefresh("保存成功")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.updatePackage = function (packageId) {
|
||||
teaweb.popup("/clusters/anti-ddos/updatePopup?packageId=" + packageId, {
|
||||
height: "26em",
|
||||
callback: function () {
|
||||
teaweb.successRefresh("保存成功")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.deletePackage = function (packageId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除此高防产品吗?", function () {
|
||||
that.$post(".delete")
|
||||
.params({
|
||||
packageId: packageId
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.successRefresh("删除成功")
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
this.updatePrices = function (packageId) {
|
||||
teaweb.popup("/clusters/anti-ddos/updatePricesPopup?packageId=" + packageId, {
|
||||
height: "30em",
|
||||
onClose: function () {
|
||||
teaweb.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
String.prototype.toBitUpper = function () {
|
||||
let unit = this
|
||||
return unit.replace(/bps$/, "").replace(/b$/, "").toUpperCase() + "bps"
|
||||
}
|
||||
Reference in New Issue
Block a user