diff options
author | Ted Trask <ttrask01@yahoo.com> | 2016-08-10 17:47:10 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2016-08-10 17:47:10 +0000 |
commit | 00508d5d1ff3125d378f9f7943d67107e31ca366 (patch) | |
tree | a48cb69f98b833fd60c4eef74f80f067c503cfa1 | |
parent | 245ffaee674551e9d1ae1ce8f2e54f34f75d5b06 (diff) | |
download | acf-tinydns-master.tar.bz2 acf-tinydns-master.tar.xz |
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | sampleconfig.conf | 2 | ||||
-rw-r--r-- | tinydns-config-html.lsp | 2 | ||||
-rw-r--r-- | tinydns-controller.lua | 2 | ||||
-rw-r--r-- | tinydns-edit-html.lsp | 4 | ||||
-rw-r--r-- | tinydns-listfiles-html.lsp | 2 | ||||
-rw-r--r-- | tinydns-model.lua | 46 | ||||
-rw-r--r-- | tinydns-status-html.lsp | 2 | ||||
-rw-r--r-- | tinydns-view-html.lsp | 8 |
9 files changed, 35 insertions, 35 deletions
@@ -7,7 +7,7 @@ APP_DIST=\ EXTRA_DIST=README Makefile config.mk -DISTFILES=$(APP_DIST) $(EXTRA_DIST) +DISTFILES=$(APP_DIST) $(EXTRA_DIST) TAR=tar diff --git a/sampleconfig.conf b/sampleconfig.conf index 46643de..4354ff4 100755 --- a/sampleconfig.conf +++ b/sampleconfig.conf @@ -15,7 +15,7 @@ Zme.org:ns3.you.org.iseng.me.org:2007082204:1200:2048:864000:3600::: =srv.me.org:208.74.141.33:3600:: =xproxy1.me.org:172.16.0.3:3600::in =xweb2.me.org:172.16.0.4:3600::in - + =www.me.org:208.74.141.33:3600:: =me.org:208.74.141.33:3600:: =test.me.org:208.74.141.33:3600:: diff --git a/tinydns-config-html.lsp b/tinydns-config-html.lsp index 2fdd23b..9cd679b 100644 --- a/tinydns-config-html.lsp +++ b/tinydns-config-html.lsp @@ -1,4 +1,4 @@ -<% local form, viewlibrary, page_info, session = ... +<% local form, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") %> diff --git a/tinydns-controller.lua b/tinydns-controller.lua index 1e1953e..ddf7a98 100644 --- a/tinydns-controller.lua +++ b/tinydns-controller.lua @@ -44,7 +44,7 @@ function mymodule.editfile(self) end, function(self, value) return self.model.set_filedetails(self, value, self.sessiondata.userinfo.userid) end, self.clientdata, "Save", "Edit Config File", "Config File Saved") - + if self.clientdata.linenumber and validator.is_integer(self.clientdata.linenumber) then config.value.filecontent.linenumber = self.clientdata.linenumber end diff --git a/tinydns-edit-html.lsp b/tinydns-edit-html.lsp index 212f222..660cab9 100644 --- a/tinydns-edit-html.lsp +++ b/tinydns-edit-html.lsp @@ -8,7 +8,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 editEntry = '<td> \ <a href="javascript:;"><img src="<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-add.png" width="16" height="16" title="Insert record"></a> \ @@ -34,7 +34,7 @@ entryTypes[2]=new Entry("&","Delegate subdomain",6,"Domain","IP address","Name server","Time to live","Timestamp","Location"); entryTypes[3]=new Entry("=","Host",5,"Host","IP address","Time to live","Timestamp","Location"); entryTypes[4]=new Entry("+","Host",5,"Host","IP address","Time to live","Timestamp","Location"); - entryTypes[5]=new Entry("@","Mail exchanger",7,"Domain","IP address","Mail exchanger","Distance","Time to live","Timestamp","Location"); + entryTypes[5]=new Entry("@","Mail exchanger",7,"Domain","IP address","Mail exchanger","Distance","Time to live","Timestamp","Location"); entryTypes[6]=new Entry("'","Text record",5,"Domain","Text Record","Time to live","Timestamp","Location"); entryTypes[7]=new Entry("^","Reverse record",5,"PTR","Domain name","Time to live","Timestamp","Location"); entryTypes[8]=new Entry("C","Canonical name",5,"Domain","Canonical name","Time to live","Timestamp","Location"); diff --git a/tinydns-listfiles-html.lsp b/tinydns-listfiles-html.lsp index 8a35d4f..8e21454 100644 --- a/tinydns-listfiles-html.lsp +++ b/tinydns-listfiles-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") %> diff --git a/tinydns-model.lua b/tinydns-model.lua index 16a95dd..908373d 100644 --- a/tinydns-model.lua +++ b/tinydns-model.lua @@ -18,32 +18,32 @@ local configfile = "/etc/conf.d/" .. processname local configdir = "/etc/"..processname local descr = { prefix={ - ['.']="Name server for your domain (NS + A + SOA)", - ['&']="Delegate subdomain (NS + A)", + ['.']="Name server for your domain (NS + A + SOA)", + ['&']="Delegate subdomain (NS + A)", ['=']="Host and reverse record (A + PTR)", ['+']="Host record (A, no PTR)", ['@']="Mail exchanger (MX)", ["'"]="Text record (TXT)", - ['^']="Reverse record (PTR)", - ['C']="Canonical name (CNAME)", - ['Z']="SOA record (SOA)", - [':']="Generic record", - ['%']="Client location", - ['S']="Service location (SRV)", - ['N']="Naming authority pointer (NAPTR)", + ['^']="Reverse record (PTR)", + ['C']="Canonical name (CNAME)", + ['Z']="SOA record (SOA)", + [':']="Generic record", + ['%']="Client location", + ['S']="Service location (SRV)", + ['N']="Naming authority pointer (NAPTR)", }, fieldlabels={ - ['.']={"Domain", "IP address", "Name server", "Time to live", "Timestamp", "Location", }, - ['&']={"Domain", "IP address", "Name server", "Time to live", "Timestamp", "Location", }, + ['.']={"Domain", "IP address", "Name server", "Time to live", "Timestamp", "Location", }, + ['&']={"Domain", "IP address", "Name server", "Time to live", "Timestamp", "Location", }, ['=']={"Host", "IP address", "Time to live", "Timestamp", "Location", }, ['+']={"Host", "IP address", "Time to live", "Timestamp", "Location", }, - ['@']={"Domain", "IP address", "Mail exchanger", "Distance", "Time to live", "Timestamp", "Location", }, - ['\'']={"Domain", "Text Record", "Time to live", "Timestamp", "Location", }, - ['^']={"PTR", "Domain name", "Time to live", "Timestamp", "Location", }, - ['C']={"Domain", "Canonical name", "Time to live", "Timestamp", "Location", }, - ['Z']={"Domain", "Primary name server", "Contact address", "Serial number", "Refresh time", "Retry time", "Expire time", "Minimum time", "Time to live", "Timestamp", "Location",}, - [':']={"Domain", "Record type", "Record data", "Time to live", "Timestamp", "Location", }, - ['%']={"Location", "IP prefix", }, + ['@']={"Domain", "IP address", "Mail exchanger", "Distance", "Time to live", "Timestamp", "Location", }, + ['\'']={"Domain", "Text Record", "Time to live", "Timestamp", "Location", }, + ['^']={"PTR", "Domain name", "Time to live", "Timestamp", "Location", }, + ['C']={"Domain", "Canonical name", "Time to live", "Timestamp", "Location", }, + ['Z']={"Domain", "Primary name server", "Contact address", "Serial number", "Refresh time", "Retry time", "Expire time", "Minimum time", "Time to live", "Timestamp", "Location",}, + [':']={"Domain", "Record type", "Record data", "Time to live", "Timestamp", "Location", }, + ['%']={"Location", "IP prefix", }, ['S']={"Domain Service", "IP address", "Server", "Port", "Priority", "Weight", "Time to live", "Timestamp", }, ['N']={"Domain", "Order", "Preference", "Flags", "Service", "Regular expression", "Replacement", "Time to live", "Timestamp", }, }, @@ -109,7 +109,7 @@ local function getallowedlist(self, userid) local auth = authenticator.get_subauth(self) local entry = auth.read_entry(self, authenticator.usertable, self.conf.prefix..self.conf.controller, userid) or "" for x in string.gmatch(entry, "([^,]+),?") do allowedlist[#allowedlist + 1] = x end - + -- also check to see if there are allowed files for this user's roles local userinfo = authenticator.get_userinfo(self, userid) -- add in the guest role @@ -158,11 +158,11 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS -function mymodule.get_startstop(self, clientdata) +function mymodule.get_startstop(self, clientdata) return modelfunctions.get_startstop(processname) end -function mymodule.startstop_service(self, startstop, action) +function mymodule.startstop_service(self, startstop, action) return modelfunctions.startstop_service(startstop, action) end @@ -226,11 +226,11 @@ function mymodule.getconfigobjects(self, file_name, userid, filter_type) -- Use only configs that has a valid prefix -- If function is called with some filter options... then show only the filtered values if ( not (filter_type) or ((filter_type) and (filter_type == filecontent_table.type)) ) - and (filecontent_table.label) + and (filecontent_table.label) then filecontent_table.filename = filename filecontent_table.linenumber = linenumber - + -- we're gonna add a reverse domain name to make it easier to sort local domain = {} for mt in string.gmatch(filecontent_table[1], "([^.]+)") do diff --git a/tinydns-status-html.lsp b/tinydns-status-html.lsp index 5ca1af4..f90b615 100644 --- a/tinydns-status-html.lsp +++ b/tinydns-status-html.lsp @@ -1,4 +1,4 @@ -<% local data, viewlibrary, page_info, session = ... +<% local data, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> diff --git a/tinydns-view-html.lsp b/tinydns-view-html.lsp index 472bae3..5e77f6e 100644 --- a/tinydns-view-html.lsp +++ b/tinydns-view-html.lsp @@ -1,4 +1,4 @@ -<% local view, viewlibrary, page_info = ... +<% local view, viewlibrary, page_info = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> @@ -8,7 +8,7 @@ html = require("acf.html") document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>'); } </script> - + <script type="text/javascript"> var last_phrase = ""; function filterPage(){ @@ -109,7 +109,7 @@ end <form id="filter-list">Filter: <input name="filter" id="filter" value="" maxlength="30" size="30" type="text"></form> <ul id="records"> <% local indent = {} -for j,entry in ipairs(view.value) do +for j,entry in ipairs(view.value) do if entry.type ~= '%' then indent = doListIndents(entry[1], indent) %> <ul><li style='margin-left:10px;' id='filename=<%= html.html_escape(entry.filename) %>;linenumber=<%= html.html_escape(entry.linenumber) %>'> @@ -126,7 +126,7 @@ for j,entry in ipairs(view.value) do </table> <% htmlviewfunctions.displayinfo(entry) %> </li></ul> - <% end + <% end end if #indent == 0 then %> </ul> |