blob: 0b377bb17dd1b7f2b1a20c7cfdf3ec3c91c36c7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<? local view = ... ?>
<h1>Interfaces file</h1>
<table border=1>
<? for i=0,table.maxn(view.iface) do
local iface=""
if i > 0 then do
j = view.iface[i]
iface = j.name.value ?>
<tr><td><?= j.name.value ?></td><td><?= j.method.value ?></td> <td><?
if ( j.method.value == "dhcp" ) then
io.write (j.hostname.value )
else
io.write ( j.address.value .. "/" .. j.netmask.value )
end ?></td><td><?
for x=3,4 do
a=view.actions.action[x]
io.write ("<a href=\"" .. view.actions.link .. a ..
"?iface=" .. j.name.value .. "\"" ..
">" .. a .. "</a>\n " )
end
?></td></tr><?
end
end ?>
<tr><td></td><td></td><td></td><td><?
a = view.actions.action[1]
io.write ("<a href=\"" .. view.actions.link .. a ..
"?iface=" .. iface .. "\"" ..
">" .. a .. "</a>\n " )
?></td></tr>
<?
end
?>
</table>
|