From f8b1afd4fed3f3df068fae35692bfff675b50cdc Mon Sep 17 00:00:00 2001
From: Mika Havela
Date: Tue, 1 Apr 2008 15:40:14 +0000
Subject: Saving work for today. Adding Expert tab to edit config (still
missing edit /etc/ipsec.conf)
git-svn-id: svn://svn.alpinelinux.org/acf/ipsec-tools/trunk@872 ab2d0c66-481e-0410-8bed-d214d4d58bed
---
ipsectools-status-html.lsp | 61 +++++++++++++++++++++++-----------------------
1 file changed, 30 insertions(+), 31 deletions(-)
(limited to 'ipsectools-status-html.lsp')
diff --git a/ipsectools-status-html.lsp b/ipsectools-status-html.lsp
index b76acfe..463474c 100644
--- a/ipsectools-status-html.lsp
+++ b/ipsectools-status-html.lsp
@@ -35,50 +35,49 @@ informationform(myform,tags)
PROGRAM SPECIFIC OPTIONS/INFORMATION
-
-Phase1
+Phase1 and Phase2 information
-
-
-
-local myform = form.status.show_isakmp2.value
+local myform = form.status.show_isakmp.option
for k,v in pairs(myform) do
- io.write("\t\n")
- io.write("\t \t" .. (v['Source']['value'] or "") .. " | \n")
- io.write("\t \t" .. (v['Destination']['value'] or "") .. " | \n")
- io.write("\t \t" .. (v['Cookies']['value'] or "") .. " | \n")
- io.write("\t \t" .. (v['St']['value'] or "") .. " | \n")
- io.write("\t \t" .. (v['S']['value'] or "") .. " | \n")
- io.write("\t \t" .. (v['V']['value'] or "") .. " | \n")
- io.write("\t \t" .. (v['E']['value'] or "") .. " | \n")
- io.write("\t \t" .. (v['Created']['value'] or "") .. " | \n")
- io.write("\t \t" .. (v['Phase2']['value'] or "") .. " | \n")
- io.write("\t
\n")
+ if (type(v) == "table") and (v.Destination) and (v.Destination.value) and (#v.Destination.value > 0) then
+ io.write("- ".. v['Destination']['value'] .. "
")
+ io.write("\n")
+ io.write("
")
+ local tags = {"Created","Source", "St", "S", "E",}
+ for k1,v1 in pairs(tags) do
+ io.write("" ..
+ (v[v1]['label'] or "") .. " | "..(v[v1]['value'] or ""))
+ if (v[v1]['descr']) and (#v[v1]['descr'] > 0) then io.write(" (".. v[v1]['descr'] .. ")") end
+ io.write(" |
")
+ end
+ io.write("
")
+ for k1,v1 in pairs(v['Phase2']['option']) do
+ io.write("" .. (v1['value'] or "") .. " ")
+ io.write(" |
")
+ end
+ io.write("
")
+ end
end
?>
-
-
-Phase2
+Policy information
-
-local myform = form.status.ip_xfrm_state
-io.write("\t\t" .. myform.value .. "
\n")
-?>
-
-
-Policy
-
-
local myform = form.status.ip_xfrm_policy
-io.write("\t\t" .. myform.value .. "
\n")
+io.write("- "..myform.label .."
\n")
+io.write(""..myform.value .."
\n")
?>
-
+
--[[ DEBUG INFORMATION
io.write("DEBUGGING
DEBUG INFO: CFE
")
--
cgit v1.2.3