From 99f26be30d5f35fd6af114528c3f6e13643b3bef Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Wed, 5 Mar 2025 19:27:25 +0700 Subject: feat: add statistics section (#2718) the "Outbounds Traffic" parameter, which was misleading, was also renamed and moved --- web/html/xui/xray.html | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'web/html') diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index 3a078eee..45ab621f 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -143,7 +143,14 @@ - + + + + + + + + @@ -1882,7 +1889,40 @@ this.templateSettings = newTemplateSettings; } }, - outboundTraffic: { + statsInboundUplink: { + get: function () { + if (!this.templateSettings || !this.templateSettings.policy.system || !this.templateSettings.policy.system.statsInboundUplink) return false; + return this.templateSettings.policy.system.statsInboundUplink; + }, + set: function (newValue) { + newTemplateSettings = this.templateSettings; + newTemplateSettings.policy.system.statsInboundUplink = newValue; + this.templateSettings = newTemplateSettings; + } + }, + statsInboundDownlink: { + get: function () { + if (!this.templateSettings || !this.templateSettings.policy.system || !this.templateSettings.policy.system.statsInboundDownlink) return false; + return this.templateSettings.policy.system.statsInboundDownlink; + }, + set: function (newValue) { + newTemplateSettings = this.templateSettings; + newTemplateSettings.policy.system.statsInboundDownlink = newValue; + this.templateSettings = newTemplateSettings; + } + }, + statsOutboundUplink: { + get: function () { + if (!this.templateSettings || !this.templateSettings.policy.system || !this.templateSettings.policy.system.statsOutboundUplink) return false; + return this.templateSettings.policy.system.statsOutboundUplink; + }, + set: function (newValue) { + newTemplateSettings = this.templateSettings; + newTemplateSettings.policy.system.statsOutboundUplink = newValue; + this.templateSettings = newTemplateSettings; + } + }, + statsOutboundDownlink: { get: function () { if (!this.templateSettings || !this.templateSettings.policy.system || !this.templateSettings.policy.system.statsOutboundDownlink) return false; return this.templateSettings.policy.system.statsOutboundDownlink; @@ -1890,7 +1930,6 @@ set: function (newValue) { newTemplateSettings = this.templateSettings; newTemplateSettings.policy.system.statsOutboundDownlink = newValue; - newTemplateSettings.policy.system.statsOutboundUplink = newValue; this.templateSettings = newTemplateSettings; } }, -- cgit v1.2.3