mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 02:16:39 +00:00
Conditionally hides CPU/ram when not available
This commit is contained in:
parent
5962cd6293
commit
d3ef896564
1 changed files with 8 additions and 2 deletions
|
|
@ -21,8 +21,14 @@ if(info["pro.systemid"] and (info["pro.systemid"] ~= "")) then
|
|||
print("<tr><th nowrap>"..i18n("about.system_id").."</th><td>".. info["pro.systemid"].."</td></tr>\n")
|
||||
end
|
||||
|
||||
print("<tr><th nowrap>"..i18n("about.cpu_load").."</th><td><span id='cpu-load-pct'>...</span></td></tr>\n")
|
||||
print("<tr><th nowrap>"..i18n("about.ram_memory").."</th><td><span id='ram-used'></span></td></tr>\n")
|
||||
local system_host_stats = ntop.systemHostStat()
|
||||
|
||||
if system_host_stats["cpu_load"] ~= nil then
|
||||
print("<tr><th nowrap>"..i18n("about.cpu_load").."</th><td><span id='cpu-load-pct'>...</span></td></tr>\n")
|
||||
end
|
||||
if system_host_stats["mem_total"] ~= nil then
|
||||
print("<tr><th nowrap>"..i18n("about.ram_memory").."</th><td><span id='ram-used'></span></td></tr>\n")
|
||||
end
|
||||
|
||||
vers = string.split(info["version.git"], ":")
|
||||
if((vers ~= nil) and (vers[2] ~= nil)) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue