mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-15 13:00:25 +08:00
阶段性提交
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
Tea.context(function () {
|
||||
var that = this;
|
||||
|
||||
this.success = NotifyPopup
|
||||
|
||||
this.selectedType = this.scheduling.code;
|
||||
this.schedulingTypeDescription = null;
|
||||
|
||||
this.changeSchedulingType = function () {
|
||||
this.schedulingTypeDescription = this.schedulingTypes.$find(function (k, v) {
|
||||
return v.code == that.selectedType;
|
||||
}).description;
|
||||
};
|
||||
this.changeSchedulingType();
|
||||
|
||||
// hash
|
||||
this.hashKey = "";
|
||||
this.hashVar = "";
|
||||
if (this.scheduling.code == "hash") {
|
||||
this.hashKey = this.scheduling.options.key;
|
||||
} else {
|
||||
this.hashKey = "${remoteAddr}";
|
||||
}
|
||||
|
||||
this.changeHashVar = function () {
|
||||
if (this.hashVar.length > 0) {
|
||||
this.hashKey = this.hashVar;
|
||||
}
|
||||
};
|
||||
|
||||
// sticky
|
||||
if (this.scheduling.code == "sticky") {
|
||||
this.stickyType = this.scheduling.options.type;
|
||||
this.stickyParam = this.scheduling.options.param;
|
||||
} else {
|
||||
this.stickyType = "cookie";
|
||||
this.stickyParam = "Origin";
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user