From 7ffd0a3e7dfa8c9d26264ed02883afc3fe2f5e8b Mon Sep 17 00:00:00 2001 From: Ronald Henderson Date: Sun, 10 May 2015 07:17:55 -0400 Subject: [PATCH] The version information for nDPI now appears in the 'About ntopng' page for non-git builds --- scripts/lua/about.lua | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/scripts/lua/about.lua b/scripts/lua/about.lua index bfe68a493c59..d04b96b1dcee 100644 --- a/scripts/lua/about.lua +++ b/scripts/lua/about.lua @@ -95,15 +95,19 @@ print("Currently Logged User ". print("Uptime "..secondsToTime(info["uptime"]).."\n") print(" \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("nDPI "..ndpi_date.."\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("nDPI "..ndpi_date.."\n") + else + print("nDPI "..ndpi_ver.."\n") + end end print(" Twitter Bootstrap3.x\n")