diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index b06e2da6..824a9683 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -38,6 +38,12 @@
{{ i18n "pages.inbounds.inboundCount" }}:
[[ dbInbounds.length ]]
+
+ {{ i18n "clients" }}:
+ [[ total.clients ]]
+ {{ i18n "enabled" }} [[ total.active ]]
+ {{ i18n "disabled" }} [[ total.deactive ]]
+
@@ -520,13 +526,32 @@
computed: {
total() {
let down = 0, up = 0;
- for (let i = 0; i < this.dbInbounds.length; ++i) {
- down += this.dbInbounds[i].down;
- up += this.dbInbounds[i].up;
- }
+ let clients = 0, active = 0, deactive = 0;
+ this.dbInbounds.forEach(dbInbound => {
+ down += dbInbound.down;
+ up += dbInbound.up;
+ inbound = dbInbound.toInbound();
+ clients = this.getClients(dbInbound.protocol, inbound.settings);
+ if(clients){
+ if(dbInbound.enable){
+ isClientEnable = false;
+ clients.forEach(client => {
+ isClientEnable = client.email == "" ? true: this.isClientEnabled(dbInbound,client.email);
+ isClientEnable ? active++ : deactive++;
+ });
+ } else {
+ deactive += clients.length;
+ }
+ } else {
+ dbInbound.enable ? active++ : deactive++;
+ }
+ });
return {
down: down,
up: up,
+ clients: active + deactive,
+ active: active,
+ deactive: deactive,
};
}
},