diff options
author | Ted Trask <ttrask01@yahoo.com> | 2011-09-08 20:27:38 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2011-09-08 20:27:38 +0000 |
commit | 70aa90177516e8c3c202b32df1e0cc9221d9e43e (patch) | |
tree | 38975bef44e3bfd5947bbad000447a5bc6dec2ed | |
parent | fc796543da9e9138dfc86348ddc6a1bbba65b799 (diff) | |
download | acf-weblog-70aa90177516e8c3c202b32df1e0cc9221d9e43e.tar.bz2 acf-weblog-70aa90177516e8c3c202b32df1e0cc9221d9e43e.tar.xz |
Change editconfig to use seq field
-rw-r--r-- | weblog-config-html.lsp | 4 | ||||
-rw-r--r-- | weblog-model.lua | 29 |
2 files changed, 17 insertions, 16 deletions
diff --git a/weblog-config-html.lsp b/weblog-config-html.lsp index 7107721..c427580 100644 --- a/weblog-config-html.lsp +++ b/weblog-config-html.lsp @@ -1,8 +1,8 @@ <% local form, viewlibrary, page_info = ... require("viewfunctions") %> + <H1><%= html.html_escape(form.label) %></H1> <% - local order = {"auditstart", "auditend", "badyesno", "sortby", "minimumscore", "window", "shorturi", "shortreason", "historydays", "watchdays", "purgedays" } - displayform(form, order, nil, page_info) + displayform(form, nil, nil, page_info, 2) %> diff --git a/weblog-model.lua b/weblog-model.lua index dd07f83..dd22723 100644 --- a/weblog-model.lua +++ b/weblog-model.lua @@ -1242,11 +1242,12 @@ function getweblog(activelog, clientuserid, starttime, endtime, clientip, badyes if (not starttime or starttime=="") and (not endtime or endtime=="") and config.auditstart~="" and config.auditend~="" then starttime = config.auditstart endtime = config.auditend + end - if config.badyesno=="true" then - badyesno = '1' - end + if config.badyesno=="true" then + badyesno = '1' end + if (not score or score=="") and config.minimumscore~="" then score = config.minimumscore end @@ -1316,17 +1317,17 @@ end function getconfig() local result = {} - result.auditstart = cfe({ value=config.auditstart or "", label="Audit Start Time" }) - result.auditend = cfe({ value=config.auditend or "", label="Audit End Time" }) - result.badyesno = cfe({ type="boolean", value=(config.badyesno == "1"), label="Display Suspect Records", descr="Show only records flagged as suspect on initial display" }) - result.minimumscore = cfe({ value=config.minimumscore or "0", label="Minimum Score", descr="Minimum Score to search for" }) - result.sortby = cfe({ type="select", value=config.sortby or "logdatetime", label="Sort By field", option={"logdatetime", "logdatetime DESC", "clientuserid", "clientuserid DESC", "clientip", "clientip DESC", "bytes", "bytes DESC", "score", "score DESC", "reason"} }) - result.window = cfe({ value=config.window or "5", label="Time Window", descr="Minutes of activity to display before and after selected block" }) - result.watchdays = cfe({ value=config.watchdays or "14", label="Days to Watch", descr="Number of additional days to keep history for users in watchlist" }) - result.purgedays = cfe({ value=config.purgedays or "30", label="Days before Purge", descr="Days to keep history, regardless of audit" }) - result.shorturi = cfe({ type="boolean", value=(config.shorturi == "true"), label="Truncate URLs", descr="You can limit the length of displayed URLs by enabling this option"}) - result.shortreason = cfe({ type="boolean", value=(config.shortreason == "true"), label="Short Reason", descr="Display a short reason (dansguardian only)"}) - result.stoponerror = cfe({ type="boolean", value=(config.stoponerror == "true"), label="Stop on Error", descr="Stop import of logs if an error is encountered"}) + result.auditstart = cfe({ value=config.auditstart or "", label="Audit Start Time", seq=1 }) + result.auditend = cfe({ value=config.auditend or "", label="Audit End Time", seq=2 }) + result.badyesno = cfe({ type="boolean", value=(config.badyesno == "1"), label="Display Suspect Records", descr="Show only records flagged as suspect on initial display", seq=3 }) + result.sortby = cfe({ type="select", value=config.sortby or "logdatetime", label="Sort By field", option={"logdatetime", "logdatetime DESC", "clientuserid", "clientuserid DESC", "clientip", "clientip DESC", "bytes", "bytes DESC", "score", "score DESC", "reason"}, seq=4 }) + result.minimumscore = cfe({ value=config.minimumscore or "0", label="Minimum Score", descr="Minimum Score to search for", seq=5 }) + result.window = cfe({ value=config.window or "5", label="Time Window", descr="Minutes of activity to display before and after selected block", seq=6 }) + result.watchdays = cfe({ value=config.watchdays or "14", label="Days to Watch", descr="Number of additional days to keep history for users in watchlist", seq=9 }) + result.purgedays = cfe({ value=config.purgedays or "30", label="Days before Purge", descr="Days to keep history, regardless of audit", seq=10 }) + result.shorturi = cfe({ type="boolean", value=(config.shorturi == "true"), label="Truncate URLs", descr="You can limit the length of displayed URLs by enabling this option", seq=7 }) + result.shortreason = cfe({ type="boolean", value=(config.shortreason == "true"), label="Short Reason", descr="Display a short reason (dansguardian only)", seq=8 }) + result.stoponerror = cfe({ type="boolean", value=(config.stoponerror == "true"), label="Stop on Error", descr="Stop import of logs if an error is encountered", seq=11}) return cfe({ type="group", value=result, label="Weblog Config" }) end |