@@ -32,7 +32,6 @@ local database_creation_script = {
"CREATE TABLE weblog(sourcename character varying(40), clientip inet NOT NULL, clientuserid character varying(64) NOT NULL, logdatetime timestamp(3) without time zone NOT NULL, uri text NOT NULL, bytes bigint NOT NULL, reason text, score integer, shortreason text, badyesno int, deniedyesno int, bypassyesno int, wordloc text, goodwordloc text, selected boolean, id serial)",
"CREATE TABLE source (sourcename character varying(40) NOT NULL, method character varying(100) NOT NULL, userid character varying(32), passwd character varying(255), source character varying(255) NOT NULL, tzislocal boolean, enabled boolean)",
"CREATE TABLE usagestat (sourcename character varying(40) NOT NULL, date timestamp(0) without time zone NOT NULL, numrequest integer, numblock integer)",
"CREATE TABLE watchlist (clientuserid character varying(64) NOT NULL, expiredatetime timestamp(0) without time zone NOT NULL)",
"ALTER TABLE ONLY source ADD CONSTRAINT source_pkey PRIMARY KEY (sourcename)",
"CREATE INDEX dbhistlogdatetimeidx ON dbhistlog USING btree (logdatetime)",
"CREATE INDEX pubweblogclientdateidx ON pubweblog USING btree (logdatetime, clientuserid)",
...
...
@@ -46,7 +45,6 @@ local database_creation_script = {
"GRANT SELECT ON pubweblog_history TO "..DatabaseUser,
"GRANT SELECT, UPDATE, INSERT, DELETE ON source TO "..DatabaseUser,
"GRANT SELECT ON usagestat TO "..DatabaseUser,
"GRANT SELECT, UPDATE, INSERT, DELETE ON watchlist TO "..DatabaseUser,
result.sortby=cfe({type="select",value=config.sortbyor"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.minimumscoreor"0",label="Minimum Score",descr="Minimum Score to search for",seq=5})
result.window=cfe({value=config.windowor"5",label="Time Window",descr="Minutes of activity to display before and after selected block",seq=6})
result.watchdays=cfe({value=config.watchdaysor"14",label="Days to Watch",descr="Number of additional days to keep history for users in watchlist",seq=9})
result.purgedays=cfe({value=config.purgedaysor"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})
...
...
@@ -1340,10 +1191,6 @@ local function validateconfig(newconfig)