diff options
author | Ted Trask <ttrask01@yahoo.com> | 2016-08-10 14:47:17 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2016-08-10 14:47:17 +0000 |
commit | 6f1ecd2037958ca57967ebe63e0bc2d72ba4b8b8 (patch) | |
tree | a766a4e30e546946a91fcc476efd9f159e239ef9 | |
parent | 747f16f8d9ca8f15fd78bd5071355c819f2b14c9 (diff) | |
download | acf-alpine-baselayout-6f1ecd2037958ca57967ebe63e0bc2d72ba4b8b8.tar.bz2 acf-alpine-baselayout-6f1ecd2037958ca57967ebe63e0bc2d72ba4b8b8.tar.xz |
Remove trailing whitespace
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cron-model.lua | 2 | ||||
-rw-r--r-- | health-network-html.lsp | 2 | ||||
-rw-r--r-- | health-networkstats-html.lsp | 2 | ||||
-rw-r--r-- | health-proc-html.lsp | 2 | ||||
-rw-r--r-- | health-storage-html.lsp | 6 | ||||
-rw-r--r-- | health-system-html.lsp | 2 | ||||
-rw-r--r-- | interfaces-definitions.lua | 8 | ||||
-rw-r--r-- | interfaces-model.lua | 20 | ||||
-rw-r--r-- | interfaces-read-html.lsp | 8 | ||||
-rw-r--r-- | interfaces-status-html.lsp | 2 | ||||
-rw-r--r-- | interfaces-update-html.lsp | 4 | ||||
-rw-r--r-- | logfiles-model.lua | 6 | ||||
-rw-r--r-- | logfiles-status-html.lsp | 8 | ||||
-rw-r--r-- | logfiles-tail-html.lsp | 6 | ||||
-rw-r--r-- | modules-status-html.lsp | 2 | ||||
-rw-r--r-- | password-model.lua | 2 | ||||
-rw-r--r-- | rc-model.lua | 4 | ||||
-rw-r--r-- | syslog-loginfo-html.lsp | 2 | ||||
-rw-r--r-- | syslog-model.lua | 20 |
20 files changed, 55 insertions, 55 deletions
@@ -18,7 +18,7 @@ APP_DIST=\ EXTRA_DIST=README Makefile config.mk -DISTFILES=$(APP_DIST) $(EXTRA_DIST) +DISTFILES=$(APP_DIST) $(EXTRA_DIST) TAR=tar diff --git a/cron-model.lua b/cron-model.lua index 00295ee..e2b1f2e 100644 --- a/cron-model.lua +++ b/cron-model.lua @@ -66,7 +66,7 @@ end -- PUBLIC FUNCTIONS function mymodule.get_startstop(self, clientdata) - return modelfunctions.get_startstop(processname) + return modelfunctions.get_startstop(processname) end function mymodule.startstop_service(self, startstop, action) diff --git a/health-network-html.lsp b/health-network-html.lsp index 57fa00f..df8ccee 100644 --- a/health-network-html.lsp +++ b/health-network-html.lsp @@ -1,4 +1,4 @@ -<% local view, viewlibrary, page_info, session = ... %> +<% local view, viewlibrary, page_info, session = ... %> <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> diff --git a/health-networkstats-html.lsp b/health-networkstats-html.lsp index 16956d3..91f59f3 100644 --- a/health-networkstats-html.lsp +++ b/health-networkstats-html.lsp @@ -1,4 +1,4 @@ -<% local view, viewlibrary, page_info, session = ... %> +<% local view, viewlibrary, page_info, session = ... %> <% json = require("json") %> <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> diff --git a/health-proc-html.lsp b/health-proc-html.lsp index b2c47ce..c58f38a 100644 --- a/health-proc-html.lsp +++ b/health-proc-html.lsp @@ -1,4 +1,4 @@ -<% local view, viewlibrary, page_info, session = ... %> +<% local view, viewlibrary, page_info, session = ... %> <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> diff --git a/health-storage-html.lsp b/health-storage-html.lsp index 7608f2f..379ad39 100644 --- a/health-storage-html.lsp +++ b/health-storage-html.lsp @@ -1,4 +1,4 @@ -<% local view, viewlibrary, page_info, session = ... %> +<% local view, viewlibrary, page_info, session = ... %> <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> @@ -47,7 +47,7 @@ else %> <% htmlviewfunctions.displaysectionend(header_level2) %> <% htmlviewfunctions.displaysectionstart(cfe({label="Harddrive capacity"}), page_info, header_level2) %> -<% if (view.value.hd) then +<% if (view.value.hd) then for name,hd in pairs(view.value.hd.value) do displaydisk(hd, name) end @@ -57,7 +57,7 @@ else %> <% htmlviewfunctions.displaysectionend(header_level2) %> <% htmlviewfunctions.displaysectionstart(cfe({label="RAM Disk capacity"}), page_info, header_level2) %> -<% if (view.value.ramdisk) then +<% if (view.value.ramdisk) then for name,ramdisk in pairs(view.value.ramdisk.value) do displaydisk(ramdisk, name) end diff --git a/health-system-html.lsp b/health-system-html.lsp index 804cb1d..e580d09 100644 --- a/health-system-html.lsp +++ b/health-system-html.lsp @@ -1,4 +1,4 @@ -<% local view, viewlibrary, page_info, session = ... %> +<% local view, viewlibrary, page_info, session = ... %> <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> diff --git a/interfaces-definitions.lua b/interfaces-definitions.lua index 089e64b..7f9684b 100644 --- a/interfaces-definitions.lua +++ b/interfaces-definitions.lua @@ -4,13 +4,13 @@ local mymodule = {} comment = {type="longtext", label="Comments", seq=2}, auto = {type="boolean", value=false, label="Auto bring-up", seq=3}, name = {label="Interface Name", seq=1}, - family = {type="select", label="Address Family", option={"inet", "ipx", "inet6"}, seq=4}, - method = {type="select", label="Method", option={"loopback", "static", "manual", "dhcp", "bootp", "ppp", "wvdial", "dynamic", "v4tunnel"}, seq=5}, + family = {type="select", label="Address Family", option={"inet", "ipx", "inet6"}, seq=4}, + method = {type="select", label="Method", option={"loopback", "static", "manual", "dhcp", "bootp", "ppp", "wvdial", "dynamic", "v4tunnel"}, seq=5}, ['pre-up'] = {type="longtext", label="'pre-up' actions", seq=100}, up = {type="longtext", label="'up' actions", seq=101}, - down = {type="longtext", label="'down' actions", seq=102}, + down = {type="longtext", label="'down' actions", seq=102}, ['post-down'] = {type="longtext", label="'post-down' actions", seq=103}, - other = {type="longtext", label="Other options (unsupported)", seq=104}, + other = {type="longtext", label="Other options (unsupported)", seq=104}, } mymodule.family_methods = { inet = {"loopback", "static", "manual", "dhcp", "bootp", "ppp", "wvdial"}, diff --git a/interfaces-model.lua b/interfaces-model.lua index ffcc376..2d9ff6d 100644 --- a/interfaces-model.lua +++ b/interfaces-model.lua @@ -1,4 +1,4 @@ --- acf model for /etc/network/interfaces +-- acf model for /etc/network/interfaces -- Copyright(c) 2007 N. Angelacos - Licensed under terms of GPL2 local mymodule = {} @@ -7,7 +7,7 @@ fs = require("acf.fs") format = require("acf.format") local servicename = "networking" -local filename = "/etc/network/interfaces" +local filename = "/etc/network/interfaces" local array @@ -25,7 +25,7 @@ local get_blank_iface = function () for name,table in pairs(iface.optional) do f[name] = cfe(table) end - + return cfe({ type="group", value=f, label="Interface description" }) end @@ -64,7 +64,7 @@ local appendentry = function (self, value, prefix) -- strip the prefix local str = string.gsub(value, "^" .. ( prefix or "" ), "") -- and append - return self .. str + return self .. str end local expandentry = function (self, prefix) @@ -89,7 +89,7 @@ local unpack_interfaces = function () local filecontent = fs.read_file(filename) -- make sure it has a terminating \n filecontent = string.gsub (filecontent, "([^\n])$", "%1\n") - + array = {} local comment = "" local auto = {} @@ -112,7 +112,7 @@ local unpack_interfaces = function () interface.method.value = method or "" elseif #array then -- it must be some kind of parameter - local param, val = + local param, val = string.match(line, "(%S+)%s*(.*)$") if (param) then local interface = array[#array].value @@ -199,7 +199,7 @@ local validate_interface = function (def) -- Determine the list of valid options optional = get_options(def.value.family.value, def.value.method.value) end - + if #def.value.name.value == 0 then def.value.name.errtxt = "The interface must have a name" success = false @@ -229,7 +229,7 @@ local list_interfaces = function() end ------------------------------------------------------------------------------- --- Public Methods +-- Public Methods ------------------------------------------------------------------------------- mymodule.get_all_interfaces = function(self, clientdata) @@ -253,7 +253,7 @@ mymodule.get_iface_by_name = function(self, clientdata) return ret end -mymodule.get_iface = function(self, clientdata) +mymodule.get_iface = function(self, clientdata) return get_blank_iface() end @@ -308,7 +308,7 @@ mymodule.delete_iface_by_name = function(self, deleterequest) unpack_interfaces() local idx = arrayindex(deleterequest.value.name.value) if idx then - table.remove (array, idx ) + table.remove (array, idx ) commit_interfaces() deleterequest.descr = "Interface deleted" else diff --git a/interfaces-read-html.lsp b/interfaces-read-html.lsp index de51424..8420674 100644 --- a/interfaces-read-html.lsp +++ b/interfaces-read-html.lsp @@ -1,4 +1,4 @@ -<% local view, viewlibrary, page_info, session = ... +<% local view, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> @@ -10,7 +10,7 @@ html = require("acf.html") <%= string.gsub(html.html_escape(tostring(option.value)), "\n", "<br/>") %> <% if option.errtxt then io.write("<br/>"..html.html_escape(option.errtxt)) end %> </td></tr> - <% end %> + <% end %> <% end %> <% htmlviewfunctions.displaycommandresults({"update", "delete", "ifup", "ifdown", "restart"}, session) %> @@ -46,8 +46,8 @@ end %> end %> </td></tr> <% end %> - - <% + + <% showoption(interface.family) if interface.method then showoption(interface.method) end for name,option in pairs(interface) do diff --git a/interfaces-status-html.lsp b/interfaces-status-html.lsp index 81fc5aa..2989d17 100644 --- a/interfaces-status-html.lsp +++ b/interfaces-status-html.lsp @@ -1,7 +1,7 @@ <% local view, viewlibrary, page_info, session = ... %> <% htmlviewfunctions = require("htmlviewfunctions") %> -<% +<% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) htmlviewfunctions.displayitem(view.value.filename) htmlviewfunctions.displayitem(view.value.ipaddr) diff --git a/interfaces-update-html.lsp b/interfaces-update-html.lsp index da0cde2..4a2df16 100644 --- a/interfaces-update-html.lsp +++ b/interfaces-update-html.lsp @@ -1,4 +1,4 @@ -<% local form, viewlibrary, page_info, session = ... +<% local form, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") json = require("json") @@ -28,7 +28,7 @@ end var optionalarray = []; if (methodoptions[family] && methodoptions[family][method]) optionalarray = methodoptions[family][method]; - + // show / hide all of the optional inputs $(".optional").each(function() { if (jQuery.inArray($(this).attr('name'), optionalarray)==-1) { diff --git a/logfiles-model.lua b/logfiles-model.lua index b5b08cf..4c3f566 100644 --- a/logfiles-model.lua +++ b/logfiles-model.lua @@ -1,4 +1,4 @@ --- acf model for displaying logfiles +-- acf model for displaying logfiles local mymodule = {} posix = require("posix") @@ -66,7 +66,7 @@ mymodule.get_filedetails = function(self, clientdata) retval.value.filename = cfe({ label="File name", key=true }) retval.value.grep = cfe({ label="Grep", key=true }) self.handle_clientdata(retval, clientdata) - + local success = false for i,file in ipairs(list_files()) do if file == retval.value.filename.value then @@ -150,7 +150,7 @@ end mymodule.get_delete = function() local filename = cfe({ type="select", label="File name", option=list_files() }) - + return cfe({ type="group", value={filename=filename}, label="Delete logfile" }) end diff --git a/logfiles-status-html.lsp b/logfiles-status-html.lsp index bf80391..c708029 100644 --- a/logfiles-status-html.lsp +++ b/logfiles-status-html.lsp @@ -7,13 +7,13 @@ document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>'); } </script> - + <script type="text/javascript"> if (typeof $.tablesorter == 'undefined') { document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"><\/script>'); } </script> - + <script type="text/javascript"> $(document).ready(function() { <% if viewlibrary.check_permission("delete") then %> @@ -23,7 +23,7 @@ <% end %> }); </script> - + <% htmlviewfunctions.displaycommandresults({"delete"}, session) %> <% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> @@ -38,7 +38,7 @@ <th>Size</th> <th>Last Modified</th> <th>File</th> - </tr> + </tr> </thead><tbody> <% local viewtype = cfe({type="hidden", value="stream"}) %> diff --git a/logfiles-tail-html.lsp b/logfiles-tail-html.lsp index 8f2184f..d3177bf 100644 --- a/logfiles-tail-html.lsp +++ b/logfiles-tail-html.lsp @@ -7,7 +7,7 @@ document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>'); } </script> - + <script type="text/javascript"> var currentoffset = -1024 var ID @@ -53,7 +53,7 @@ function handleerror(event, request, settings){ $(this).append("Error requesting page " + settings.url + "<br/>Perhaps the session has timed out."); $("#Stop").click(); - }; + }; $(function(){ $("#errtxt").ajaxError(handleerror); $("#Start").attr("disabled","disabled"); @@ -66,7 +66,7 @@ }); </script> -<% +<% local header_level = htmlviewfunctions.displaysectionstart(form, page_info) htmlviewfunctions.displayitem(form.value.filename) htmlviewfunctions.displayitem(form.value.size) diff --git a/modules-status-html.lsp b/modules-status-html.lsp index 871202e..167c1b5 100644 --- a/modules-status-html.lsp +++ b/modules-status-html.lsp @@ -1,4 +1,4 @@ -<% local view, viewlibrary, page_info, session = ... %> +<% local view, viewlibrary, page_info, session = ... %> <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> diff --git a/password-model.lua b/password-model.lua index a91f3db..9766cba 100644 --- a/password-model.lua +++ b/password-model.lua @@ -14,7 +14,7 @@ mymodule.read_password = function() end --setup so that it will compare password input -mymodule.update_password = function (self, pw) +mymodule.update_password = function (self, pw) local success = true if pw.value.password.value == "" or pw.value.password.value ~= pw.value.password_confirm.value then pw.value.password.errtxt = "Invalid or non matching password" diff --git a/rc-model.lua b/rc-model.lua index 35e69a5..312d06b 100644 --- a/rc-model.lua +++ b/rc-model.lua @@ -45,7 +45,7 @@ mymodule.read_runlevels = function(self, clientdata) break end end - + return cfe({ type="group", value=value, label="Service Runlevels"}) end @@ -86,7 +86,7 @@ mymodule.update_runlevels = function(self, service) end function mymodule.get_startstop(self, clientdata) - return modelfunctions.get_startstop(clientdata.servicename) + return modelfunctions.get_startstop(clientdata.servicename) end function mymodule.startstop_service(self, startstop, action) diff --git a/syslog-loginfo-html.lsp b/syslog-loginfo-html.lsp index 00450e0..57fde84 100644 --- a/syslog-loginfo-html.lsp +++ b/syslog-loginfo-html.lsp @@ -5,6 +5,6 @@ viewlibrary.dispatch_component("status") end %> -<% +<% htmlviewfunctions.displayitem(view, page_info) %> diff --git a/syslog-model.lua b/syslog-model.lua index 943903a..bc6a333 100644 --- a/syslog-model.lua +++ b/syslog-model.lua @@ -20,8 +20,8 @@ end local writeconfig = function (config) -- Set variables local variable = "SYSLOGD_OPTS" - local variabletranslator = { - logfile = "-O", + local variabletranslator = { + logfile = "-O", loglevel = "-l", smallerlogs = "-S", maxsize = "-s", @@ -41,7 +41,7 @@ local writeconfig = function (config) configdata[entry] = nil end end - + fs.write_file(configfile, format.update_ini_file(fs.read_file(configfile) or "", "", variable, '"'..format.table_to_opts(configdata) .. '"')) end @@ -49,24 +49,24 @@ local makeconfig = function(configcontent) local config = {} configcontent = configcontent or {} -- Next section selects which configurations we should show to the user - config["logfile"] = cfe({ + config["logfile"] = cfe({ label = "Log to given file", descr = "File must be in /var/log directory", value = configcontent["-O"] or "/var/log/messages", }) - config["loglevel"] = cfe({ + config["loglevel"] = cfe({ label = "Set local log level", value = configcontent["-l"] or "8", type = "select", option = getloglevels(), descr = "1=Quiet, ... , " .. table.maxn(getloglevels()) .. "=Debug", }) - config["smallerlogs"] = cfe({ + config["smallerlogs"] = cfe({ label = "Smaller logging output", value = (configcontent["-S"] == ""), type = "boolean", }) - config["maxsize"] = cfe ({ + config["maxsize"] = cfe ({ label = "Max size (KB) before rotate", descr = "Default=200KB, 0=off", value = configcontent["-s"] or "", @@ -76,13 +76,13 @@ local makeconfig = function(configcontent) descr = "Default=1, max=99, 0=purge", value = configcontent["-b"] or "", }) - config["localandnetworklog"] = cfe ({ + config["localandnetworklog"] = cfe ({ label = "Log locally and via network", value = (configcontent["-L"] == ""), type = "boolean", descr = "Default is network only if host[:PORT] is defined", }) - config["remotelogging"] = cfe ({ + config["remotelogging"] = cfe ({ label = "Log to IP or hostname on PORT", descr = "host[:PORT] - Default PORT=514/UDP", value = configcontent["-R"] or "", @@ -146,7 +146,7 @@ end -- PUBLIC FUNCTIONS function mymodule.get_startstop(self, clientdata) - return modelfunctions.get_startstop(processname) + return modelfunctions.get_startstop(processname) end function mymodule.startstop_service(self, startstop, action) |