Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2025-03-06 22:35:17 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-03-06 22:35:17 +0300
commit361849b9dbbc11a49a251f81c4ff7bed06d243f4 (patch)
treeff458c2682c1aa654d065466e5a1da6b505cf271 /web
parentc13db7922edd401c57a3077090af3816aed25373 (diff)
Balancer fallbackTag #2724
Diffstat (limited to 'web')
-rw-r--r--web/html/xui/xray.html12
1 files changed, 7 insertions, 5 deletions
diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html
index ac8ed80a..288b69fc 100644
--- a/web/html/xui/xray.html
+++ b/web/html/xui/xray.html
@@ -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;