From 734a01085de5f0b7a1ded8c6fe5a82daf2679abe Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sat, 20 Oct 2018 11:19:11 +0800 Subject: [PATCH] update x86/x64 index.html info --- package/lean/autocore/Makefile | 2 +- package/lean/autocore/files/index.htm | 44 +++------------------------ 2 files changed, 6 insertions(+), 40 deletions(-) diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile index bf29929360..829236a3ef 100644 --- a/package/lean/autocore/Makefile +++ b/package/lean/autocore/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=autocore PKG_VERSION:=1 -PKG_RELEASE:=15 +PKG_RELEASE:=16 include $(INCLUDE_DIR)/package.mk diff --git a/package/lean/autocore/files/index.htm b/package/lean/autocore/files/index.htm index 6cec12ca95..5832d59623 100644 --- a/package/lean/autocore/files/index.htm +++ b/package/lean/autocore/files/index.htm @@ -24,6 +24,8 @@ buffered = 0, shared = 0 } + + local mem_cached = luci.sys.exec("sed -e '/^Cached: /!d; s#Cached: *##; s# kB##g' /proc/meminfo") local swapinfo = sysinfo.swap or { total = 0, @@ -49,6 +51,7 @@ localtime = os.date(), loadavg = sysinfo.load or { 0, 0, 0 }, memory = meminfo, + memcached = mem_cached, swap = swapinfo, connmax = conn_max, conncount = conn_count, @@ -639,13 +642,7 @@ if (e = document.getElementById('memtotal')) e.innerHTML = progressbar( - Math.floor((info.memory.free + info.memory.buffered) / 1048576) + " <%:MB%>", - Math.floor(info.memory.total / 1048576) + " <%:MB%>" - ); - - if (e = document.getElementById('memfree')) - e.innerHTML = progressbar( - Math.floor(info.memory.free / 1048576) + " <%:MB%>", + Math.floor(((info.memory.free + info.memory.buffered) / 1048576) + (info.memcached / 1024)) + " <%:MB%>", Math.floor(info.memory.total / 1048576) + " <%:MB%>" ); @@ -682,7 +679,7 @@ - +
<%:Hostname%><%=luci.sys.hostname() or "?"%>
<%:Model%><%=pcdata(boardinfo.model or boardinfo.system or "?")%>
<%:CPU Temperature%><%=luci.sys.exec("sensors | grep 'Core 0' | cut -c10-24")%> @ <%=luci.sys.exec("grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'")%> MHz
<%:CPU Info%><%=luci.sys.exec("grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'")%> MHz <%=luci.sys.exec("sensors | grep 'Core 0' | cut -c10-24")%>
<%:Firmware Version%> <%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> / <%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>) @@ -699,7 +696,6 @@ -
<%:Total Available%>-
<%:Free%>-
<%:Buffered%>-
@@ -795,36 +791,6 @@
<%:Collecting data...%>
- -
- <%:Associated Stations%> - - - - - - - - - - - - - -
 <%:Network%><%:MAC-Address%><%:Host%><%:Signal%> / <%:Noise%><%:RX Rate%> / <%:TX Rate%>

<%:Collecting data...%>
-
<% end %> -<%- - local incdir = util.libpath() .. "/view/admin_status/index/" - if fs.access(incdir) then - local inc - for inc in fs.dir(incdir) do - if inc:match("%.htm$") then - include("admin_status/index/" .. inc:gsub("%.htm$", "")) - end - end - end --%> - <%+footer%>