Skip to content

Commit

Permalink
Merge pull request #17 from rwhalb/dev
Browse files Browse the repository at this point in the history
The version information for nDPI now appears in the 'About ntopng' pa…
  • Loading branch information
lucaderi committed May 11, 2015
2 parents 9fc1069 + 7ffd0a3 commit bf2d12f
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions scripts/lua/about.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,19 @@ print("<tr><th>Currently Logged User</th><td><i class='fa fa-user fa-lg'></i> ".
print("<tr><th>Uptime</th><td><i class='fa fa-clock-o fa-lg'></i> "..secondsToTime(info["uptime"]).."</td></tr>\n")
print("<tr><th colspan=2 align=center>&nbsp;</th></tr>\n")

v = string.split(info["version.ndpi"], " ")
if(v ~= nil) then
ndpi_vers = v[1]
v_all = string.sub(v[2], 2, -2)

vers = string.split(v_all, ":")
ndpi_hash = vers[1]
ndpi_date = vers[2]
print("<tr><th><a href=http://www.ntop.org/products/ndpi/ target=\"_blank\">nDPI</A></th><td> <A HREF=https://github.com/ntop/nDPI/commit/".. ndpi_hash ..">"..ndpi_date.."</A></td></tr>\n")
ndpi_ver = info["version.ndpi"]
if (ndpi_ver ~= nil) then
v = string.split(ndpi_ver, " ")
if (v ~= nil) then
ndpi_vers = v[1]
v_all = string.sub(v[2], 2, -2)
vers = string.split(v_all, ":")
ndpi_hash = vers[1]
ndpi_date = vers[2]
print("<tr><th><A href=http://www.ntop.org/products/ndpi/ target=\"_blank\">nDPI</a></th><td> <A HREF=https://github.com/ntop/nDPI/commit/".. ndpi_hash ..">"..ndpi_date.."</A></td></tr>\n")
else
print("<tr><th><A href=http://www.ntop.org/products/ndpi/ target=\"_blank\">nDPI</A></th><td> <A HREF=https://github.com/ntop/nDPI/>"..ndpi_ver.."</A></td></tr>\n")
end
end

print("<tr><th><a href=http://twitter.github.io/ target=\"_blank\"><i class=\'fa fa-twitter fa-lg'></i> Twitter Bootstrap</A></th><td>3.x</td></tr>\n")
Expand Down

0 comments on commit bf2d12f

Please sign in to comment.