From 0cd84aec11e0a54ab6e6beae46813e4e71ba27bd Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Mon, 31 Mar 2008 15:35:57 +0000 Subject: Added description to the different types. git-svn-id: svn://svn.alpinelinux.org/acf/opennhrp/trunk@865 ab2d0c66-481e-0410-8bed-d214d4d58bed --- opennhrp-model.lua | 2 ++ opennhrp-status-html.lsp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/opennhrp-model.lua b/opennhrp-model.lua index af5046f..f809283 100644 --- a/opennhrp-model.lua +++ b/opennhrp-model.lua @@ -75,6 +75,8 @@ local function opennhrpctl_show() if (string.lower(k) == "type") then local tooltip = string.match(v,"^.-:%s?(.*)") cmd_output_result_table[cnt]["Tooltip"] = type_status[tooltip] + local typestatus = string.lower(string.match(v,"^.-:%s?(.*)")) + cmd_output_result_table[cnt]['type_descr']=(type_status[typestatus] or "") end end end diff --git a/opennhrp-status-html.lsp b/opennhrp-status-html.lsp index 180c291..0d84bc1 100644 --- a/opennhrp-status-html.lsp +++ b/opennhrp-status-html.lsp @@ -65,7 +65,11 @@ for k,v in pairs(myform.option or {}) do if (k2) and not ((string.lower(k2) == "protocol-address") or (string.lower(k2) == "tooltip") or (string.lower(k2) == "interface")) then - io.write(""..k2..""..v2.."\n") + io.write(""..k2..""..v2) + if (string.lower(k2) == "type") then + io.write(" (" .. (v1['type_descr'] or "") .. ")") + end + io.write("\n") end end -- cgit v1.2.3