diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-05-15 15:12:42 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-05-15 15:12:42 +0000 |
commit | a3965b138f8c37b32cc28889250d55e20124983f (patch) | |
tree | 158a140cab494c92f9a03f3fa953b45465a3ce14 /shorewall-config-html.lsp | |
parent | 2019d21baffd94e03608d28eba103150fb1ba1cd (diff) | |
download | acf-shorewall-a3965b138f8c37b32cc28889250d55e20124983f.tar.bz2 acf-shorewall-a3965b138f8c37b32cc28889250d55e20124983f.tar.xz |
Saving work for today.
Applying the component functionallity to acf-shorewall.
Cleaning up and rebuilding the view-files.
git-svn-id: svn://svn.alpinelinux.org/acf/shorewall/trunk@1121 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'shorewall-config-html.lsp')
-rw-r--r-- | shorewall-config-html.lsp | 85 |
1 files changed, 44 insertions, 41 deletions
diff --git a/shorewall-config-html.lsp b/shorewall-config-html.lsp index 41ca945..c644fec 100644 --- a/shorewall-config-html.lsp +++ b/shorewall-config-html.lsp @@ -1,4 +1,4 @@ -<? local form = ... +<? local form,viewlibrary = ... require("viewfunctions") --[[ DEBUG INFORMATION io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") @@ -23,36 +23,26 @@ local descr = { ['labels'] = { "ACTION", "SOURCE", "DEST", "PROTO", "DEST<BR>PORT", "SOURCE<BR>PORT(S)", "ORIGINAL<BR>DEST", "RATE<BR>LIMIT", "USER/<BR>GROUP", "MARK", }, ['width'] = { "100", "70", "70", "70", "100", } }, + ['masq'] = { + ['labels'] = { "INTERFACE", "SOURCE", "ADDRESS", "PROTO", "PORT(S)", "IPSEC", "MARK" }, + ['width'] = { "100", "70", "70", "70", "100", } + }, } ?> -<H1>SYSTEM INFO</H1> -<DL> -<? -local myform = form.status -local tags = { "status", "version", "autostart", } -displayinfo(myform,tags,"viewonly") -?> -</DL> +<? if viewlibrary and viewlibrary.dispatch_component then + viewlibrary.dispatch_component("statusbasic") +end ?> -<form name="cmd" action="" method="POST"> <? local myform = form.config ?> -<h1>CONFIGURATION</h1> -<H2>Advanced configuration</H2> -<H3>Parameters</H3> -<DL> -<? -local tags = { "params", "params_cmd", } -displayinfo(myform,tags) -?> -</DL> +<h1>GUIDED CONFIGURATION</h1> -<H3>Interfaces</H3> -<? local myform = "interfaces" ?> + +<H3>Defince zones</H3> +<? local myform = "zones" ?> <DL> <TABLE> <TR> - <TD style="padding:0px;margin:0px;" class="header" WIDTH="17"><IMG SRC='/static/tango/16x16/actions/go-down.png' width='16' height='16' alt></TD> <? for i=1,#descr[myform]['labels'] do ?> <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<? io.write(descr[myform]['width'][i] or "*") ?>"><? io.write(descr[myform]['labels'][i] or "") ?></TD> <? end ?> @@ -64,7 +54,6 @@ for i=1, #form.config[myform]['option'] do ?> <TR> - <TD><IMG SRC='/static/tango/16x16/actions/go-<? if i == #form.config[myform]['option'] then io.write("bottom") else io.write("down") end ?>.png' width='16' height='16' alt></TD> <? for ii=1,#descr[myform]['labels'] do ?> <TD style="padding-right:10px;text-align:left;border-bottom:1px solid #ccc"><? io.write(form.config[myform]['option'][i][ii] or "") ?></TD> <? end ?> @@ -80,12 +69,11 @@ end </TABLE> </DL> -<H3>Defince zones</H3> -<? local myform = "zones" ?> +<H3>Interfaces</H3> +<? local myform = "interfaces" ?> <DL> <TABLE> <TR> - <TD style="padding:0px;margin:0px;" class="header" WIDTH="17"><IMG SRC='/static/tango/16x16/actions/go-down.png' width='16' height='16' alt></TD> <? for i=1,#descr[myform]['labels'] do ?> <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<? io.write(descr[myform]['width'][i] or "*") ?>"><? io.write(descr[myform]['labels'][i] or "") ?></TD> <? end ?> @@ -97,7 +85,6 @@ for i=1, #form.config[myform]['option'] do ?> <TR> - <TD><IMG SRC='/static/tango/16x16/actions/go-<? if i == #form.config[myform]['option'] then io.write("bottom") else io.write("down") end ?>.png' width='16' height='16' alt></TD> <? for ii=1,#descr[myform]['labels'] do ?> <TD style="padding-right:10px;text-align:left;border-bottom:1px solid #ccc"><? io.write(form.config[myform]['option'][i][ii] or "") ?></TD> <? end ?> @@ -113,12 +100,12 @@ end </TABLE> </DL> + <h3>Default policy</h3> <? local myform = "policy" ?> <DL> <TABLE> <TR> - <TD style="padding:0px;margin:0px;" class="header" WIDTH="17"><IMG SRC='/static/tango/16x16/actions/go-down.png' width='16' height='16' alt></TD> <? for i=1,#descr[myform]['labels'] do ?> <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<? io.write(descr[myform]['width'][i] or "*") ?>"><? io.write(descr[myform]['labels'][i] or "") ?></TD> <? end ?> @@ -130,7 +117,6 @@ for i=1, #form.config[myform]['option'] do ?> <TR> - <TD><IMG SRC='/static/tango/16x16/actions/go-<? if i == #form.config[myform]['option'] then io.write("bottom") else io.write("down") end ?>.png' width='16' height='16' alt></TD> <? for ii=1,#descr[myform]['labels'] do ?> <TD style="padding-right:10px;text-align:left;border-bottom:1px solid #ccc"><? io.write(form.config[myform]['option'][i][ii] or "") ?></TD> <? end ?> @@ -153,7 +139,6 @@ local val = {1,2,3,4,5,6,7,8,10,} <DL> <TABLE> <TR> - <TD style="padding:0px;margin:0px;" class="header" WIDTH="17"><IMG SRC='/static/tango/16x16/actions/go-down.png' width='16' height='16' alt></TD> <? for k,i in pairs(val) do ?> <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<? io.write(descr[myform]['width'][i] or "*") ?>"><? io.write(descr[myform]['labels'][i] or "") ?></TD> <? end ?> @@ -165,7 +150,6 @@ for i=1, #form.config[myform]['option'] do ?> <TR> - <TD><IMG SRC='/static/tango/16x16/actions/go-<? if i == #form.config[myform]['option'] then io.write("bottom") else io.write("down") end ?>.png' width='16' height='16' alt></TD> <? for ii,vv in pairs(val) do ?> <TD style="padding-right:10px;text-align:left;border-bottom:1px solid #ccc"><? io.write(form.config[myform]['option'][i][ii] or "") ?></TD> <? end ?> @@ -181,16 +165,35 @@ end </TABLE> </DL> +<H3>Masq</H3> +<? local myform = "masq" ?> +<DL> +<TABLE> +<TR> +<? for i=1,#descr[myform]['labels'] do ?> + <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<? io.write(descr[myform]['width'][i] or "*") ?>"><? io.write(descr[myform]['labels'][i] or "") ?></TD> +<? end ?> + <TD class="header" WIDTH="60"><IMG SRC='/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"></TD> +</TR> -</form> +<? +for i=1, #form.config[myform]['option'] do +?> -<form name="cmd" action="<?= form.option.link ?>/<?= form.option.action ?>" method="POST"> -<H1>MANAGEMENT</H1> -<dl> -<? -local myform = form.config -local tags = { "check_cmd",} -displayinfo(myform,tags) +<TR> + <? for ii=1,#descr[myform]['labels'] do ?> + <TD style="padding-right:10px;text-align:left;border-bottom:1px solid #ccc"><? io.write(form.config[myform]['option'][i][ii] or "") ?></TD> + <? end ?> + <TD style="padding-right:0px;text-align:left;border-bottom:1px solid #ccc"> +<IMG SRC='/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"> +<IMG SRC='/static/tango/16x16/actions/list-remove.png' width='16' height='16' title="Remove this record"> +<IMG SRC='/static/tango/16x16/actions/document-properties.png' width='16' height='16' title="Edit this record"> +</TD> + </TR> +<? +end ?> -</dl> -</form> +</TABLE> +</DL> + + |