blob: 270e24c1f54a2c27b4f599a41accdff060c569e6 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<% local data, viewlibrary, page_info, session = ...
require("viewfunctions")
%>
<% displaycommandresults({"deletesource", "editsource", "testsource", "createsource", "importlogs"}, session) %>
<h1><%= html.html_escape(data.label) %></h1>
<DL>
<TABLE>
<TR style="background:#eee;font-weight:bold;">
<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Action</TD>
<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Name</TD>
<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Enabled</TD>
<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Source</TD>
<TD style="white-space:nowrap;text-align:left;" class="header">Method</TD>
</TR>
<% for i,source in ipairs(data.value) do %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
<%= html.link{value = "editsource?sourcename=" .. source.sourcename.."&redir="..page_info.orig_action, label="Edit "} %>
<%= html.link{value = "deletesource?sourcename=" .. source.sourcename, label="Delete "} %>
<%= html.link{value = "testsource?sourcename=" .. source.sourcename, label="Test "} %>
</TD>
<TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(source.sourcename) %></TD>
<TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(tostring(source.enabled)) %></TD>
<TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(source.source) %></TD>
<TD style="white-space:nowrap;" width="90%"><%= html.html_escape(source.method) %></TD>
</TR>
<% end %>
</TABLE>
<% if data.errtxt then %>
<p class='error'><%= html.html_escape(data.errtxt) %></p>
<% end %>
<% if #data.value == 0 then %>
<p>No sources found</p>
<% end %>
<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/createsource") %>">
<DT>Create New Source</DT>
<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
<DD><input class="submit" type="submit" value="Create"></DD>
</form>
<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/importlogs") %>">
<DT>Import Logs</DT>
<DD><input class="submit" type="submit" value="Import"></DD>
</form>
</DL>
|