summaryrefslogtreecommitdiffstats
path: root/interfaces-read-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'interfaces-read-html.lsp')
-rw-r--r--interfaces-read-html.lsp70
1 files changed, 35 insertions, 35 deletions
diff --git a/interfaces-read-html.lsp b/interfaces-read-html.lsp
index 54908cf..ac910a9 100644
--- a/interfaces-read-html.lsp
+++ b/interfaces-read-html.lsp
@@ -1,68 +1,68 @@
-<? local view, viewlibrary, pageinfo, session = ...
+<% local view, viewlibrary, pageinfo, session = ...
require("viewfunctions")
-?>
-<?
+%>
+<%
--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
io.write(html.cfe_unpack(view))
io.write("</span>")
--]]
-?>
+%>
-<? showoption = function(option)
- if option.errtxt or option.value ~= "" then ?>
- <TR><TD WIDTH='120px' STYLE='font-weight:bold;border:none;'><?= option.label ?></TD>
- <TD STYLE='border:none;'<? if option.errtxt then io.write("class='error'") end ?>>
- <?= string.gsub(tostring(option.value), "\n", "<BR>") ?>
- <? if option.errtxt then io.write("<BR>"..option.errtxt) end ?>
+<% showoption = function(option)
+ if option.errtxt or option.value ~= "" then %>
+ <TR><TD WIDTH='120px' STYLE='font-weight:bold;border:none;'><%= option.label %></TD>
+ <TD STYLE='border:none;'<% if option.errtxt then io.write("class='error'") end %>>
+ <%= string.gsub(tostring(option.value), "\n", "<BR>") %>
+ <% if option.errtxt then io.write("<BR>"..option.errtxt) end %>
</TD></TR>
- <? end ?>
-<? end ?>
+ <% end %>
+<% end %>
-<? displaycommandresults({"delete", "ifup", "ifdown"}, session) ?>
+<% displaycommandresults({"delete", "ifup", "ifdown"}, session) %>
-<? if viewlibrary and viewlibrary.dispatch_component then
+<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("status")
-end ?>
+end %>
<H1>Configured interfaces</H1>
<DL>
-<? for i,entry in ipairs(view.value) do
- local interface = entry.value ?>
- <DT><IMG SRC='/skins/static/tango/16x16/devices/network-wired.png' width='16' height='16'> <?= interface.name.value ?></DT><DD>
+<% for i,entry in ipairs(view.value) do
+ local interface = entry.value %>
+ <DT><IMG SRC='/skins/static/tango/16x16/devices/network-wired.png' width='16' height='16'> <%= interface.name.value %></DT><DD>
<TABLE STYLE='margin-bottom:10px'>
- <?
+ <%
showoption(interface.family)
if interface.method then showoption(interface.method) end
for name,option in pairs(interface) do
if name~="name" and name~="family" and name~="method" then
showoption(option)
end
- end ?>
+ end %>
<TR>
- <? if session.permissions.interfaces.update then ?>
- <A HREF='update?name=<?= interface.name.value ?>'>Edit </A>
- <? end
- if session.permissions.interfaces.delete then ?>
- <A HREF='delete?name=<?= interface.name.value ?>'>Delete </A>
- <? end
- if session.permissions.interfaces.ifup then ?>
- <A HREF='ifup?name=<?= interface.name.value ?>'>ifup </A>
- <? end
- if session.permissions.interfaces.ifdown then ?>
- <A HREF='ifdown?name=<?= interface.name.value ?>'>ifdown </A>
- <? end ?>
+ <% if session.permissions.interfaces.update then %>
+ <A HREF='update?name=<%= interface.name.value %>'>Edit </A>
+ <% end
+ if session.permissions.interfaces.delete then %>
+ <A HREF='delete?name=<%= interface.name.value %>'>Delete </A>
+ <% end
+ if session.permissions.interfaces.ifup then %>
+ <A HREF='ifup?name=<%= interface.name.value %>'>ifup </A>
+ <% end
+ if session.permissions.interfaces.ifdown then %>
+ <A HREF='ifdown?name=<%= interface.name.value %>'>ifdown </A>
+ <% end %>
</TR>
</TABLE>
-<? end ?>
+<% end %>
</DD>
</DL>
-<?
+<%
--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
io.write(html.cfe_unpack(form))
io.write("</span>")
--]]
-?>
+%>