From fa17f273a1fed485afafa7492e84fa978a05bf31 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 20 Nov 2015 23:14:58 +0000 Subject: Replace convertsize function with orig_size Also changes listtemplates to return all details and fixes HTML view bug when template file is missing --- provisioning-listfiles-html.lsp | 16 +--------------- provisioning-listtemplates-html.lsp | 16 +--------------- provisioning-model.lua | 5 +++-- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/provisioning-listfiles-html.lsp b/provisioning-listfiles-html.lsp index 8269e65..5763912 100644 --- a/provisioning-listfiles-html.lsp +++ b/provisioning-listfiles-html.lsp @@ -3,20 +3,6 @@ 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 -%> -