20 lines
729 B
JavaScript
20 lines
729 B
JavaScript
Tea.context(function () {
|
|
this.success = NotifyReloadSuccess("保存成功");
|
|
this.activeSection = "user";
|
|
|
|
if (!Array.isArray(this.availableClusters)) {
|
|
this.availableClusters = [];
|
|
}
|
|
if (!this.policies.defaultClusterId || this.policies.defaultClusterId <= 0) {
|
|
if (this.availableClusters.length > 0) {
|
|
this.policies.defaultClusterId = this.availableClusters[0].id;
|
|
}
|
|
}
|
|
if (typeof this.policies.defaultTTL == "undefined" || this.policies.defaultTTL <= 0) {
|
|
this.policies.defaultTTL = 30;
|
|
}
|
|
if (typeof this.policies.defaultFallbackMs == "undefined" || this.policies.defaultFallbackMs <= 0) {
|
|
this.policies.defaultFallbackMs = 300;
|
|
}
|
|
});
|