Files
EdgeAdmin/web/views/@default/servers/create.js

24 lines
532 B
JavaScript
Raw Normal View History

2020-07-29 19:34:54 +08:00
Tea.context(function () {
2020-08-21 12:32:16 +08:00
this.serverType = "httpProxy";
this.tlsProtocolName = ""
this.origins = [];
2020-07-29 19:34:54 +08:00
this.success = NotifySuccess("保存成功", "/servers");
2020-08-21 12:32:16 +08:00
this.changeServerType = function () {
this.origins = [];
this.tlsProtocolName = "";
};
this.addOrigin = function () {
teaweb.popup("/servers/addOriginPopup?serverType=" + this.serverType, {
2020-09-16 09:09:10 +08:00
callback: function (resp) {
2020-08-21 12:32:16 +08:00
this.origins.push(resp.data.origin);
}
});
};
this.removeOrigin = function (index) {
this.origins.$remove(index);
};
2020-07-29 19:34:54 +08:00
});