From e00c3f1823a4ff80daf8290e2dfec4474e7f9173 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Wed, 9 Aug 2023 00:37:05 +0330 Subject: add panel usage to main page --- web/html/xui/index.html | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) (limited to 'web/html') diff --git a/web/html/xui/index.html b/web/html/xui/index.html index 0942b0ad..62e60297 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -108,21 +108,30 @@ - - - {{ i18n "pages.index.systemLoad" }}: [[ status.loads[0] ]] | [[ status.loads[1] ]] | [[ status.loads[2] ]] - - - - - - - {{ i18n "pages.index.operationHours" }}: - [[ formatSecond(status.uptime) ]] - - + {{ i18n "pages.index.operationHours" }}: + Xray: + [[ formatSecond(status.appStats.uptime) ]] + OS: + [[ formatSecond(status.uptime) ]] + + + + + {{ i18n "pages.index.systemLoad" }}: [[ status.loads[0] ]] | [[ status.loads[1] ]] | [[ status.loads[2] ]] + + + + + + + + + {{ i18n "usage"}}: + Memory [[ sizeFormat(status.appStats.mem) ]] - + Threads [[ status.appStats.threads ]] + @@ -361,6 +370,8 @@ this.tcpCount = 0; this.udpCount = 0; this.uptime = 0; + this.appUptime = 0; + this.appStats = {threads: 0, mem: 0, uptime: 0}; this.xray = { state: State.Stop, errorMsg: "", version: "", color: "" }; if (data == null) { @@ -379,6 +390,8 @@ this.tcpCount = data.tcpCount; this.udpCount = data.udpCount; this.uptime = data.uptime; + this.appUptime = data.appUptime; + this.appStats = data.appStats; this.xray = data.xray; switch (this.xray.state) { case State.Running: -- cgit v1.2.3