local form,viewlibrary = ...
require("viewfunctions")
--[[ DEBUG INFORMATION
io.write("
DEBUGGING
DEBUG INFO: CFE
")
io.write(html.cfe_unpack(form))
io.write("")
--]]
local descr = {
['interfaces'] = {
['labels'] = { "ZONE", "INTERFACES", "BROADCAST", "OPTIONS" },
['width'] = { "100", "100", "100", "*" }
},
['zones'] = {
['labels'] = { "ZONE", "INTERFACES", "BROADCAST", "OPTIONS" },
['width'] = { "100", "100", "100", "*" }
},
['policy'] = {
['labels'] = { "SOURCE", "DEST", "POLICY", "LOG LEVEL", "LIMIT:BURST" },
['width'] = { "100", "100", "100", "100" }
},
['rules'] = {
['labels'] = { "ACTION", "SOURCE", "DEST", "PROTO", "DEST
PORT", "SOURCE
PORT(S)", "ORIGINAL
DEST", "RATE
LIMIT", "USER/
GROUP", "MARK", },
['width'] = { "100", "70", "70", "70", "100", }
},
['masq'] = {
['labels'] = { "INTERFACE", "SOURCE", "ADDRESS", "PROTO", "PORT(S)", "IPSEC", "MARK" },
['width'] = { "100", "70", "70", "70", "100", }
},
}
?>
if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("statusbasic")
end ?>
local myform = form.config ?>
GUIDED CONFIGURATION
Defince zones
local myform = "zones" ?>
for i=1,#descr[myform]['labels'] do ?>
end ?>
for i=1, #form.config[myform]['option'] do
?>
for ii=1,#descr[myform]['labels'] do ?>
io.write(form.config[myform]['option'][i][ii] or "") ?> |
end ?>
|
end
?>
Interfaces
local myform = "interfaces" ?>
for i=1,#descr[myform]['labels'] do ?>
end ?>
for i=1, #form.config[myform]['option'] do
?>
for ii=1,#descr[myform]['labels'] do ?>
io.write(form.config[myform]['option'][i][ii] or "") ?> |
end ?>
|
end
?>
Default policy
local myform = "policy" ?>
for i=1,#descr[myform]['labels'] do ?>
end ?>
for i=1, #form.config[myform]['option'] do
?>
for ii=1,#descr[myform]['labels'] do ?>
io.write(form.config[myform]['option'][i][ii] or "") ?> |
end ?>
|
end
?>
Rules
local myform = "rules"
local val = {1,2,3,4,5,6,7,8,10,}
?>
for k,i in pairs(val) do ?>
end ?>
for i=1, #form.config[myform]['option'] do
?>
for ii,vv in pairs(val) do ?>
io.write(form.config[myform]['option'][i][ii] or "") ?> |
end ?>
|
end
?>
Masq
local myform = "masq" ?>
for i=1,#descr[myform]['labels'] do ?>
end ?>
for i=1, #form.config[myform]['option'] do
?>
for ii=1,#descr[myform]['labels'] do ?>
io.write(form.config[myform]['option'][i][ii] or "") ?> |
end ?>
|
end
?>