<% local form, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% function convertsize(size) if string.find(size, "k$") then return tonumber(string.match(size, "[%d.]*")) * 1024.0 elseif string.find(size, "M$") then return tonumber(string.match(size, "[%d.]*")) * 1024.0 * 1024.0 elseif string.find(size, "G$") then return tonumber(string.match(size, "[%d.]*")) + 1024.0 * 1024.0 * 1024.0 else return tonumber(string.match(size, "[%d.]*")) end end %> <% htmlviewfunctions.displaycommandresults({"delete"}, session) %> <% local header_level = htmlviewfunctions.displaysectionstart(form, page_info) %>
<% for i,file in ipairs(form.value) do %> <% end %> <% if viewlibrary.check_permission("createrrd") then %> <% end %>
Action Size Last Modified File
<% if viewlibrary.check_permission("delete") then %> Delete <% end %> <% if viewlibrary.check_permission("editgraphcfg") then io.write(html.link{value = "editgraphcfg?filename=" .. file.value.filename.value.."&redir="..page_info.orig_action, label="Edit " }) end %> <%= convertsize(file.value.filesize.value) %>b<%= html.html_escape(file.value.filesize.value) %> <%= html.html_escape(file.value.mtime.value) %> <%= html.html_escape(string.gsub(file.value.filename.value, "^.*/", "")) %>
<% io.write(html.link{value = "newgraphcfg", label="Create new graph " }) %>    
<% htmlviewfunctions.displaysectionend(header_level) %>