mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 13:32:24 +00:00
Balancer fallbackTag #2724
This commit is contained in:
parent
c13db7922e
commit
361849b9db
1 changed files with 7 additions and 5 deletions
|
@ -1384,8 +1384,7 @@
|
|||
}
|
||||
newTemplateSettings.routing.balancers.push(tmpBalancer);
|
||||
this.templateSettings = newTemplateSettings;
|
||||
if (balancer.strategy == 'leastPing' || balancer.strategy == 'leastLoad')
|
||||
this.updateObservatorySelectors();
|
||||
this.updateObservatorySelectors();
|
||||
balancerModal.close();
|
||||
this.changeObsCode();
|
||||
},
|
||||
|
@ -1433,8 +1432,7 @@
|
|||
});
|
||||
}
|
||||
this.templateSettings = newTemplateSettings;
|
||||
if (balancer.strategy == 'leastPing' || balancer.strategy == 'leastLoad')
|
||||
this.updateObservatorySelectors();
|
||||
this.updateObservatorySelectors();
|
||||
balancerModal.close();
|
||||
this.changeObsCode();
|
||||
},
|
||||
|
@ -1444,7 +1442,11 @@
|
|||
updateObservatorySelectors(){
|
||||
newTemplateSettings = this.templateSettings;
|
||||
const leastPings = this.balancersData.filter((b) => b.strategy == 'leastPing');
|
||||
const leastLoads = this.balancersData.filter((b) => b.strategy == 'leastLoad');
|
||||
const leastLoads = this.balancersData.filter((b) =>
|
||||
b.strategy === 'leastLoad' ||
|
||||
b.strategy === 'roundRobin' ||
|
||||
b.strategy === 'random'
|
||||
);
|
||||
if (leastPings.length>0){
|
||||
if (!newTemplateSettings.observatory)
|
||||
newTemplateSettings.observatory = this.defaultObservatory;
|
||||
|
|
Loading…
Reference in a new issue