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;