summaryrefslogtreecommitdiffstats
path: root/cron-listjobs-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'cron-listjobs-html.lsp')
-rw-r--r--cron-listjobs-html.lsp37
1 files changed, 37 insertions, 0 deletions
diff --git a/cron-listjobs-html.lsp b/cron-listjobs-html.lsp
new file mode 100644
index 0000000..6f21673
--- /dev/null
+++ b/cron-listjobs-html.lsp
@@ -0,0 +1,37 @@
+<% local view, viewlibrary, page_info, session = ... %>
+<% require("viewfunctions") %>
+
+<% displaycommandresults({"editjob", "deletejob"}, session) %>
+<% displaycommandresults({"createjob"}, session, true) %>
+
+<% if viewlibrary and viewlibrary.dispatch_component then
+ viewlibrary.dispatch_component("status")
+end %>
+
+<H1>Cron Jobs</H1>
+<% for i,tabl in ipairs(view.value) do %>
+<H2><%= tabl.period %></H2>
+ <% if #tabl.jobs == 0 then %>
+No jobs
+ <% else %>
+<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="white-space:nowrap;text-align:left;" class="header">Job</TD>
+ </TR>
+ <% for i,job in ipairs(tabl.jobs) do %>
+ <TR>
+ <TD style="padding-right:20px;white-space:nowrap;">
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editjob?name="..job.."&redir="..page_info.orig_action, label="Edit "} %>
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletejob?name="..job, label="Delete "} %>
+ </TD>
+ <TD style="white-space:nowrap;"><%= string.gsub(job, "^.*/", "") %></TD>
+ </TR>
+ <% end %>
+</TABLE>
+ <% end %>
+<% end %>
+
+<% if viewlibrary and viewlibrary.dispatch_component and session.permissions.cron.createjob then
+ viewlibrary.dispatch_component("createjob")
+end %>